Uses
Uses | Description |
---|---|
wp-includes/l10n.php: __() | Retrieve the translation of $text. |
Test if auto-updates related constants are set correctly.
(string) (Required) The name of the constant to check.
(bool|string|array) (Required) The value that the constant should be, if set, or an array of acceptable values.
(array) The test results.
File: wp-admin/includes/class-wp-site-health-auto-updates.php
public function test_constants( $constant, $value ) { $acceptable_values = (array) $value; if ( defined( $constant ) && ! in_array( constant( $constant ), $acceptable_values, true ) ) { return array( 'description' => sprintf( /* translators: %s: Name of the constant used. */ __( 'The %s constant is defined and enabled.' ), "<code>$constant</code>" ), 'severity' => 'fail', ); } }
Version | Description |
---|---|
5.5.1 | The $value parameter can accept an array. |
5.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_health_auto_updates/test_constants