WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

WP_Customize_Manager::set_post_value() public WP 4.2.0

Override a setting's value in the current customized state.

The name "post_value" is a carry-over from when the customized state was exclusively sourced from $_POST['customized'].

{} Это метод класса: WP_Customize_Manager{}

Возвращает

Null. Ничего.

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

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->set_post_value( $setting_id, $value );
$setting_id(строка) (обязательный)
ID for the WP_Customize_Setting instance.
$value(смешанный) (обязательный)
Post value.

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

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

Код WP_Customize_Manager::set_post_value() WP 5.5.3

<?php
public function set_post_value( $setting_id, $value ) {
	$this->unsanitized_post_values(); // Populate _post_values from $_POST['customized'].
	$this->_post_values[ $setting_id ] = $value;

	/**
	 * Announce 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 $this  WP_Customize_Manager instance.
	 */
	do_action( "customize_post_value_set_{$setting_id}", $value, $this );

	/**
	 * Announce 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.
	 *
	 * @since 4.4.0
	 *
	 * @param string               $setting_id Setting ID.
	 * @param mixed                $value      Unsanitized setting post value.
	 * @param WP_Customize_Manager $this       WP_Customize_Manager instance.
	 */
	do_action( 'customize_post_value_set', $setting_id, $value, $this );
}