__( 'Top Navigation', 'ml' ),) ); // helper functions if ( function_exists('wp_list_bookmarks') ) //used to check WP 2.1 or not $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' and post_status = 'publish'"); else $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'"); if (0 < $numposts) $numposts = number_format($numposts); $numcmnts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); if (0 < $numcmnts) $numcmnts = number_format($numcmnts); // ---------------- // For backward Compatiblity to older versions of WordPress add_filter( 'comments_template', 'legacy_comments' ); function legacy_comments( $file ) { if ( !function_exists('wp_list_comments') ) $file = TEMPLATEPATH . '/old-comments.php'; return $file; } if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); if ( function_exists('unregister_sidebar_widget') ) { unregister_sidebar_widget( __('Links') ); } if ( function_exists('register_sidebar_widget') ) { register_sidebar_widget(__('Links'), 'mistylook_ShowLinks'); } if ( function_exists('register_sidebar_widget') ) { register_sidebar_widget(__('About'), 'mistylook_ShowAbout'); } function mistylook_ShowAbout() {?> guid ); $base = $wpdb->get_blog_prefix( $post_blog_id ); $r = $wpdb->get_col( "SELECT comment_count FROM {$base}posts WHERE ID=$post_id" ); if( is_array( $r ) ) return $r[0] + $count; return $count; } add_filter('get_comments_number', 'ds_sitewide_tags_get_comments_num'); {?>