fix: prevent wp-edit-post from loading in the customizer block widgets editor - #2667
Open
faisalahammad wants to merge 1 commit into
Open
Conversation
…s editor - Extend existing widgets.php dependency guards to also cover customize.php, preventing JS conflicts with themes like Blocksy in the Appearance > Customize block widgets editor. - Add PHPUnit test to verify wp-edit-post and wp-editor are stripped from script dependencies when $pagenow is customize.php. Fixes godaddy-wordpress#2627
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fix extends the existing pagenow check for widgets.php to also cover customize.php. CoBlocks was loading the
wp-edit-postscript dependency in the customizer, causing a JS conflict with themes like Blocksy when WooCommerce is also active.The
editor_assets()method already stripswp-edit-postandwp-editorfrom script dependencies onwidgets.php, but the customizer was not included in that check.Fixes #2627
Screenshots
N/A
Types of changes
Bug fix (non-breaking change which fixes an issue)
How has this been tested?
test_wp_edit_post_stripped_on_customize_phpverifieswp-edit-postandwp-editorare stripped when $pagenow iscustomize.php.Acceptance criteria
wp-edit-postdependency in Appearance > Customize block widgets editor.Checklist: