WordPress at a glance
filter is not described

customize_dynamic_setting_args filter-hook . WP 4.2.0

Filters a dynamic setting's constructor args.

For a dynamic setting to be registered, this filter must be employed to override the default false value with an array of args to pass to the WP_Customize_Setting constructor.


add_filter( 'customize_dynamic_setting_args', 'filter_function_name_5041', 10, 2 );
function filter_function_name_5041( $setting_args, $setting_id ){
	// filter...

	return $setting_args;
The arguments to the WP_Customize_Setting constructor.
ID for dynamic setting, usually coming from $_POST['customized'].

Where the hook is called

wp-includes/class-wp-customize-manager.php 3719
$setting_args = apply_filters( 'customize_dynamic_setting_args', $setting_args, $setting_id );
wp-includes/class-wp-customize-manager.php 3670
$args = apply_filters( 'customize_dynamic_setting_args', $args, $id );

Where the hook is used (in WP core)

wp-includes/class-wp-customize-nav-menus.php 50
add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_dynamic_setting_args' ), 10, 2 );
wp-includes/class-wp-customize-widgets.php 103
add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args' ), 10, 2 );