WordPress.org

Make WordPress Core

Ticket #51742: 51742.10.diff

File 51742.10.diff, 672 bytes (added by audrasjb, 14 months ago)

Handles automatic_updater_disabled filter as per Mark’s comment

  • src/wp-admin/update-core.php

    diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
    index 904a76366a..83bce165fb 100644
    a b function core_auto_updates_settings() { 
    348348                $can_set_update_option = false;
    349349        }
    350350
    351         if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
    352                 if ( true === AUTOMATIC_UPDATER_DISABLED ) {
     351        if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) || has_filter( 'automatic_updater_disabled' ) ) {
     352                if ( true === AUTOMATIC_UPDATER_DISABLED || true === apply_filters( 'automatic_updater_disabled', null ) ) {
    353353                        $upgrade_dev   = false;
    354354                        $upgrade_minor = false;
    355355                        $upgrade_major = false;