[wp-trac] [WordPress Trac] #51742: Core auto-updates UI: disable checkbox when filter or constant takes precedent on the option
WordPress Trac
noreply at wordpress.org
Wed Nov 11 08:50:51 UTC 2020
#51742: Core auto-updates UI: disable checkbox when filter or constant takes
precedent on the option
-------------------------------------------------+-------------------------
Reporter: audrasjb | Owner: audrasjb
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.6
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-screenshots needs- | Focuses: ui
copy-review needs-design-feedback dev- |
feedback |
-------------------------------------------------+-------------------------
Changes (by azaozz):
* keywords:
has-patch has-screenshots needs-copy-review needs-design-feedback dev-
feedback needs-refresh
=>
has-patch has-screenshots needs-copy-review needs-design-feedback dev-
feedback
Comment:
Replying to [comment:9 audrasjb]:
Suggestions:
1. The `$major_optin_disabled = false;` var is a "double negative".
Perhaps would be easier to read/understand if it was a "positive", i.e.
`$major_optin_enabled = true;`? Also the name could be a bit more
descriptive, perhaps, like `$upgrade_major_optin_enabled` or similar.
2. The `$is_major_optin_disabled` doesn't seem needed? If there should be
a specific filter for disabling major core updates that runs in addition
to `$upgrade_major = apply_filters( 'allow_major_auto_core_updates',
$upgrade_major );`, it can perhaps be checked right in the conditional
(and expect only boolean `true`).
3. A nitpick, perhaps `do_action(
'after_core_auto_updates_settings_fields', $auto_update_settings );` can
be only `after_core_auto_updates_settings` as there aren't any "fields"
there.
4. The `auto_update_core_major` and similar site options would perhaps be
better as explicitly set to `enabled` or `disabled`. It's more readable
and, as PHP 8.0 explicitly requires) it would be better to save and then
expect a string, not a boolean as a string, etc. Also, these new options
should be pre-populated when updating to WP 5.6.
5. The `WordPress auto-update settings updated.` notice could perhaps be
more specific and "tell" whether major core auto-updates were enabled or
disabled.
6. Looking at the UI, maybe it would be better to have a "link as a
button" for the action link? The rest of the "actions" are all buttons.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51742#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list