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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-08-05 20:54:08 +00:00
parent 620f8e83fd
commit 902cbda424
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 );
}