Action hook 'customize_post_value_set_{$setting_id}'

in WP Core File wp-includes/class-wp-customize-manager.php at line 1882

View Source

customize_post_value_set_{$setting_id}

Action Hook
Description
Announces when a specific setting's unsanitized post value has been set. Fires when the WP_Customize_Manager::set_post_value() method is called. The dynamic portion of the hook name, `$setting_id`, refers to the setting ID.

Hook Information

File Location wp-includes/class-wp-customize-manager.php View on GitHub
Hook Type Action
Line Number 1882

Hook Parameters

Type Name Description
mixed $value Unsanitized setting post value.
WP_Customize_Manager $manager WP_Customize_Manager instance.

Usage Examples

Basic Usage
<?php
// Hook into customize_post_value_set_{$setting_id}
add_action('customize_post_value_set_{$setting_id}', 'my_custom_function', 10, 2);

function my_custom_function($value, $manager) {
    // Your custom code here
}

Source Code Context

wp-includes/class-wp-customize-manager.php:1882 - How this hook is used in WordPress core
<?php
1877  		 * @since 4.4.0
1878  		 *
1879  		 * @param mixed                $value   Unsanitized setting post value.
1880  		 * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
1881  		 */
1882  		do_action( "customize_post_value_set_{$setting_id}", $value, $this );
1883  
1884  		/**
1885  		 * Announces when any setting's unsanitized post value has been set.
1886  		 *
1887  		 * Fires when the WP_Customize_Manager::set_post_value() method is called.

PHP Documentation

<?php
/**
		 * Announces when a specific setting's unsanitized post value has been set.
		 *
		 * Fires when the WP_Customize_Manager::set_post_value() method is called.
		 *
		 * The dynamic portion of the hook name, `$setting_id`, refers to the setting ID.
		 *
		 * @since 4.4.0
		 *
		 * @param mixed                $value   Unsanitized setting post value.
		 * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-includes/class-wp-customize-manager.php
Related Hooks

Related hooks will be displayed here in future updates.