[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/rest-api/endpoints/ -> class-wp-rest-site-health-controller.php (summary)

REST API: WP_REST_Site_Health_Controller class

File Size: 376 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_REST_Site_Health_Controller:: (11 methods):
  __construct()
  register_routes()
  validate_request_permission()
  test_background_updates()
  test_dotorg_communication()
  test_loopback_requests()
  test_https_status()
  test_authorization_header()
  get_directory_sizes()
  load_admin_textdomain()
  get_item_schema()


Class: WP_REST_Site_Health_Controller  - X-Ref

Core class for interacting with Site Health tests.

__construct( $site_health )   X-Ref
Site Health controller constructor.

since: 5.6.0
param: WP_Site_Health $site_health An instance of the site health class.

register_routes()   X-Ref
Registers API routes.

since: 5.6.0

validate_request_permission( $check )   X-Ref
Validates if the current user can request this REST endpoint.

return: bool
since: 5.6.0
param: string $check The endpoint check being ran.

test_background_updates()   X-Ref
Checks if background updates work as expected.

return: array
since: 5.6.0

test_dotorg_communication()   X-Ref
Checks that the site can reach the WordPress.org API.

return: array
since: 5.6.0

test_loopback_requests()   X-Ref
Checks that loopbacks can be performed.

return: array
since: 5.6.0

test_https_status()   X-Ref
Checks that the site's frontend can be accessed over HTTPS.

return: array
since: 5.7.0

test_authorization_header()   X-Ref
Checks that the authorization header is valid.

return: array
since: 5.6.0

get_directory_sizes()   X-Ref
Gets the current directory sizes for this install.

return: array|WP_Error
since: 5.6.0

load_admin_textdomain()   X-Ref
Loads the admin textdomain for Site Health tests.

The {@see WP_Site_Health} class is defined in WP-Admin, while the REST API operates in a front-end context.
This means that the translations for Site Health won't be loaded by default in {@see load_default_textdomain()}.

since: 5.6.0

get_item_schema()   X-Ref
Gets the schema for each site health test.

return: array The test schema.
since: 5.6.0



Generated: Wed Apr 24 01:00:03 2024 Cross-referenced by PHPXref 0.7.1