Advanced Custom Fields: Font Awesome Field - Version 2.0.9

Version Description

  • Fixed bug effecting null value fields created in 1.x of this plugin would return a string of 'null' instead of boolean false when used in 2.x versions of this plugin.
Download this release

Release Info

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

Code changes from version 2.0.8 to 2.0.9

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.8
8
  Author: mattkeys
9
  Author URI: http://mattkeys.me/
10
  License: GPLv2 or later
@@ -24,7 +24,7 @@ if ( ! class_exists('acf_plugin_font_awesome') ) :
24
  public function __construct()
25
  {
26
  $this->settings = array(
27
- 'version' => '2.0.8',
28
  'url' => plugin_dir_url( __FILE__ ),
29
  'path' => plugin_dir_path( __FILE__ )
30
  );
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.9
8
  Author: mattkeys
9
  Author URI: http://mattkeys.me/
10
  License: GPLv2 or later
24
  public function __construct()
25
  {
26
  $this->settings = array(
27
+ 'version' => '2.0.9',
28
  'url' => plugin_dir_url( __FILE__ ),
29
  'path' => plugin_dir_path( __FILE__ )
30
  );
fields/acf-font-awesome-v4.php CHANGED
@@ -263,6 +263,10 @@ if ( ! class_exists( 'acf_field_font_awesome' ) ) :
263
 
264
  public function format_value_for_api( $value, $post_id, $field )
265
  {
 
 
 
 
266
  if ( empty( $value ) ) {
267
  return $value;
268
  }
263
 
264
  public function format_value_for_api( $value, $post_id, $field )
265
  {
266
+ if ( 'null' == $value ) {
267
+ return false;
268
+ }
269
+
270
  if ( empty( $value ) ) {
271
  return $value;
272
  }
fields/acf-font-awesome-v5.php CHANGED
@@ -187,6 +187,10 @@ if ( ! class_exists( 'acf_field_font_awesome' ) ) :
187
 
188
  public function format_value( $value, $post_id, $field )
189
  {
 
 
 
 
190
  if ( empty( $value ) ) {
191
  return $value;
192
  }
187
 
188
  public function format_value( $value, $post_id, $field )
189
  {
190
+ if ( 'null' == $value ) {
191
+ return false;
192
+ }
193
+
194
  if ( empty( $value ) ) {
195
  return $value;
196
  }
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: 4.8
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -51,6 +51,9 @@ This ACF field type is compatible with:
51
 
52
  == Changelog ==
53
 
 
 
 
54
  = 2.0.8 =
55
  * Fixed bug where fields marked to 'allow null' in acf v5 did not show the (x) to remove the selected option on the field
56
 
@@ -148,6 +151,9 @@ This ACF field type is compatible with:
148
 
149
  == Upgrade Notice ==
150
 
 
 
 
151
  = 2.0.8 =
152
  * Fixed bug where fields marked to 'allow null' in acf v5 did not show the (x) to remove the selected option on the field
153
 
2
  Contributors: mattkeys
3
  Tags: Advanced Custom Fields, ACF, Font Awesome, FontAwesome
4
  Requires at least: 3.5
5
+ Tested up to: 4.9
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
51
 
52
  == Changelog ==
53
 
54
+ = 2.0.9 =
55
+ * Fixed bug effecting null value fields created in 1.x of this plugin would return a string of 'null' instead of boolean false when used in 2.x versions of this plugin.
56
+
57
  = 2.0.8 =
58
  * Fixed bug where fields marked to 'allow null' in acf v5 did not show the (x) to remove the selected option on the field
59
 
151
 
152
  == Upgrade Notice ==
153
 
154
+ = 2.0.9 =
155
+ * Fixed bug effecting null value fields created in 1.x of this plugin would return a string of 'null' instead of boolean false when used in 2.x versions of this plugin.
156
+
157
  = 2.0.8 =
158
  * Fixed bug where fields marked to 'allow null' in acf v5 did not show the (x) to remove the selected option on the field
159