WP_Site_Health_Auto_Updates::test_wp_automatic_updates_disabled()
Checks if automatic updates are disabled.
Метод класса: WP_Site_Health_Auto_Updates{}
Хуков нет.
Возвращает
Массив|false
. The test results. False if auto-updates are enabled.
Использование
$WP_Site_Health_Auto_Updates = new WP_Site_Health_Auto_Updates(); $WP_Site_Health_Auto_Updates->test_wp_automatic_updates_disabled();
Список изменений
С версии 5.3.0 | Введена. |
Код WP_Site_Health_Auto_Updates::test_wp_automatic_updates_disabled() WP Site Health Auto Updates::test wp automatic updates disabled WP 6.6.2
public function test_wp_automatic_updates_disabled() { if ( ! class_exists( 'WP_Automatic_Updater' ) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php'; } $auto_updates = new WP_Automatic_Updater(); if ( ! $auto_updates->is_disabled() ) { return false; } return array( 'description' => __( 'All automatic updates are disabled.' ), 'severity' => 'fail', ); }