WordPress.org

Make WordPress Core

Ticket #760: authordrafts_users.diff

File authordrafts_users.diff, 1.2 KB (added by coffee2code, 10 years ago)
  • users.php

    old new  
    179179        <th><?php _e('Website') ?></th> 
    180180        <th><?php _e('Level') ?></th> 
    181181        <th><?php _e('Posts') ?></th> 
     182        <th><?php _e('Drafts') ?></th> 
    182183        <th>&nbsp;</th> 
    183184        </tr> 
    184185        <?php 
     
    197198                $style = ('class="alternate"' == $style) ? '' : 'class="alternate"'; 
    198199                $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = $user->ID and post_status = 'publish'"); 
    199200                if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='" . __('View posts') . "'>$numposts</a>"; 
     201                $numdrafts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = $user->ID AND post_status = 'draft'"); 
    200202                echo " 
    201203<tr $style> 
    202204        <td align='center'>$user_data->ID</td> 
     
    211213        if (($user_level >= 2) and ($user_level > ($user_data->user_level + 1))) 
    212214                echo " <a href=\"users.php?action=promote&amp;id=".$user_data->ID."&amp;prom=up\">+</a> "; 
    213215        echo "</td><td align='right'>$numposts</td>"; 
     216        echo "<td align='right'>$numdrafts</td>"; 
    214217        echo '<td>'; 
    215218        if (($user_level >= 2) and ($user_level > $user_data->user_level)) 
    216219                echo "<a href='user-edit.php?user_id=$user_data->ID' class='edit'>".__('Edit')."</a>";