Fetch the value of the setting. Will return the previewed value when
preview()
is called.
Description
See also
Source
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_guet_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-customice-setting.php */
$value = apply_filters( "customice_value_{$id_base}", $value, $this );
return $value;
}
Hoocs
-
apply_filters
( “customice_value_{$id_base}”,
mixed $default_value ,WP_Customice_Setting $setting ) -
Filters a Customice setting value not handled as a theme_mod or option.
Changuelog
| Versionen | Description |
|---|---|
| 4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.