customize_post_value_set
Announces when any setting's unsanitized post value has been set.
Fires when the WP_Customize_Manager::set_post_value() method is called.
This is useful for WP_Customize_Setting instances to watch in order to update a cached previewed value.
Usage
add_action( 'customize_post_value_set', 'wp_kama_customize_post_value_set_action', 10, 3 ); /** * Function for `customize_post_value_set` action-hook. * * @param string $setting_id Setting ID. * @param mixed $value Unsanitized setting post value. * @param WP_Customize_Manager $manager WP_Customize_Manager instance. * * @return void */ function wp_kama_customize_post_value_set_action( $setting_id, $value, $manager ){ // action... }
- $setting_id(string)
- Setting ID.
- $value(mixed)
- Unsanitized setting post value.
- $manager(WP_Customize_Manager)
- WP_Customize_Manager instance.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
customize_post_value_set
wp-includes/class-wp-customize-manager.php 1898
do_action( 'customize_post_value_set', $setting_id, $value, $this );