From 098aad5aeaab50995fea112ea0bf109baca9b50c Mon Sep 17 00:00:00 2001 From: daomapsieucap Date: Thu, 25 Aug 2022 15:31:03 +0700 Subject: [PATCH] :bookmark: release v4.0.6 --- CHANGELOG.md | 4 ++++ acf-icomoon.php | 2 +- changelog.txt | 5 +++++ includes/fields/acf-field-icomoon.php | 18 ++++++++---------- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6286b77..a919868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## Changelog +### v4.0.6 - 2022-08-25 + +- Fixed: Fix issue return wrong SVG path. + ### v4.0.5 - 2022-08-24 - Fixed: Check icon multicolor before output SVG. diff --git a/acf-icomoon.php b/acf-icomoon.php index f519f02..3898af0 100644 --- a/acf-icomoon.php +++ b/acf-icomoon.php @@ -3,7 +3,7 @@ * Plugin Name: Support For Icomoon with Advanced Custom Fields * Plugin URI: https://wordpress.org/plugins/acf-icomoon/ * Description: 🔩 Add a field to select icons from a selection.json file generated by IcoMoon - * Version: 4.0.5 + * Version: 4.0.6 * Requires at least: 5.2 * Requires PHP: 7.2 * Author: ViiVue diff --git a/changelog.txt b/changelog.txt index 7687f27..d6c445e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ == Changelog == += 4.0.6 = +*Release Date - 25 August 2022* + +- Fixed: Fix issue return wrong SVG path. + = 4.0.5 = *Release Date - 24 August 2022* diff --git a/includes/fields/acf-field-icomoon.php b/includes/fields/acf-field-icomoon.php index f9f1fe4..72ecaeb 100644 --- a/includes/fields/acf-field-icomoon.php +++ b/includes/fields/acf-field-icomoon.php @@ -145,16 +145,14 @@ function viivue_get_icomoon_json($json_path = ''): array{ $icon_svg_inner = ''; if($icon_paths){ foreach($icon_paths as $index => $path){ - $fill = viivue_array_key_exists('fill', $icon_attrs[$index]); - if($fill){ - // svg - $icon_svg_inner .= ''; - - // html - if($is_multicolor){ - // only output span if there are more than 1 path - $icon_html_inner .= ''; - } + // svg + $fill = viivue_array_key_exists('fill', $icon_attrs[$index]); + $icon_svg_inner .= ''; + + // html + if($fill && $is_multicolor){ + // only output span if there are more than 1 path + $icon_html_inner .= ''; } } }