Make WordPress Core

Changeset 27274


Ignore:
Timestamp:
02/25/2014 08:10:34 PM (11 years ago)
Author:
nacin
Message:

Add exclude and include to wp_list_authors().

props patricknami.
fixes #9902.

File:
1 edited

Legend:

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

    r26868 r27274  
    317317 * <li>html (bool) (true): Whether to list the items in html form or plaintext.
    318318 * </li>
     319 * <li>exclude (array): Array of user IDs to explicitly exclude.</li>
     320 * <li>include (array): Array of user IDs to explicitly include.</li>
    319321 * </ul>
    320322 *
     
    332334        'show_fullname' => false, 'hide_empty' => true,
    333335        'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true,
    334         'style' => 'list', 'html' => true
     336        'style' => 'list', 'html' => true, 'exclude' => '', 'include' => ''
    335337    );
    336338
     
    340342    $return = '';
    341343
    342     $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) );
     344    $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number', 'exclude', 'include' ) );
    343345    $query_args['fields'] = 'ids';
    344346    $authors = get_users( $query_args );
Note: See TracChangeset for help on using the changeset viewer.