4 * |
4 * |
5 * @package WordPress |
5 * @package WordPress |
6 * @subpackage Administration |
6 * @subpackage Administration |
7 */ |
7 */ |
8 |
8 |
9 /** WordPress Administration Bootstrap */ |
9 if ( ! defined( 'ABSPATH' ) ) { |
10 require_once __DIR__ . '/admin.php'; |
10 die(); |
11 |
|
12 $title = __( 'Site Health Info' ); |
|
13 |
|
14 if ( ! current_user_can( 'view_site_health_checks' ) ) { |
|
15 wp_die( __( 'Sorry, you are not allowed to access the debug data.' ), '', 403 ); |
|
16 } |
11 } |
17 |
|
18 wp_enqueue_style( 'site-health' ); |
|
19 wp_enqueue_script( 'site-health' ); |
|
20 |
12 |
21 if ( ! class_exists( 'WP_Debug_Data' ) ) { |
13 if ( ! class_exists( 'WP_Debug_Data' ) ) { |
22 require_once ABSPATH . 'wp-admin/includes/class-wp-debug-data.php'; |
14 require_once ABSPATH . 'wp-admin/includes/class-wp-debug-data.php'; |
23 } |
15 } |
24 if ( ! class_exists( 'WP_Site_Health' ) ) { |
16 if ( ! class_exists( 'WP_Site_Health' ) ) { |
25 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php'; |
17 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php'; |
26 } |
18 } |
27 |
19 |
28 $health_check_site_status = WP_Site_Health::get_instance(); |
20 $health_check_site_status = WP_Site_Health::get_instance(); |
29 |
|
30 require_once ABSPATH . 'wp-admin/admin-header.php'; |
|
31 ?> |
21 ?> |
32 <div class="health-check-header"> |
|
33 <div class="health-check-title-section"> |
|
34 <h1> |
|
35 <?php _e( 'Site Health' ); ?> |
|
36 </h1> |
|
37 </div> |
|
38 |
|
39 <div class="health-check-title-section site-health-progress-wrapper loading hide-if-no-js"> |
|
40 <div class="site-health-progress"> |
|
41 <svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg"> |
|
42 <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle> |
|
43 <circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle> |
|
44 </svg> |
|
45 </div> |
|
46 <div class="site-health-progress-label"> |
|
47 <?php _e( 'Results are still loading…' ); ?> |
|
48 </div> |
|
49 </div> |
|
50 |
|
51 <nav class="health-check-tabs-wrapper hide-if-no-js" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> |
|
52 <a href="<?php echo esc_url( admin_url( 'site-health.php' ) ); ?>" class="health-check-tab"> |
|
53 <?php |
|
54 /* translators: Tab heading for Site Health Status page. */ |
|
55 _ex( 'Status', 'Site Health' ); |
|
56 ?> |
|
57 </a> |
|
58 |
|
59 <a href="<?php echo esc_url( admin_url( 'site-health.php?tab=debug' ) ); ?>" class="health-check-tab active" aria-current="true"> |
|
60 <?php |
|
61 /* translators: Tab heading for Site Health Info page. */ |
|
62 _ex( 'Info', 'Site Health' ); |
|
63 ?> |
|
64 </a> |
|
65 </nav> |
|
66 </div> |
|
67 |
|
68 <hr class="wp-header-end"> |
|
69 |
22 |
70 <div class="notice notice-error hide-if-js"> |
23 <div class="notice notice-error hide-if-js"> |
71 <p><?php _e( 'The Site Health check requires JavaScript.' ); ?></p> |
24 <p><?php _e( 'The Site Health check requires JavaScript.' ); ?></p> |
72 </div> |
25 </div> |
73 |
26 |