| 38 | /* |
| 39 | * Until a proper _deprecated_option() function can be introduced, |
| 40 | * redirect requests to deprecated keys to the new, correct ones. |
| 41 | */ |
| 42 | $deprecated_keys = array( |
| 43 | 'blacklist_keys' => 'blocklist_keys', |
| 44 | 'comment_whitelist' => 'comment_previously_approved', |
| 45 | ); |
| 46 | |
| 47 | if ( ! wp_installing() && isset( $deprecated_keys[ $option ] ) ) { |
| 48 | _deprecated_argument( |
| 49 | __FUNCTION__, |
| 50 | '5.5.0', |
| 51 | sprintf( |
| 52 | /* translators: 1: Deprecated option key, 2: New option key. */ |
| 53 | __( 'The "%1$s" option key has been renamed to "%2$s".' ), |
| 54 | $option, |
| 55 | $deprecated_keys[ $option ] |
| 56 | ) |
| 57 | ); |
| 58 | return get_option( $deprecated_keys[ $option ], $default ); |
| 59 | } |
| 60 | |
| 339 | /* |
| 340 | * Until a proper _deprecated_option() function can be introduced, |
| 341 | * redirect requests to deprecated keys to the new, correct ones. |
| 342 | */ |
| 343 | $deprecated_keys = array( |
| 344 | 'blacklist_keys' => 'blocklist_keys', |
| 345 | 'comment_whitelist' => 'comment_previously_approved', |
| 346 | ); |
| 347 | |
| 348 | if ( ! wp_installing() && isset( $deprecated_keys[ $option ] ) ) { |
| 349 | _deprecated_argument( |
| 350 | __FUNCTION__, |
| 351 | '5.5.0', |
| 352 | sprintf( |
| 353 | /* translators: 1: Deprecated option key, 2: New option key. */ |
| 354 | __( 'The "%1$s" option key has been renamed to "%2$s".' ), |
| 355 | $option, |
| 356 | $deprecated_keys[ $option ] |
| 357 | ) |
| 358 | ); |
| 359 | return update_option( $deprecated_keys[ $option ], $value, $autoload ); |
| 360 | } |
| 361 | |
| 526 | /* |
| 527 | * Until a proper _deprecated_option() function can be introduced, |
| 528 | * redirect requests to deprecated keys to the new, correct ones. |
| 529 | */ |
| 530 | $deprecated_keys = array( |
| 531 | 'blacklist_keys' => 'blocklist_keys', |
| 532 | 'comment_whitelist' => 'comment_previously_approved', |
| 533 | ); |
| 534 | |
| 535 | if ( ! wp_installing() && isset( $deprecated_keys[ $option ] ) ) { |
| 536 | _deprecated_argument( |
| 537 | __FUNCTION__, |
| 538 | '5.5.0', |
| 539 | sprintf( |
| 540 | /* translators: 1: Deprecated option key, 2: New option key. */ |
| 541 | __( 'The "%1$s" option key has been renamed to "%2$s".' ), |
| 542 | $option, |
| 543 | $deprecated_keys[ $option ] |
| 544 | ) |
| 545 | ); |
| 546 | return add_option( $deprecated_keys[ $option ], $value, $deprecated, $autoload ); |
| 547 | } |
| 548 | |