Changeset 49677
- Timestamp:
- 11/22/2020 01:01:46 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r49668 r49677 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'; … … 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 } … … 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.' );
Note: See TracChangeset
for help on using the changeset viewer.