Version Description
- Fixed compatibility issue with ACF 5.10+
- Fixed deprecated warnings in PHP 8, thanks to Levi Cole for the pull request
Download this release
Release Info
Developer | mattkeys |
Plugin | Advanced Custom Fields: Font Awesome Field |
Version | 3.1.2 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 3.1.2
- acf-font-awesome.php +30 -9
- admin/class-ACFFA-Admin.php +6 -4
- assets/inc/class-ACFFA-Loader-4.php +2 -4
- assets/inc/class-ACFFA-Loader-5.php +23 -8
- assets/js/input-v5.js +6 -0
- fields/acf-font-awesome-v5.php +1 -0
- readme.txt +39 -45
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: 3.
|
8 |
Author: mattkeys
|
9 |
Author URI: http://mattkeys.me/
|
10 |
License: GPLv2 or later
|
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
}
|
17 |
|
18 |
if ( ! defined( 'ACFFA_VERSION' ) ) {
|
19 |
-
define( 'ACFFA_VERSION', '3.
|
20 |
}
|
21 |
|
22 |
if ( ! defined( 'ACFFA_PUBLIC_PATH' ) ) {
|
@@ -39,6 +39,8 @@ if ( ! class_exists('acf_plugin_font_awesome') ) :
|
|
39 |
{
|
40 |
$acffa_major_version = $this->get_major_version();
|
41 |
|
|
|
|
|
42 |
if ( version_compare( $acffa_major_version, 5, '<' ) ) {
|
43 |
require 'assets/inc/class-ACFFA-Loader-4.php';
|
44 |
} else {
|
@@ -53,15 +55,10 @@ if ( ! class_exists('acf_plugin_font_awesome') ) :
|
|
53 |
|
54 |
load_plugin_textdomain( 'acf-font-awesome', false, plugin_basename( dirname( __FILE__ ) ) . '/lang' );
|
55 |
|
56 |
-
add_action( 'acf/include_field_types', array( $this, 'include_field_types' ), 10 );
|
57 |
-
}
|
58 |
-
|
59 |
-
public function include_field_types( $version = false )
|
60 |
-
{
|
61 |
include_once('fields/acf-font-awesome-v5.php');
|
62 |
}
|
63 |
|
64 |
-
|
65 |
{
|
66 |
$current_version = get_option( 'ACFFA_current_version' );
|
67 |
$acffa_settings = get_option( 'acffa_settings', array() );
|
@@ -101,8 +98,32 @@ if ( ! class_exists('acf_plugin_font_awesome') ) :
|
|
101 |
|
102 |
return $acffa_major_version;
|
103 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
105 |
|
106 |
-
add_action( '
|
107 |
|
108 |
endif;
|
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: 3.1.2
|
8 |
Author: mattkeys
|
9 |
Author URI: http://mattkeys.me/
|
10 |
License: GPLv2 or later
|
16 |
}
|
17 |
|
18 |
if ( ! defined( 'ACFFA_VERSION' ) ) {
|
19 |
+
define( 'ACFFA_VERSION', '3.1.2' );
|
20 |
}
|
21 |
|
22 |
if ( ! defined( 'ACFFA_PUBLIC_PATH' ) ) {
|
39 |
{
|
40 |
$acffa_major_version = $this->get_major_version();
|
41 |
|
42 |
+
$this->check_for_updates( $acffa_major_version );
|
43 |
+
|
44 |
if ( version_compare( $acffa_major_version, 5, '<' ) ) {
|
45 |
require 'assets/inc/class-ACFFA-Loader-4.php';
|
46 |
} else {
|
55 |
|
56 |
load_plugin_textdomain( 'acf-font-awesome', false, plugin_basename( dirname( __FILE__ ) ) . '/lang' );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
include_once('fields/acf-font-awesome-v5.php');
|
59 |
}
|
60 |
|
61 |
+
private function get_major_version()
|
62 |
{
|
63 |
$current_version = get_option( 'ACFFA_current_version' );
|
64 |
$acffa_settings = get_option( 'acffa_settings', array() );
|
98 |
|
99 |
return $acffa_major_version;
|
100 |
}
|
101 |
+
|
102 |
+
private function check_for_updates( $acffa_major_version )
|
103 |
+
{
|
104 |
+
$acffa_settings = get_option( 'acffa_settings', array() );
|
105 |
+
$acffa_internal_version = isset( $acffa_settings['acffa_plugin_version'] ) ? $acffa_settings['acffa_plugin_version'] : false;
|
106 |
+
|
107 |
+
if ( ! $acffa_internal_version ) {
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
switch ( $acffa_major_version ) {
|
112 |
+
case 5:
|
113 |
+
if ( version_compare( $acffa_internal_version, '3.1.1', '<' ) ) {
|
114 |
+
define( 'ACFFA_FORCE_REFRESH', true );
|
115 |
+
do_action( 'ACFFA_refresh_latest_icons' );
|
116 |
+
}
|
117 |
+
break;
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( $acffa_internal_version !== ACFFA_VERSION ) {
|
121 |
+
$acffa_settings['acffa_plugin_version'] = ACFFA_VERSION;
|
122 |
+
update_option( 'acffa_settings', $acffa_settings, false );
|
123 |
+
}
|
124 |
+
}
|
125 |
}
|
126 |
|
127 |
+
add_action( 'acf/include_field_types', array( new acf_plugin_font_awesome, 'init' ), 10 );
|
128 |
|
129 |
endif;
|
admin/class-ACFFA-Admin.php
CHANGED
@@ -90,11 +90,13 @@ class ACFFA_Admin
|
|
90 |
|
91 |
public function add_settings_page()
|
92 |
{
|
|
|
|
|
93 |
add_submenu_page(
|
94 |
'edit.php?post_type=acf-field-group',
|
95 |
'FontAwesome Settings',
|
96 |
'FontAwesome Settings',
|
97 |
-
|
98 |
'fontawesome-settings',
|
99 |
array( $this, 'fontawesome_settings' )
|
100 |
);
|
@@ -340,7 +342,7 @@ class ACFFA_Admin
|
|
340 |
echo '<optgroup label="' . $optgroup_label . '">';
|
341 |
|
342 |
foreach( $icons as $k => $v ) {
|
343 |
-
$value = str_replace( array( 'fas ', 'far ', 'fab ', 'fal ', 'fa-' ), '', $k );
|
344 |
?>
|
345 |
<option value="<?php echo $k; ?>"><?php echo $value; ?></option>
|
346 |
<?php
|
@@ -516,7 +518,7 @@ class ACFFA_Admin
|
|
516 |
update_option( 'ACFFA_custom_icon_sets_list', $icon_sets_list, false );
|
517 |
}
|
518 |
|
519 |
-
private function remove_icon_set( $custom_icon_sets_list
|
520 |
{
|
521 |
if ( ! $custom_icon_sets_list ) {
|
522 |
$custom_icon_sets_list = get_option( 'ACFFA_custom_icon_sets_list' );
|
@@ -550,4 +552,4 @@ class ACFFA_Admin
|
|
550 |
|
551 |
}
|
552 |
|
553 |
-
add_action( '
|
90 |
|
91 |
public function add_settings_page()
|
92 |
{
|
93 |
+
$capability = apply_filters( 'acf/settings/capability', 'manage_options' );
|
94 |
+
|
95 |
add_submenu_page(
|
96 |
'edit.php?post_type=acf-field-group',
|
97 |
'FontAwesome Settings',
|
98 |
'FontAwesome Settings',
|
99 |
+
$capability,
|
100 |
'fontawesome-settings',
|
101 |
array( $this, 'fontawesome_settings' )
|
102 |
);
|
342 |
echo '<optgroup label="' . $optgroup_label . '">';
|
343 |
|
344 |
foreach( $icons as $k => $v ) {
|
345 |
+
$value = str_replace( array( 'fas ', 'far ', 'fab ', 'fal ', 'fad ', 'fa-' ), '', $k );
|
346 |
?>
|
347 |
<option value="<?php echo $k; ?>"><?php echo $value; ?></option>
|
348 |
<?php
|
518 |
update_option( 'ACFFA_custom_icon_sets_list', $icon_sets_list, false );
|
519 |
}
|
520 |
|
521 |
+
private function remove_icon_set( $custom_icon_sets_list, $icon_set_name, $list_only = false )
|
522 |
{
|
523 |
if ( ! $custom_icon_sets_list ) {
|
524 |
$custom_icon_sets_list = get_option( 'ACFFA_custom_icon_sets_list' );
|
552 |
|
553 |
}
|
554 |
|
555 |
+
add_action( 'acf/init', array( new ACFFA_Admin, 'init' ), 10 );
|
assets/inc/class-ACFFA-Loader-4.php
CHANGED
@@ -15,14 +15,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
|
16 |
class ACFFA_Loader_4
|
17 |
{
|
18 |
-
|
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 $current_version = false;
|
23 |
private $version;
|
24 |
|
25 |
-
public function
|
26 |
{
|
27 |
$this->version = 'v' . ACFFA_MAJOR_VERSION;
|
28 |
$this->api_endpoint = apply_filters( 'ACFFA_api_endpoint', $this->api_endpoint );
|
@@ -247,5 +246,4 @@ class ACFFA_Loader_4
|
|
247 |
}
|
248 |
}
|
249 |
|
250 |
-
|
251 |
-
add_action( 'acf/register_fields', array( new ACFFA_Loader_4, 'init' ), 5 ); // v4
|
15 |
|
16 |
class ACFFA_Loader_4
|
17 |
{
|
|
|
18 |
public $api_endpoint = 'https://data.jsdelivr.com/v1/package/resolve/gh/FortAwesome/Font-Awesome@4';
|
19 |
public $cdn_baseurl = 'https://cdn.jsdelivr.net/fontawesome/';
|
20 |
public $cdn_filepath = '/css/font-awesome.min.css';
|
21 |
public $current_version = false;
|
22 |
private $version;
|
23 |
|
24 |
+
public function __construct()
|
25 |
{
|
26 |
$this->version = 'v' . ACFFA_MAJOR_VERSION;
|
27 |
$this->api_endpoint = apply_filters( 'ACFFA_api_endpoint', $this->api_endpoint );
|
246 |
}
|
247 |
}
|
248 |
|
249 |
+
new ACFFA_Loader_4();
|
|
assets/inc/class-ACFFA-Loader-5.php
CHANGED
@@ -30,7 +30,7 @@ class ACFFA_Loader_5
|
|
30 |
private $active_icon_set = false;
|
31 |
private $version;
|
32 |
|
33 |
-
public function
|
34 |
{
|
35 |
$this->version = 'v' . ACFFA_MAJOR_VERSION;
|
36 |
$acffa_settings = get_option( 'acffa_settings' );
|
@@ -159,7 +159,7 @@ class ACFFA_Loader_5
|
|
159 |
return;
|
160 |
}
|
161 |
|
162 |
-
if ( version_compare( $this->current_version, $latest_version, '<' ) || ! $this->active_icon_set || ( $this->pro_icons_enabled && 'pro' !== $this->active_icon_set ) || ( ! $this->pro_icons_enabled && 'free' !== $this->active_icon_set ) ) {
|
163 |
update_option( 'ACFFA_current_version', $latest_version, false );
|
164 |
$this->current_version = $latest_version;
|
165 |
|
@@ -203,7 +203,7 @@ class ACFFA_Loader_5
|
|
203 |
{
|
204 |
$fa_icons = get_option( 'ACFFA_icon_data' );
|
205 |
|
206 |
-
if ( empty( $fa_icons ) || ! isset( $fa_icons[ $this->current_version ] ) || ! $this->active_icon_set || ( $this->pro_icons_enabled && 'pro' !== $this->active_icon_set ) || ( ! $this->pro_icons_enabled && 'free' !== $this->active_icon_set ) ) {
|
207 |
$remote_get = wp_remote_get( $this->manifest_url );
|
208 |
|
209 |
if ( ! is_wp_error( $remote_get ) && isset( $remote_get['response']['code'] ) && '200' == $remote_get['response']['code'] ) {
|
@@ -260,7 +260,11 @@ class ACFFA_Loader_5
|
|
260 |
$icons['list'][ $prefix ] = array();
|
261 |
}
|
262 |
|
263 |
-
|
|
|
|
|
|
|
|
|
264 |
|
265 |
$icons['details'][ $prefix ][ $prefix . ' fa-' . $icon ] = array(
|
266 |
'hex' => '\\' . $details['unicode'],
|
@@ -272,8 +276,10 @@ class ACFFA_Loader_5
|
|
272 |
return $icons;
|
273 |
}
|
274 |
|
275 |
-
public function get_prefix( $prefix
|
276 |
{
|
|
|
|
|
277 |
switch ( $style ) {
|
278 |
case 'solid':
|
279 |
$prefix = 'fas';
|
@@ -287,6 +293,10 @@ class ACFFA_Loader_5
|
|
287 |
$prefix = 'fal';
|
288 |
break;
|
289 |
|
|
|
|
|
|
|
|
|
290 |
case 'regular':
|
291 |
default:
|
292 |
$prefix = 'far';
|
@@ -296,8 +306,10 @@ class ACFFA_Loader_5
|
|
296 |
return $prefix;
|
297 |
}
|
298 |
|
299 |
-
public function get_prefix_label( $label
|
300 |
{
|
|
|
|
|
301 |
switch ( $prefix ) {
|
302 |
case 'fas':
|
303 |
$label = __( 'Solid', 'acf-font-awesome' );
|
@@ -311,6 +323,10 @@ class ACFFA_Loader_5
|
|
311 |
$label = __( 'Light', 'acf-font-awesome' );
|
312 |
break;
|
313 |
|
|
|
|
|
|
|
|
|
314 |
case 'far':
|
315 |
default:
|
316 |
$label = __( 'Regular', 'acf-font-awesome' );
|
@@ -321,5 +337,4 @@ class ACFFA_Loader_5
|
|
321 |
}
|
322 |
}
|
323 |
|
324 |
-
|
325 |
-
add_action( 'acf/register_fields', array( new ACFFA_Loader_5, 'init' ), 5 ); // v4
|
30 |
private $active_icon_set = false;
|
31 |
private $version;
|
32 |
|
33 |
+
public function __construct()
|
34 |
{
|
35 |
$this->version = 'v' . ACFFA_MAJOR_VERSION;
|
36 |
$acffa_settings = get_option( 'acffa_settings' );
|
159 |
return;
|
160 |
}
|
161 |
|
162 |
+
if ( version_compare( $this->current_version, $latest_version, '<' ) || defined( 'ACFFA_FORCE_REFRESH' ) || ! $this->active_icon_set || ( $this->pro_icons_enabled && 'pro' !== $this->active_icon_set ) || ( ! $this->pro_icons_enabled && 'free' !== $this->active_icon_set ) ) {
|
163 |
update_option( 'ACFFA_current_version', $latest_version, false );
|
164 |
$this->current_version = $latest_version;
|
165 |
|
203 |
{
|
204 |
$fa_icons = get_option( 'ACFFA_icon_data' );
|
205 |
|
206 |
+
if ( empty( $fa_icons ) || defined( 'ACFFA_FORCE_REFRESH' ) || ! isset( $fa_icons[ $this->current_version ] ) || ! $this->active_icon_set || ( $this->pro_icons_enabled && 'pro' !== $this->active_icon_set ) || ( ! $this->pro_icons_enabled && 'free' !== $this->active_icon_set ) ) {
|
207 |
$remote_get = wp_remote_get( $this->manifest_url );
|
208 |
|
209 |
if ( ! is_wp_error( $remote_get ) && isset( $remote_get['response']['code'] ) && '200' == $remote_get['response']['code'] ) {
|
260 |
$icons['list'][ $prefix ] = array();
|
261 |
}
|
262 |
|
263 |
+
if ( 'fad' == $prefix ) {
|
264 |
+
$icons['list'][ $prefix ][ $prefix . ' fa-' . $icon ] = '<i class="' . $prefix . ' fa-' . $icon . '"></i> ' . $icon;
|
265 |
+
} else {
|
266 |
+
$icons['list'][ $prefix ][ $prefix . ' fa-' . $icon ] = '<i class="' . $prefix . '">&#x' . $details['unicode'] . ';</i> ' . $icon;
|
267 |
+
}
|
268 |
|
269 |
$icons['details'][ $prefix ][ $prefix . ' fa-' . $icon ] = array(
|
270 |
'hex' => '\\' . $details['unicode'],
|
276 |
return $icons;
|
277 |
}
|
278 |
|
279 |
+
public function get_prefix( $prefix, $style )
|
280 |
{
|
281 |
+
$prefix = empty( $prefix ) ? 'far' : $prefix;
|
282 |
+
|
283 |
switch ( $style ) {
|
284 |
case 'solid':
|
285 |
$prefix = 'fas';
|
293 |
$prefix = 'fal';
|
294 |
break;
|
295 |
|
296 |
+
case 'duotone':
|
297 |
+
$prefix = 'fad';
|
298 |
+
break;
|
299 |
+
|
300 |
case 'regular':
|
301 |
default:
|
302 |
$prefix = 'far';
|
306 |
return $prefix;
|
307 |
}
|
308 |
|
309 |
+
public function get_prefix_label( $label, $prefix )
|
310 |
{
|
311 |
+
$label = empty( $label ) ? 'Regular' : $label;
|
312 |
+
|
313 |
switch ( $prefix ) {
|
314 |
case 'fas':
|
315 |
$label = __( 'Solid', 'acf-font-awesome' );
|
323 |
$label = __( 'Light', 'acf-font-awesome' );
|
324 |
break;
|
325 |
|
326 |
+
case 'fad':
|
327 |
+
$label = __( 'Duotone', 'acf-font-awesome' );
|
328 |
+
break;
|
329 |
+
|
330 |
case 'far':
|
331 |
default:
|
332 |
$label = __( 'Regular', 'acf-font-awesome' );
|
337 |
}
|
338 |
}
|
339 |
|
340 |
+
new ACFFA_Loader_5();
|
|
assets/js/input-v5.js
CHANGED
@@ -35,6 +35,12 @@
|
|
35 |
if ( $select.hasClass('select2-fontawesome') ) {
|
36 |
args.dropdownCssClass = 'fa-select2-drop fa' + ACFFA.major_version;
|
37 |
args.containerCssClass = 'fa-select2 fa' + ACFFA.major_version;
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
return args;
|
35 |
if ( $select.hasClass('select2-fontawesome') ) {
|
36 |
args.dropdownCssClass = 'fa-select2-drop fa' + ACFFA.major_version;
|
37 |
args.containerCssClass = 'fa-select2 fa' + ACFFA.major_version;
|
38 |
+
args.escapeMarkup = function( markup ) {
|
39 |
+
if (typeof markup !== 'string') {
|
40 |
+
return markup;
|
41 |
+
}
|
42 |
+
return acf.escHtml( markup );
|
43 |
+
}
|
44 |
}
|
45 |
|
46 |
return args;
|
fields/acf-font-awesome-v5.php
CHANGED
@@ -69,6 +69,7 @@ if ( ! class_exists( 'acf_field_font_awesome' ) ) :
|
|
69 |
'fas' => __( 'Solid', 'acf-font-awesome' ),
|
70 |
'far' => __( 'Regular', 'acf-font-awesome' ),
|
71 |
'fal' => __( 'Light (FontAwesome Pro License Required)', 'acf-font-awesome' ),
|
|
|
72 |
'fab' => __( 'Brands', 'acf-font-awesome' ),
|
73 |
'custom' => __( 'Custom Icon Set', 'acf-font-awesome' )
|
74 |
);
|
69 |
'fas' => __( 'Solid', 'acf-font-awesome' ),
|
70 |
'far' => __( 'Regular', 'acf-font-awesome' ),
|
71 |
'fal' => __( 'Light (FontAwesome Pro License Required)', 'acf-font-awesome' ),
|
72 |
+
'fad' => __( 'Duotone (FontAwesome Pro License Required)', 'acf-font-awesome' ),
|
73 |
'fab' => __( 'Brands', 'acf-font-awesome' ),
|
74 |
'custom' => __( 'Custom Icon Set', 'acf-font-awesome' )
|
75 |
);
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: mattkeys
|
3 |
Tags: Advanced Custom Fields, ACF, Font Awesome, FontAwesome
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to:
|
6 |
-
Stable tag:
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -42,7 +42,7 @@ This ACF field type is compatible with:
|
|
42 |
* **ACFFA_admin_enqueue_fa**: Return false to stop enqueueing FontAwesome in the admin area. Useful if you already have FontAwesome enqueued by some other means.
|
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 |
-
* **ACFFA_override_major_version**: Filter to manually set the 'major' version of FontAwesome to load (accepts either 4, or 5).
|
46 |
|
47 |
== Screenshots ==
|
48 |
|
@@ -51,7 +51,25 @@ This ACF field type is compatible with:
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
= 3.0.0 =
|
|
|
55 |
* Added support for new FontAwesome 5.x free and pro icon sets
|
56 |
* Added new 'custom icon set' builder which allows FontAwesome ACF fields to be created with a limited set of icons individually selected from the full list of FontAwesome icons. Example: Create a custom icon set limited to just the social media brand icons
|
57 |
* Added new field options to to limit which of the icon sets ( Brands, Regular, Lite, Solid ) you want to allow in the field (applies to FontAwesome v5 only)
|
@@ -168,6 +186,23 @@ This ACF field type is compatible with:
|
|
168 |
|
169 |
== Upgrade Notice ==
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
= 3.0.0 =
|
172 |
* NOTE: When upgrading from a previous version of this plugin, the FontAwesome 'major version' will remain at v4 to stay compatible with existing integrations. *HOWEVER* if you are upgrading from a very old version of this plugin, it may not be possible to detect the former installation, and you will need to manually configure this plugin to use FontAwesome v4 in the new settings admin area.
|
173 |
* Added support for new FontAwesome 5.x free and pro icon sets
|
@@ -175,45 +210,4 @@ This ACF field type is compatible with:
|
|
175 |
* Added new field options to to limit which of the icon sets ( Brands, Regular, Lite, Solid ) you want to allow in the field (applies to FontAwesome v5 only)
|
176 |
* Adding new FontAwesome Settings admin menu under the ACF primary menu area for global configuration options.
|
177 |
* Page load performance improvements (don't load icons in field constructor)
|
178 |
-
* Removing support for ACF v4 now that v5 is out with a free version
|
179 |
-
|
180 |
-
= 2.1.2 =
|
181 |
-
* Fixed bug where ACFFA_get_icons filter was not used in wp-admin area when retrieving icons.
|
182 |
-
|
183 |
-
= 2.1.1 =
|
184 |
-
* 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
|
185 |
-
|
186 |
-
= 2.1.0 =
|
187 |
-
* 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.
|
188 |
-
|
189 |
-
= 2.0.9 =
|
190 |
-
* 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.
|
191 |
-
|
192 |
-
= 2.0.8 =
|
193 |
-
* Fixed bug where fields marked to 'allow null' in acf v5 did not show the (x) to remove the selected option on the field
|
194 |
-
|
195 |
-
= 2.0.7 =
|
196 |
-
* Fixed bug with FA fields assigned to menu items + further refactoring of JS for ACF v5
|
197 |
-
|
198 |
-
= 2.0.6 =
|
199 |
-
* Refactored JS to simplify codebase and fix bugs where Chosen or Select2 fields would not initialize in a variety of field/sub-field configurations and display options.
|
200 |
-
|
201 |
-
= 2.0.5 =
|
202 |
-
* Fixed bug with ACF tabs + FontAwesome fields where Chosen/Select2 would not initialize beyond the first tab shown
|
203 |
-
|
204 |
-
= 2.0.4 =
|
205 |
-
* Added filter (ACFFA_always_enqueue_fa) to allow FontAwesome to always be enqueued on your sites frontend, even if no ACF FontAwesome fields are in use on the page.
|
206 |
-
|
207 |
-
= 2.0.3 =
|
208 |
-
* Fixed bug where a field set to return 'Icon Object' would instead return an array
|
209 |
-
|
210 |
-
= 2.0.2 =
|
211 |
-
* Fixed bug effecting Select fields when used along with a Font Awesome field in a repeater (ACF v5)
|
212 |
-
|
213 |
-
= 2.0.1 =
|
214 |
-
* Fixed bug causing incompatibilities with ACF Clone fields (ACF v5)
|
215 |
-
* Fixed bug where default icons could not be unselected when creating FontAwesome fields (ACF v5)
|
216 |
-
|
217 |
-
= 2.0.0 =
|
218 |
-
* Total rewrite of plugin to simplify codebase and better adhere to WordPress and Advanced Custom Fields coding standards and best practices
|
219 |
-
* Added option to disable the larger icon preview displayed with the FontAwesome select fields
|
2 |
Contributors: mattkeys
|
3 |
Tags: Advanced Custom Fields, ACF, Font Awesome, FontAwesome
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 5.8
|
6 |
+
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
42 |
* **ACFFA_admin_enqueue_fa**: Return false to stop enqueueing FontAwesome in the admin area. Useful if you already have FontAwesome enqueued by some other means.
|
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 |
+
* **ACFFA_override_major_version**: Filter to manually set the 'major' version of FontAwesome to load (accepts either 4, or 5). NOTE: This filter must be registered before any calls to ACF get_field() function are made.
|
46 |
|
47 |
== Screenshots ==
|
48 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 3.1.2 =
|
55 |
+
* Fixed compatibility issue with ACF 5.10+
|
56 |
+
* Fixed deprecated warnings in PHP 8, thanks to Levi Cole for the pull request
|
57 |
+
|
58 |
+
= 3.1.1 =
|
59 |
+
* Fixed bug where Duotone icons were not available to existing users of this plugin due to cached versions of the icons from before this plugin could properly parse the duotone icons.
|
60 |
+
|
61 |
+
= 3.1.0 =
|
62 |
+
* Added support for new FontAwesome Duotone icons (FontAwesome Pro subscription required)
|
63 |
+
* Added support for ACF 'acf/settings/capability' filter on the settings page
|
64 |
+
|
65 |
+
= 3.0.2 =
|
66 |
+
* Fixed bug causing PHP warning of undefined constant
|
67 |
+
|
68 |
+
= 3.0.1 =
|
69 |
+
* Fixed bug where the FontAwesome field would not successfully register on sites which force ACF to initialize itself early (usually by calling get_field function in the theme functions.php file)
|
70 |
+
|
71 |
= 3.0.0 =
|
72 |
+
* NOTE: When upgrading from a previous version of this plugin, the FontAwesome 'major version' will remain at v4 to stay compatible with existing integrations. *HOWEVER* if you are upgrading from a very old version of this plugin, it may not be possible to detect the former installation, and you will need to manually configure this plugin to use FontAwesome v4 in the new settings admin area.
|
73 |
* Added support for new FontAwesome 5.x free and pro icon sets
|
74 |
* Added new 'custom icon set' builder which allows FontAwesome ACF fields to be created with a limited set of icons individually selected from the full list of FontAwesome icons. Example: Create a custom icon set limited to just the social media brand icons
|
75 |
* Added new field options to to limit which of the icon sets ( Brands, Regular, Lite, Solid ) you want to allow in the field (applies to FontAwesome v5 only)
|
186 |
|
187 |
== Upgrade Notice ==
|
188 |
|
189 |
+
= 3.1.2 =
|
190 |
+
* Fixed compatibility issue with ACF 5.10+
|
191 |
+
* Fixed deprecated warnings in PHP 8, thanks to Levi Cole for the pull request
|
192 |
+
|
193 |
+
= 3.1.1 =
|
194 |
+
* Fixed bug where Duotone icons were not available to existing users of this plugin due to cached versions of the icons from before this plugin could properly parse the duotone icons.
|
195 |
+
|
196 |
+
= 3.1.0 =
|
197 |
+
* Added support for new FontAwesome Duotone icons (FontAwesome Pro subscription required)
|
198 |
+
* Added support for ACF 'acf/settings/capability' filter on the settings page
|
199 |
+
|
200 |
+
= 3.0.2 =
|
201 |
+
* Fixed bug causing PHP warning of undefined constant
|
202 |
+
|
203 |
+
= 3.0.1 =
|
204 |
+
* Fixed bug where the FontAwesome field would not successfully register on sites which force ACF to initialize itself early (usually by calling get_field function in the theme functions.php file)
|
205 |
+
|
206 |
= 3.0.0 =
|
207 |
* NOTE: When upgrading from a previous version of this plugin, the FontAwesome 'major version' will remain at v4 to stay compatible with existing integrations. *HOWEVER* if you are upgrading from a very old version of this plugin, it may not be possible to detect the former installation, and you will need to manually configure this plugin to use FontAwesome v4 in the new settings admin area.
|
208 |
* Added support for new FontAwesome 5.x free and pro icon sets
|
210 |
* Added new field options to to limit which of the icon sets ( Brands, Regular, Lite, Solid ) you want to allow in the field (applies to FontAwesome v5 only)
|
211 |
* Adding new FontAwesome Settings admin menu under the ACF primary menu area for global configuration options.
|
212 |
* Page load performance improvements (don't load icons in field constructor)
|
213 |
+
* Removing support for ACF v4 now that v5 is out with a free version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|