register_setting_args
Filters the registration arguments when registering a setting.
Usage
add_filter( 'register_setting_args', 'wp_kama_register_setting_args_filter', 10, 4 ); /** * Function for `register_setting_args` filter-hook. * * @param array $args Array of setting registration arguments. * @param array $defaults Array of default arguments. * @param string $option_group Setting group. * @param string $option_name Setting name. * * @return array */ function wp_kama_register_setting_args_filter( $args, $defaults, $option_group, $option_name ){ // filter... return $args; }
- $args(array)
- Array of setting registration arguments.
- $defaults(array)
- Array of default arguments.
- $option_group(string)
- Setting group.
- $option_name(string)
- Setting name.
Changelog
Since 4.7.0 | Introduced. |
Where the hook is called
register_setting_args
wp-includes/option.php 2941
$args = apply_filters( 'register_setting_args', $args, $defaults, $option_group, $option_name );