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

[Block Theme Previews] Change the URL query string for more safety #51312

Merged

Conversation

okmttdhr
Copy link
Contributor

@okmttdhr okmttdhr commented Jun 8, 2023

What?

Changed the URL query string name to trigger Block Theme Previews (from ?theme_preview to ?gutenberg_theme_preview).

Why?

The original URL query string had a wide impact in terms of WordPress context. (e.g. WordPress.com is using $_GET['theme_preview'] as well). c.f. #50983 (comment)

Testing Instructions

  • Go to /wp-admin/themes.php
  • Click the Live Preview button on a theme installed

or

  • Open the Site Editor and add the following to your URL: ?gutenberg_theme_preview=[themePath] where themePath is the relative path to the theme you want to preview (e.g. twentytwentythree).

Screenshots or screencast

Screen.Recording.2023-06-08.at.10.42.17.2.small.mov

Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scruffian scruffian merged commit bdf728b into WordPress:trunk Jun 8, 2023
49 checks passed
@github-actions github-actions bot added this to the Gutenberg 16.1 milestone Jun 8, 2023
Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@okmttdhr okmttdhr deleted the update/block-theme-previews-url-query branch June 8, 2023 08:02
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants