WP_Site_Health_Auto_Updates::test_constants( string $constant, bool $value )

Test if auto-updates related constants are set correctly.

Description Description

Parameters Parameters


(string) (Required) The name of the constant to check.


(bool) (Required) The value that the constant should be, if set.

Top ↑

Return Return

(array) The test results.

Top ↑

Source Source

File: wp-admin/includes/class-wp-site-health-auto-updates.php

	public function test_constants( $constant, $value ) {
		if ( defined( $constant ) && constant( $constant ) != $value ) {
			return array(
				'description' => sprintf(
					/* translators: %s: Name of the constant used. */
					__( 'The %s constant is defined and enabled.' ),
				'severity'    => 'fail',

Top ↑

Changelog Changelog

Version Description
5.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.