customize_post_value_set хук-событиеWP 4.4.0

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.

Использование

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(строка)
Setting ID.
$value(разное)
Unsanitized setting post value.
$manager(WP_Customize_Manager)
WP_Customize_Manager instance.

Список изменений

С версии 4.4.0 Введена.

Где вызывается хук

WP_Customize_Manager::set_post_value()
customize_post_value_set
wp-includes/class-wp-customize-manager.php 1885
do_action( 'customize_post_value_set', $setting_id, $value, $this );

Где используется хук в WordPress

Использование не найдено.