Title: WP_Customize_Setting::post_value
Published: April 25, 2014
Last modified: April 28, 2025

---

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

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#wp--skip-link--target)

Fetch and sanitize the $_POST value for the setting.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#description)󠁿

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#parameters)󠁿

 `$default_value`mixedoptional

A default value which is used as a fallback.

Default:`null`

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#return)󠁿

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

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-setting.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-setting.php#L559)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-setting.php#L559-L561)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Customize_Setting::value()](https://developer.wordpress.org/reference/classes/wp_customize_setting/value/)`wp-includes/class-wp-customize-setting.php` |

Fetch the value of the setting.

  | 
| [WP_Customize_Setting::preview()](https://developer.wordpress.org/reference/classes/wp_customize_setting/preview/)`wp-includes/class-wp-customize-setting.php` |

Add filters to supply the setting’s value when accessed.

  | 
| [WP_Customize_Setting::_preview_filter()](https://developer.wordpress.org/reference/classes/wp_customize_setting/_preview_filter/)`wp-includes/class-wp-customize-setting.php` |

Callback function to filter non-multidimensional theme mods and options.

  | 
| [WP_Customize_Setting::save()](https://developer.wordpress.org/reference/classes/wp_customize_setting/save/)`wp-includes/class-wp-customize-setting.php` |

Checks user capabilities and theme supports, and then saves the value of the setting.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_setting/post_value/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_setting%2Fpost_value%2F)
before being able to contribute a note or feedback.