Make WordPress Core

Changeset 53402


Ignore:
Timestamp:
05/17/2022 12:08:15 PM (4 years ago)
Author:
gziolo
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-template-utils.php

    r53197 r53402  
    938938
    939939        $obscura    = wp_generate_password( 12, false, false );
    940         $theme_name = wp_get_theme()->get( 'TextDomain' );
     940        $theme_name = basename( get_stylesheet() );
    941941        $filename   = get_temp_dir() . $theme_name . $obscura . '.zip';
    942942
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php

    r53129 r53402  
    8383                }
    8484
    85                 $theme_name = wp_get_theme()->get( 'TextDomain' );
     85                $theme_name = basename( get_stylesheet() );
    8686                header( 'Content-Type: application/zip' );
    8787                header( 'Content-Disposition: attachment; filename=' . $theme_name . '.zip' );
Note: See TracChangeset for help on using the changeset viewer.