Framework: Migrate/remove temporary compatibility script initialization#19178
Merged
Conversation
00eafe8 to
7049159
Compare
Member
Author
|
This was left sitting for a while, but I've rebased the branch. Most of the original changes have been impacted by other pull requests (notably #18981 and #20628, cc @noisysocks and @mcsf). I've updated the original comment accordingly. |
|
Size Change: 0 B Total Size: 857 kB ℹ️ View Unchanged
|
mcsf
approved these changes
Mar 20, 2020
Member
Author
|
Just to confirm, I did another pass at the core implementation to ensure that all of the inline scripts being removed here are reflected in WordPress 5.3.0: https://github.com/WordPress/wordpress-develop/blob/5.3.0/src/wp-includes/script-loader.php#L660 |
12 tasks
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.
This pull request seeks to...
Remove a persistence script initialization which was incorporated in core as part of WordPress 5.2.0Edit: This was removed separately as part of Deprecate '@wordpress/nux' package #18981.Migrate remaining compatibility scripts toEdit: This is now removed altogether in this branch. It was originally slated for removal once support reached WordPress 5.3.0+ minimum (see original commit 3aac816 and associated Trac tickets Trac#48310 and Trac#48076). Since version support was bumped in Plugin: Bump minimum WordPress version to 5.3 #20628 to 5.3.0, it can be assumed to be safely removed.compat.phpwith notes relevant for future removal. This affects API fetch nonce middleware, media upload middleware.Implementation Notes:
(Edit: This section does not apply anymore per latest updates)
The rationale for this change is based on the assumption that
client-assets.phpshould be used for the bootstrapping of scripts relevant for Gutenberg, notably:These scripts will always need to exist in the plugin.
Conversely, scripts and filtering which serve a temporary purpose should be isolated in a way that it can be easily removed in future versions as compatibility requirements change. Currently, these are maintained in the
lib/compat.phpfile.Testing Instructions:
Verify there are no regressions in the behavior of the nonce middleware, media uploads.