Advanced Custom Fields: Font Awesome Field - Version 2.0.2

Version Description

  • Fixed bug effecting Select fields when used along with a Font Awesome field in a repeater (ACF v5)
Download this release

Release Info

Developer mattkeys
Plugin Icon 128x128 Advanced Custom Fields: Font Awesome Field
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

Files changed (3) hide show
  1. acf-font-awesome.php +1 -1
  2. assets/js/input-v5.js +2 -3
  3. readme.txt +13 -6
acf-font-awesome.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Advanced Custom Fields: Font Awesome
5
  Plugin URI: https://wordpress.org/plugins/advanced-custom-fields-font-awesome/
6
  Description: Adds a new 'Font Awesome Icon' field to the popular Advanced Custom Fields plugin.
7
- Version: 2.0.1
8
  Author: mattkeys
9
  Author URI: http://mattkeys.me/
10
  License: GPLv2 or later
4
  Plugin Name: Advanced Custom Fields: Font Awesome
5
  Plugin URI: https://wordpress.org/plugins/advanced-custom-fields-font-awesome/
6
  Description: Adds a new 'Font Awesome Icon' field to the popular Advanced Custom Fields plugin.
7
+ Version: 2.0.2
8
  Author: mattkeys
9
  Author URI: http://mattkeys.me/
10
  License: GPLv2 or later
assets/js/input-v5.js CHANGED
@@ -1,7 +1,6 @@
1
  (function($){
2
 
3
  function update_preview( value, parent ) {
4
- // v5
5
  $( '.acf-field-setting-fa_live_preview .acf-input', parent ).html( '<i class="fa ' + value + '" aria-hidden="true"></i>' );
6
  $( '.icon_preview', parent ).html( '<i class="fa ' + value + '" aria-hidden="true"></i>' );
7
  }
@@ -40,9 +39,9 @@
40
  var $fa_fields = $el;
41
 
42
  $fa_fields.each( function( index, fa_field ) {
43
- update_preview( $( 'select', fa_field ).val(), fa_field );
44
 
45
- acf.select2.init( $( 'select', fa_field ), select2_init_args( fa_field ), $( fa_field ) );
46
  });
47
  }
48
  });
1
  (function($){
2
 
3
  function update_preview( value, parent ) {
 
4
  $( '.acf-field-setting-fa_live_preview .acf-input', parent ).html( '<i class="fa ' + value + '" aria-hidden="true"></i>' );
5
  $( '.icon_preview', parent ).html( '<i class="fa ' + value + '" aria-hidden="true"></i>' );
6
  }
39
  var $fa_fields = $el;
40
 
41
  $fa_fields.each( function( index, fa_field ) {
42
+ update_preview( $( 'select.fontawesome-edit', fa_field ).val(), fa_field );
43
 
44
+ acf.select2.init( $( 'select.fontawesome-edit', fa_field ), select2_init_args( fa_field ), $( fa_field ) );
45
  });
46
  }
47
  });
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: mattkeys
3
  Tags: Advanced Custom Fields, ACF, Font Awesome, FontAwesome
4
  Requires at least: 3.5
