diff --git a/lib/compat/wordpress-6.0/class-gutenberg-rest-edit-site-export-controller.php b/lib/compat/wordpress-6.0/class-gutenberg-rest-edit-site-export-controller.php index 13862bc97a197..e4cffb2bff268 100644 --- a/lib/compat/wordpress-6.0/class-gutenberg-rest-edit-site-export-controller.php +++ b/lib/compat/wordpress-6.0/class-gutenberg-rest-edit-site-export-controller.php @@ -76,9 +76,7 @@ public function export() { return $filename; } - $stylesheet = get_stylesheet(); - $stylesheet_directories = explode( '/', $stylesheet ); - $theme_name = end( $stylesheet_directories ); + $theme_name = basename( get_stylesheet() ); header( 'Content-Type: application/zip' ); header( 'Content-Disposition: attachment; filename=' . $theme_name . '.zip' );