Changeset 48804 for branches/5.5
- Timestamp:
- 08/17/2020 01:02:38 AM (4 years ago)
- Location:
- branches/5.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
-
branches/5.5/src/wp-admin/includes/class-wp-site-health-auto-updates.php
r48655 r48804 28 28 public function run_tests() { 29 29 $tests = array( 30 $this->test_constants( 'WP_AUTO_UPDATE_CORE', true),30 $this->test_constants( 'WP_AUTO_UPDATE_CORE', array( true, 'minor' ) ), 31 31 $this->test_wp_version_check_attached(), 32 32 $this->test_filters_automatic_updater_disabled(), … … 61 61 * 62 62 * @since 5.2.0 63 * 64 * @param string $constant The name of the constant to check. 65 * @param bool $value The value that the constant should be, if set. 63 * @since 5.5.1 The `$value` parameter can accept an array. 64 * 65 * @param string $constant The name of the constant to check. 66 * @param bool|string|array $value The value that the constant should be, if set, 67 * or an array of acceptable values. 66 68 * @return array The test results. 67 69 */ 68 70 public function test_constants( $constant, $value ) { 69 if ( defined( $constant ) && constant( $constant ) !== $value ) { 71 $acceptable_values = (array) $value; 72 73 if ( defined( $constant ) && ! in_array( constant( $constant ), $acceptable_values, true ) ) { 70 74 return array( 71 75 'description' => sprintf(
Note: See TracChangeset
for help on using the changeset viewer.