diff --git wp-admin/includes/class-wp-upgrader.php wp-admin/includes/class-wp-upgrader.php
index 51aa97c..3373223 100644
|
|
|
class WP_Automatic_Upgrader { |
| 1469 | 1469 | |
| 1470 | 1470 | static $upgrade_results = array(); |
| 1471 | 1471 | |
| 1472 | | static function upgrader_disabled() { |
| | 1472 | static function upgrader_enabled() { |
| 1473 | 1473 | // That's a no if you don't want files changes |
| 1474 | 1474 | if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) |
| 1475 | | return true; |
| | 1475 | return false; |
| 1476 | 1476 | |
| 1477 | 1477 | // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters |
| 1478 | 1478 | if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED ) |
| 1479 | | return true; |
| | 1479 | return false; |
| 1480 | 1480 | |
| 1481 | 1481 | if ( defined( 'WP_INSTALLING' ) ) |
| 1482 | | return true; |
| | 1482 | return false; |
| 1483 | 1483 | |
| 1484 | | return apply_filters( 'auto_upgrader_disabled', false ); |
| | 1484 | return apply_filters( 'auto_upgrader_enabled', true ); |
| 1485 | 1485 | } |
| 1486 | 1486 | |
| 1487 | 1487 | /** |
| … |
… |
class WP_Automatic_Upgrader { |
| 1510 | 1510 | */ |
| 1511 | 1511 | static function should_auto_update( $type, $item, $context ) { |
| 1512 | 1512 | |
| 1513 | | if ( self::upgrader_disabled() ) |
| | 1513 | if ( !self::upgrader_enabled() ) |
| 1514 | 1514 | return false; |
| 1515 | 1515 | |
| 1516 | 1516 | if ( self::is_vcs_checkout( $context ) ) |
diff --git wp-includes/update.php wp-includes/update.php
index 79903f5..b9c5e8a 100644
|
|
|
function wp_auto_updates_maybe_update() { |
| 398 | 398 | include_once ABSPATH . '/wp-admin/includes/admin.php'; |
| 399 | 399 | include_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php'; |
| 400 | 400 | |
| 401 | | if ( WP_Automatic_Upgrader::upgrader_disabled() ) |
| | 401 | if ( !WP_Automatic_Upgrader::upgrader_enabled() ) |
| 402 | 402 | return; |
| 403 | 403 | |
| 404 | 404 | WP_Automatic_Upgrader::perform_auto_updates(); |