} elseif ( $has_global_styles_duotone ) { $slug =
$global_styles_block_names[ $block['blockName'
] ]; // e.g. 'blue-orange'.
$filter_id = self::
get_filter_id( $slug ); // e.g. 'wp-duotone-filter-blue-orange'.
$filter_value = self::
get_css_var( $slug ); // e.g. 'var(--wp--preset--duotone--blue-orange)'.
// CSS custom property, SVG filter, and block CSS.
self::
enqueue_global_styles_preset( $filter_id,
$duotone_selector,
$filter_value );
} // Like the layout hook, this assumes the hook only applies to blocks with a single wrapper.
$tags =
new WP_HTML_Tag_Processor( $block_content );
if ( $tags->
next_tag() ) { $tags->
add_class( $filter_id );
} return $tags->
get_updated_html();
} /**
* Appends the used block duotone filter declarations to the inline block supports CSS.
*
* Uses the declarations saved in earlier calls to self::enqueue_block_css.
*
* @since 6.3.0
*/