Version Description
- Fixed bug effecting any users who did not update to 2.1.0 before jsDelivr added FontAwesome 5.x to their CDN, where the 5.x icons would get loaded and break functionality
Download this release
Release Info
Developer | mattkeys |
Plugin | Advanced Custom Fields: Font Awesome Field |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- acf-font-awesome.php +2 -2
- assets/inc/class-ACFFAL.php +9 -2
- readme.txt +12 -0
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.
|
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.
|
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.1.1
|
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.1.1',
|
28 |
'url' => plugin_dir_url( __FILE__ ),
|
29 |
'path' => plugin_dir_path( __FILE__ )
|
30 |
);
|
assets/inc/class-ACFFAL.php
CHANGED
@@ -15,7 +15,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
class ACFFAL
|
16 |
{
|
17 |
|
18 |
-
public $api_endpoint = 'https://data.jsdelivr.com/v1/package/gh/FortAwesome/Font-Awesome';
|
|
|
19 |
public $cdn_baseurl = 'https://cdn.jsdelivr.net/fontawesome/';
|
20 |
public $cdn_filepath = '/css/font-awesome.min.css';
|
21 |
public $override_version = false;
|
@@ -32,7 +33,7 @@ class ACFFAL
|
|
32 |
|
33 |
if ( $this->override_version ) {
|
34 |
$this->current_version = $this->override_version;
|
35 |
-
} else if ( ! $this->current_version ) {
|
36 |
$this->current_version = $this->check_latest_version();
|
37 |
}
|
38 |
|
@@ -135,6 +136,12 @@ class ACFFAL
|
|
135 |
$latest_version = max( $response->versions );
|
136 |
$latest_version = ltrim( $latest_version, 'v' );
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
if ( $update_option ) {
|
139 |
update_option( 'ACFFA_current_version', $latest_version, false );
|
140 |
}
|
15 |
class ACFFAL
|
16 |
{
|
17 |
|
18 |
+
// public $api_endpoint = 'https://data.jsdelivr.com/v1/package/gh/FortAwesome/Font-Awesome';
|
19 |
+
public $api_endpoint = 'https://data.jsdelivr.com/v1/package/resolve/gh/FortAwesome/Font-Awesome@4';
|
20 |
public $cdn_baseurl = 'https://cdn.jsdelivr.net/fontawesome/';
|
21 |
public $cdn_filepath = '/css/font-awesome.min.css';
|
22 |
public $override_version = false;
|
33 |
|
34 |
if ( $this->override_version ) {
|
35 |
$this->current_version = $this->override_version;
|
36 |
+
} else if ( ! $this->current_version || version_compare( $this->current_version, '5.0.0', '>=' ) ) {
|
37 |
$this->current_version = $this->check_latest_version();
|
38 |
}
|
39 |
|
136 |
$latest_version = max( $response->versions );
|
137 |
$latest_version = ltrim( $latest_version, 'v' );
|
138 |
|
139 |
+
if ( $update_option ) {
|
140 |
+
update_option( 'ACFFA_current_version', $latest_version, false );
|
141 |
+
}
|
142 |
+
} else if ( isset( $response->version ) && ! empty( $response->version ) ) {
|
143 |
+
$latest_version = $response->version;
|
144 |
+
|
145 |
if ( $update_option ) {
|
146 |
update_option( 'ACFFA_current_version', $latest_version, false );
|
147 |
}
|
readme.txt
CHANGED
@@ -51,6 +51,12 @@ This ACF field type is compatible with:
|
|
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 |
|
@@ -151,6 +157,12 @@ This ACF field type is compatible with:
|
|
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 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 2.1.1 =
|
55 |
+
* Fixed bug effecting any users who did not update to 2.1.0 before jsDelivr added FontAwesome 5.x to their CDN, where the 5.x icons would get loaded and break functionality
|
56 |
+
|
57 |
+
= 2.1.0 =
|
58 |
+
* Preventing any automatic updates to version 5.x of FontAwesome that could break plugin functionality and result in broken icons on sites currently using 4.x FontAwesome icons.
|
59 |
+
|
60 |
= 2.0.9 =
|
61 |
* 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.
|
62 |
|
157 |
|
158 |
== Upgrade Notice ==
|
159 |
|
160 |
+
= 2.1.1 =
|
161 |
+
* Fixed bug effecting any users who did not update to 2.1.0 before jsDelivr added FontAwesome 5.x to their CDN, where the 5.x icons would get loaded and break functionality
|
162 |
+
|
163 |
+
= 2.1.0 =
|
164 |
+
* Preventing any automatic updates to version 5.x of FontAwesome that could break plugin functionality and result in broken icons on sites currently using 4.x FontAwesome icons.
|
165 |
+
|
166 |
= 2.0.9 =
|
167 |
* 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.
|
168 |
|