wp/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php
changeset 22 8c2e4d02f4ef
parent 19 3d72ae0968f4
--- a/wp/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php	Fri Sep 05 18:52:52 2025 +0200
@@ -50,10 +50,10 @@
 	 *
 	 * @since 5.9.0
 	 *
-	 * @return WP_Error|true True if the request has access, or WP_Error object.
+	 * @return true|WP_Error True if the request has access, or WP_Error object.
 	 */
 	public function permissions_check() {
-		if ( current_user_can( 'edit_theme_options' ) ) {
+		if ( current_user_can( 'export' ) ) {
 			return true;
 		}
 
@@ -70,7 +70,7 @@
 	 *
 	 * @since 5.9.0
 	 *
-	 * @return WP_Error|void
+	 * @return void|WP_Error
 	 */
 	public function export() {
 		// Generate the export file.