From aad35b2d56f21955f1716308d165348f4c7bbf14 Mon Sep 17 00:00:00 2001 From: drill-lancer Date: Thu, 26 Sep 2024 15:30:58 +0900 Subject: [PATCH 1/3] upodate: css optimize 0.2.6 --- inc/vk-css-optimize/config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/vk-css-optimize/config.php b/inc/vk-css-optimize/config.php index b04889868..aab09a05a 100644 --- a/inc/vk-css-optimize/config.php +++ b/inc/vk-css-optimize/config.php @@ -27,7 +27,7 @@ function vk_blocks_css_tree_shaking_handles( $vk_css_tree_shaking_handles ) { * * @param array $inidata CSS Tree Shaking Exclude Paramator. */ -function vk_blocks_css_tree_shaking_exclude_class( $inidata ) { +function vk_blocks_css_tree_shaking_exclude_class( $jsaddlist ) { $exclude_classes_array = array( 'swiper-pagination-bullet', 'swiper-pagination-bullet-active', @@ -73,9 +73,9 @@ function vk_blocks_css_tree_shaking_exclude_class( $inidata ) { 'vk_post-col-xxl-2', ); - $inidata['class'] = array_unique( array_merge( $inidata['class'], $exclude_classes_array ) ); + $jsaddlist = array_unique( array_merge( $jsaddlist, $exclude_classes_array ) ); - return $inidata; + return $jsaddlist; } add_filter( 'css_tree_shaking_exclude', 'vk_blocks_css_tree_shaking_exclude_class' ); From 4696ae3b7ea9d4208a3aed3cdc82b5ede5d36490 Mon Sep 17 00:00:00 2001 From: drill-lancer Date: Fri, 27 Sep 2024 10:32:32 +0900 Subject: [PATCH 2/3] fix: filter hook name --- inc/vk-css-optimize/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/vk-css-optimize/config.php b/inc/vk-css-optimize/config.php index aab09a05a..50c15fbf8 100644 --- a/inc/vk-css-optimize/config.php +++ b/inc/vk-css-optimize/config.php @@ -77,7 +77,7 @@ function vk_blocks_css_tree_shaking_exclude_class( $jsaddlist ) { return $jsaddlist; } -add_filter( 'css_tree_shaking_exclude', 'vk_blocks_css_tree_shaking_exclude_class' ); +add_filter( 'css_tree_shaking_js_added_class', 'vk_blocks_css_tree_shaking_exclude_class' ); /** * CSS Optimize option default From cf9c220ef31b77ee1f0fd182a7e52971c189631b Mon Sep 17 00:00:00 2001 From: drill-lancer Date: Fri, 27 Sep 2024 11:01:12 +0900 Subject: [PATCH 3/3] fix: css-optimize --- inc/vk-css-optimize/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/vk-css-optimize/config.php b/inc/vk-css-optimize/config.php index 50c15fbf8..184953de6 100644 --- a/inc/vk-css-optimize/config.php +++ b/inc/vk-css-optimize/config.php @@ -27,7 +27,7 @@ function vk_blocks_css_tree_shaking_handles( $vk_css_tree_shaking_handles ) { * * @param array $inidata CSS Tree Shaking Exclude Paramator. */ -function vk_blocks_css_tree_shaking_exclude_class( $jsaddlist ) { +function vk_blocks_css_tree_shaking_js_added_class( $jsaddlist ) { $exclude_classes_array = array( 'swiper-pagination-bullet', 'swiper-pagination-bullet-active', @@ -77,7 +77,7 @@ function vk_blocks_css_tree_shaking_exclude_class( $jsaddlist ) { return $jsaddlist; } -add_filter( 'css_tree_shaking_js_added_class', 'vk_blocks_css_tree_shaking_exclude_class' ); +add_filter( 'css_tree_shaking_js_added_class', 'vk_blocks_css_tree_shaking_js_added_class' ); /** * CSS Optimize option default