wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
update_custom_css_data › Filtr WordPress Hooks
Od4.7.0
Przestarzałyn/a
› apply_filters( 'update_custom_css_data', $data, array_merge( $args, compact( 'css' )
| Parametry: (2) |
|
| Zdefiniowane na: |
|
| Codex: |
Filters the `css` (`post_content`) and `preprocessed` (`post_content_filtered`) args for a `custom_css` post being updated.
This filter can be used by plugin that offer CSS pre-processors, to store the original pre-processed CSS in `post_content_filtered` and then store processed CSS in `post_content`. When used in this way, the `post_content_filtered` should be supplied as the setting value instead of `post_content` via a the `customize_value_custom_css` filter, for example:
add_filter( 'customize_value_custom_css', function( $value, $setting ) {
$post = wp_get_custom_css_post( $setting->stylesheet );
if ( $post && ! empty( $post->post_content_filtered ) ) {
$css = $post->post_content_filtered;
}
return $css;
}, 10, 2 );
Powiązane Funkcje: wp_update_custom_css_post, wp_custom_css_cb, wp_get_custom_css_post, wp_custom_css_has_value, wp_get_custom_css, update_metadata
Powiązane Hooks: wp_update_comment_data, wp_update_term_data, update-custom_-action, wp_get_custom_css, log_query_custom_data