From c5bd74218c57a1bf8db00bde93681c1404890f8e Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 22 Mar 2022 00:16:04 +1100 Subject: [PATCH 1/3] Don't add properties with only a `px` set --- inc/css-builder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/css-builder.php b/inc/css-builder.php index c10539ce2..681c4edf0 100644 --- a/inc/css-builder.php +++ b/inc/css-builder.php @@ -30,9 +30,9 @@ public function add_css( $selector, $attributes, $resolution = 1920 ) { if ( ! strlen( (string) $v[ $i ] ) ) continue; $attribute_string[] = wp_strip_all_tags( $k ) . ':' . wp_strip_all_tags( $v[ $i ] ); } - } - else { - if ( ! strlen( (string) $v ) ) continue; + } elseif ( ! strlen( (string) $v ) || $v == 'px' ) { + continue; + } else { $attribute_string[] = wp_strip_all_tags( $k ) . ':' . wp_strip_all_tags( $v ); } } From bdf9eec84ed6fdc16c012b34d2f1ed6c61c0240a Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 22 Mar 2022 00:51:39 +1100 Subject: [PATCH 2/3] WPML: Refrine Sidebar Emulator Language Path Removal --- inc/sidebars-emulator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/sidebars-emulator.php b/inc/sidebars-emulator.php index cc5eb9552..b77566fb5 100644 --- a/inc/sidebars-emulator.php +++ b/inc/sidebars-emulator.php @@ -73,9 +73,10 @@ function register_widgets() { if ( ! empty( $current_url['path'] ) ) { // Check if WPML is running. - if ( defined( 'ICL_LANGUAGE_CODE' ) ) { + $wpml_language = apply_filters( 'wpml_current_language', NULL ); + if ( ! empty( $wpml_language ) ) { // Remove the current language code from path to avoid 404. - $current_url['path'] = ltrim( $current_url['path'], '/' . ICL_LANGUAGE_CODE . '/' ); + $current_url['path'] = preg_replace( "/^\/$wpml_language\//", '/', $current_url['path'], 1 ); } $page = get_page_by_path( $current_url['path'], OBJECT, siteorigin_panels_setting( 'post-types' ) ); From d06f13e972539d4134a10129d1952b9f71c87e90 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Mon, 21 Mar 2022 20:44:53 +0200 Subject: [PATCH 3/3] Updated changelog --- readme.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.txt b/readme.txt index b252aa60a..48ae5e3c6 100644 --- a/readme.txt +++ b/readme.txt @@ -107,6 +107,10 @@ SiteOrigin Premium includes access to our professional email support service, pe == Changelog == += 2.16.6 - 21 March 2022 = +* Prevented CSS properties outputting with only `px` set as the value. +* WPML: Refined sidebar emulator language path removal. + = 2.16.5 - 06 March 2022 = * Full-Width Containers Using CSS: Ensured full-width global CSS is only output once.