Handle id back compat in isset magic method. see #15458

git-svn-id: https://develop.svn.wordpress.org/trunk@18515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-08-05 20:54:08 +00:00
parent f9becd5d16
commit afe083447f
1 changed files with 4 additions and 0 deletions

View File

@ -462,6 +462,10 @@ class WP_User {
* @since 3.3.0
*/
function __isset( $key ) {
if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1', __( 'Use <code>WP_User->ID</code> instead.' ) );
$key = 'ID';
}
return isset( $this->data->$key );
}