WP_Customize_Setting::post_value()publicWP 3.4.0

Fetch and sanitize the $_POST value for the setting.

During a save request prior to save, post_value() provides the new value while value() does not.

{} It's a method of the class: WP_Customize_Setting{}

No Hooks.

Return

Mixed. The default value on failure, otherwise the sanitized and validated value.

Usage

$WP_Customize_Setting = new WP_Customize_Setting();
$WP_Customize_Setting->post_value( $default_value );
$default_value(mixed)
A default value which is used as a fallback.
Default: null

Changelog

Since 3.4.0 Introduced.

Code of WP_Customize_Setting::post_value() WP 6.0.2

final public function post_value( $default_value = null ) {
	return $this->manager->post_value( $this, $default_value );
}