クラス WP_User::__get()
2014/12/11
WP_User::__get()
定義ファイル :/blog/wp-includes/capabilities.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public function __get( $key ) { if ( 'id' == $key ) { _deprecated_argument( 'WP_User->id', '2.1', __( 'Use <code>WP_User->ID</code> instead.' ) ); return $this->ID; } if ( isset( $this->data->$key ) ) { $value = $this->data->$key; } else { if ( isset( self::$back_compat_keys[ $key ] ) ) $key = self::$back_compat_keys[ $key ]; $value = get_user_meta( $this->ID, $key, true ); } if ( $this->filter ) { $value = sanitize_user_field( $key, $value, $this->ID, $this->filter ); } return $value; } |