WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/27/2010 12:22:29 AM (11 years ago)
Author:
scribu
Message:

Deprecate unused get_author_user_ids()and get_editable_authors(). See #14572

File:
1 edited

Legend:

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

    r15539 r15540  
    196196 * @since unknown
    197197 *
    198  * @return array List of user IDs.
    199  */
    200 function get_author_user_ids() {
    201     global $wpdb;
    202     if ( !is_multisite() )
    203         $level_key = $wpdb->get_blog_prefix() . 'user_level';
    204     else
    205         $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
    206 
    207     return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
    208 }
    209 
    210 /**
    211  * {@internal Missing Short Description}}
    212  *
    213  * {@internal Missing Long Description}}
    214  *
    215  * @since unknown
    216  *
    217  * @param int $user_id User ID.
    218  * @return array|bool List of editable authors. False if no editable users.
    219  */
    220 function get_editable_authors( $user_id ) {
    221     global $wpdb;
    222 
    223     $editable = get_editable_user_ids( $user_id );
    224 
    225     if ( !$editable ) {
    226         return false;
    227     } else {
    228         $editable = join(',', $editable);
    229         $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
    230     }
    231 
    232     return apply_filters('get_editable_authors', $authors);
    233 }
    234 
    235 /**
    236  * {@internal Missing Short Description}}
    237  *
    238  * {@internal Missing Long Description}}
    239  *
    240  * @since unknown
    241  *
    242198 * @param int $user_id User ID.
    243199 * @param bool $deprecated Not used.
Note: See TracChangeset for help on using the changeset viewer.