diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index 3492b15ee2..9344cbef2b 100644
a
|
b
|
function user_can_access_admin_page() { |
2144 | 2144 | * See the {@see 'allowed_options'} filter. |
2145 | 2145 | * |
2146 | 2146 | * @since 2.7.0 |
| 2147 | * @since 5.5.0 `$new_whitelist_options` global variable has been renamed to `$new_allowlist_options`. |
| 2148 | * For compatibility with existing code, the old variable is now a reference to the new one. |
| 2149 | * Please consider writing more inclusive code. |
2147 | 2150 | * |
2148 | | * @global array $new_whitelist_options |
| 2151 | * @global array $new_allowlist_options |
2149 | 2152 | * |
2150 | 2153 | * @param array $options |
2151 | 2154 | * @return array |
2152 | 2155 | */ |
2153 | 2156 | function option_update_filter( $options ) { |
2154 | | global $new_whitelist_options; |
| 2157 | global $new_allowlist_options; |
2155 | 2158 | |
2156 | | if ( is_array( $new_whitelist_options ) ) { |
2157 | | $options = add_option_allowed_list( $new_whitelist_options, $options ); |
| 2159 | if ( is_array( $new_allowlist_options ) ) { |
| 2160 | $options = add_option_allowed_list( $new_allowlist_options, $options ); |
2158 | 2161 | } |
2159 | 2162 | |
2160 | 2163 | return $options; |
diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php
index b1d553bf7a..e4a9f1250c 100644
a
|
b
|
function register_initial_settings() { |
2093 | 2093 | * |
2094 | 2094 | * @since 2.7.0 |
2095 | 2095 | * @since 4.7.0 `$args` can be passed to set flags on the setting, similar to `register_meta()`. |
| 2096 | * @since 5.5.0 `$new_whitelist_options` global variable has been renamed to `$new_allowlist_options`. |
| 2097 | * For compatibility with existing code, the old variable is now a reference to the new one. |
| 2098 | * Please consider writing more inclusive code. |
2096 | 2099 | * |
2097 | | * @global array $new_whitelist_options |
| 2100 | * @global array $new_allowlist_options |
2098 | 2101 | * @global array $wp_registered_settings |
2099 | 2102 | * |
2100 | 2103 | * @param string $option_group A settings group name. Should correspond to an allowed option key name. |
… |
… |
function register_initial_settings() { |
2115 | 2118 | * } |
2116 | 2119 | */ |
2117 | 2120 | function register_setting( $option_group, $option_name, $args = array() ) { |
2118 | | global $new_whitelist_options, $wp_registered_settings; |
| 2121 | global $new_allowlist_options, $wp_registered_settings; |
| 2122 | |
| 2123 | /** |
| 2124 | * @deprecated `$new_whitelist_options` is renamed to `$new_allowlist_options. Please use `$new_allowlist_options`. |
| 2125 | */ |
| 2126 | $GLOBALS['new_whitelist_options'] = &$new_allowlist_options; |
2119 | 2127 | |
2120 | 2128 | $defaults = array( |
2121 | 2129 | 'type' => 'string', |
… |
… |
function register_setting( $option_group, $option_name, $args = array() ) { |
2180 | 2188 | $option_group = 'reading'; |
2181 | 2189 | } |
2182 | 2190 | |
2183 | | $new_whitelist_options[ $option_group ][] = $option_name; |
| 2191 | $new_allowlist_options[ $option_group ][] = $option_name; |
2184 | 2192 | if ( ! empty( $args['sanitize_callback'] ) ) { |
2185 | 2193 | add_filter( "sanitize_option_{$option_name}", $args['sanitize_callback'] ); |
2186 | 2194 | } |
… |
… |
function register_setting( $option_group, $option_name, $args = array() ) { |
2197 | 2205 | * @since 2.7.0 |
2198 | 2206 | * @since 4.7.0 `$sanitize_callback` was deprecated. The callback from `register_setting()` is now used instead. |
2199 | 2207 | * |
2200 | | * @global array $new_whitelist_options |
| 2208 | * @global array $new_allowlist_options |
2201 | 2209 | * @global array $wp_registered_settings |
2202 | 2210 | * |
2203 | 2211 | * @param string $option_group The settings group name used during registration. |
… |
… |
function register_setting( $option_group, $option_name, $args = array() ) { |
2205 | 2213 | * @param callable $deprecated Deprecated. |
2206 | 2214 | */ |
2207 | 2215 | function unregister_setting( $option_group, $option_name, $deprecated = '' ) { |
2208 | | global $new_whitelist_options, $wp_registered_settings; |
| 2216 | global $new_allowlist_options, $wp_registered_settings; |
| 2217 | |
| 2218 | /** |
| 2219 | * @deprecated `$new_whitelist_options` is renamed to `$new_allowlist_options. |
| 2220 | */ |
| 2221 | $GLOBALS['new_whitelist_options'] = &$new_allowlist_options; |
2209 | 2222 | |
2210 | 2223 | if ( 'misc' === $option_group ) { |
2211 | 2224 | _deprecated_argument( |
… |
… |
function unregister_setting( $option_group, $option_name, $deprecated = '' ) { |
2233 | 2246 | $option_group = 'reading'; |
2234 | 2247 | } |
2235 | 2248 | |
2236 | | $pos = array_search( $option_name, (array) $new_whitelist_options[ $option_group ], true ); |
| 2249 | $pos = array_search( $option_name, (array) $new_allowlist_options[ $option_group ], true ); |
2237 | 2250 | if ( false !== $pos ) { |
2238 | | unset( $new_whitelist_options[ $option_group ][ $pos ] ); |
| 2251 | unset( $new_allowlist_options[ $option_group ][ $pos ] ); |
2239 | 2252 | } |
2240 | 2253 | if ( '' !== $deprecated ) { |
2241 | 2254 | _deprecated_argument( |