From 60e7db7538dae6063f60937266c5393773ee3d26 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Fri, 21 Jun 2019 20:43:18 +0200 Subject: [PATCH 1/4] Use theme name instead of hard-coding 'genesis-sample' for handles Fixes an issue where changing the theme name would result in: 1. No front end inline styles being output. 2. Stylesheet handles that still contained 'genesis-sample-'. --- lib/gutenberg/init.php | 2 +- lib/gutenberg/inline-styles.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gutenberg/init.php b/lib/gutenberg/init.php index 4204459f..98e58a9c 100644 --- a/lib/gutenberg/init.php +++ b/lib/gutenberg/init.php @@ -17,7 +17,7 @@ function genesis_sample_enqueue_gutenberg_frontend_styles() { wp_enqueue_style( - 'genesis-sample-gutenberg', + genesis_get_theme_handle() . '-gutenberg', get_stylesheet_directory_uri() . '/lib/gutenberg/front-end.css', array( genesis_get_theme_handle() ), genesis_get_theme_version() diff --git a/lib/gutenberg/inline-styles.php b/lib/gutenberg/inline-styles.php index b73c75f0..95ce6371 100644 --- a/lib/gutenberg/inline-styles.php +++ b/lib/gutenberg/inline-styles.php @@ -85,7 +85,7 @@ function genesis_sample_custom_gutenberg_admin_css() { } CSS; - wp_add_inline_style( 'genesis-sample-gutenberg-fonts', $css ); + wp_add_inline_style( genesis_get_theme_handle() . '-gutenberg-fonts', $css ); } From 4f3f4d73861262a43f83581a5e2fe33acdfb2095 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 24 Jun 2019 10:52:35 +0200 Subject: [PATCH 2/4] Fix gutenberg fonts enqueue handle --- lib/gutenberg/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gutenberg/init.php b/lib/gutenberg/init.php index 98e58a9c..34b66252 100644 --- a/lib/gutenberg/init.php +++ b/lib/gutenberg/init.php @@ -36,7 +36,7 @@ function genesis_sample_block_editor_styles() { $appearance = genesis_get_config( 'appearance' ); wp_enqueue_style( - 'genesis-sample-gutenberg-fonts', + genesis_get_theme_handle() . '-gutenberg-fonts', $appearance['fonts-url'], array(), genesis_get_theme_version() From 0d617dda1a5536ac48a71c24b8cc79469af850ac Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 24 Jun 2019 18:52:06 +0200 Subject: [PATCH 3/4] Bump version to 3.0.1 --- languages/genesis-sample.pot | 4 ++-- package.json | 2 +- style.css | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/languages/genesis-sample.pot b/languages/genesis-sample.pot index 9c9719d7..79373397 100644 --- a/languages/genesis-sample.pot +++ b/languages/genesis-sample.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPL-2.0-or-later.=!> msgid "" msgstr "" -"Project-Id-Version: Genesis Sample 3.0.0\n" +"Project-Id-Version: Genesis Sample 3.0.1\n" "Report-Msgid-Bugs-To: StudioPress \n" -"POT-Creation-Date: 2019-06-17 13:33:45+00:00\n" +"POT-Creation-Date: 2019-06-24 16:51:49+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/package.json b/package.json index 579471b8..4c7e7d08 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "description": "The sample child theme for the Genesis Framework.", "author": "StudioPress", "authoruri": "https://www.studiopress.com/", - "version": "3.0.0", + "version": "3.0.1", "tags": "one-column, two-columns, left-sidebar, right-sidebar, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready", "license": "GPL-2.0-or-later", "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", diff --git a/style.css b/style.css index fa94109b..214122b3 100755 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Description: This is the sample theme created for the Genesis Framework. Author: StudioPress Author URI: https://www.studiopress.com/ -Version: 3.0.0 +Version: 3.0.1 Tags: accessibility-ready, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, left-sidebar, one-column, right-sidebar, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns, wide-blocks From 91f86e7158f2251f8cbd573fdc2977241b3b3d5f Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 24 Jun 2019 18:54:48 +0200 Subject: [PATCH 4/4] Add changelog for 3.0.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b423ca7..56731967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Genesis Sample Theme Changelog +## [3.0.1] - 2019-06-25 +* Use current theme name instead of 'genesis-sample' when enqueueing assets. This ensures assets continue to load if the theme is renamed. + ## [3.0.0] - 2019-06-19 Requires Genesis 3.0.0+. @@ -139,6 +142,7 @@ Requires Genesis 2.8.0+. * Set localization. * Update XML file. +[3.0.1]: https://github.com/studiopress/genesis-sample/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/studiopress/genesis-sample/compare/2.10.0...3.0.0 [2.10.0]: https://github.com/studiopress/genesis-sample/compare/2.9.1...2.10.0 [2.9.1]: https://github.com/studiopress/genesis-sample/compare/2.9.0...2.9.1