Changeset 49682
- Timestamp:
- 11/22/2020 04:04:04 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
- Property svn:mergeinfo changed
/trunk merged: 49677,49681
- Property svn:mergeinfo changed
-
branches/5.6/src/wp-admin/update-core.php
r49638 r49682 290 290 } 291 291 292 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 293 $updater = new WP_Automatic_Updater(); 294 292 295 // Defaults: 293 296 $upgrade_dev = get_site_option( 'auto_update_core_dev', 'enabled' ) === 'enabled'; … … 318 321 } 319 322 320 // The UI is overridden by the WP_AUTO_UPDATE_COREconstant.323 // The UI is overridden by the `WP_AUTO_UPDATE_CORE` constant. 321 324 $can_set_update_option = false; 322 325 } 323 326 324 if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) 325 || has_filter( 'automatic_updater_disabled' ) 326 ) { 327 if ( true === AUTOMATIC_UPDATER_DISABLED 328 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 329 || true === apply_filters( 'automatic_updater_disabled', false ) 330 ) { 331 $upgrade_dev = false; 332 $upgrade_minor = false; 333 $upgrade_major = false; 334 } 335 // The UI is overridden by the AUTOMATIC_UPDATER_DISABLED constant. 327 if ( $updater->is_disabled() ) { 328 $upgrade_dev = false; 329 $upgrade_minor = false; 330 $upgrade_major = false; 331 332 /* 333 * The UI is overridden by the `AUTOMATIC_UPDATER_DISABLED` constant 334 * or the `automatic_updater_disabled` filter, 335 * or by `wp_is_file_mod_allowed( 'automatic_updater' )`. 336 * See `WP_Automatic_Updater::is_disabled()`. 337 */ 336 338 $can_set_update_option = false; 337 339 } 338 340 339 // Is the UI overridden by a plugin using the allow_major_auto_core_updatesfilter?341 // Is the UI overridden by a plugin using the `allow_major_auto_core_updates` filter? 340 342 if ( has_filter( 'allow_major_auto_core_updates' ) ) { 341 343 $can_set_update_option = false; … … 369 371 <p class="auto-update-status"> 370 372 <?php 371 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 372 $updater = new WP_Automatic_Updater(); 373 373 374 if ( $updater->is_vcs_checkout( ABSPATH ) ) { 374 375 _e( 'This site appears to be under version control. Automatic updates are disabled.' );
Note: See TracChangeset
for help on using the changeset viewer.