Ticket #51827: 51827.2.patch
File 51827.2.patch, 1.8 KB (added by , 4 years ago) |
---|
-
src/wp-admin/update-core.php
291 291 } 292 292 } 293 293 294 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 295 $updater = new WP_Automatic_Updater(); 296 294 297 // Defaults: 295 298 $upgrade_dev = get_site_option( 'auto_update_core_dev', 'enabled' ) === 'enabled'; 296 299 $upgrade_minor = get_site_option( 'auto_update_core_minor', 'enabled' ) === 'enabled'; … … 323 326 $can_set_update_option = false; 324 327 } 325 328 326 if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) 327 || has_filter( 'automatic_updater_disabled' ) 328 ) { 329 if ( true === AUTOMATIC_UPDATER_DISABLED 330 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 331 || true === apply_filters( 'automatic_updater_disabled', false ) 332 ) { 333 $upgrade_dev = false; 334 $upgrade_minor = false; 335 $upgrade_major = false; 336 } 337 // The UI is overridden by the AUTOMATIC_UPDATER_DISABLED constant. 329 if ( $updater->is_disabled() ) { 330 $upgrade_dev = false; 331 $upgrade_minor = false; 332 $upgrade_major = false; 333 334 // The UI is overridden by the AUTOMATIC_UPDATER_DISABLED constant 335 // or the automatic_updater_disabled filter, 336 // or by wp_is_file_mod_allowed( 'automatic_updater' ). 337 // See WP_Automatic_Updater::is_disabled(). 338 338 $can_set_update_option = false; 339 339 } 340 340 … … 370 370 371 371 <p class="auto-update-status"> 372 372 <?php 373 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 374 $updater = new WP_Automatic_Updater(); 373 375 374 if ( $updater->is_vcs_checkout( ABSPATH ) ) { 376 375 _e( 'This site appears to be under version control. Automatic updates are disabled.' ); 377 376 } elseif ( $upgrade_major ) {