-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Remove deprecations slated for 3.5 removal #8687
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.
if ( this.props.onSelectURL ) { | ||
this.props.onSelectURL( this.state.src ); | ||
} | ||
if ( this.state.src && this.props.onSelectURL ) { |
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.
The comment above is a bit unclear to me, but seems to imply we shouldn't (need to) check for truthiness of onSelectUrl
. It says it's required for this function to run, so do we still want to check for it?
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 double checked this one and how it is used, this prop is optional, it is good as is.
@@ -120,7 +100,7 @@ class MediaPlaceholder extends Component { | |||
onFilesDrop={ this.onFilesUpload } | |||
onHTMLDrop={ onHTMLDrop } | |||
/> | |||
{ ( onSelectUrl || onSelectURL ) && ( | |||
{ onSelectURL && ( |
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, based on this the function above should error if called without onSelectURL
being specified.
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.
won't it silently skip this branch?
@@ -242,27 +241,4 @@ class URLInput extends Component { | |||
} | |||
} | |||
|
|||
// TODO: As part of deprecation of UrlInput, the temporary passthrough |
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 to whomever wrote these deprecation comments, because they make reviewing this code removal very straightforward 👍
091f841
to
f396173
Compare
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, tests well.
This PR removes deprecations scheduled to be removed in the upcoming 3.5.0 release.
This includes a few updates to core code which was still using deprecated functions (see #7895, #7947).
Source: https://wordpress.org/gutenberg/handbook/reference/deprecated/#3-4-0