Make WordPress Core

Changeset 49592


Ignore:
Timestamp:
11/13/2020 11:12:55 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Account for the automatic_updater_disabled filter in core auto-update settings UI.

Follow-up to [49587].

Props markparnell, audrasjb.
See #51742.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r49591 r49592  
    349349        }
    350350
    351         if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
    352                 if ( true === AUTOMATIC_UPDATER_DISABLED ) {
     351        if ( defined( 'AUTOMATIC_UPDATER_DISABLED' )
     352                || has_filter( 'automatic_updater_disabled' )
     353        ) {
     354                if ( true === AUTOMATIC_UPDATER_DISABLED
     355                        /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
     356                        || true === apply_filters( 'automatic_updater_disabled', false )
     357                ) {
    353358                        $upgrade_dev   = false;
    354359                        $upgrade_minor = false;
Note: See TracChangeset for help on using the changeset viewer.