WP_Customize_Setting::post_value PHP Method

post_value() final public method

During a save request prior to save, post_value() provides the new value while value() does not.
Since: 3.4.0
final public post_value ( mixed $default = null ) : mixed
$default mixed A default value which is used as a fallback. Default is null.
return mixed The default value on failure, otherwise the sanitized and validated value.
    public final function post_value($default = null)
    {
        return $this->manager->post_value($this, $default);
    }

Usage Example

コード例 #1
0
 /**
  * Save data in special option for better performance in query
  *
  * @param \WP_Customize_Setting $setting
  */
 protected function _save_post_id($setting)
 {
     Posts::update($setting->id, $setting->post_value());
 }
All Usage Examples Of WP_Customize_Setting::post_value