Changeset 51066
- Timestamp:
- 06/03/2021 11:13:14 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health.php
r51057 r51066 2311 2311 'test' => 'http_requests', 2312 2312 ), 2313 'rest_availability' => array( 2314 'label' => __( 'REST API availability' ), 2315 'test' => 'rest_availability', 2316 'skip_cron' => true, 2317 ), 2313 2318 'debug_enabled' => array( 2314 2319 'label' => __( 'Debugging enabled' ), … … 2353 2358 2354 2359 // Conditionally include Authorization header test if the site isn't protected by Basic Auth. 2355 if ( function_exists( 'wp_is_site_protected_by_basic_auth' ) ) { 2356 if ( ! wp_is_site_protected_by_basic_auth() ) { 2357 $tests['async']['authorization_header'] = array( 2358 'label' => __( 'Authorization header' ), 2359 'test' => rest_url( 'wp-site-health/v1/tests/authorization-header' ), 2360 'has_rest' => true, 2361 'headers' => array( 'Authorization' => 'Basic ' . base64_encode( 'user:pwd' ) ), 2362 'skip_cron' => true, 2363 ); 2364 } 2365 } 2366 2367 // Conditionally include REST rules if the function for it exists. 2368 if ( function_exists( 'rest_url' ) ) { 2369 $tests['direct']['rest_availability'] = array( 2370 'label' => __( 'REST API availability' ), 2371 'test' => 'rest_availability', 2360 if ( ! wp_is_site_protected_by_basic_auth() ) { 2361 $tests['async']['authorization_header'] = array( 2362 'label' => __( 'Authorization header' ), 2363 'test' => rest_url( 'wp-site-health/v1/tests/authorization-header' ), 2364 'has_rest' => true, 2365 'headers' => array( 'Authorization' => 'Basic ' . base64_encode( 'user:pwd' ) ), 2372 2366 'skip_cron' => true, 2373 2367 );
Note: See TracChangeset
for help on using the changeset viewer.