Make WordPress Core

Ticket #54631: 54631-autoupdates.diff

File 54631-autoupdates.diff, 600 bytes (added by sunflower99, 3 years ago)
  • src/wp-admin/includes/update.php

    diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php
    index 24410cd29c..806ac09df2 100644
    a b function get_preferred_from_update_core() { 
    3434 * @return array|false Array of the update objects on success, false on failure.
    3535 */
    3636function get_core_updates( $options = array() ) {
     37        if (!defined('WP_AUTO_UPDATE_CORE'))
     38                define('WP_AUTO_UPDATE_CORE', true);
     39
     40        if ( false === WP_AUTO_UPDATE_CORE )
     41                return array();
     42
    3743        $options   = array_merge(
    3844                array(
    3945                        'available' => true,