[wp-trac] [WordPress Trac] #49698: Issue with replacement for filter deprecation
WordPress Trac
noreply at wordpress.org
Wed Mar 25 15:33:38 UTC 2020
#49698: Issue with replacement for filter deprecation
--------------------------+-----------------------------
Reporter: renathoc | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.5
Component: Plugins | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):
* keywords: => needs-patch
* owner: (none) => SergeyBiryukov
* status: new => accepted
* milestone: Awaiting Review => 5.5
Comment:
Hi there, welcome to WordPress Trac! Thanks for the ticket.
The issue is already fixed for WordPress 5.4 in [46792] / #48817.
That said, I think we should switch the default values for `$replacement`
and `$message` parameters in these functions to an empty string instead of
`null`, to match the documented type of `string`. The `! is_null()` check
for these parameters seems unnecessarily strict, we only need to check for
a truthy value.
This would affect:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `apply_filters_deprecated()`
* `do_action_deprecated()`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49698#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list