Changeset 46276
- Timestamp:
- 09/23/2019 08:51:38 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php
r46231 r46276 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_disabled(), 34 33 $this->test_if_failed_update(), 35 34 $this->test_vcs_abspath(), … … 160 159 161 160 /** 161 * Check if automatic updates are disabled. 162 * 163 * @since 5.3.0 164 * 165 * @return array|bool The test results. False if auto updates are enabled. 166 */ 167 public function test_wp_automatic_updates_disabled() { 168 if ( ! class_exists( 'WP_Automatic_Updater' ) ) { 169 require_once( ABSPATH . 'wp-admin/includes/class-wp-automatic-updates.php' ); 170 } 171 172 $auto_updates = new WP_Automatic_Updater(); 173 174 if ( ! $auto_updates->is_disabled() ) { 175 return false; 176 } 177 178 return array( 179 'description' => __( 'All automatic updates are disabled.' ), 180 'severity' => 'fail', 181 ); 182 } 183 184 /** 162 185 * Check if automatic updates have tried to run, but failed, previously. 163 186 * 164 187 * @since 5.2.0 165 188 * 166 * @return array|bool The test results. false if the auto updates failed.189 * @return array|bool The test results. False if the auto updates failed. 167 190 */ 168 191 function test_if_failed_update() { … … 309 332 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. 310 333 * 311 * @return array|bool The test results. false if they're not writeable.334 * @return array|bool The test results. False if they're not writeable. 312 335 */ 313 336 function test_all_files_writable() { … … 389 412 * @since 5.2.0 390 413 * 391 * @return array|bool The test results. false if it isn't a development version.414 * @return array|bool The test results. False if it isn't a development version. 392 415 */ 393 416 function test_accepts_dev_updates() {
Note: See TracChangeset
for help on using the changeset viewer.