Changeset 44986
- Timestamp:
- 03/23/2019 03:54:16 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r44740 r44986 264 264 [ WORKING_DIR + 'wp-admin/js/tags-suggest.js' ]: [ './src/js/_enqueues/admin/tags-suggest.js' ], 265 265 [ WORKING_DIR + 'wp-admin/js/tags.js' ]: [ './src/js/_enqueues/admin/tags.js' ], 266 [ WORKING_DIR + 'wp-admin/js/site-health.js' ]: [ './src/js/_enqueues/admin/site-health.js' ], 266 267 [ WORKING_DIR + 'wp-admin/js/theme-plugin-editor.js' ]: [ './src/js/_enqueues/wp/theme-plugin-editor.js' ], 267 268 [ WORKING_DIR + 'wp-admin/js/theme.js' ]: [ './src/js/_enqueues/wp/theme.js' ], -
trunk/src/wp-admin/admin-ajax.php
r42986 r44986 132 132 'wp-privacy-export-personal-data', 133 133 'wp-privacy-erase-personal-data', 134 'health-check-site-status-result', 135 'health-check-dotorg-communication', 136 'health-check-is-in-debug-mode', 137 'health-check-background-updates', 138 'health-check-loopback-requests', 134 139 ); 135 140 -
trunk/src/wp-admin/css/wp-admin.css
r32994 r44986 13 13 @import url(site-icon.css); 14 14 @import url(l10n.css); 15 @import url(site-health.css); -
trunk/src/wp-admin/includes/ajax-actions.php
r44975 r44986 4859 4859 wp_send_json_success( $response ); 4860 4860 } 4861 4862 /** 4863 * Ajax handler for site health checks on server communication. 4864 * 4865 * @since 5.2.0 4866 */ 4867 function wp_ajax_health_check_dotorg_communication() { 4868 check_ajax_referer( 'health-check-site-status' ); 4869 4870 if ( ! current_user_can( 'install_plugins' ) ) { 4871 wp_send_json_error(); 4872 } 4873 4874 if ( ! class_exists( 'WP_Site_Health' ) ) { 4875 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4876 } 4877 4878 $site_health = new WP_Site_Health(); 4879 wp_send_json_success( $site_health->get_test_dotorg_communication() ); 4880 } 4881 4882 /** 4883 * Ajax handler for site health checks on debug mode. 4884 * 4885 * @since 5.2.0 4886 */ 4887 function wp_ajax_health_check_is_in_debug_mode() { 4888 wp_verify_nonce( 'health-check-site-status' ); 4889 4890 if ( ! current_user_can( 'install_plugins' ) ) { 4891 wp_send_json_error(); 4892 } 4893 4894 if ( ! class_exists( 'WP_Site_Health' ) ) { 4895 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4896 } 4897 4898 $site_health = new WP_Site_Health(); 4899 wp_send_json_success( $site_health->get_test_is_in_debug_mode() ); 4900 } 4901 4902 /** 4903 * Ajax handler for site health checks on background updates. 4904 * 4905 * @since 5.2.0 4906 */ 4907 function wp_ajax_health_check_background_updates() { 4908 check_ajax_referer( 'health-check-site-status' ); 4909 4910 if ( ! current_user_can( 'install_plugins' ) ) { 4911 wp_send_json_error(); 4912 } 4913 4914 if ( ! class_exists( 'WP_Site_Health' ) ) { 4915 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4916 } 4917 4918 $site_health = new WP_Site_Health(); 4919 wp_send_json_success( $site_health->get_test_background_updates() ); 4920 } 4921 4922 4923 /** 4924 * Ajax handler for site health checks on loopback requests. 4925 * 4926 * @since 5.2.0 4927 */ 4928 function wp_ajax_health_check_loopback_requests() { 4929 check_ajax_referer( 'health-check-site-status' ); 4930 4931 if ( ! current_user_can( 'install_plugins' ) ) { 4932 wp_send_json_error(); 4933 } 4934 4935 if ( ! class_exists( 'WP_Site_Health' ) ) { 4936 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4937 } 4938 4939 $site_health = new WP_Site_Health(); 4940 wp_send_json_success( $site_health->get_test_loopback_requests() ); 4941 } 4942 4943 /** 4944 * Ajax handler for site health check to update the result status. 4945 * 4946 * @since 5.2.0 4947 */ 4948 function wp_ajax_health_check_site_status_result() { 4949 check_ajax_referer( 'health-check-site-status-result' ); 4950 4951 if ( ! current_user_can( 'install_plugins' ) ) { 4952 wp_send_json_error(); 4953 } 4954 4955 set_transient( 'health-check-site-status-result', wp_json_encode( $_POST['counts'] ) ); 4956 4957 wp_send_json_success(); 4958 } -
trunk/src/wp-admin/menu.php
r44924 r44986 264 264 $submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' ); 265 265 $submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' ); 266 $submenu['tools.php'][20] = array( __( 'Site Health' ), 'install_plugins', 'site-health.php' ); 266 267 if ( is_multisite() && ! is_main_site() ) { 267 268 $submenu['tools.php'][25] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' ); -
trunk/src/wp-includes/script-loader.php
r44960 r44986 1689 1689 ); 1690 1690 1691 $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); 1692 1691 1693 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); 1692 1694 did_action( 'init' ) && $scripts->localize( … … 1934 1936 $styles->add( 'l10n', "/wp-admin/css/l10n$suffix.css" ); 1935 1937 $styles->add( 'code-editor', "/wp-admin/css/code-editor$suffix.css", array( 'wp-codemirror' ) ); 1938 $styles->add( 'site-health', "/wp-admin/css/site-health$suffix.css" ); 1936 1939 1937 1940 $styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
Note: See TracChangeset
for help on using the changeset viewer.