Changeset 22248
- Timestamp:
- 10/16/2012 08:05:40 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r22118 r22248 460 460 * @access public 461 461 * 462 * @param int|string $id User's ID462 * @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB. 463 463 * @param string $name Optional. User's username 464 464 * @param int $blog_id Optional Blog ID, defaults to current blog. … … 476 476 $prefix . 'usersettingstime' => $prefix . 'user-settings-time', 477 477 ); 478 } 479 480 if ( is_a( $id, 'WP_User' ) ) { 481 $this->init( $id->data, $blog_id ); 482 return; 483 } elseif ( is_object( $id ) ) { 484 $this->init( $id, $blog_id ); 485 return; 478 486 } 479 487 -
trunk/wp-includes/user.php
r22124 r22248 560 560 561 561 $this->results = $r; 562 } elseif ( 'all' == $qv['fields'] ) { 563 foreach ( $this->results as $key => $user ) { 564 $this->results[ $key ] = new WP_User( $user ); 565 } 562 566 } 563 567 }
Note: See TracChangeset
for help on using the changeset viewer.