Changeset 50399 for trunk/src/wp-admin/includes/class-wp-site-health.php
- Timestamp:
- 02/22/2021 12:49:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health.php
r50381 r50399 2648 2648 */ 2649 2649 function can_perform_loopback() { 2650 $body = array( 'site-health' => 'loopback-test' ); 2650 2651 $cookies = wp_unslash( $_COOKIE ); 2651 2652 $timeout = 10; … … 2661 2662 } 2662 2663 2663 $url = home_url(); 2664 2665 $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); 2664 $url = site_url( 'wp-cron.php' ); 2665 2666 /* 2667 * A post request is used for the wp-cron.php loopback test to cause the file 2668 * to finish early without triggering cron jobs. This has two benefits: 2669 * - cron jobs are not triggered a second time on the site health page, 2670 * - the loopback request finishes sooner providing a quicker result. 2671 * 2672 * Using a POST request causes the loopback to differ slightly to the standard 2673 * GET request WordPress uses for wp-cron.php loopback requests but is close 2674 * enough. See https://core.trac.wordpress.org/ticket/52547 2675 */ 2676 $r = wp_remote_post( $url, compact( 'body', 'cookies', 'headers', 'timeout', 'sslverify' ) ); 2666 2677 2667 2678 if ( is_wp_error( $r ) ) {
Note: See TracChangeset
for help on using the changeset viewer.