Notice fixes from DD32. see #7509

git-svn-id: https://develop.svn.wordpress.org/trunk@9699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-11-14 23:01:16 +00:00
parent f6f653c05b
commit 2dc15c5a81
13 changed files with 101 additions and 65 deletions
+6 -4
View File
@@ -177,11 +177,13 @@ function wp_dashboard_right_now() {
echo "\n\t".'<tr class="first">';
// Posts
$num = number_format_i18n( $num_posts->publish );
$num = isset($num_posts->publish) ? number_format_i18n( $num_posts->publish ) : 0;
if ( current_user_can( 'edit_posts' ) )
$num = "<a href='edit.php'>$num</a>";
echo '<td class="first b b-posts">'.$num.'</td>';
echo '<td class="t posts">' . __ngettext( 'Post', 'Posts', $num_posts->publish ) . '</td>';
$text = "<a href='edit.php'>$num</a>";
else
$text = $num;
echo '<td class="first b b-posts">' . $text . '</td>';
echo '<td class="t posts">' . __ngettext( 'Post', 'Posts', $num ) . '</td>';
/* TODO: Show status breakdown on hover
if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can
$post_type_texts[] = '<a href="edit-pages.php">'.sprintf( __ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>';