Changeset 44984
- Timestamp:
- 03/23/2019 03:17:14 AM (6 years ago)
- Location:
- branches/5.1
- Files:
-
- 7 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1/Gruntfile.js
r44740 r44984 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' ], -
branches/5.1/src/wp-admin/admin-ajax.php
r42986 r44984 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 -
branches/5.1/src/wp-admin/css/wp-admin.css
r32994 r44984 13 13 @import url(site-icon.css); 14 14 @import url(l10n.css); 15 @import url(site-health.css); -
branches/5.1/src/wp-admin/includes/ajax-actions.php
r44843 r44984 4836 4836 wp_send_json_success( $response ); 4837 4837 } 4838 4839 /** 4840 * Ajax handler for site health checks on server communication. 4841 * 4842 * @since 5.2.0 4843 */ 4844 function wp_ajax_health_check_dotorg_communication() { 4845 check_ajax_referer( 'health-check-site-status' ); 4846 4847 if ( ! current_user_can( 'install_plugins' ) ) { 4848 wp_send_json_error(); 4849 } 4850 4851 if ( ! class_exists( 'WP_Site_Health' ) ) { 4852 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4853 } 4854 4855 $site_health = new WP_Site_Health(); 4856 wp_send_json_success( $site_health->get_test_dotorg_communication() ); 4857 } 4858 4859 /** 4860 * Ajax handler for site health checks on debug mode. 4861 * 4862 * @since 5.2.0 4863 */ 4864 function wp_ajax_health_check_is_in_debug_mode() { 4865 wp_verify_nonce( 'health-check-site-status' ); 4866 4867 if ( ! current_user_can( 'install_plugins' ) ) { 4868 wp_send_json_error(); 4869 } 4870 4871 if ( ! class_exists( 'WP_Site_Health' ) ) { 4872 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4873 } 4874 4875 $site_health = new WP_Site_Health(); 4876 wp_send_json_success( $site_health->get_test_is_in_debug_mode() ); 4877 } 4878 4879 /** 4880 * Ajax handler for site health checks on background updates. 4881 * 4882 * @since 5.2.0 4883 */ 4884 function wp_ajax_health_check_background_updates() { 4885 check_ajax_referer( 'health-check-site-status' ); 4886 4887 if ( ! current_user_can( 'install_plugins' ) ) { 4888 wp_send_json_error(); 4889 } 4890 4891 if ( ! class_exists( 'WP_Site_Health' ) ) { 4892 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4893 } 4894 4895 $site_health = new WP_Site_Health(); 4896 wp_send_json_success( $site_health->get_test_background_updates() ); 4897 } 4898 4899 4900 /** 4901 * Ajax handler for site health checks on loopback requests. 4902 * 4903 * @since 5.2.0 4904 */ 4905 function wp_ajax_health_check_loopback_requests() { 4906 check_ajax_referer( 'health-check-site-status' ); 4907 4908 if ( ! current_user_can( 'install_plugins' ) ) { 4909 wp_send_json_error(); 4910 } 4911 4912 if ( ! class_exists( 'WP_Site_Health' ) ) { 4913 require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' ); 4914 } 4915 4916 $site_health = new WP_Site_Health(); 4917 wp_send_json_success( $site_health->get_test_loopback_requests() ); 4918 } 4919 4920 /** 4921 * Ajax handler for site health check to update the result status. 4922 * 4923 * @since 5.2.0 4924 */ 4925 function wp_ajax_health_check_site_status_result() { 4926 check_ajax_referer( 'health-check-site-status-result' ); 4927 4928 if ( ! current_user_can( 'install_plugins' ) ) { 4929 wp_send_json_error(); 4930 } 4931 4932 set_transient( 'health-check-site-status-result', wp_json_encode( $_POST['counts'] ) ); 4933 4934 wp_send_json_success(); 4935 } -
branches/5.1/src/wp-admin/menu.php
r43223 r44984 257 257 $submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' ); 258 258 $submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' ); 259 $submenu['tools.php'][20] = array( __( 'Site Health' ), 'install_plugins', 'site-health.php' ); 259 260 if ( is_multisite() && ! is_main_site() ) { 260 261 $submenu['tools.php'][25] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' ); -
branches/5.1/src/wp-includes/script-loader.php
r44763 r44984 1638 1638 ); 1639 1639 1640 $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); 1641 1640 1642 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); 1641 1643 did_action( 'init' ) && $scripts->localize( … … 1883 1885 $styles->add( 'l10n', "/wp-admin/css/l10n$suffix.css" ); 1884 1886 $styles->add( 'code-editor', "/wp-admin/css/code-editor$suffix.css", array( 'wp-codemirror' ) ); 1887 $styles->add( 'site-health', "/wp-admin/css/site-health$suffix.css" ); 1885 1888 1886 1889 $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.