mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
620f8e83fd
commit
902cbda424
@ -462,6 +462,10 @@ class WP_User {
|
|||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
function __isset( $key ) {
|
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 );
|
return isset( $this->data->$key );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user