From def9cb48be22a867e33d2152309ccbfe6fedc738 Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Fri, 17 Feb 2023 00:18:00 +0700 Subject: [PATCH] fixing theme slug in template part linked from a pattern --- admin/class-create-block-theme-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/class-create-block-theme-admin.php b/admin/class-create-block-theme-admin.php index dcc0e1ff..7c6b498e 100644 --- a/admin/class-create-block-theme-admin.php +++ b/admin/class-create-block-theme-admin.php @@ -707,7 +707,7 @@ function add_theme_attr_to_template_part_block ( $block ) { // The template parts included in the patterns need to indicate the theme they belong to if ( 'core/template-part' === $block[ 'blockName' ] ) { $block['attrs']['theme'] = ( $_POST['theme']['type'] === "export" || $_POST['theme']['type'] === "save" ) - ? get_stylesheet() + ? strtolower( wp_get_theme()->get( 'Name' ) ) : $_POST['theme']['name']; } return $block;