diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
index c08e57f6e9..4597def075 100644
|
a
|
b
|
function core_auto_updates_settings() { |
| 322 | 322 | $upgrade_minor = get_site_option( 'auto_update_core_minor', true ); |
| 323 | 323 | $upgrade_major = get_site_option( 'auto_update_core_major', false ); |
| 324 | 324 | |
| | 325 | $major_optin_disabled = ''; |
| 325 | 326 | // WP_AUTO_UPDATE_CORE = true (all), 'beta', 'rc', 'minor', false. |
| 326 | 327 | if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) { |
| 327 | 328 | if ( false === WP_AUTO_UPDATE_CORE ) { |
| … |
… |
function core_auto_updates_settings() { |
| 343 | 344 | $upgrade_minor = true; |
| 344 | 345 | $upgrade_major = false; |
| 345 | 346 | } |
| | 347 | $major_optin_disabled = ' disabled'; |
| 346 | 348 | } |
| 347 | 349 | |
| 348 | 350 | /** This filter is documented in wp-admin/includes/class-core-upgrader.php */ |
| … |
… |
function core_auto_updates_settings() { |
| 352 | 354 | /** This filter is documented in wp-admin/includes/class-core-upgrader.php */ |
| 353 | 355 | $upgrade_major = apply_filters( 'allow_major_auto_core_updates', $upgrade_major ); |
| 354 | 356 | |
| | 357 | $is_major_optin_disabled = apply_filters( 'allow_major_auto_core_updates', null ); |
| | 358 | if ( isset( $is_major_optin_disabled ) ) { |
| | 359 | $major_optin_disabled = ' disabled'; |
| | 360 | } |
| | 361 | |
| 355 | 362 | $auto_update_settings = array( |
| 356 | 363 | 'dev' => $upgrade_dev, |
| 357 | 364 | 'minor' => $upgrade_minor, |
| … |
… |
function core_auto_updates_settings() { |
| 373 | 380 | ?> |
| 374 | 381 | </p> |
| 375 | 382 | <p> |
| 376 | | <input type="checkbox" name="core-auto-updates-major" id="core-auto-updates-major" value="1" <?php checked( $auto_update_settings['major'], 1 ); ?> /> |
| | 383 | <input type="checkbox" name="core-auto-updates-major" id="core-auto-updates-major" value="1" <?php checked( $auto_update_settings['major'], 1 ); ?> <?php echo $major_optin_disabled; ?> /> |
| 377 | 384 | <label for="core-auto-updates-major"> |
| 378 | 385 | <?php _e( 'Automatically keep this site up-to-date with regular feature updates.' ); ?> |
| | 386 | <?php if ( ! empty( $major_optin_disabled ) ) : ?> |
| | 387 | <em><?php _e( 'This setting has been disabled using a constant or a filter.' ); ?></em> |
| | 388 | <?php endif; ?> |
| 379 | 389 | </label> |
| 380 | 390 | </p> |
| 381 | 391 | <?php |