Make WordPress Core

Changeset 55996


Ignore:
Timestamp:
06/23/2023 01:48:49 PM (13 months ago)
Author:
audrasjb
Message:

Themes: Allow non-block themes to add theme support for link color settings.

This changeset themes without theme.json to opt-in to block link color tools via add_theme_support( 'link-color' );.

Follow-up to [55067], [55273].

Props poena, audrasjb.
Fixes #58597.

File:
1 edited

Legend:

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

    r55995 r55996  
    315315            // Classic themes without a theme.json don't support global duotone.
    316316            $theme_support_data['settings']['color']['defaultDuotone'] = false;
     317
     318            // Allow themes to enable link color setting via theme_support.
     319            if ( current_theme_supports( 'link-color' ) ) {
     320                $theme_support_data['settings']['color']['link'] = true;
     321            }
    317322
    318323            // Allow themes to enable all border settings via theme_support.
Note: See TracChangeset for help on using the changeset viewer.