Skip to content

Commit

Permalink
🔖 release v4.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
daomapsieucap committed Aug 25, 2022
1 parent 6c8b832 commit 098aad5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion acf-icomoon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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*

Expand Down
18 changes: 8 additions & 10 deletions includes/fields/acf-field-icomoon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= '<path fill="' . $fill . '" d="' . $path . '"></path>';

// html
if($is_multicolor){
// only output span if there are more than 1 path
$icon_html_inner .= '<span class="path' . ($index + 1) . '"></span>';
}
// svg
$fill = viivue_array_key_exists('fill', $icon_attrs[$index]);
$icon_svg_inner .= '<path fill="' . $fill . '" d="' . $path . '"></path>';

// html
if($fill && $is_multicolor){
// only output span if there are more than 1 path
$icon_html_inner .= '<span class="path' . ($index + 1) . '"></span>';
}
}
}
Expand Down

0 comments on commit 098aad5

Please sign in to comment.