Skip to content

Commit

Permalink
Theme Export: Use basename when determining the theme slug (#41058)
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian authored May 13, 2022
1 parent b83ce72 commit 610e449
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit 610e449

Please sign in to comment.