Gets a default
‘s preset name by a provided slug.
Parameters
$slug
stringrequired- The slug we want to find a match from default presets.
$base_path
arrayrequired- The path to inspect. It’s
'settings'
by default.
Source
* @return string SVG filters.
*/
public function get_svg_filters( $origins ) {
$blocks_metadata = static::get_blocks_metadata();
$setting_nodes = static::get_setting_nodes( $this->theme_json, $blocks_metadata );
$filters = '';
foreach ( $setting_nodes as $metadata ) {
$node = _wp_array_get( $this->theme_json, $metadata['path'], array() );
if ( empty( $node['color']['duotone'] ) ) {
continue;
}
$duotone_presets = $node['color']['duotone'];
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.