Changes in trunk/wp-admin/index.php [5191:4658]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/index.php
r5191 r4658 16 16 add_action( 'admin_head', 'index_js' ); 17 17 wp_enqueue_script('prototype'); 18 wp_enqueue_script('interface');19 18 20 19 $title = __('Dashboard'); … … 51 50 if ( $comments ) { 52 51 foreach ($comments as $comment) { 53 echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . apply_filters('the_title', get_the_title($comment->comment_post_ID)) . '</a>');52 echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>'); 54 53 edit_comment_link(__("Edit"), ' <small>(', ')</small>'); 55 54 echo '</li>'; … … 62 61 63 62 <?php 64 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") ) :63 if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) : 65 64 ?> 66 65 <div> … … 100 99 <h3><?php _e('Blog Stats'); ?></h3> 101 100 <?php 102 $numposts = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); 103 $numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); 104 $numcats = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); 101 $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); 102 if (0 < $numposts) $numposts = number_format($numposts); 105 103 106 $post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), number_format($numposts), 'edit.php'); 107 $comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), number_format($numcomms), 'edit-comments.php'); 108 $cat_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), number_format($numcats), 'categories.php'); 104 $numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); 105 if (0 < $numcomms) $numcomms = number_format($numcomms); 106 107 $numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); 108 if (0 < $numcats) $numcats = number_format($numcats); 109 109 ?> 110 <p><?php 111 $post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), $numposts, 'edit.php'); 112 $comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), $numcomms, 'edit-comments.php'); 113 $cat_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), $numcats, 'categories.php'); 110 114 111 <p><?phpprintf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p>115 printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p> 112 116 </div> 113 117 … … 123 127 <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li> 124 128 <?php if ( current_user_can('manage_links') ) : ?> 125 <li><a href="link-add.php"><?php _e('Add a link to your blogroll'); ?></a></li>129 <li><a href="link-add.php"><?php _e('Add a bookmark to your blogroll'); ?></a></li> 126 130 <?php endif; ?> 127 131 <?php if ( current_user_can('switch_themes') ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.