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:
Ryan Boren 2011-08-04 15:42:38 +00:00
parent 7f154ed6c3
commit 35d92b5e1e
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}