| @@ 1199-1202 (lines=4) @@ | ||
| 1196 | function add_settings_section($id, $title, $callback, $page) { |
|
| 1197 | global $wp_settings_sections; |
|
| 1198 | ||
| 1199 | if ( 'misc' == $page ) { |
|
| 1200 | _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); |
|
| 1201 | $page = 'general'; |
|
| 1202 | } |
|
| 1203 | ||
| 1204 | if ( 'privacy' == $page ) { |
|
| 1205 | _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); |
|
| @@ 271-280 (lines=10) @@ | ||
| 268 | * @return bool Whether the given user meta key is set. |
|
| 269 | */ |
|
| 270 | public function __isset( $key ) { |
|
| 271 | if ( 'id' == $key ) { |
|
| 272 | _deprecated_argument( 'WP_User->id', '2.1', |
|
| 273 | sprintf( |
|
| 274 | /* translators: %s: WP_User->ID */ |
|
| 275 | __( 'Use %s instead.' ), |
|
| 276 | '<code>WP_User->ID</code>' |
|
| 277 | ) |
|
| 278 | ); |
|
| 279 | $key = 'ID'; |
|
| 280 | } |
|
| 281 | ||
| 282 | if ( isset( $this->data->$key ) ) |
|
| 283 | return true; |
|
| @@ 301-310 (lines=10) @@ | ||
| 298 | * @return mixed Value of the given user meta key (if set). If `$key` is 'id', the user ID. |
|
| 299 | */ |
|
| 300 | public function __get( $key ) { |
|
| 301 | if ( 'id' == $key ) { |
|
| 302 | _deprecated_argument( 'WP_User->id', '2.1', |
|
| 303 | sprintf( |
|
| 304 | /* translators: %s: WP_User->ID */ |
|
| 305 | __( 'Use %s instead.' ), |
|
| 306 | '<code>WP_User->ID</code>' |
|
| 307 | ) |
|
| 308 | ); |
|
| 309 | return $this->ID; |
|
| 310 | } |
|
| 311 | ||
| 312 | if ( isset( $this->data->$key ) ) { |
|
| 313 | $value = $this->data->$key; |
|
| @@ 340-350 (lines=11) @@ | ||
| 337 | * @param mixed $value User meta value. |
|
| 338 | */ |
|
| 339 | public function __set( $key, $value ) { |
|
| 340 | if ( 'id' == $key ) { |
|
| 341 | _deprecated_argument( 'WP_User->id', '2.1', |
|
| 342 | sprintf( |
|
| 343 | /* translators: %s: WP_User->ID */ |
|
| 344 | __( 'Use %s instead.' ), |
|
| 345 | '<code>WP_User->ID</code>' |
|
| 346 | ) |
|
| 347 | ); |
|
| 348 | $this->ID = $value; |
|
| 349 | return; |
|
| 350 | } |
|
| 351 | ||
| 352 | $this->data->$key = $value; |
|
| 353 | } |
|