Make WordPress Core

#59108 closed defect (bug) (fixed)

Preserve block style variations when securing theme json

Reported by: dean's profile dean Owned by: isabel_brison's profile isabel_brison
Milestone: 6.3.2 Priority: normal
Severity: normal Version: 6.3
Component: Editor Keywords: has-patch has-unit-tests dev-feedback fixed-major
Focuses: Cc:

Description

I'd like to sync a GB PR that fixes an issue where block style variations are not preserved when securing theme json

GB PR: https://github.com/WordPress/gutenberg/pull/53466

Change History (12)

This ticket was mentioned in PR #5013 on WordPress/wordpress-develop by @dsas.


18 months ago
#1

  • Keywords has-patch has-unit-tests added

Valid and safe block style variations were being removed by WP_Theme_JSON::remove_insecure_properties when securing the theme.json. When this was a problem varied depending upon site configuration, but out-of-the-box it was a problem for administrators on multi-site installs.

This change adds explicit processing of variations in remove_insecure_properties so that they won't get removed.

Trac ticket: [](https://core.trac.wordpress.org/ticket/59108)

@dsas commented on PR #5013:


18 months ago
#2

@ramonjd, sorry I've been afk. What's the next step here?

@ramonopoly commented on PR #5013:


18 months ago
#3

Thanks for the ping! We're now looking for a core committer to give final review.

Though I think it might now be punted to 6.3.2 (?)

At any rate, I added it to the 6.3.x board a while back so it's on the radar.

#4 @isabel_brison
18 months ago

  • Owner set to isabel_brison
  • Resolution set to fixed
  • Status changed from new to closed

In 56502:

Editor: Preserve block style variations when securing theme.

Adds the ability to process block style variations to the remove_insecure_properties function of theme json class.

Props dsas, ramonopoly.
Fixes #59108.

#5 @isabel_brison
18 months ago

  • Keywords dev-feedback added
  • Milestone changed from Awaiting Review to 6.3.2
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to 6.3

Reopening for second committer review/committing to 6.3 release branch.

@isabel_brison commented on PR #5013:


18 months ago
#6

Committed to trunk in r56502; leaving the PR open pending commit to the release branch.

This ticket was mentioned in Slack in #core by joemcgill. View the logs.


17 months ago

#8 @joemcgill
17 months ago

  • Keywords fixed-major added

It would be good to get a performance analysis of the changes in r56502, but it looks good at first glance.

#9 @dsas
17 months ago

@joemcgill how do I go about wrangling that? Is there a particular method I should use?

#10 @audrasjb
16 months ago

Worth noting that the @since mention should be set to 6.3.2, not 6.3.1

I'll add a follow up commit to fix it, then I will backport it to branch 6.3.

We still have one week before the final release to revert it if any performance issue is pointed out :)

#11 @audrasjb
16 months ago

In 56778:

Editor: Fix wrong @since mention in remove_insecure_properties().

Follow-up to [56502].

See #59108.

#12 @audrasjb
16 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 56779:

Editor: Preserve block style variations when securing theme.

Adds the ability to process block style variations to the remove_insecure_properties function of theme json class.

Props dsas, ramonopoly, dean, isabel_brison, joemcgill, audrasjb.
Merges [56502] and [56778] to the 6.3 branch.
Fixes #59108.

Note: See TracTickets for help on using tickets.