* * * Jan * [..] * * * year * month post count * [..] * * [..] * */ function BX_archive() { global $month, $wpdb; $arcresults = $wpdb->get_results('SELECT DISTINCT YEAR(post_date) AS year FROM ' .$wpdb->posts ." WHERE post_status='publish' AND post_type='post' AND post_password='' " ."ORDER BY post_date DESC "); if ($arcresults) { echo '', "\n"; echo '', "\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '', "\n"; foreach ($arcresults as $arcresult) { echo '', "\n"; $yearurl = get_year_link($arcresult->year); $tdArray = array ("") ; for ($n=1;$n<13;$n++) { $tdArray[]= ''; } $arcresults2 = $wpdb->get_results('SELECT DISTINCT MONTH(post_date) AS month, count(ID) as monthposts FROM ' .$wpdb->posts ." WHERE YEAR(post_date)='$arcresult->year' AND post_status='publish' AND post_type='post' AND post_password='' " ."GROUP BY MONTH(post_date) ORDER BY post_date DESC"); foreach ($arcresults2 as $arcresult2) { $monthurl = get_month_link($arcresult->year, $arcresult2->month); $tdArray[$arcresult2->month]=''; } for ($n=0;$n<13;$n++) { echo $tdArray[$n],"\n"; } echo '', "\n"; } echo '
 Jan.Feb.Mar.Apr.May.Jun.Jul.Aug.Sep.Oct.Nov.Dec.
" . get_archives_link($yearurl, $arcresult->year, '') . " '. get_archives_link($monthurl, $arcresult2->monthposts, '') . '
', "\n"; } } /** * Function BX_excluded_pages() * ------------------------------------------------ * Returns the Bito default pages that are excluded * from the navigation in the sidebar */ function BX_excluded_pages() { $page_paths = array('archives', 'about'); foreach ($page_paths as $page_path) { $page = get_page_by_path($page_path); if ($page) $exclude .= $page->ID . ','; } return rtrim($exclude, ','); } /** * Function BX_remove_p * --------------------------------------------------- * Removes the opening

and closing

from $text * Used for the short about text on the front page */ function BX_remove_p($text) { $text = apply_filters('the_content', $text); $text = preg_replace("/^[\t|\n]?

(.*)/","\\1",$text); // opening

$text = preg_replace("/(.*)<\/p>[\t|\n]$/","\\1",$text); // closing

return $text; } ?>