WP_Site_Health_Auto_Updates::run_tests()
Runs tests to determine if auto-updates can run.
Метод класса: WP_Site_Health_Auto_Updates{}
Хуков нет.
Возвращает
Массив
. The test results.
Использование
$WP_Site_Health_Auto_Updates = new WP_Site_Health_Auto_Updates(); $WP_Site_Health_Auto_Updates->run_tests();
Список изменений
С версии 5.2.0 | Введена. |
Код WP_Site_Health_Auto_Updates::run_tests() WP Site Health Auto Updates::run tests WP 6.7.1
public function run_tests() { $tests = array( $this->test_constants( 'WP_AUTO_UPDATE_CORE', array( true, 'beta', 'rc', 'development', 'branch-development', 'minor' ) ), $this->test_wp_version_check_attached(), $this->test_filters_automatic_updater_disabled(), $this->test_wp_automatic_updates_disabled(), $this->test_if_failed_update(), $this->test_vcs_abspath(), $this->test_check_wp_filesystem_method(), $this->test_all_files_writable(), $this->test_accepts_dev_updates(), $this->test_accepts_minor_updates(), ); $tests = array_filter( $tests ); $tests = array_map( static function ( $test ) { $test = (object) $test; if ( empty( $test->severity ) ) { $test->severity = 'warning'; } return $test; }, $tests ); return $tests; }