wordpress / latest / classes / wp_customize_setting / post_value.html

WP_Customize_Setting::post_value( mixed $default_value = null ): mixed

Fetch and sanitize the $_POST value for the setting.

Description

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

Parameters

$default_value mixed Optional
A default value which is used as a fallback.

Default: null

Return

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

Source

File: wp-includes/class-wp-customize-setting.php. View all references

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

Used By

Used By Description

Changelog

Version Description
3.4.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value