Checks if we have a valid duotone preset.
Description
Valid presets are defined in the $global_styles_presets array.
Parameters
$duotone_attr
stringrequired- The duotone attribute from a block.
Source
private static function is_preset( $duotone_attr ) {
$slug = self::get_slug_from_attribute( $duotone_attr );
$filter_id = self::get_filter_id( $slug );
return array_key_exists( $filter_id, self::get_all_global_styles_presets() );
}
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.