GC_Customize_Custom_CSS_Setting::value()
最后更新于:2021-11-27 00:13:38
GC_Customize_Custom_CSS_Setting::value()Fetch the value of the setting. Will return the previewed value when preview()
is called.
响应
(string)
源文件
文件: gc-includes/customize/class-gc-customize-custom-css-setting.php
public function value() {
if ( $this->is_previewed ) {
$post_value = $this->post_value( null );
if ( null !== $post_value ) {
return $post_value;
}
}
$id_base = $this->id_data['base'];
$value = '';
$post = gc_get_custom_css_post( $this->stylesheet );
if ( $post ) {
$value = $post->post_content;
}
if ( empty( $value ) ) {
$value = $this->default;
}
/** This filter is documented in gc-includes/class-gc-customize-setting.php */
$value = apply_filters( "customize_value_{$id_base}", $value, $this );
return $value;
}