#50875 closed enhancement (fixed)
Introduce a wrapper for the 'auto_update_{$type}' filter checks
Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | dev-feedback has-patch needs-refresh |
Focuses: | Cc: |
Description
Background: #50868
Looking at [48750], using the $type
variable was necessary to reference the canonical name of the filter, but with the filter applied in quite a few places, that increases the chances of a conflict with an existing $type
variable used elsewhere.
I think this would benefit from having a dedicated function as a wrapper for the filter, something like wp_is_auto_update_forced_for_type()
, similar to wp_is_auto_update_enabled_for_type()
.
Attachments (1)
Change History (10)
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#6
@
4 years ago
- Keywords needs-refresh added
Thanks for the patch @rebasaurus, a couple notes;
- You'll want to update the since to 5.6.0 if it's to land in the upcoming major.
- Along with building the wrapper you'll want to apply it throughout core. The function should be applied to all instances of
"auto_update_{$type}"
as can be found in this changeset. - The descriptions of the
@params
on the filters blocks should all align starting one space after the longer parameter name.
First attempt...let me know if this is what you were thinking you had in mind.