Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Block editor settings mobile endpoint - Add missing global styles has support check #39806

Merged

Conversation

geriux
Copy link
Member

@geriux geriux commented Mar 28, 2022

What?

This PR adds a missing check for only passing the experimentalStyles data for themes that support global styles.

Why?

After some recent changes #39030 while moving some files, this check was left behind, causing issues on the latest production builds of the mobile WordPress apps.

How?

Brings back the missing WP_Theme_JSON_Resolver_Gutenberg::theme_has_support() check.

Testing Instructions

  • On a local instance of Gutenberg
  • Activate a standard theme e.g. Seedlet
  • Make a request to the following endpoint: wp-json/wp-block-editor/v1/settings?context=mobile
  • Expect not to see the __experimentalStyles data in the response. It should only be returned for block-based themes.

Screenshots or screencast

N/A

@geriux geriux added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Mar 28, 2022
@geriux geriux requested a review from oandregal March 28, 2022 10:40
@oandregal oandregal added [Type] Bug An existing feature does not function as intended REST API Interaction Related to REST API labels Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants