Handle deprecation of id in __set(). Props scribu. see #15458
git-svn-id: http://svn.automattic.com/wordpress/trunk@18506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ba9ae611eb
commit
8611d30e5e
|
@ -507,6 +507,12 @@ class WP_User {
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
function __set( $key, $value ) {
|
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;
|
$this->data->$key = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue