mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 14:05:11 +00:00
Theme: Use a better method to determine the theme name during export
See the same change in the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/40829. Props scruffian, davidbaumwald, jeremyfelt. See #55567. Built from https://develop.svn.wordpress.org/trunk@53402 git-svn-id: http://core.svn.wordpress.org/trunk@52991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c03decd0cb
commit
102004b505
@ -937,7 +937,7 @@ function wp_generate_block_templates_export_file() {
|
||||
}
|
||||
|
||||
$obscura = wp_generate_password( 12, false, false );
|
||||
$theme_name = wp_get_theme()->get( 'TextDomain' );
|
||||
$theme_name = basename( get_stylesheet() );
|
||||
$filename = get_temp_dir() . $theme_name . $obscura . '.zip';
|
||||
|
||||
$zip = new ZipArchive();
|
||||
|
@ -82,7 +82,7 @@ class WP_REST_Edit_Site_Export_Controller extends WP_REST_Controller {
|
||||
return $filename;
|
||||
}
|
||||
|
||||
$theme_name = wp_get_theme()->get( 'TextDomain' );
|
||||
$theme_name = basename( get_stylesheet() );
|
||||
header( 'Content-Type: application/zip' );
|
||||
header( 'Content-Disposition: attachment; filename=' . $theme_name . '.zip' );
|
||||
header( 'Content-Length: ' . filesize( $filename ) );
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-53401';
|
||||
$wp_version = '6.1-alpha-53402';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user