From a4ee712d0d67b16506ccf1656a3793d491bf8584 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 29 Aug 2023 15:41:17 +0000 Subject: [PATCH] Site Health: fix check name used for REST API permission checks. Updates the calls to permission validation calls for the `directory-sizes` and `page-cache` routes to actually match the route names. Follow-up to r54043 and r49154. Props szepeviktor. Fixes #59236 Built from https://develop.svn.wordpress.org/trunk@56489 git-svn-id: http://core.svn.wordpress.org/trunk@56001 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../endpoints/class-wp-rest-site-health-controller.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php index 43e6676eff..18d67dc2dd 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php @@ -153,7 +153,7 @@ class WP_REST_Site_Health_Controller extends WP_REST_Controller { 'methods' => 'GET', 'callback' => array( $this, 'get_directory_sizes' ), 'permission_callback' => function() { - return $this->validate_request_permission( 'debug_enabled' ) && ! is_multisite(); + return $this->validate_request_permission( 'directory_sizes' ) && ! is_multisite(); }, ) ); @@ -170,7 +170,7 @@ class WP_REST_Site_Health_Controller extends WP_REST_Controller { 'methods' => 'GET', 'callback' => array( $this, 'test_page_cache' ), 'permission_callback' => function () { - return $this->validate_request_permission( 'view_site_health_checks' ); + return $this->validate_request_permission( 'page_cache' ); }, ), ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 2307a489e9..440c551251 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56488'; +$wp_version = '6.4-alpha-56489'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.