From a9ea0e8be55f8dd8459ddf099406b44402d2a190 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Tue, 4 Mar 2025 06:07:22 +0000 Subject: [PATCH] Editor: Use the `export` cap to determine whether users can export themes. This changeset replaces `edit_theme_options` with the `export` capability to determine whether the current user can export themes. That condition determines whether to show the Export Theme button in the Site Editor. Using `export` capability makes it more consistent with general export capabilities across the administration. Props unsalkorkmaz, rajinsharwar, audrasjb, peterwilsoncc, desrosj, Mamaduka, TimothyBlynJacobs. Fixes #57379. Built from https://develop.svn.wordpress.org/trunk@59924 git-svn-id: http://core.svn.wordpress.org/trunk@59266 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../endpoints/class-wp-rest-edit-site-export-controller.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php index d326782f15..297249497b 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php @@ -53,7 +53,7 @@ class WP_REST_Edit_Site_Export_Controller extends WP_REST_Controller { * @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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index e3cd01f2aa..42a917a33f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59923'; +$wp_version = '6.8-alpha-59924'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.