Action hook 'customize_update_{$this->type}'

in WP Core File wp-includes/class-wp-customize-setting.php at line 709

View Source

customize_update_{$this->type}

Action Hook
Description
Fires when the WP_Customize_Setting::update() method is called for settings not handled as theme_mods or options. The dynamic portion of the hook name, `$this->type`, refers to the type of setting.

Hook Information

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

Hook Parameters

Type Name Description
mixed $value Value of the setting.
WP_Customize_Setting $setting WP_Customize_Setting instance.

Usage Examples

Basic Usage
<?php
// Hook into customize_update_{$this->type}
add_action('customize_update_{$this->type}', 'my_custom_function', 10, 2);

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

Source Code Context

wp-includes/class-wp-customize-setting.php:709 - How this hook is used in WordPress core
<?php
 704  			 * @since 3.4.0
 705  			 *
 706  			 * @param mixed                $value   Value of the setting.
 707  			 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 708  			 */
 709  			do_action( "customize_update_{$this->type}", $value, $this );
 710  
 711  			return has_action( "customize_update_{$this->type}" );
 712  		}
 713  	}
 714  

PHP Documentation

<?php
/**
			 * Fires when the WP_Customize_Setting::update() method is called for settings
			 * not handled as theme_mods or options.
			 *
			 * The dynamic portion of the hook name, `$this->type`, refers to the type of setting.
			 *
			 * @since 3.4.0
			 *
			 * @param mixed                $value   Value of the setting.
			 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
			 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-includes/class-wp-customize-setting.php
Related Hooks

Related hooks will be displayed here in future updates.