From 899a05eecd10867a2e21e839bc45f65dc2e7e7c4 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:18:45 +1300 Subject: [PATCH 1/3] Resolve CSS being unexpectedly output inline After Update --- so-css.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/so-css.php b/so-css.php index 0957824..d3d71c3 100644 --- a/so-css.php +++ b/so-css.php @@ -319,11 +319,11 @@ public function enqueue_css() { * * This method retrieves the CSS output location setting from the * `so_css_output_location` option and returns true if the setting is - * set to 'file' and false if it is set to 'inline'. + * set to 'file'. Otherwise false is returned. * * @param string|null $location The unused default location value. * - * @return bool True if the CSS should be output in a dedicated file, false if it should be inline. + * @return bool True if the CSS should be output in a dedicated file. */ public function css_output_location( $location = null ) { $output_location = get_option( @@ -432,7 +432,7 @@ public function action_admin_menu() { ! empty( $_POST['so_css_output_location'] ) && ( $_POST['so_css_output_location'] === 'file' || - $_POST['so_css_output_location'] === 'inline' + $_POST['so_css_output_location'] === 'onpage' ) ) { update_option( @@ -1023,12 +1023,12 @@ private function get_latest_revision_timestamp() { public function version_check() { $version = get_option( 'so_css_version' ); - // If there's no version set, check if this site already - // had SO CSS installed by checking for custom CSS. - if ( empty( $version ) ) { + // If there's no version set or it's set to 1.6.0, check if + // this site already had SO CSS installed by checking for custom CSS. + if ( empty( $version ) || $version === '1.6.0' ) { update_option( 'so_css_output_location', - ! empty( $this->get_custom_css( $this->theme ) ) ? 'inline' : 'file' + empty( $this->get_custom_css( $this->theme ) ) ? 'onpage' : 'file' ); } From fd8d00152d8cf9b477c066611c5c9bac10f6a2cb Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 26 Nov 2024 12:58:14 +1300 Subject: [PATCH 2/3] `so_css_output_location`: Restore Inline and Ensure File Default --- so-css.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/so-css.php b/so-css.php index d3d71c3..60f3d3f 100644 --- a/so-css.php +++ b/so-css.php @@ -432,7 +432,7 @@ public function action_admin_menu() { ! empty( $_POST['so_css_output_location'] ) && ( $_POST['so_css_output_location'] === 'file' || - $_POST['so_css_output_location'] === 'onpage' + $_POST['so_css_output_location'] === 'inline' ) ) { update_option( @@ -1026,10 +1026,7 @@ public function version_check() { // If there's no version set or it's set to 1.6.0, check if // this site already had SO CSS installed by checking for custom CSS. if ( empty( $version ) || $version === '1.6.0' ) { - update_option( - 'so_css_output_location', - empty( $this->get_custom_css( $this->theme ) ) ? 'onpage' : 'file' - ); + update_option( 'so_css_output_location', 'file' ); } if ( empty( $version ) || version_compare( $version, SOCSS_VERSION, '<' ) ) { From 114ff55233c76a7b2ff357071c091fcc32c02128 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 26 Nov 2024 00:27:40 +0000 Subject: [PATCH 3/3] Changelog update --- changelog.txt | 3 +++ readme.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/changelog.txt b/changelog.txt index 1a9726c..60ff2ee 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ == Changelog == += 1.6.1 - 25 November 2024 = +* CSS Output Location: Additional check to ensure the default is Dedicated File. + = 1.6.0 - 22 November 2024 = * Added `Visual Editor: Decoration > Background Attachment` setting. * Added CSS Ouput Location setting. Dedicated CSS File offers best performance, Internal CSS embeds styles in page HTML. diff --git a/readme.txt b/readme.txt index 4a1fb52..4a29349 100644 --- a/readme.txt +++ b/readme.txt @@ -72,6 +72,9 @@ SiteOrigin Premium includes access to our professional email support service, pe == Changelog == += 1.6.1 - 25 November 2024 = +* CSS Output Location: Additional check to ensure the default is Dedicated File. + = 1.6.0 - 22 November 2024 = * Added `Visual Editor: Decoration > Background Attachment` setting. * Added CSS Ouput Location setting. Dedicated CSS File offers best performance, Internal CSS embeds styles in page HTML.