WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/03/2010 07:08:30 PM (12 years ago)
Author:
ryan
Message:

Improve user listing performance. Props miqrogroove. see #11914

File:
1 edited

Legend:

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

    r13536 r13576  
    18251825
    18261826/**
    1827  * {@internal Missing Short Description}}
    1828  *
    1829  * @since unknown
    1830  *
    1831  * @param unknown_type $user_object
    1832  * @param unknown_type $style
    1833  * @param unknown_type $role
    1834  * @return unknown
    1835  */
    1836 function user_row( $user_object, $style = '', $role = '' ) {
     1827 * Generate HTML for a single row on the users.php admin panel.
     1828 *
     1829 * @since 2.1.0
     1830 *
     1831 * @param object $user_object
     1832 * @param string $style Optional. Attributes added to the TR element.  Must be sanitized.
     1833 * @param string $role Key for the $wp_roles array.
     1834 * @param int $numposts Optional. Post count to display for this user.  Defaults to zero, as in, a new user has made zero posts.
     1835 * @return string
     1836 */
     1837function user_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
    18371838    global $wp_roles;
    18381839
     
    18501851    if ( strlen( $short_url ) > 35 )
    18511852        $short_url = substr( $short_url, 0, 32 ).'...';
    1852     $numposts = get_usernumposts( $user_object->ID );
    18531853    $checkbox = '';
    18541854    // Check if the user for this row is editable
Note: See TracChangeset for help on using the changeset viewer.