mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-08 06:34:34 +00:00
General: Rename the $new_whitelist_options global variable.
This change renames `$new_whitelist_options` to `$new_allowed_options`. This makes the variable’s purpose more clear, and promotes using more inclusive language. For backwards compatibility, the new variable is passed by reference to the old one. Follow up to [48121]. Props ayeshrajans, desrosj, jorbin, SergeyBiryukov. See #50413. Fixes #50434. git-svn-id: https://develop.svn.wordpress.org/trunk@48477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2167,17 +2167,19 @@ function user_can_access_admin_page() {
|
||||
* See the {@see 'allowed_options'} filter.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`.
|
||||
* Please consider writing more inclusive code.
|
||||
*
|
||||
* @global array $new_whitelist_options
|
||||
* @global array $new_allowed_options
|
||||
*
|
||||
* @param array $options
|
||||
* @return array
|
||||
*/
|
||||
function option_update_filter( $options ) {
|
||||
global $new_whitelist_options;
|
||||
global $new_allowed_options;
|
||||
|
||||
if ( is_array( $new_whitelist_options ) ) {
|
||||
$options = add_allowed_options( $new_whitelist_options, $options );
|
||||
if ( is_array( $new_allowed_options ) ) {
|
||||
$options = add_allowed_options( $new_allowed_options, $options );
|
||||
}
|
||||
|
||||
return $options;
|
||||
|
||||
Reference in New Issue
Block a user