Changeset 48321
- Timestamp:
- 07/05/2020 03:05:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r48320 r48321 2213 2213 2214 2214 $new_whitelist_options[ $option_group ][] = $option_name; 2215 2215 2216 if ( ! empty( $args['sanitize_callback'] ) ) { 2216 2217 add_filter( "sanitize_option_{$option_name}", $args['sanitize_callback'] ); … … 2220 2221 } 2221 2222 2223 /** 2224 * Fires immediately before the setting is registered but after its filters are in place. 2225 * 2226 * @since 5.5.0 2227 * 2228 * @param string $option_group Setting group. 2229 * @param string $option_name Setting name. 2230 * @param array $args Array of setting registration arguments. 2231 */ 2232 do_action( 'register_setting', $option_group, $option_name, $args ); 2233 2222 2234 $wp_registered_settings[ $option_name ] = $args; 2223 2235 } … … 2232 2244 * @global array $wp_registered_settings 2233 2245 * 2234 * @param string $option_group 2235 * @param string $option_name 2236 * @param callable $deprecated 2246 * @param string $option_group The settings group name used during registration. 2247 * @param string $option_name The name of the option to unregister. 2248 * @param callable $deprecated Deprecated. 2237 2249 */ 2238 2250 function unregister_setting( $option_group, $option_name, $deprecated = '' ) { … … 2266 2278 2267 2279 $pos = array_search( $option_name, (array) $new_whitelist_options[ $option_group ], true ); 2280 2268 2281 if ( false !== $pos ) { 2269 2282 unset( $new_whitelist_options[ $option_group ][ $pos ] ); 2270 2283 } 2284 2271 2285 if ( '' !== $deprecated ) { 2272 2286 _deprecated_argument( … … 2294 2308 } 2295 2309 2310 /** 2311 * Fires immediately before the setting is unregistered and after its filters have been removed. 2312 * 2313 * @since 5.5.0 2314 * 2315 * @param string $option_group Setting group. 2316 * @param string $option_name Setting name. 2317 */ 2318 do_action( 'unregister_setting', $option_group, $option_name ); 2319 2296 2320 unset( $wp_registered_settings[ $option_name ] ); 2297 2321 }
Note: See TracChangeset
for help on using the changeset viewer.