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