Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
ACF 6 compatibility, fix #29 (#30)
Browse files Browse the repository at this point in the history
* ACF 6 compatibility, fix #29

* Fix pull request number in readme
  • Loading branch information
idflood authored Oct 7, 2022
1 parent 04944dd commit f6a0ad1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Add the svg icons you want to be available in your theme to an acf folder inside
## Compatibility

This ACF field type is compatible with:

[x] ACF 6
[x] ACF 5

## Screenshots
Expand Down Expand Up @@ -87,6 +89,7 @@ add_filter('acf_icon_url',

## Changelog

* 1.9.1 - ACF 6 compatibility fix. Thanks to [idflood](https://github.com/houke/acf-icon-picker/pull/30)
* 1.9.0 - Fix issue with Gutenberg preview not updating when removing. Thanks to [cherbst](https://github.com/houke/acf-icon-picker/pull/23)
* 1.8.0 - Fix issue with Gutenberg not saving icon. Thanks to [tlewap](https://github.com/houke/acf-icon-picker/pull/17)
* 1.7.0 - 2 new filters for more control over icon path. Thanks to [benjibee](https://github.com/houke/acf-icon-picker/pull/11)
Expand Down
4 changes: 2 additions & 2 deletions acf-icon-picker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields: Icon Picker
Plugin URI: https://github.com/houke/acf-icon-picker
Description: Allows you to pick an icon from a predefined list
Version: 1.9.0
Version: 1.9.1
Author: Houke de Kwant
Author URI: ttps://github.com/houke/
License: GPLv2 or later
Expand All @@ -21,7 +21,7 @@ class acf_plugin_icon_picker {
function __construct() {

$this->settings = array(
'version' => '1.9.0',
'version' => '1.9.1',
'url' => plugin_dir_url( __FILE__ ),
'path' => plugin_dir_path( __FILE__ )
);
Expand Down
5 changes: 3 additions & 2 deletions assets/js/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
jQuery('.acf-icon-picker__popup-holder').trigger('close');
jQuery('.acf-icon-picker__popup-holder').remove();
jQuery('.acf-icon-picker__img input').trigger('change');

active_item
.parents('.acf-icon-picker')
.find('.acf-icon-picker__remove')
Expand Down Expand Up @@ -175,7 +175,8 @@
});

// show the remove button if there is an icon selected
if ($el.find('input').val().length != 0) {
const $input = $el.find('input')
if ($input.length && $input.val().length != 0) {
$el
.find('.acf-icon-picker__remove')
.addClass('acf-icon-picker__remove--active');
Expand Down

0 comments on commit f6a0ad1

Please sign in to comment.