Make WordPress Core


Ignore:
Timestamp:
08/24/2011 07:32:59 PM (10 years ago)
Author:
ryan
Message:

Introduce metadata_exists(), WP_User::get_data_by(), WP_User::get(), WP_User::has_prop(). Don't fill user objects with meta. Eliminate data duplication in cache and memory. Props scribu. see #15458

File:
1 edited

Legend:

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

    r17032 r18597  
    227227    $user = new WP_User( $user_id );
    228228
    229     $user_contactmethods = _wp_get_user_contactmethods( $user );
    230     foreach ($user_contactmethods as $method => $name) {
    231         if ( empty( $user->{$method} ) )
    232             $user->{$method} = '';
    233     }
    234 
    235     if ( empty($user->description) )
    236         $user->description = '';
    237 
    238     $user = sanitize_user_object($user, 'edit');
     229    $user->filter = 'edit';
    239230
    240231    return $user;
Note: See TracChangeset for help on using the changeset viewer.