Make WordPress Core


Ignore:
Timestamp:
01/14/2023 09:34:55 AM (2 years ago)
Author:
audrasjb
Message:

Themes: Add opt-in Appearance Tools support for Classic Themes.

This changeset merges the following changes from Gutenberg repository:

  • Allow themes without theme.json to opt-in to appearance tools via add_theme_support( 'appearance-tools' );
  • Update wpThemeJsonResolver unit tests accordingly

See the following pull request for more info: https://github.com/WordPress/gutenberg/pull/43337

Props ironprogrammer, audrasjb.
Fixes #57460.

File:
1 edited

Legend:

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

    r54824 r55067  
    323323            // Classic themes without a theme.json don't support global duotone.
    324324            $theme_support_data['settings']['color']['defaultDuotone'] = false;
     325
     326            // Allow themes to enable appearance tools via theme_support.
     327            if ( current_theme_supports( 'appearance-tools' ) ) {
     328                $theme_support_data['settings']['appearanceTools'] = true;
     329            }
    325330        }
    326331        $with_theme_supports = new WP_Theme_JSON( $theme_support_data );
Note: See TracChangeset for help on using the changeset viewer.