Make WordPress Core

Changeset 53009


Ignore:
Timestamp:
03/29/2022 09:10:55 AM (3 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.
Merges [52791] to the 5.9 branch.
Fixes #55241.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-includes/class-wp-theme-json.php

    r52764 r53009  
    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.