Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wp-admin/includes/class-wp-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -1884,13 +1884,13 @@ public static function get_database_size() {
* Intended to supplement the array returned by `WP_Debug_Data::debug_data()`.
*
* @since 5.2.0
* @deprecated 5.6.0 Use WP_REST_Site_Health_Controller::get_directory_sizes()
* @see WP_REST_Site_Health_Controller::get_directory_sizes()
* @deprecated 5.6.0 Use wp_ajax_health_check_get_sizes()
* @see wp_ajax_health_check_get_sizes()
*
* @return array The sizes of the directories, also the database size and total installation size.
*/
public static function get_sizes() {
_deprecated_function( __METHOD__, '5.6.0', 'WP_REST_Site_Health_Controller::get_directory_sizes()' );
_deprecated_function( __METHOD__, '5.6.0', 'wp_ajax_health_check_get_sizes()' );

$size_db = self::get_database_size();
$upload_dir = wp_get_upload_dir();
Expand Down
21 changes: 0 additions & 21 deletions wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -2851,48 +2851,27 @@ public static function get_tests() {
'async' => array(
'dotorg_communication' => array(
'label' => __( 'Communication with WordPress.org' ),
'test' => rest_url( 'wp-site-health/v1/tests/dotorg-communication' ),
'has_rest' => true,
'async_direct_test' => array( WP_Site_Health::get_instance(), 'get_test_dotorg_communication' ),
),
'background_updates' => array(
'label' => __( 'Background updates' ),
'test' => rest_url( 'wp-site-health/v1/tests/background-updates' ),
'has_rest' => true,
'async_direct_test' => array( WP_Site_Health::get_instance(), 'get_test_background_updates' ),
),
'loopback_requests' => array(
'label' => __( 'Loopback request' ),
'test' => rest_url( 'wp-site-health/v1/tests/loopback-requests' ),
'has_rest' => true,
'async_direct_test' => array( WP_Site_Health::get_instance(), 'get_test_loopback_requests' ),
),
'https_status' => array(
'label' => __( 'HTTPS status' ),
'test' => rest_url( 'wp-site-health/v1/tests/https-status' ),
'has_rest' => true,
'async_direct_test' => array( WP_Site_Health::get_instance(), 'get_test_https_status' ),
),
),
);

// Conditionally include Authorization header test if the site isn't protected by Basic Auth.
if ( ! wp_is_site_protected_by_basic_auth() ) {
$tests['async']['authorization_header'] = array(
'label' => __( 'Authorization header' ),
'test' => rest_url( 'wp-site-health/v1/tests/authorization-header' ),
'has_rest' => true,
'headers' => array( 'Authorization' => 'Basic ' . base64_encode( 'user:pwd' ) ),
'skip_cron' => true,
);
}

// Only check for caches in production environments.
if ( 'production' === wp_get_environment_type() ) {
$tests['async']['page_cache'] = array(
'label' => __( 'Page cache' ),
'test' => rest_url( 'wp-site-health/v1/tests/page-cache' ),
'has_rest' => true,
'async_direct_test' => array( WP_Site_Health::get_instance(), 'get_test_page_cache' ),
);

Expand Down
8 changes: 0 additions & 8 deletions wp-includes/capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -797,14 +797,6 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
case 'manage_privacy_options':
$caps[] = is_multisite() ? 'manage_network' : 'manage_options';
break;
case 'create_app_password':
case 'list_app_passwords':
case 'read_app_password':
case 'edit_app_password':
case 'delete_app_passwords':
case 'delete_app_password':
$caps = map_meta_cap( 'edit_user', $user_id, $args[0] );
break;
case 'edit_block_binding':
$block_editor_context = $args[0];
if ( isset( $block_editor_context->post ) ) {
Expand Down
1 change: 0 additions & 1 deletion wp-includes/default-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@
// Email notifications.
add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
add_action( 'rest_insert_comment', 'wp_new_comment_via_rest_notify_postauthor' );
add_action( 'after_password_reset', 'wp_password_change_notification' );
add_action( 'register_new_user', 'wp_send_new_user_notifications' );
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
Expand Down
15 changes: 0 additions & 15 deletions wp-includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,6 @@ function create_initial_rest_routes() {
$controller = new WP_REST_Users_Controller();
$controller->register_routes();

// Application Passwords
$controller = new WP_REST_Application_Passwords_Controller();
$controller->register_routes();

// Comments.
$controller = new WP_REST_Comments_Controller();
$controller->register_routes();

$search_handlers = array(
new WP_REST_Post_Search_Handler(),
Expand Down Expand Up @@ -392,14 +385,6 @@ function create_initial_rest_routes() {
$controller = new WP_REST_Block_Pattern_Categories_Controller();
$controller->register_routes();

// Site Health.
$site_health = WP_Site_Health::get_instance();
$controller = new WP_REST_Site_Health_Controller( $site_health );
$controller->register_routes();

// URL Details.
$controller = new WP_REST_URL_Details_Controller();
$controller->register_routes();

// Menu Locations.
$controller = new WP_REST_Menu_Locations_Controller();
Expand Down
Loading