Make WordPress Core


Ignore:
Timestamp:
06/24/2024 08:49:52 AM (17 months ago)
Author:
oandregal
Message:

Section styles: improve performance and conceptual consistency.

These changes involve:

  • Move shared variation definitions from styles.blocks.variations to styles.variations
  • Remove blockTypes from styles.variations.
  • Do not register shared variations from theme style variation or primary theme.json files.
  • Move the merging of theme.json data into the WP_Theme_JSON_Resolver and WP_Theme_JSON classes.

These changes improve performance and are more future-proof API wise.
See conversation at https://github.com/WordPress/gutenberg/issues/62686

Props aaronrobertshaw, oandregal, andrewserong, joemcgill, talldanwp, andrewserong, ramonopoly, richtabor, youknowriad.

See #61312, #61451.

File:
1 edited

Legend:

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

    r58412 r58466  
    8181        }
    8282    },
    83     "styles": {
    84         "blocks": {
    85             "variations": {
    86                 "*": {
    87                     "title": "Style variation name"
    88                 }
    89             }
    90         }
    91     },
    9283    "customTemplates": [
    9384        {
Note: See TracChangeset for help on using the changeset viewer.