WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/index.php

    r4658 r5191  
    1616add_action( 'admin_head', 'index_js' );
    1717wp_enqueue_script('prototype');
     18wp_enqueue_script('interface');
    1819
    1920$title = __('Dashboard');
     
    5051if ( $comments ) {
    5152foreach ($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>');
    5354    edit_comment_link(__("Edit"), ' <small>(', ')</small>');
    5455    echo '</li>';
     
    6162
    6263<?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") ) :
     64if ( $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") ) :
    6465?>
    6566<div>
     
    99100<h3><?php _e('Blog Stats'); ?></h3>
    100101<?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");
    103105
    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?>
    106110
    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>
    116112</div>
    117113
     
    127123    <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li>
    128124<?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>
    130126<?php endif; ?>
    131127<?php if ( current_user_can('switch_themes') ) : ?>
Note: See TracChangeset for help on using the changeset viewer.