WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

update_custom_css_data хук-фильтр . WP 4.7.0

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 );

Использование

add_filter( 'update_custom_css_data', 'filter_function_name_4657', 10, 2 );
function filter_function_name_4657( $data, $args ){
	// filter...

	return $data;
}
$data(массив)

Custom CSS data.

  • css(строка)
    CSS stored in post_content.

  • preprocessed(строка)
    Pre-processed CSS stored in post_content_filtered. Normally empty string.
$args(массив)

The args passed into wp_update_custom_css_post() merged with defaults.

  • css(строка)
    The original CSS passed in to be updated.

  • preprocessed(строка)
    The original preprocessed CSS passed in to be updated.

  • stylesheet(строка)
    The stylesheet (theme) being updated.

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

wp_update_custom_css_post()
update_custom_css_data
wp-includes/theme.php 1986
$data = apply_filters( 'update_custom_css_data', $data, array_merge( $args, compact( 'css' ) ) );

Где используется хук в ядре WordPress

Использование не найдено.