WordPress at Your Fingertips
function is not described

WP_Site_Health::get_test_plugin_theme_auto_updates() public WP 5.5.0

Test if plugin and theme auto-updates appear to be configured correctly.

{} It's a method of the class: WP_Site_Health{}

No Hooks.

Return

Array. The test results.

Usage

$WP_Site_Health = new WP_Site_Health();
$WP_Site_Health->get_test_plugin_theme_auto_updates();

Changelog

Since 5.5.0 Introduced.

Code of WP_Site_Health::get_test_plugin_theme_auto_updates() WP 5.8.2

public function get_test_plugin_theme_auto_updates() {
	$result = array(
		'label'       => __( 'Plugin and theme auto-updates appear to be configured correctly' ),
		'status'      => 'good',
		'badge'       => array(
			'label' => __( 'Security' ),
			'color' => 'blue',
		),
		'description' => sprintf(
			'<p>%s</p>',
			__( 'Plugin and theme auto-updates ensure that the latest versions are always installed.' )
		),
		'actions'     => '',
		'test'        => 'plugin_theme_auto_updates',
	);

	$check_plugin_theme_updates = $this->detect_plugin_theme_auto_update_issues();

	$result['status'] = $check_plugin_theme_updates->status;

	if ( 'good' !== $result['status'] ) {
		$result['label'] = __( 'Your site may have problems auto-updating plugins and themes' );

		$result['description'] .= sprintf(
			'<p>%s</p>',
			$check_plugin_theme_updates->message
		);
	}

	return $result;
}