Themes: Avoid undefined variable warning on `get_svg_filters()`.
This change fixes an undefined variable warning thrown when `duotone` color setting was set to null` in Block Themes `theme.json` file. Follow-up to [52768]. Props aliakseyenkaihar, audrasjb, rafiahmedd. Fixes #55241. Built from https://develop.svn.wordpress.org/trunk@52791 git-svn-id: http://core.svn.wordpress.org/trunk@52380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
76e93c5d5f
commit
4237c0a88b
|
@ -1598,6 +1598,7 @@ class WP_Theme_JSON {
|
|||
$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'] ) ) {
|
||||
|
@ -1606,7 +1607,6 @@ class WP_Theme_JSON {
|
|||
|
||||
$duotone_presets = $node['color']['duotone'];
|
||||
|
||||
$filters = '';
|
||||
foreach ( $origins as $origin ) {
|
||||
if ( ! isset( $duotone_presets[ $origin ] ) ) {
|
||||
continue;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52790';
|
||||
$wp_version = '6.0-alpha-52791';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue