apply_filters( 'customize_dynamic_setting_class', string $setting_class, string $setting_id, array $setting_args )
- Since
- 4.2.0
Allow non-statically created settings to be constructed with custom WP_Customize_Setting subclass.
Compatibility
- WordPress
- since 4.2.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$setting_classstring- WP_Customize_Setting or a subclass.
$setting_idstring- ID for dynamic setting, usually coming from
$_POST['customized']. $setting_argsarray- WP_Customize_Setting or a subclass.
Where this hook fires · 2
wp-includes/class-wp-customize-manager.php:3791WP_Customize_Manager::add_setting()wp-includes/class-wp-customize-manager.php:3851WP_Customize_Manager::add_dynamic_settings()
Source code
* @since 4.2.0 * * @param string $setting_class WP_Customize_Setting or a subclass. * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. * @param array $setting_args WP_Customize_Setting or a subclass. */ $setting_class = apply_filters( 'customize_dynamic_setting_class', $setting_class, $setting_id, $setting_args ); $setting = new $setting_class( $this, $setting_id, $setting_args ); $this->add_setting( $setting ); $new_settings[] = $setting; }Changelog
Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.