diff --git a/changelog.md b/changelog.md index e9f36bf..e96d99c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,17 @@ # Reykjavik Changelog +## 1.5.1 + +* **Update**: Preventing JavaScript error for CSS variables incompatible browsers fallback + +### Files changed: + + changelog.md + readme.txt + style.css + library/includes/classes/class-css-variables.php + + ## 1.5.0 * **Update**: Improving touch screen navigation diff --git a/library/includes/classes/class-css-variables.php b/library/includes/classes/class-css-variables.php index fbcce9a..d8bb215 100644 --- a/library/includes/classes/class-css-variables.php +++ b/library/includes/classes/class-css-variables.php @@ -8,7 +8,7 @@ * @subpackage Customize * * @since 1.4.0 - * @version 1.4.1 + * @version 1.5.1 * * Contents: * @@ -259,7 +259,7 @@ public static function get_variable_declaration( $variable, $value ) { * @link https://github.com/jhildenbiddle/css-vars-ponyfill * * @since 1.4.0 - * @version 1.4.0 + * @version 1.5.1 */ public static function compatibility() { @@ -274,7 +274,12 @@ public static function compatibility() { wp_add_inline_script( 'css-vars-ponyfill', - "cssVars( { onlyVars: true, exclude: 'link:not([href^=\"" . esc_url_raw( get_theme_root_uri() ) . "\"])' } );" + 'window.onload = function() {' . PHP_EOL . + "\t" . 'cssVars( {' . PHP_EOL . + "\t\t" . 'onlyVars: true,' . PHP_EOL . + "\t\t" . 'exclude: \'link:not([href^="' . esc_url_raw( get_theme_root_uri() ) . '"])\'' . PHP_EOL . + "\t" . '} );' . PHP_EOL . + '};' ); } // /compatibility diff --git a/readme.txt b/readme.txt index ce06e2b..c8d6b0f 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: webmandesign Tags: one-column, two-columns, right-sidebar, grid-layout, flexible-header, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-image-header, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce, portfolio Requires at least: 4.7.0 Tested up to: 5.0.3 -Stable tag: 1.5.0 +Stable tag: 1.5.1 License: GNU General Public License v3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -37,8 +37,8 @@ Please see `changelog.md` file. == Upgrade Notice == -= 1.5.0 = -Improving navigation touch screen functionality, improving excerpt display, security and accessibility. += 1.5.1 = +Preventing JavaScript error for CSS variables incompatible browsers fallback. == Resources == diff --git a/style.css b/style.css index 05e7047..1781b96 100644 --- a/style.css +++ b/style.css @@ -3,7 +3,7 @@ Theme Name: Reykjavik Theme URI: https://www.webmandesign.eu/portfolio/reykjavik-wordpress-theme/ Author: WebMan Design Author URI: https://www.webmandesign.eu/ -Version: 1.5.0 +Version: 1.5.1 Text Domain: reykjavik Domain Path: /languages License: GNU General Public License v3