WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/21/2006 11:40:16 PM (12 years ago)
Author:
markjaquith
Message:

Categories with zero posts and posts with no comments no longer link to those empty views in the admin. fixes #3493

File:
1 edited

Legend:

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

    r4658 r4659  
    761761    $category->category_count = number_format( $category->category_count );
    762762    $category->link_count = number_format( $category->link_count );
     763    $posts_count = ( $category->category_count > 0 ) ? "<a href='edit.php?cat=$category->cat_ID'>$category->category_count</a>" : $category->category_count;
    763764    return "<tr id='cat-$category->cat_ID'$class>
    764765        <th scope='row' style='text-align: center'>$category->cat_ID</th>
    765766        <td>" . ( $name_override ? $name_override : $pad . ' ' . $category->cat_name ) . "</td>
    766767        <td>$category->category_description</td>
    767         <td align='center'><a href='edit.php?cat=$category->cat_ID'>$category->category_count</a></td>
     768        <td align='center'>$posts_count</td>
    768769        <td align='center'>$category->link_count</td>
    769770        <td>$edit</td>\n\t</tr>\n";
Note: See TracChangeset for help on using the changeset viewer.