Skip to content

Commit

Permalink
Carry forward previous theme tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
jffng committed Apr 3, 2023
1 parent cd5f862 commit fd779d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions admin/class-create-block-theme-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ function clone_theme( $theme, $screenshot ) {
$theme['template'] = wp_get_theme()->get( 'Template' );
$theme['original_theme'] = wp_get_theme()->get( 'Name' );

// Use previous theme's tags if custom tags are empty.
if ( empty( $theme['tags_custom'] ) ) {
$theme['tags_custom'] = implode( ', ', wp_get_theme()->get( 'Tags' ) );
}

// Create ZIP file in the temporary directory.
$filename = tempnam( get_temp_dir(), $theme['slug'] );
$zip = Theme_Zip::create_zip( $filename );
Expand Down

0 comments on commit fd779d3

Please sign in to comment.