diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index 6a53fd6730..28efb5cbad 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -913,7 +913,7 @@ function block_footer_area() { */ function wp_generate_block_templates_export_file() { if ( ! class_exists( 'ZipArchive' ) ) { - return new WP_Error( __( 'Zip Export not supported.' ) ); + return new WP_Error( 'missing_zip_package', __( 'Zip Export not supported.' ) ); } $obscura = wp_generate_password( 12, false, false ); @@ -921,7 +921,7 @@ function wp_generate_block_templates_export_file() { $zip = new ZipArchive(); if ( true !== $zip->open( $filename, ZipArchive::CREATE ) ) { - return new WP_Error( __( 'Unable to open export file (archive) for writing.' ) ); + return new WP_Error( 'unable_to_create_zip', __( 'Unable to open export file (archive) for writing.' ) ); } $zip->addEmptyDir( 'theme' ); 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 1bd40cd637..d5abfa5682 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 @@ -54,8 +54,8 @@ class WP_REST_Edit_Site_Export_Controller extends WP_REST_Controller { */ public function permissions_check() { if ( ! current_user_can( 'edit_theme_options' ) ) { - new WP_Error( - 'rest_cannot_view_url_details', + return new WP_Error( + 'rest_cannot_export_templates', __( 'Sorry, you are not allowed to export templates and template parts.' ), array( 'status' => rest_authorization_required_code() ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index bf4440d189..a427642995 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta1-52339'; +$wp_version = '5.9-beta1-52340'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.