WP_Duotone::enqueue_custom_filter( string $filter_id, string $duotone_selector, string $filter_value, array $filter_data )

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Enqueue custom filter assets for the page.

Description

Includes an SVG filter and block CSS declaration.

Parameters

$filter_idstringrequired
The filter ID. e.g. 'wp-duotone-000000-ffffff-2'.
$duotone_selectorstringrequired
The block’s duotone selector. e.g. ‘.wp-block-image img’.
$filter_valuestringrequired
The filter CSS value. e.g. 'url(#wp-duotone-000000-ffffff-2)' or 'unset'.
$filter_dataarrayrequired
Duotone filter data with 'slug' and 'colors' keys.

Source

private static function enqueue_custom_filter( $filter_id, $duotone_selector, $filter_value, $filter_data ) {
	self::$used_svg_filter_data[ $filter_id ] = $filter_data;
	self::enqueue_block_css( $filter_id, $duotone_selector, $filter_value );
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.