Ticket #47869: 47869.3.patch
| File 47869.3.patch, 1.4 KB (added by , 7 years ago) |
|---|
-
src/wp-admin/includes/class-wp-site-health-auto-updates.php
26 26 */ 27 27 public function run_tests() { 28 28 $tests = array( 29 $this->test_constants( 'DISALLOW_FILE_MODS', false ),30 $this->test_constants( 'AUTOMATIC_UPDATER_DISABLED', false ),31 29 $this->test_constants( 'WP_AUTO_UPDATE_CORE', true ), 32 30 $this->test_wp_version_check_attached(), 33 31 $this->test_filters_automatic_updater_disabled(), 32 $this->test_wp_automatic_updates_is_disabled(), 34 33 $this->test_if_failed_update(), 35 34 $this->test_vcs_abspath(), 36 35 $this->test_check_wp_filesystem_method(), … … 157 156 ); 158 157 } 159 158 } 159 160 public function test_wp_automatic_updates_is_disabled() { 161 if ( ! class_exists( 'WP_Automatic_Updater' ) ) { 162 require_once( ABSPATH . 'wp-admin/includes/class-wp-automatic-updates.php' ); 163 } 164 165 $auto_updates = new WP_Automatic_Updater(); 166 167 if ( ! $auto_updates->is_disabled() ) { 168 return false; 169 } 170 171 return array( 172 'description' => __( 'All automatic updates are disabled.' ), 173 'severity' => 'fail', 174 ); 175 } 160 176 161 177 /** 162 178 * Check if automatic updates have tried to run, but failed, previously.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)