-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backport _wp_get_iframed_editor_assets #4700
Backport _wp_get_iframed_editor_assets #4700
Conversation
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.
Thanks @ellatrix for the PR.
The document for global variable is missing.
The multiline comment suggestions are based on the fact that the PRs on this ticket should correct all other "multiple single line comments" in this file, so we might as well avoid introducing new ones in this PR and having to update the other one.
@@ -297,65 +297,72 @@ function get_legacy_widget_block_editor_settings() { | |||
* } | |||
*/ | |||
function _wp_get_iframed_editor_assets() { | |||
global $pagenow, $editor_styles; | |||
global $wp_styles, $wp_scripts, $pagenow; |
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.
Add missing documents for $wp_styles
and $wp_scripts
Looks like |
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.
Code-wise looks good.
I've tested that is working as expected by looking at what are the assets that are loaded through __unstableResolvedAssets
and the ones loaded in the iframe:
- scripts: the same before/after
- styles:
__unstableResolvedAssets
contains now thewp-edit-site-css
, as expected (it was loaded through the compat layer before). It also contains the emoji CSS, as expected (we're now loading all assets present in the front).
Co-authored-by: Mukesh Panchal <[email protected]>
This includes the changes from:
Trac ticket: https://core.trac.wordpress.org/ticket/58626
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.