WP_Customize_Custom_CSS_Setting::value()
Fetch the value of the setting. Will return the previewed value when preview() is called.
Method of the class: WP_Customize_Custom_CSS_Setting{}
Hooks from the method
Return
String
.
Usage
$WP_Customize_Custom_CSS_Setting = new WP_Customize_Custom_CSS_Setting(); $WP_Customize_Custom_CSS_Setting->value();
Notes
Changelog
Since 4.7.0 | Introduced. |
WP_Customize_Custom_CSS_Setting::value() WP Customize Custom CSS Setting::value code WP 6.8
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 = wp_get_custom_css_post( $this->stylesheet ); if ( $post ) { $value = $post->post_content; } if ( empty( $value ) ) { $value = $this->default; } /** This filter is documented in wp-includes/class-wp-customize-setting.php */ $value = apply_filters( "customize_value_{$id_base}", $value, $this ); return $value; }