X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/ff81ee6e8304a1982a3ec4f5b134764a29d502cf..959f97d8ecd5c1668103a3e41c795486b944bc68:/wp-admin/index.php diff --git a/wp-admin/index.php b/wp-admin/index.php index f5852a39..15bc950c 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -1,8 +1,41 @@ + + @@ -11,162 +44,92 @@ $today = current_time('mysql', 1);

-
-

+
+

+ -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"); -$numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'"); +$num_posts = wp_count_posts( 'post' ); +$num_pages = wp_count_posts( 'page' ); -if ( $comments || $numcomments ) : -?> -
-

»

+$num_cats = wp_count_terms('category'); - -

»

- -
- - - - -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") ) : -?> -
-

»

-
    -post_title == '') - $post->post_title = sprintf(__('Post #%s'), $post->ID); - echo "
  • "; - the_title(); - echo '
  • '; +if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { + $pending_text = sprintf( __ngettext( 'There is %2$s post pending your review.', 'There are %2$s posts pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); +} else { + $pending_text = ''; } -?> -
-
- -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") ) : -?> -
-

-
    -post_title == '') - $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') )) . "
  • "; +$cats_text = sprintf( __ngettext( '%s category', '%s categories', $num_cats ), number_format_i18n( $num_cats ) ); +$tags_text = sprintf( __ngettext( '%s tag', '%s tags', $num_tags ), number_format_i18n( $num_tags ) ); +if ( current_user_can( 'manage_categories' ) ) { + $cats_text = "$cats_text"; + $tags_text = "$tags_text"; } -?> -
-
- -
-

-get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'"); -if (0 < $numposts) $numposts = number_format($numposts); +$post_type_text = implode(', ', $post_type_texts); -$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); -if (0 < $numcomms) $numcomms = number_format($numcomms); +// There is always a category +$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s' ), $post_type_text, $cats_text, $tags_text, $pending_text ); +$sentence = apply_filters( 'dashboard_count_sentence', $sentence, $post_type_text, $cats_text, $tags_text, $pending_text ); -$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -if (0 < $numcats) $numcats = number_format($numcats); ?> -

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

-
+

+$widgets_text"; +?> +

+ title, $widgets_text ); ?> + + + + +

- -
+ + +
-

+
-

+
- + -

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) ) { -?> -
-

»

- -
- -
  -
-
- + - +