-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Framework: Drop deprecations slated for 3.1 removal #7419
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.
I believe there were also PHP changes introduced to make the following polyfill work:
All components in
wp.blocks.*
are removed. Please usewp.editor.*
instead.
@@ -50,15 +50,6 @@ export function reinitializeEditor( postType, postId, target, settings, override | |||
* @return {Object} Editor interface. | |||
*/ | |||
export function initializeEditor( id, postType, postId, settings, overridePost ) { | |||
if ( 'production' !== process.env.NODE_ENV ) { | |||
// Remove with 3.0 release. |
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.
Yeah, thanks 👍
I removed PHP part with 8bf8d21. @youknowriad can you double check if we didn't miss anything? |
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.
LGTM, I tested the editor with the changes applied and it still works 👍
One more commit added 818acd1. Removed deprecated utils :) |
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.
LGTM 👍
|
||
// viewport | ||
export function isExtraSmall() { | ||
originalDeprecated( 'wp.utils.isExtraSmall', { |
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.
Unfortunately the custom ESLint rule is not smart enough to capture anything except the default function name deprecated
😅
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.
Right, I was too creative renaming its name :)
This pull request seeks to remove deprecations slated for removal in the upcoming 3.1.0 release.
Specifically, this includes:
wp.blocks.*
are removed. Please usewp.editor.*
instead.wp.blocks.withEditorSettings
is removed. Please use the data module to access the editor settingswp.data.select( "core/editor" ).getEditorSettings()
.wp.utils.*
are removed. Please usewp.dom.*
instead.isPrivate: true
has been removed from the Block API. Please usesupports.inserter: false
instead.wp.utils.isExtraSmall
function removed. Please usewp.viewport.isExtraSmall
instead.getEditedPostExcerpt
selector removed (core/editor
). UsegetEditedPostAttribute( 'excerpt' )
instead.See: https://wordpress.org/gutenberg/handbook/reference/deprecated/#3-1-0
Testing instructions:
Verify that there are no regressions in impacted behavior, and importantly that no references to deprecated behaviors exist in core code.
Notably, test the excerpt field, which had not been previously upgraded until this pull request.