Make WordPress Core

Changeset 52791


Ignore:
Timestamp:
02/23/2022 11:15:56 PM (2 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r52763 r52791  
    15991599        $setting_nodes   = static::get_setting_nodes( $this->theme_json, $blocks_metadata );
    16001600
     1601        $filters = '';
    16011602        foreach ( $setting_nodes as $metadata ) {
    16021603            $node = _wp_array_get( $this->theme_json, $metadata['path'], array() );
     
    16071608            $duotone_presets = $node['color']['duotone'];
    16081609
    1609             $filters = '';
    16101610            foreach ( $origins as $origin ) {
    16111611                if ( ! isset( $duotone_presets[ $origin ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.