Make WordPress Core


Ignore:
Timestamp:
11/14/2008 11:01:16 PM (17 years ago)
Author:
ryan
Message:

Notice fixes from DD32. see #7509

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r9694 r9699  
    178178
    179179    // Posts
    180     $num = number_format_i18n( $num_posts->publish );
     180    $num = isset($num_posts->publish) ? number_format_i18n( $num_posts->publish ) : 0;
    181181    if ( current_user_can( 'edit_posts' ) )
    182         $num = "<a href='edit.php'>$num</a>";
    183     echo '<td class="first b b-posts">'.$num.'</td>';
    184     echo '<td class="t posts">' . __ngettext( 'Post', 'Posts', $num_posts->publish ) . '</td>';
     182        $text = "<a href='edit.php'>$num</a>";
     183    else
     184        $text = $num;
     185    echo '<td class="first b b-posts">' . $text . '</td>';
     186    echo '<td class="t posts">' . __ngettext( 'Post', 'Posts', $num ) . '</td>';
    185187    /* TODO: Show status breakdown on hover
    186188    if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds.  Don't show if !current_user_can
Note: See TracChangeset for help on using the changeset viewer.