WP_Site_Health::get_test_loopback_requests

Advertisement

Summery Summery

Test if loopbacks work as expected.

Syntax Syntax

WP_Site_Health::get_test_loopback_requests()

Description Description

A loopback is when WordPress queries itself, for example to start a new WP_Cron instance, or when editing a plugin or theme. This has shown itself to be a recurring issue as code can very easily break this interaction.

Return Return

(array) The test results.

Source Source

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

		foreach ( $tests as $test ) {
			$severity_string = __( 'Passed' );

			if ( 'fail' === $test->severity ) {
				$result['label'] = __( 'Background updates are not working as expected' );

				$result['status'] = 'critical';

				$severity_string = __( 'Error' );
			}

			if ( 'warning' === $test->severity && 'good' === $result['status'] ) {
				$result['label'] = __( 'Background updates may not be working properly' );

				$result['status'] = 'recommended';

				$severity_string = __( 'Warning' );
			}

			$output .= sprintf(
				'<li><span class="dashicons %s"><span class="screen-reader-text">%s</span></span> %s</li>',
				esc_attr( $test->severity ),
				$severity_string,
				$test->description
			);
		}

		$output .= '</ul>';

		if ( 'good' !== $result['status'] ) {

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply