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. diff --git a/so-css.php b/so-css.php index 0957824..60f3d3f 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( @@ -1023,13 +1023,10 @@ 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 ) ) { - update_option( - 'so_css_output_location', - ! empty( $this->get_custom_css( $this->theme ) ) ? 'inline' : 'file' - ); + // 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', 'file' ); } if ( empty( $version ) || version_compare( $version, SOCSS_VERSION, '<' ) ) {