5
- Tested up to: 3.8.1
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -17,7 +17,7 @@ Add a [Font Awesome](http://fontawesome.io/) icon field type to Advanced Custom
17
  * Returns Icon Element, Icon Class, Icon Unicode, or an Object including the element, class, and unicode value
18
  * Optionally enqueues Font Awesome in footer where needed (when a font awesome field is being used on the page)
19
  * Integrates with [jsDelivr](https://www.jsdelivr.com/) to automatically load the latest version of [Font Awesome](http://fontawesome.io/)
20
- * Includes filters to override the which version of FontAwesome is loaded
21
 
22
  Note: It is recommended to let this plugin enqueue the latest version of Font Awesome on your front-end; or include the latest version by some other means; so that available icons in the admin area will be displayed properly on your sites front-end.
23
 
@@ -32,7 +32,6 @@ This ACF field type is compatible with:
32
  1. Copy the `advanced-custom-fields-font-awesome` folder into your `wp-content/plugins` folder
33
  2. Activate the Font Awesome plugin via the plugins admin page
34
  3. Create a new field via ACF and select the Font Awesome type
35
- 4. Please refer to the description for more info regarding the field type settings
36
 
37
  == Optional Configuration ==
38
 
@@ -44,8 +43,16 @@ This ACF field type is compatible with:
44
  * **ACFFA_get_icons**: Filter the array of icons and icon details loaded from the database
45
  * **ACFFA_get_fa_url**: Filter the URL used for enqueuing FontAwesome in the frontend and admin areas of the site.
46
 
 
 
 
 
 
47
  == Changelog ==
48
 
 
 
 
49
  = 2.0.1 =
50
  * Fixed bug causing incompatibilities with ACF Clone fields (ACF v5)
51
  * Fixed bug where default icons could not be unselected when creating FontAwesome fields (ACF v5)
@@ -53,7 +60,6 @@ This ACF field type is compatible with:
53
  = 2.0.0 =
54
  * Total rewrite of plugin to simplify codebase and better adhere to WordPress and Advanced Custom Fields coding standards and best practices
55
  * Added option to disable the larger icon preview displayed with the FontAwesome select fields
56
- * Fixed incompatibilities when using this plugin alongside WooCommerce
57
 
58
  = 1.7.4 =
59
  * Fixed incompatibilities with latest ACF 5 + Select2 v4.x
@@ -121,9 +127,11 @@ This ACF field type is compatible with:
121
  = 1.0.0 =
122
  * Initial Release.
123
 
124
-
125
  == Upgrade Notice ==
126
 
 
 
 
127
  = 2.0.1 =
128
  * Fixed bug causing incompatibilities with ACF Clone fields (ACF v5)
129
  * Fixed bug where default icons could not be unselected when creating FontAwesome fields (ACF v5)
@@ -131,4 +139,3 @@ This ACF field type is compatible with:
131
  = 2.0.0 =
132
  * Total rewrite of plugin to simplify codebase and better adhere to WordPress and Advanced Custom Fields coding standards and best practices
133
  * Added option to disable the larger icon preview displayed with the FontAwesome select fields
134
- * Fixed incompatibilities when using this plugin alongside WooCommerce
2
  Contributors: mattkeys
3
  Tags: Advanced Custom Fields, ACF, Font Awesome, FontAwesome
4
  Requires at least: 3.5
5
+ Tested up to: 4.8
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
17
  * Returns Icon Element, Icon Class, Icon Unicode, or an Object including the element, class, and unicode value
18
  * Optionally enqueues Font Awesome in footer where needed (when a font awesome field is being used on the page)
19
  * Integrates with [jsDelivr](https://www.jsdelivr.com/) to automatically load the latest version of [Font Awesome](http://fontawesome.io/)
20
+ * Includes filters to override the which version of FontAwesome is loaded (See Optional Configuration)
21
 
22
  Note: It is recommended to let this plugin enqueue the latest version of Font Awesome on your front-end; or include the latest version by some other means; so that available icons in the admin area will be displayed properly on your sites front-end.
23
 
32
  1. Copy the `advanced-custom-fields-font-awesome` folder into your `wp-content/plugins` folder
33
  2. Activate the Font Awesome plugin via the plugins admin page
34
  3. Create a new field via ACF and select the Font Awesome type
 
35
 
36
  == Optional Configuration ==
37
 
43
  * **ACFFA_get_icons**: Filter the array of icons and icon details loaded from the database
44
  * **ACFFA_get_fa_url**: Filter the URL used for enqueuing FontAwesome in the frontend and admin areas of the site.
45
 
46
+ == Screenshots ==
47
+
48
+ 1. Set a default icon, and choose how you want icon data to be returned.
49
+ 2. Searchable list of all icons, including large live preview
50
+
51
  == Changelog ==
52
 
53
+ = 2.0.2 =
54
+ * Fixed bug effecting Select fields when used along with a Font Awesome field in a repeater (ACF v5)
55
+
56
  = 2.0.1 =
57
  * Fixed bug causing incompatibilities with ACF Clone fields (ACF v5)
58
  * Fixed bug where default icons could not be unselected when creating FontAwesome fields (ACF v5)
60
  = 2.0.0 =
61
  * Total rewrite of plugin to simplify codebase and better adhere to WordPress and Advanced Custom Fields coding standards and best practices
62
  * Added option to disable the larger icon preview displayed with the FontAwesome select fields
 
63
 
64
  = 1.7.4 =
65
  * Fixed incompatibilities with latest ACF 5 + Select2 v4.x
127
  = 1.0.0 =
128
  * Initial Release.
129
 
 
130
  == Upgrade Notice ==
131
 
132
+ = 2.0.2 =
133
+ * Fixed bug effecting Select fields when used along with a Font Awesome field in a repeater (ACF v5)
134
+
135
  = 2.0.1 =
136
  * Fixed bug causing incompatibilities with ACF Clone fields (ACF v5)
137
  * Fixed bug where default icons could not be unselected when creating FontAwesome fields (ACF v5)
139
  = 2.0.0 =
140
  * Total rewrite of plugin to simplify codebase and better adhere to WordPress and Advanced Custom Fields coding standards and best practices
141
  * Added option to disable the larger icon preview displayed with the FontAwesome select fields