X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/022dfbbbe3215917d84708eb09acca93b21ae9e0..refs/tags/wordpress-2.3.2:/wp-admin/index.php diff --git a/wp-admin/index.php b/wp-admin/index.php index 734b349e..2447e2fe 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -1,35 +1,36 @@ + +
-

+

-items) && 0 != count($rss->items) ) { -?> - - + get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5"); @@ -38,18 +39,18 @@ $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE commen if ( $comments || $numcomments ) : ?>
-

»

+

»' ), 'edit-comments.php' ); ?>

-

»

+

    -' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '' . get_the_title($comment->comment_post_ID) . ''); - edit_comment_link(__("Edit"), ' (', ')'); + edit_comment_link(__("Edit"), ' (', ')'); echo ''; } } @@ -58,12 +59,11 @@ foreach ($comments as $comment) {
- get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) : +if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) : ?>
-

»

+

»' ), 'edit.php' ); ?>

    get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt > '$today' ORDER BY post_date ASC") ) : -?> +if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'future' ORDER BY post_date ASC") ) : +?>

      @@ -90,7 +90,7 @@ foreach ($scheduled as $post) { $post->post_title = sprintf(__('Post #%s'), $post->ID); echo "
    • " . sprintf(__('%1$s in %2$s'), "$post->post_title", human_time_diff( current_time('timestamp', 1), strtotime($post->post_date_gmt. ' GMT') )) . "
    • "; } -?> +?>
    @@ -98,70 +98,43 @@ foreach ($scheduled as $post) {

    get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'"); -if (0 < $numposts) $numposts = number_format($numposts); - -$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); -if (0 < $numcomms) $numcomms = number_format($numcomms); +$numposts = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); +$numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); +$numcats = wp_count_terms('category'); +$numtags = wp_count_terms('post_tag'); -$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -if (0 < $numcats) $numcats = number_format($numcats); +$post_str = sprintf(__ngettext('%1$s post', '%1$s posts', $numposts), number_format_i18n($numposts), 'edit.php'); +$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), number_format_i18n($numcomms), 'edit-comments.php'); +$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), number_format_i18n($numcats), 'categories.php'); +$tag_str = sprintf(__ngettext('%1$s tag', '%1$s tags', $numtags), number_format_i18n($numtags)); ?> -

    posts and %3$s comments, contained within %5$s categories.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?>

    + +

-

-

+

documentation or visit the support forums."); ?>

-

great documentation or if that doesn't help visit the support forums."); ?>

-items) && 0 != count($rss->items) ) { -?> -

-items = array_slice($rss->items, 0, 3); -foreach ($rss->items as $item ) { -?> -

'>

-

- +
+
-items) && 0 != count($rss->items) ) { -?> -
-

»

-
    -items = array_slice($rss->items, 0, 20); -foreach ($rss->items as $item ) { -?> -
  • '>
  • - -
-
-