GC_Customize_Setting::save()
最后更新于:2021-11-27 08:44:55
GC_Customize_Setting::save()Checks user capabilities and theme supports, and then saves the value of the setting.
响应
(void|false) Void on success, false if cap check fails or value isn’t set or is invalid.
源文件
文件: gc-includes/class-gc-customize-setting.php
final public function save() {
$value = $this->post_value();
if ( ! $this->check_capabilities() || ! isset( $value ) ) {
return false;
}
$id_base = $this->id_data['base'];
/**
* Fires when the GC_Customize_Setting::save() method is called.
*
* The dynamic portion of the hook name, `$id_base` refers to
* the base slug of the setting name.
*
* @since 3.4.0
*
* @param GC_Customize_Setting $this GC_Customize_Setting instance.
*/
do_action( "customize_save_{$id_base}", $this );
$this->update( $value );
}