Ticket #47869: 47869.2.patch
| File 47869.2.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(), … … 155 154 ); 156 155 } 157 156 } 157 158 public function test_wp_automatic_updates_is_disabled() { 159 if ( ! class_exists( 'WP_Automatic_Updater' ) ) { 160 require_once( ABSPATH . 'wp-admin/includes/class-wp-automatic-updates.php' ); 161 } 162 163 $auto_updatesa = new WP_Automatic_Updater(); 164 165 if ( ! $auto_updatesa->is_disabled() ) { 166 return false; 167 } 168 169 return array( 170 'description' => __( 'All automatic updates are disabled.' ), 171 'severity' => 'fail', 172 ); 173 } 158 174 159 175 /** 160 176 * 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)