| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
REST API: WP_REST_Site_Health_Controller class
| File Size: | 407 lines (10 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 1 file wp-admin/includes/class-wp-debug-data.php |
WP_REST_Site_Health_Controller:: (12 methods):
__construct()
register_routes()
validate_request_permission()
test_background_updates()
test_dotorg_communication()
test_loopback_requests()
test_https_status()
test_authorization_header()
test_page_cache()
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. param: WP_Site_Health $site_health An instance of the site health class. |
| register_routes() X-Ref |
| Registers API routes. |
| validate_request_permission( $check ) X-Ref |
| Validates if the current user can request this REST endpoint. param: string $check The endpoint check being ran. return: bool |
| test_background_updates() X-Ref |
| Checks if background updates work as expected. return: array |
| test_dotorg_communication() X-Ref |
| Checks that the site can reach the WordPress.org API. return: array |
| test_loopback_requests() X-Ref |
| Checks that loopbacks can be performed. return: array |
| test_https_status() X-Ref |
| Checks that the site's frontend can be accessed over HTTPS. return: array |
| test_authorization_header() X-Ref |
| Checks that the authorization header is valid. return: array |
| test_page_cache() X-Ref |
| Checks that full page cache is active. return: array The test result. |
| get_directory_sizes() X-Ref |
| Gets the current directory sizes for this install. return: array|WP_Error |
| 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()}. |
| get_item_schema() X-Ref |
| Gets the schema for each site health test. return: array The test schema. |
| Generated : Sat Apr 18 08:20:10 2026 | Cross-referenced by PHPXref |