Handle deprecation of id in __set(). Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7f154ed6c3
commit
35d92b5e1e
@ -507,6 +507,12 @@ class WP_User {
|
||||
* @since 3.3.0
|
||||
*/
|
||||
function __set( $key, $value ) {
|
||||
if ( 'id' == $key ) {
|
||||
_deprecated_argument( 'WP_User->id', '2.1', __( 'Use <code>WP_User->ID</code> instead.' ) );
|
||||
$this->ID = $value;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->data->$key = $value;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user