[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
Fri Nov 13 08:37:08 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:  reopened
 Priority:  normal                     |   Milestone:  5.6
Component:  Upgrade/Install            |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:  ui
---------------------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:42 audrasjb]:
 > @markparnell thanks for spotting this during the release party.
 > `51742.10.diff` fixes this issue.

 51742.10.diff looks good.

 Yeah, it's a pretty "big mess" how the various auto-update constants and
 filters work. That also affects the UI...

 Would be great to add a (big) docblock explaining all of these and how
 they interact, just have to find the right place for it :)

 As of WP 5.6:

 1. There are three options to control core auto-updates:
 `auto_update_core_dev`, `auto_update_core_minor`, and
 `auto_update_core_major`. There is UI only for the last one, and that UI
 is on the Dashboard -> Updates screen. Also there are various constants
 and filters that override these options.

 2. There is the `WP_AUTO_UPDATE_CORE` constant that can be used to enable
 or disable core auto-updates for beta, rc, minor and major versions.
  - This constant can be overridden by the `allow_dev_auto_core_updates`,
 `allow_minor_auto_core_updates`, and `allow_major_auto_core_updates`
 filters.
  - This constant and the filters that override it can be overridden by the
 `auto_update_[core]` filter in `WP_Automatic_Updater::should_update()`.

 3. Then there is also the `AUTOMATIC_UPDATER_DISABLED` constant that
 overrides the `WP_AUTO_UPDATE_CORE` constant and all the filters that
 override it (including the last one).
  - The `AUTOMATIC_UPDATER_DISABLED` constant also has a filter
 `automatic_updater_disabled` to override it.
  - In addition `AUTOMATIC_UPDATER_DISABLED` can be overridden for themes
 and plugins by the `plugins_auto_update_enabled` and
 `themes_auto_update_enabled` filters in
 `wp_is_auto_update_enabled_for_type()`. (Currently this functions only
 supports plugins and themes. Perhaps would be good to add support for core
 too.)

 Did I miss something? :)

 Please edit/correct the above and lets add it in a docblock, probably best
 in `update-core.php` or for the abstracted function @helen mentioned
 above.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51742#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list