-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Site Editor: Set IFRAME_REQUEST
constant for classic theme site preview
#69535
base: trunk
Are you sure you want to change the base?
Conversation
*/ | ||
function wp_initialize_site_preview_hooks() { | ||
if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['wp_site_preview'] ) && 1 === (int) $_GET['wp_site_preview'] ) { | ||
define( 'IFRAME_REQUEST', true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, @t-hamano! Today, I also learned about IFRAME_REQUEST
😄
78242a5
to
bf6b891
Compare
Flaky tests detected in 2859a73. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/13829249888
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Follow-up #69514
Related core PR: WordPress/wordpress-develop#8475
Note
Don't add
Backport to WP 6.8 Beta/RC
label to this PR. This is because the auto cherry-pick has failed in #69514. I plan to submit another PR to thewp/6.8
branch that includes this PR and #69514.Why?
In #69514, We added a get parameter to hide admin bar in the classic theme site preview. However, we found that some plugins load code into the preview.
How?
To solve this problem, it seems best to define
IFRAME_REQUEST
instead of filteringshow_admin_bar
hook.Testing Instructions