Version Description
- Added support for ACF version 5.x
Download this release
Release Info
Developer | mattkeys |
Plugin | Advanced Custom Fields: Font Awesome Field |
Version | 1.3 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.3
- acf-font-awesome-v4.php +864 -0
- acf-font-awesome-v5.php +841 -0
- acf-font-awesome.php +14 -41
- css/fontawesome.css +4 -0
- css/input.css +0 -0
- font-awesome-v4.php +0 -860
- js/create_input.js +45 -16
- js/edit_input.js +116 -65
- readme.txt +13 -22
acf-font-awesome-v4.php
ADDED
@@ -0,0 +1,864 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class acf_field_font_awesome extends acf_field
|
4 |
+
{
|
5 |
+
// vars
|
6 |
+
var $settings, // will hold info such as dir / path
|
7 |
+
$defaults; // will hold default field options
|
8 |
+
|
9 |
+
/*
|
10 |
+
* __construct
|
11 |
+
*
|
12 |
+
* Set name / label needed for actions / filters
|
13 |
+
*
|
14 |
+
* @since 3.6
|
15 |
+
* @date 23/01/13
|
16 |
+
*/
|
17 |
+
|
18 |
+
function __construct()
|
19 |
+
{
|
20 |
+
$this->name = 'font-awesome';
|
21 |
+
$this->label = __('Font Awesome Icon');
|
22 |
+
$this->category = __("Content",'acf'); // Basic, Content, Choice, etc
|
23 |
+
$this->defaults = array(
|
24 |
+
'enqueue_fa' => 0,
|
25 |
+
'allow_null' => 0,
|
26 |
+
'save_format' => 'element',
|
27 |
+
'default_value' => '',
|
28 |
+
'choices' => array(
|
29 |
+
'fa-adjust' => ' fa-adjust',
|
30 |
+
'fa-adn' => ' fa-adn',
|
31 |
+
'fa-align-center' => ' fa-align-center',
|
32 |
+
'fa-align-justify' => ' fa-align-justify',
|
33 |
+
'fa-align-left' => ' fa-align-left',
|
34 |
+
'fa-align-right' => ' fa-align-right',
|
35 |
+
'fa-ambulance' => ' fa-ambulance',
|
36 |
+
'fa-anchor' => ' fa-anchor',
|
37 |
+
'fa-android' => ' fa-android',
|
38 |
+
'fa-angle-double-down' => ' fa-angle-double-down',
|
39 |
+
'fa-angle-double-left' => ' fa-angle-double-left',
|
40 |
+
'fa-angle-double-right' => ' fa-angle-double-right',
|
41 |
+
'fa-angle-double-up' => ' fa-angle-double-up',
|
42 |
+
'fa-angle-down' => ' fa-angle-down',
|
43 |
+
'fa-angle-left' => ' fa-angle-left',
|
44 |
+
'fa-angle-right' => ' fa-angle-right',
|
45 |
+
'fa-angle-up' => ' fa-angle-up',
|
46 |
+
'fa-apple' => ' fa-apple',
|
47 |
+
'fa-archive' => ' fa-archive',
|
48 |
+
'fa-arrow-circle-down' => ' fa-arrow-circle-down',
|
49 |
+
'fa-arrow-circle-left' => ' fa-arrow-circle-left',
|
50 |
+
'fa-arrow-circle-o-down' => ' fa-arrow-circle-o-down',
|
51 |
+
'fa-arrow-circle-o-left' => ' fa-arrow-circle-o-left',
|
52 |
+
'fa-arrow-circle-o-right' => ' fa-arrow-circle-o-right',
|
53 |
+
'fa-arrow-circle-o-up' => ' fa-arrow-circle-o-up',
|
54 |
+
'fa-arrow-circle-right' => ' fa-arrow-circle-right',
|
55 |
+
'fa-arrow-circle-up' => ' fa-arrow-circle-up',
|
56 |
+
'fa-arrow-down' => ' fa-arrow-down',
|
57 |
+
'fa-arrow-left' => ' fa-arrow-left',
|
58 |
+
'fa-arrow-right' => ' fa-arrow-right',
|
59 |
+
'fa-arrow-up' => ' fa-arrow-up',
|
60 |
+
'fa-arrows' => ' fa-arrows',
|
61 |
+
'fa-arrows-alt' => ' fa-arrows-alt',
|
62 |
+
'fa-arrows-h' => ' fa-arrows-h',
|
63 |
+
'fa-arrows-v' => ' fa-arrows-v',
|
64 |
+
'fa-asterisk' => ' fa-asterisk',
|
65 |
+
'fa-automobile' => ' fa-automobile',
|
66 |
+
'fa-backward' => ' fa-backward',
|
67 |
+
'fa-ban' => ' fa-ban',
|
68 |
+
'fa-bank' => ' fa-bank',
|
69 |
+
'fa-bar-chart-o' => ' fa-bar-chart-o',
|
70 |
+
'fa-barcode' => ' fa-barcode',
|
71 |
+
'fa-bars' => ' fa-bars',
|
72 |
+
'fa-beer' => ' fa-beer',
|
73 |
+
'fa-behance' => ' fa-behance',
|
74 |
+
'fa-behance-square' => ' fa-behance-square',
|
75 |
+
'fa-bell' => ' fa-bell',
|
76 |
+
'fa-bell-o' => ' fa-bell-o',
|
77 |
+
'fa-bitbucket' => ' fa-bitbucket',
|
78 |
+
'fa-bitbucket-square' => ' fa-bitbucket-square',
|
79 |
+
'fa-bitcoin' => ' fa-bitcoin',
|
80 |
+
'fa-bold' => ' fa-bold',
|
81 |
+
'fa-bolt' => ' fa-bolt',
|
82 |
+
'fa-bomb' => ' fa-bomb',
|
83 |
+
'fa-book' => ' fa-book',
|
84 |
+
'fa-bookmark' => ' fa-bookmark',
|
85 |
+
'fa-bookmark-o' => ' fa-bookmark-o',
|
86 |
+
'fa-briefcase' => ' fa-briefcase',
|
87 |
+
'fa-btc' => ' fa-btc',
|
88 |
+
'fa-bug' => ' fa-bug',
|
89 |
+
'fa-building' => ' fa-building',
|
90 |
+
'fa-building-o' => ' fa-building-o',
|
91 |
+
'fa-bullhorn' => ' fa-bullhorn',
|
92 |
+
'fa-bullseye' => ' fa-bullseye',
|
93 |
+
'fa-cab' => ' fa-cab',
|
94 |
+
'fa-calendar' => ' fa-calendar',
|
95 |
+
'fa-calendar-o' => ' fa-calendar-o',
|
96 |
+
'fa-camera' => ' fa-camera',
|
97 |
+
'fa-camera-retro' => ' fa-camera-retro',
|
98 |
+
'fa-car' => ' fa-car',
|
99 |
+
'fa-caret-down' => ' fa-caret-down',
|
100 |
+
'fa-caret-left' => ' fa-caret-left',
|
101 |
+
'fa-caret-right' => ' fa-caret-right',
|
102 |
+
'fa-caret-square-o-down' => ' fa-caret-square-o-down',
|
103 |
+
'fa-caret-square-o-left' => ' fa-caret-square-o-left',
|
104 |
+
'fa-caret-square-o-right' => ' fa-caret-square-o-right',
|
105 |
+
'fa-caret-square-o-up' => ' fa-caret-square-o-up',
|
106 |
+
'fa-caret-up' => ' fa-caret-up',
|
107 |
+
'fa-certificate' => ' fa-certificate',
|
108 |
+
'fa-chain' => ' fa-chain',
|
109 |
+
'fa-chain-broken' => ' fa-chain-broken',
|
110 |
+
'fa-check' => ' fa-check',
|
111 |
+
'fa-check-circle' => ' fa-check-circle',
|
112 |
+
'fa-check-circle-o' => ' fa-check-circle-o',
|
113 |
+
'fa-check-square' => ' fa-check-square',
|
114 |
+
'fa-check-square-o' => ' fa-check-square-o',
|
115 |
+
'fa-chevron-circle-down' => ' fa-chevron-circle-down',
|
116 |
+
'fa-chevron-circle-left' => ' fa-chevron-circle-left',
|
117 |
+
'fa-chevron-circle-right' => ' fa-chevron-circle-right',
|
118 |
+
'fa-chevron-circle-up' => ' fa-chevron-circle-up',
|
119 |
+
'fa-chevron-down' => ' fa-chevron-down',
|
120 |
+
'fa-chevron-left' => ' fa-chevron-left',
|
121 |
+
'fa-chevron-right' => ' fa-chevron-right',
|
122 |
+
'fa-chevron-up' => ' fa-chevron-up',
|
123 |
+
'fa-child' => ' fa-child',
|
124 |
+
'fa-circle' => ' fa-circle',
|
125 |
+
'fa-circle-o' => ' fa-circle-o',
|
126 |
+
'fa-circle-o-notch' => ' fa-circle-o-notch',
|
127 |
+
'fa-circle-thin' => ' fa-circle-thin',
|
128 |
+
'fa-clipboard' => ' fa-clipboard',
|
129 |
+
'fa-clock-o' => ' fa-clock-o',
|
130 |
+
'fa-cloud' => ' fa-cloud',
|
131 |
+
'fa-cloud-download' => ' fa-cloud-download',
|
132 |
+
'fa-cloud-upload' => ' fa-cloud-upload',
|
133 |
+
'fa-cny' => ' fa-cny',
|
134 |
+
'fa-code' => ' fa-code',
|
135 |
+
'fa-code-fork' => ' fa-code-fork',
|
136 |
+
'fa-codepen' => ' fa-codepen',
|
137 |
+
'fa-coffee' => ' fa-coffee',
|
138 |
+
'fa-cog' => ' fa-cog',
|
139 |
+
'fa-cogs' => ' fa-cogs',
|
140 |
+
'fa-columns' => ' fa-columns',
|
141 |
+
'fa-comment' => ' fa-comment',
|
142 |
+
'fa-comment-o' => ' fa-comment-o',
|
143 |
+
'fa-comments' => ' fa-comments',
|
144 |
+
'fa-comments-o' => ' fa-comments-o',
|
145 |
+
'fa-compass' => ' fa-compass',
|
146 |
+
'fa-compress' => ' fa-compress',
|
147 |
+
'fa-copy' => ' fa-copy',
|
148 |
+
'fa-credit-card' => ' fa-credit-card',
|
149 |
+
'fa-crop' => ' fa-crop',
|
150 |
+
'fa-crosshairs' => ' fa-crosshairs',
|
151 |
+
'fa-css3' => ' fa-css3',
|
152 |
+
'fa-cube' => ' fa-cube',
|
153 |
+
'fa-cubes' => ' fa-cubes',
|
154 |
+
'fa-cut' => ' fa-cut',
|
155 |
+
'fa-cutlery' => ' fa-cutlery',
|
156 |
+
'fa-dashboard' => ' fa-dashboard',
|
157 |
+
'fa-database' => ' fa-database',
|
158 |
+
'fa-dedent' => ' fa-dedent',
|
159 |
+
'fa-delicious' => ' fa-delicious',
|
160 |
+
'fa-desktop' => ' fa-desktop',
|
161 |
+
'fa-deviantart' => ' fa-deviantart',
|
162 |
+
'fa-digg' => ' fa-digg',
|
163 |
+
'fa-dollar' => ' fa-dollar',
|
164 |
+
'fa-dot-circle-o' => ' fa-dot-circle-o',
|
165 |
+
'fa-download' => ' fa-download',
|
166 |
+
'fa-dribbble' => ' fa-dribbble',
|
167 |
+
'fa-dropbox' => ' fa-dropbox',
|
168 |
+
'fa-drupal' => ' fa-drupal',
|
169 |
+
'fa-edit' => ' fa-edit',
|
170 |
+
'fa-eject' => ' fa-eject',
|
171 |
+
'fa-ellipsis-h' => ' fa-ellipsis-h',
|
172 |
+
'fa-ellipsis-v' => ' fa-ellipsis-v',
|
173 |
+
'fa-empire' => ' fa-empire',
|
174 |
+
'fa-envelope' => ' fa-envelope',
|
175 |
+
'fa-envelope-o' => ' fa-envelope-o',
|
176 |
+
'fa-envelope-square' => ' fa-envelope-square',
|
177 |
+
'fa-eraser' => ' fa-eraser',
|
178 |
+
'fa-eur' => ' fa-eur',
|
179 |
+
'fa-euro' => ' fa-euro',
|
180 |
+
'fa-exchange' => ' fa-exchange',
|
181 |
+
'fa-exclamation' => ' fa-exclamation',
|
182 |
+
'fa-exclamation-circle' => ' fa-exclamation-circle',
|
183 |
+
'fa-exclamation-triangle' => ' fa-exclamation-triangle',
|
184 |
+
'fa-expand' => ' fa-expand',
|
185 |
+
'fa-external-link' => ' fa-external-link',
|
186 |
+
'fa-external-link-square' => ' fa-external-link-square',
|
187 |
+
'fa-eye' => ' fa-eye',
|
188 |
+
'fa-eye-slash' => ' fa-eye-slash',
|
189 |
+
'fa-facebook' => ' fa-facebook',
|
190 |
+
'fa-facebook-square' => ' fa-facebook-square',
|
191 |
+
'fa-fast-backward' => ' fa-fast-backward',
|
192 |
+
'fa-fast-forward' => ' fa-fast-forward',
|
193 |
+
'fa-fax' => ' fa-fax',
|
194 |
+
'fa-female' => ' fa-female',
|
195 |
+
'fa-fighter-jet' => ' fa-fighter-jet',
|
196 |
+
'fa-file' => ' fa-file',
|
197 |
+
'fa-file-archive-o' => ' fa-file-archive-o',
|
198 |
+
'fa-file-audio-o' => ' fa-file-audio-o',
|
199 |
+
'fa-file-code-o' => ' fa-file-code-o',
|
200 |
+
'fa-file-excel-o' => ' fa-file-excel-o',
|
201 |
+
'fa-file-image-o' => ' fa-file-image-o',
|
202 |
+
'fa-file-movie-o' => ' fa-file-movie-o',
|
203 |
+
'fa-file-o' => ' fa-file-o',
|
204 |
+
'fa-file-pdf-o' => ' fa-file-pdf-o',
|
205 |
+
'fa-file-photo-o' => ' fa-file-photo-o',
|
206 |
+
'fa-file-picture-o' => ' fa-file-picture-o',
|
207 |
+
'fa-file-powerpoint-o' => ' fa-file-powerpoint-o',
|
208 |
+
'fa-file-sound-o' => ' fa-file-sound-o',
|
209 |
+
'fa-file-text' => ' fa-file-text',
|
210 |
+
'fa-file-text-o' => ' fa-file-text-o',
|
211 |
+
'fa-file-video-o' => ' fa-file-video-o',
|
212 |
+
'fa-file-word-o' => ' fa-file-word-o',
|
213 |
+
'fa-file-zip-o' => ' fa-file-zip-o',
|
214 |
+
'fa-files-o' => ' fa-files-o',
|
215 |
+
'fa-film' => ' fa-film',
|
216 |
+
'fa-filter' => ' fa-filter',
|
217 |
+
'fa-fire' => ' fa-fire',
|
218 |
+
'fa-fire-extinguisher' => ' fa-fire-extinguisher',
|
219 |
+
'fa-flag' => ' fa-flag',
|
220 |
+
'fa-flag-checkered' => ' fa-flag-checkered',
|
221 |
+
'fa-flag-o' => ' fa-flag-o',
|
222 |
+
'fa-flash' => ' fa-flash',
|
223 |
+
'fa-flask' => ' fa-flask',
|
224 |
+
'fa-flickr' => ' fa-flickr',
|
225 |
+
'fa-floppy-o' => ' fa-floppy-o',
|
226 |
+
'fa-folder' => ' fa-folder',
|
227 |
+
'fa-folder-o' => ' fa-folder-o',
|
228 |
+
'fa-folder-open' => ' fa-folder-open',
|
229 |
+
'fa-folder-open-o' => ' fa-folder-open-o',
|
230 |
+
'fa-font' => ' fa-font',
|
231 |
+
'fa-forward' => ' fa-forward',
|
232 |
+
'fa-foursquare' => ' fa-foursquare',
|
233 |
+
'fa-frown-o' => ' fa-frown-o',
|
234 |
+
'fa-gamepad' => ' fa-gamepad',
|
235 |
+
'fa-gavel' => ' fa-gavel',
|
236 |
+
'fa-gbp' => ' fa-gbp',
|
237 |
+
'fa-ge' => ' fa-ge',
|
238 |
+
'fa-gear' => ' fa-gear',
|
239 |
+
'fa-gears' => ' fa-gears',
|
240 |
+
'fa-gift' => ' fa-gift',
|
241 |
+
'fa-git' => ' fa-git',
|
242 |
+
'fa-git-square' => ' fa-git-square',
|
243 |
+
'fa-github' => ' fa-github',
|
244 |
+
'fa-github-alt' => ' fa-github-alt',
|
245 |
+
'fa-github-square' => ' fa-github-square',
|
246 |
+
'fa-gittip' => ' fa-gittip',
|
247 |
+
'fa-glass' => ' fa-glass',
|
248 |
+
'fa-globe' => ' fa-globe',
|
249 |
+
'fa-google' => ' fa-google',
|
250 |
+
'fa-google-plus' => ' fa-google-plus',
|
251 |
+
'fa-google-plus-square' => ' fa-google-plus-square',
|
252 |
+
'fa-graduation-cap' => ' fa-graduation-cap',
|
253 |
+
'fa-group' => ' fa-group',
|
254 |
+
'fa-h-square' => ' fa-h-square',
|
255 |
+
'fa-hacker-news' => ' fa-hacker-news',
|
256 |
+
'fa-hand-o-down' => ' fa-hand-o-down',
|
257 |
+
'fa-hand-o-left' => ' fa-hand-o-left',
|
258 |
+
'fa-hand-o-right' => ' fa-hand-o-right',
|
259 |
+
'fa-hand-o-up' => ' fa-hand-o-up',
|
260 |
+
'fa-hdd-o' => ' fa-hdd-o',
|
261 |
+
'fa-header' => ' fa-header',
|
262 |
+
'fa-headphones' => ' fa-headphones',
|
263 |
+
'fa-heart' => ' fa-heart',
|
264 |
+
'fa-heart-o' => ' fa-heart-o',
|
265 |
+
'fa-history' => ' fa-history',
|
266 |
+
'fa-home' => ' fa-home',
|
267 |
+
'fa-hospital-o' => ' fa-hospital-o',
|
268 |
+
'fa-html5' => ' fa-html5',
|
269 |
+
'fa-image' => ' fa-image',
|
270 |
+
'fa-inbox' => ' fa-inbox',
|
271 |
+
'fa-indent' => ' fa-indent',
|
272 |
+
'fa-info' => ' fa-info',
|
273 |
+
'fa-info-circle' => ' fa-info-circle',
|
274 |
+
'fa-inr' => ' fa-inr',
|
275 |
+
'fa-instagram' => ' fa-instagram',
|
276 |
+
'fa-institution' => ' fa-institution',
|
277 |
+
'fa-italic' => ' fa-italic',
|
278 |
+
'fa-joomla' => ' fa-joomla',
|
279 |
+
'fa-jpy' => ' fa-jpy',
|
280 |
+
'fa-jsfiddle' => ' fa-jsfiddle',
|
281 |
+
'fa-key' => ' fa-key',
|
282 |
+
'fa-keyboard-o' => ' fa-keyboard-o',
|
283 |
+
'fa-krw' => ' fa-krw',
|
284 |
+
'fa-language' => ' fa-language',
|
285 |
+
'fa-laptop' => ' fa-laptop',
|
286 |
+
'fa-leaf' => ' fa-leaf',
|
287 |
+
'fa-legal' => ' fa-legal',
|
288 |
+
'fa-lemon-o' => ' fa-lemon-o',
|
289 |
+
'fa-level-down' => ' fa-level-down',
|
290 |
+
'fa-level-up' => ' fa-level-up',
|
291 |
+
'fa-life-bouy' => ' fa-life-bouy',
|
292 |
+
'fa-life-ring' => ' fa-life-ring',
|
293 |
+
'fa-life-saver' => ' fa-life-saver',
|
294 |
+
'fa-lightbulb-o' => ' fa-lightbulb-o',
|
295 |
+
'fa-link' => ' fa-link',
|
296 |
+
'fa-linkedin' => ' fa-linkedin',
|
297 |
+
'fa-linkedin-square' => ' fa-linkedin-square',
|
298 |
+
'fa-linux' => ' fa-linux',
|
299 |
+
'fa-list' => ' fa-list',
|
300 |
+
'fa-list-alt' => ' fa-list-alt',
|
301 |
+
'fa-list-ol' => ' fa-list-ol',
|
302 |
+
'fa-list-ul' => ' fa-list-ul',
|
303 |
+
'fa-location-arrow' => ' fa-location-arrow',
|
304 |
+
'fa-lock' => ' fa-lock',
|
305 |
+
'fa-long-arrow-down' => ' fa-long-arrow-down',
|
306 |
+
'fa-long-arrow-left' => ' fa-long-arrow-left',
|
307 |
+
'fa-long-arrow-right' => ' fa-long-arrow-right',
|
308 |
+
'fa-long-arrow-up' => ' fa-long-arrow-up',
|
309 |
+
'fa-magic' => ' fa-magic',
|
310 |
+
'fa-magnet' => ' fa-magnet',
|
311 |
+
'fa-mail-forward' => ' fa-mail-forward',
|
312 |
+
'fa-mail-reply' => ' fa-mail-reply',
|
313 |
+
'fa-mail-reply-all' => ' fa-mail-reply-all',
|
314 |
+
'fa-male' => ' fa-male',
|
315 |
+
'fa-map-marker' => ' fa-map-marker',
|
316 |
+
'fa-maxcdn' => ' fa-maxcdn',
|
317 |
+
'fa-medkit' => ' fa-medkit',
|
318 |
+
'fa-meh-o' => ' fa-meh-o',
|
319 |
+
'fa-microphone' => ' fa-microphone',
|
320 |
+
'fa-microphone-slash' => ' fa-microphone-slash',
|
321 |
+
'fa-minus' => ' fa-minus',
|
322 |
+
'fa-minus-circle' => ' fa-minus-circle',
|
323 |
+
'fa-minus-square' => ' fa-minus-square',
|
324 |
+
'fa-minus-square-o' => ' fa-minus-square-o',
|
325 |
+
'fa-mobile' => ' fa-mobile',
|
326 |
+
'fa-mobile-phone' => ' fa-mobile-phone',
|
327 |
+
'fa-money' => ' fa-money',
|
328 |
+
'fa-moon-o' => ' fa-moon-o',
|
329 |
+
'fa-mortar-board' => ' fa-mortar-board',
|
330 |
+
'fa-music' => ' fa-music',
|
331 |
+
'fa-navicon' => ' fa-navicon',
|
332 |
+
'fa-openid' => ' fa-openid',
|
333 |
+
'fa-outdent' => ' fa-outdent',
|
334 |
+
'fa-pagelines' => ' fa-pagelines',
|
335 |
+
'fa-paper-plane' => ' fa-paper-plane',
|
336 |
+
'fa-paper-plane-o' => ' fa-paper-plane-o',
|
337 |
+
'fa-paperclip' => ' fa-paperclip',
|
338 |
+
'fa-paragraph' => ' fa-paragraph',
|
339 |
+
'fa-paste' => ' fa-paste',
|
340 |
+
'fa-pause' => ' fa-pause',
|
341 |
+
'fa-paw' => ' fa-paw',
|
342 |
+
'fa-pencil' => ' fa-pencil',
|
343 |
+
'fa-pencil-square' => ' fa-pencil-square',
|
344 |
+
'fa-pencil-square-o' => ' fa-pencil-square-o',
|
345 |
+
'fa-phone' => ' fa-phone',
|
346 |
+
'fa-phone-square' => ' fa-phone-square',
|
347 |
+
'fa-photo' => ' fa-photo',
|
348 |
+
'fa-picture-o' => ' fa-picture-o',
|
349 |
+
'fa-pied-piper' => ' fa-pied-piper',
|
350 |
+
'fa-pied-piper-alt' => ' fa-pied-piper-alt',
|
351 |
+
'fa-pied-piper-square' => ' fa-pied-piper-square',
|
352 |
+
'fa-pinterest' => ' fa-pinterest',
|
353 |
+
'fa-pinterest-square' => ' fa-pinterest-square',
|
354 |
+
'fa-plane' => ' fa-plane',
|
355 |
+
'fa-play' => ' fa-play',
|
356 |
+
'fa-play-circle' => ' fa-play-circle',
|
357 |
+
'fa-play-circle-o' => ' fa-play-circle-o',
|
358 |
+
'fa-plus' => ' fa-plus',
|
359 |
+
'fa-plus-circle' => ' fa-plus-circle',
|
360 |
+
'fa-plus-square' => ' fa-plus-square',
|
361 |
+
'fa-plus-square-o' => ' fa-plus-square-o',
|
362 |
+
'fa-power-off' => ' fa-power-off',
|
363 |
+
'fa-print' => ' fa-print',
|
364 |
+
'fa-puzzle-piece' => ' fa-puzzle-piece',
|
365 |
+
'fa-qq' => ' fa-qq',
|
366 |
+
'fa-qrcode' => ' fa-qrcode',
|
367 |
+
'fa-question' => ' fa-question',
|
368 |
+
'fa-question-circle' => ' fa-question-circle',
|
369 |
+
'fa-quote-left' => ' fa-quote-left',
|
370 |
+
'fa-quote-right' => ' fa-quote-right',
|
371 |
+
'fa-ra' => ' fa-ra',
|
372 |
+
'fa-random' => ' fa-random',
|
373 |
+
'fa-rebel' => ' fa-rebel',
|
374 |
+
'fa-recycle' => ' fa-recycle',
|
375 |
+
'fa-reddit' => ' fa-reddit',
|
376 |
+
'fa-reddit-square' => ' fa-reddit-square',
|
377 |
+
'fa-refresh' => ' fa-refresh',
|
378 |
+
'fa-renren' => ' fa-renren',
|
379 |
+
'fa-reorder' => ' fa-reorder',
|
380 |
+
'fa-repeat' => ' fa-repeat',
|
381 |
+
'fa-reply' => ' fa-reply',
|
382 |
+
'fa-reply-all' => ' fa-reply-all',
|
383 |
+
'fa-retweet' => ' fa-retweet',
|
384 |
+
'fa-rmb' => ' fa-rmb',
|
385 |
+
'fa-road' => ' fa-road',
|
386 |
+
'fa-rocket' => ' fa-rocket',
|
387 |
+
'fa-rotate-left' => ' fa-rotate-left',
|
388 |
+
'fa-rotate-right' => ' fa-rotate-right',
|
389 |
+
'fa-rouble' => ' fa-rouble',
|
390 |
+
'fa-rss' => ' fa-rss',
|
391 |
+
'fa-rss-square' => ' fa-rss-square',
|
392 |
+
'fa-rub' => ' fa-rub',
|
393 |
+
'fa-ruble' => ' fa-ruble',
|
394 |
+
'fa-rupee' => ' fa-rupee',
|
395 |
+
'fa-save' => ' fa-save',
|
396 |
+
'fa-scissors' => ' fa-scissors',
|
397 |
+
'fa-search' => ' fa-search',
|
398 |
+
'fa-search-minus' => ' fa-search-minus',
|
399 |
+
'fa-search-plus' => ' fa-search-plus',
|
400 |
+
'fa-send' => ' fa-send',
|
401 |
+
'fa-send-o' => ' fa-send-o',
|
402 |
+
'fa-share' => ' fa-share',
|
403 |
+
'fa-share-alt' => ' fa-share-alt',
|
404 |
+
'fa-share-alt-square' => ' fa-share-alt-square',
|
405 |
+
'fa-share-square' => ' fa-share-square',
|
406 |
+
'fa-share-square-o' => ' fa-share-square-o',
|
407 |
+
'fa-shield' => ' fa-shield',
|
408 |
+
'fa-shopping-cart' => ' fa-shopping-cart',
|
409 |
+
'fa-sign-in' => ' fa-sign-in',
|
410 |
+
'fa-sign-out' => ' fa-sign-out',
|
411 |
+
'fa-signal' => ' fa-signal',
|
412 |
+
'fa-sitemap' => ' fa-sitemap',
|
413 |
+
'fa-skype' => ' fa-skype',
|
414 |
+
'fa-slack' => ' fa-slack',
|
415 |
+
'fa-sliders' => ' fa-sliders',
|
416 |
+
'fa-smile-o' => ' fa-smile-o',
|
417 |
+
'fa-sort' => ' fa-sort',
|
418 |
+
'fa-sort-alpha-asc' => ' fa-sort-alpha-asc',
|
419 |
+
'fa-sort-alpha-desc' => ' fa-sort-alpha-desc',
|
420 |
+
'fa-sort-amount-asc' => ' fa-sort-amount-asc',
|
421 |
+
'fa-sort-amount-desc' => ' fa-sort-amount-desc',
|
422 |
+
'fa-sort-asc' => ' fa-sort-asc',
|
423 |
+
'fa-sort-desc' => ' fa-sort-desc',
|
424 |
+
'fa-sort-down' => ' fa-sort-down',
|
425 |
+
'fa-sort-numeric-asc' => ' fa-sort-numeric-asc',
|
426 |
+
'fa-sort-numeric-desc' => ' fa-sort-numeric-desc',
|
427 |
+
'fa-sort-up' => ' fa-sort-up',
|
428 |
+
'fa-soundcloud' => ' fa-soundcloud',
|
429 |
+
'fa-space-shuttle' => ' fa-space-shuttle',
|
430 |
+
'fa-spinner' => ' fa-spinner',
|
431 |
+
'fa-spoon' => ' fa-spoon',
|
432 |
+
'fa-spotify' => ' fa-spotify',
|
433 |
+
'fa-square' => ' fa-square',
|
434 |
+
'fa-square-o' => ' fa-square-o',
|
435 |
+
'fa-stack-exchange' => ' fa-stack-exchange',
|
436 |
+
'fa-stack-overflow' => ' fa-stack-overflow',
|
437 |
+
'fa-star' => ' fa-star',
|
438 |
+
'fa-star-half' => ' fa-star-half',
|
439 |
+
'fa-star-half-empty' => ' fa-star-half-empty',
|
440 |
+
'fa-star-half-full' => ' fa-star-half-full',
|
441 |
+
'fa-star-half-o' => ' fa-star-half-o',
|
442 |
+
'fa-star-o' => ' fa-star-o',
|
443 |
+
'fa-steam' => ' fa-steam',
|
444 |
+
'fa-steam-square' => ' fa-steam-square',
|
445 |
+
'fa-step-backward' => ' fa-step-backward',
|
446 |
+
'fa-step-forward' => ' fa-step-forward',
|
447 |
+
'fa-stethoscope' => ' fa-stethoscope',
|
448 |
+
'fa-stop' => ' fa-stop',
|
449 |
+
'fa-strikethrough' => ' fa-strikethrough',
|
450 |
+
'fa-stumbleupon' => ' fa-stumbleupon',
|
451 |
+
'fa-stumbleupon-circle' => ' fa-stumbleupon-circle',
|
452 |
+
'fa-subscript' => ' fa-subscript',
|
453 |
+
'fa-suitcase' => ' fa-suitcase',
|
454 |
+
'fa-sun-o' => ' fa-sun-o',
|
455 |
+
'fa-superscript' => ' fa-superscript',
|
456 |
+
'fa-support' => ' fa-support',
|
457 |
+
'fa-table' => ' fa-table',
|
458 |
+
'fa-tablet' => ' fa-tablet',
|
459 |
+
'fa-tachometer' => ' fa-tachometer',
|
460 |
+
'fa-tag' => ' fa-tag',
|
461 |
+
'fa-tags' => ' fa-tags',
|
462 |
+
'fa-tasks' => ' fa-tasks',
|
463 |
+
'fa-taxi' => ' fa-taxi',
|
464 |
+
'fa-tencent-weibo' => ' fa-tencent-weibo',
|
465 |
+
'fa-terminal' => ' fa-terminal',
|
466 |
+
'fa-text-height' => ' fa-text-height',
|
467 |
+
'fa-text-width' => ' fa-text-width',
|
468 |
+
'fa-th' => ' fa-th',
|
469 |
+
'fa-th-large' => ' fa-th-large',
|
470 |
+
'fa-th-list' => ' fa-th-list',
|
471 |
+
'fa-thumb-tack' => ' fa-thumb-tack',
|
472 |
+
'fa-thumbs-down' => ' fa-thumbs-down',
|
473 |
+
'fa-thumbs-o-down' => ' fa-thumbs-o-down',
|
474 |
+
'fa-thumbs-o-up' => ' fa-thumbs-o-up',
|
475 |
+
'fa-thumbs-up' => ' fa-thumbs-up',
|
476 |
+
'fa-ticket' => ' fa-ticket',
|
477 |
+
'fa-times' => ' fa-times',
|
478 |
+
'fa-times-circle' => ' fa-times-circle',
|
479 |
+
'fa-times-circle-o' => ' fa-times-circle-o',
|
480 |
+
'fa-tint' => ' fa-tint',
|
481 |
+
'fa-toggle-down' => ' fa-toggle-down',
|
482 |
+
'fa-toggle-left' => ' fa-toggle-left',
|
483 |
+
'fa-toggle-right' => ' fa-toggle-right',
|
484 |
+
'fa-toggle-up' => ' fa-toggle-up',
|
485 |
+
'fa-trash-o' => ' fa-trash-o',
|
486 |
+
'fa-tree' => ' fa-tree',
|
487 |
+
'fa-trello' => ' fa-trello',
|
488 |
+
'fa-trophy' => ' fa-trophy',
|
489 |
+
'fa-truck' => ' fa-truck',
|
490 |
+
'fa-try' => ' fa-try',
|
491 |
+
'fa-tumblr' => ' fa-tumblr',
|
492 |
+
'fa-tumblr-square' => ' fa-tumblr-square',
|
493 |
+
'fa-turkish-lira' => ' fa-turkish-lira',
|
494 |
+
'fa-twitter' => ' fa-twitter',
|
495 |
+
'fa-twitter-square' => ' fa-twitter-square',
|
496 |
+
'fa-umbrella' => ' fa-umbrella',
|
497 |
+
'fa-underline' => ' fa-underline',
|
498 |
+
'fa-undo' => ' fa-undo',
|
499 |
+
'fa-university' => ' fa-university',
|
500 |
+
'fa-unlink' => ' fa-unlink',
|
501 |
+
'fa-unlock' => ' fa-unlock',
|
502 |
+
'fa-unlock-alt' => ' fa-unlock-alt',
|
503 |
+
'fa-unsorted' => ' fa-unsorted',
|
504 |
+
'fa-upload' => ' fa-upload',
|
505 |
+
'fa-usd' => ' fa-usd',
|
506 |
+
'fa-user' => ' fa-user',
|
507 |
+
'fa-user-md' => ' fa-user-md',
|
508 |
+
'fa-users' => ' fa-users',
|
509 |
+
'fa-video-camera' => ' fa-video-camera',
|
510 |
+
'fa-vimeo-square' => ' fa-vimeo-square',
|
511 |
+
'fa-vine' => ' fa-vine',
|
512 |
+
'fa-vk' => ' fa-vk',
|
513 |
+
'fa-volume-down' => ' fa-volume-down',
|
514 |
+
'fa-volume-off' => ' fa-volume-off',
|
515 |
+
'fa-volume-up' => ' fa-volume-up',
|
516 |
+
'fa-warning' => ' fa-warning',
|
517 |
+
'fa-wechat' => ' fa-wechat',
|
518 |
+
'fa-weibo' => ' fa-weibo',
|
519 |
+
'fa-weixin' => ' fa-weixin',
|
520 |
+
'fa-wheelchair' => ' fa-wheelchair',
|
521 |
+
'fa-windows' => ' fa-windows',
|
522 |
+
'fa-won' => ' fa-won',
|
523 |
+
'fa-wordpress' => ' fa-wordpress',
|
524 |
+
'fa-wrench' => ' fa-wrench',
|
525 |
+
'fa-xing' => ' fa-xing',
|
526 |
+
'fa-xing-square' => ' fa-xing-square',
|
527 |
+
'fa-yahoo' => ' fa-yahoo',
|
528 |
+
'fa-yen' => ' fa-yen',
|
529 |
+
'fa-youtube' => ' fa-youtube',
|
530 |
+
'fa-youtube-play' => ' fa-youtube-play',
|
531 |
+
'fa-youtube-square' => ' fa-youtube-square'
|
532 |
+
)
|
533 |
+
);
|
534 |
+
|
535 |
+
$this->settings = array(
|
536 |
+
'path' => apply_filters('acf/helpers/get_path', __FILE__),
|
537 |
+
'dir' => apply_filters('acf/helpers/get_dir', __FILE__),
|
538 |
+
'version' => '1.2'
|
539 |
+
);
|
540 |
+
|
541 |
+
add_filter('acf/load_field', array( $this, 'maybe_enqueue_font_awesome' ) );
|
542 |
+
|
543 |
+
parent::__construct();
|
544 |
+
}
|
545 |
+
|
546 |
+
/*
|
547 |
+
* maybe_enqueue_font_awesome()
|
548 |
+
*
|
549 |
+
* If Enqueue FA is set to true, enqueue it in the footer. We cannot enqueue in the header because wp_head has already been called
|
550 |
+
*
|
551 |
+
*/
|
552 |
+
|
553 |
+
function maybe_enqueue_font_awesome( $field )
|
554 |
+
{
|
555 |
+
if( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {
|
556 |
+
add_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );
|
557 |
+
}
|
558 |
+
|
559 |
+
return $field;
|
560 |
+
}
|
561 |
+
|
562 |
+
/*
|
563 |
+
* create_options()
|
564 |
+
*
|
565 |
+
* Create extra options for your field. This is rendered when editing a field.
|
566 |
+
* The value of $field['name'] can be used (like bellow) to save extra data to the $field
|
567 |
+
*
|
568 |
+
* @type action
|
569 |
+
* @since 3.6
|
570 |
+
* @date 23/01/13
|
571 |
+
*
|
572 |
+
* @param $field - an array holding all the field's data
|
573 |
+
*/
|
574 |
+
|
575 |
+
function create_options($field)
|
576 |
+
{
|
577 |
+
// defaults?
|
578 |
+
$field = array_merge($this->defaults, $field);
|
579 |
+
|
580 |
+
// key is needed in the field names to correctly save the data
|
581 |
+
$key = $field['name'];
|
582 |
+
|
583 |
+
|
584 |
+
// Create Field Options HTML
|
585 |
+
?>
|
586 |
+
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
587 |
+
<td class="label">
|
588 |
+
<label><?php _e("Default Icon", 'acf'); ?></label>
|
589 |
+
</td>
|
590 |
+
<td>
|
591 |
+
<div class="fa-field-wrapper">
|
592 |
+
<div class="fa-live-preview"></div>
|
593 |
+
<?php
|
594 |
+
|
595 |
+
do_action('acf/create_field', array(
|
596 |
+
'type' => 'select',
|
597 |
+
'name' => 'fields[' . $key . '][default_value]',
|
598 |
+
'value' => $field['default_value'],
|
599 |
+
'class' => 'fontawesome',
|
600 |
+
'choices' => array_merge( array( 'null' => __("Select",'acf') ), $field['choices'] )
|
601 |
+
));
|
602 |
+
|
603 |
+
?>
|
604 |
+
</div>
|
605 |
+
</td>
|
606 |
+
</tr>
|
607 |
+
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
608 |
+
<td class="label">
|
609 |
+
<label><?php _e("Return Value",'acf'); ?></label>
|
610 |
+
<p class="description"><?php _e("Specify the returned value on front end", 'acf'); ?></p>
|
611 |
+
</td>
|
612 |
+
<td>
|
613 |
+
<?php
|
614 |
+
do_action('acf/create_field', array(
|
615 |
+
'type' => 'radio',
|
616 |
+
'name' => 'fields['.$key.'][save_format]',
|
617 |
+
'value' => $field['save_format'],
|
618 |
+
'choices' => array(
|
619 |
+
'element' => __("Icon Element",'acf'),
|
620 |
+
'class' => __("Icon Class",'acf'),
|
621 |
+
'unicode' => __("Icon Unicode",'acf'),
|
622 |
+
'object' => __("Icon Object",'acf'),
|
623 |
+
),
|
624 |
+
'layout' => 'horizontal',
|
625 |
+
));
|
626 |
+
?>
|
627 |
+
</td>
|
628 |
+
</tr>
|
629 |
+
|
630 |
+
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
631 |
+
<td class="label">
|
632 |
+
<label><?php _e("Allow Null?",'acf'); ?></label>
|
633 |
+
</td>
|
634 |
+
<td>
|
635 |
+
<?php
|
636 |
+
do_action('acf/create_field', array(
|
637 |
+
'type' => 'radio',
|
638 |
+
'name' => 'fields['.$key.'][allow_null]',
|
639 |
+
'value' => $field['allow_null'],
|
640 |
+
'choices' => array(
|
641 |
+
1 => __("Yes",'acf'),
|
642 |
+
0 => __("No",'acf'),
|
643 |
+
),
|
644 |
+
'layout' => 'horizontal',
|
645 |
+
));
|
646 |
+
?>
|
647 |
+
</td>
|
648 |
+
</tr>
|
649 |
+
|
650 |
+
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
651 |
+
<td class="label">
|
652 |
+
<label><?php _e("Enqueue FontAwesome?",'acf'); ?></label>
|
653 |
+
<p class="description"><?php _e("Set to 'Yes' to enqueue FA in the footer on any pages using this field.", 'acf'); ?></p>
|
654 |
+
</td>
|
655 |
+
<td>
|
656 |
+
<?php
|
657 |
+
do_action('acf/create_field', array(
|
658 |
+
'type' => 'radio',
|
659 |
+
'name' => 'fields['.$key.'][enqueue_fa]',
|
660 |
+
'value' => $field['enqueue_fa'],
|
661 |
+
'choices' => array(
|
662 |
+
1 => __("Yes",'acf'),
|
663 |
+
0 => __("No",'acf'),
|
664 |
+
),
|
665 |
+
'layout' => 'horizontal',
|
666 |
+
));
|
667 |
+
?>
|
668 |
+
</td>
|
669 |
+
</tr>
|
670 |
+
<?php
|
671 |
+
|
672 |
+
}
|
673 |
+
|
674 |
+
/*
|
675 |
+
* create_field()
|
676 |
+
*
|
677 |
+
* Create the HTML interface for your field
|
678 |
+
*
|
679 |
+
* @param $field - an array holding all the field's data
|
680 |
+
*
|
681 |
+
* @type action
|
682 |
+
* @since 3.6
|
683 |
+
* @date 23/01/13
|
684 |
+
*/
|
685 |
+
|
686 |
+
function create_field( $field )
|
687 |
+
{
|
688 |
+
if( 'object' == $field['save_format'] )
|
689 |
+
$field['value'] = array( $field['value']->class );
|
690 |
+
|
691 |
+
// value must be array
|
692 |
+
if( !is_array($field['value']) )
|
693 |
+
{
|
694 |
+
// perhaps this is a default value with new lines in it?
|
695 |
+
if( strpos($field['value'], "\n") !== false )
|
696 |
+
{
|
697 |
+
// found multiple lines, explode it
|
698 |
+
$field['value'] = explode("\n", $field['value']);
|
699 |
+
}
|
700 |
+
else
|
701 |
+
{
|
702 |
+
$field['value'] = array( $field['value'] );
|
703 |
+
}
|
704 |
+
}
|
705 |
+
|
706 |
+
// trim value
|
707 |
+
$field['value'] = array_map('trim', $field['value']);
|
708 |
+
|
709 |
+
// html
|
710 |
+
echo '<div class="fa-field-wrapper">';
|
711 |
+
echo '<div class="fa-live-preview"></div>';
|
712 |
+
echo '<select id="' . $field['id'] . '" class="' . $field['class'] . ' fa-select2-field" name="' . $field['name'] . '" >';
|
713 |
+
|
714 |
+
// null
|
715 |
+
if( $field['allow_null'] )
|
716 |
+
{
|
717 |
+
echo '<option value="null">- ' . __("Select",'acf') . ' -</option>';
|
718 |
+
}
|
719 |
+
|
720 |
+
// loop through values and add them as options
|
721 |
+
if( is_array($field['choices']) )
|
722 |
+
{
|
723 |
+
foreach( $field['choices'] as $key => $value )
|
724 |
+
{
|
725 |
+
$selected = $this->find_selected( $key, $field['value'], $field['save_format'], $field['choices'] );
|
726 |
+
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
|
727 |
+
}
|
728 |
+
}
|
729 |
+
|
730 |
+
echo '</select>';
|
731 |
+
echo '</div>';
|
732 |
+
}
|
733 |
+
|
734 |
+
function find_selected( $needle, $haystack, $type, $choices )
|
735 |
+
{
|
736 |
+
switch( $type )
|
737 |
+
{
|
738 |
+
case 'object':
|
739 |
+
case 'element':
|
740 |
+
$search = array( '<i class="fa ', '"></i>' );
|
741 |
+
$string = str_replace( $search, '', $haystack[0] );
|
742 |
+
break;
|
743 |
+
|
744 |
+
case 'class':
|
745 |
+
$string = $haystack[0];
|
746 |
+
break;
|
747 |
+
}
|
748 |
+
|
749 |
+
if( $string == $needle )
|
750 |
+
return 'selected="selected"';
|
751 |
+
|
752 |
+
return '';
|
753 |
+
}
|
754 |
+
|
755 |
+
/*
|
756 |
+
* input_admin_enqueue_scripts()
|
757 |
+
*
|
758 |
+
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
|
759 |
+
* Use this action to add css + javascript to assist your create_field() action.
|
760 |
+
*
|
761 |
+
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
|
762 |
+
* @type action
|
763 |
+
* @since 3.6
|
764 |
+
* @date 23/01/13
|
765 |
+
*/
|
766 |
+
|
767 |
+
function input_admin_enqueue_scripts()
|
768 |
+
{
|
769 |
+
// register acf scripts
|
770 |
+
wp_enqueue_script('acf-input-font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);
|
771 |
+
wp_enqueue_script('acf-input-font-awesome-edit-input', $this->settings['dir'] . 'js/edit_input.js', array(), $this->settings['version']);
|
772 |
+
wp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);
|
773 |
+
wp_enqueue_style('acf-input-font-awesome-fa', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
774 |
+
wp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);
|
775 |
+
}
|
776 |
+
|
777 |
+
/*
|
778 |
+
* field_group_admin_enqueue_scripts()
|
779 |
+
*
|
780 |
+
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited.
|
781 |
+
* Use this action to add css + javascript to assist your create_field_options() action.
|
782 |
+
*
|
783 |
+
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
|
784 |
+
* @type action
|
785 |
+
* @since 3.6
|
786 |
+
* @date 23/01/13
|
787 |
+
*/
|
788 |
+
|
789 |
+
function field_group_admin_enqueue_scripts()
|
790 |
+
{
|
791 |
+
// register acf scripts
|
792 |
+
wp_enqueue_script('font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);
|
793 |
+
wp_enqueue_script('font-awesome-create-input', $this->settings['dir'] . 'js/create_input.js', array(), $this->settings['version']);
|
794 |
+
wp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);
|
795 |
+
wp_enqueue_style('acf-input-font-awesome-fa', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
796 |
+
wp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);
|
797 |
+
}
|
798 |
+
|
799 |
+
/*
|
800 |
+
* frontend_enqueue_scripts()
|
801 |
+
*
|
802 |
+
* This action is called in the wp_enqueue_scripts action on the front end.
|
803 |
+
*
|
804 |
+
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts
|
805 |
+
* @type action
|
806 |
+
*/
|
807 |
+
|
808 |
+
function frontend_enqueue_scripts()
|
809 |
+
{
|
810 |
+
wp_register_style('font-awesome', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
811 |
+
|
812 |
+
wp_enqueue_style(array(
|
813 |
+
'font-awesome'
|
814 |
+
));
|
815 |
+
}
|
816 |
+
|
817 |
+
/*
|
818 |
+
* load_value()
|
819 |
+
*
|
820 |
+
* This filter is appied to the $value after it is loaded from the db
|
821 |
+
*
|
822 |
+
* @type filter
|
823 |
+
* @since 3.6
|
824 |
+
* @date 23/01/13
|
825 |
+
*
|
826 |
+
* @param $value - the value found in the database
|
827 |
+
* @param $post_id - the $post_id from which the value was loaded from
|
828 |
+
* @param $field - the field array holding all the field options
|
829 |
+
*
|
830 |
+
* @return $value - the value to be saved in te database
|
831 |
+
*/
|
832 |
+
|
833 |
+
function load_value($value, $post_id, $field)
|
834 |
+
{
|
835 |
+
switch( $field['save_format'] )
|
836 |
+
{
|
837 |
+
case 'object':
|
838 |
+
$icon_unicode_string = $this->defaults['choices'][ $value ];
|
839 |
+
$icon_unicode_arr = explode( ' ', $icon_unicode_string );
|
840 |
+
$icon_unicode = $icon_unicode_arr[0];
|
841 |
+
$value = (object) array(
|
842 |
+
'unicode' => $icon_unicode,
|
843 |
+
'class' => $value,
|
844 |
+
'element' => '<i class="fa ' . $value . '"></i>'
|
845 |
+
);
|
846 |
+
break;
|
847 |
+
|
848 |
+
case 'unicode':
|
849 |
+
$icon_unicode_string = $this->defaults['choices'][ $value ];
|
850 |
+
$icon_unicode_arr = explode( ' ', $icon_unicode_string );
|
851 |
+
$value = $icon_unicode_arr[0];
|
852 |
+
break;
|
853 |
+
|
854 |
+
case 'element':
|
855 |
+
$value = '<i class="fa ' . $value . '"></i>';
|
856 |
+
break;
|
857 |
+
}
|
858 |
+
|
859 |
+
return $value;
|
860 |
+
}
|
861 |
+
|
862 |
+
}
|
863 |
+
|
864 |
+
new acf_field_font_awesome();
|
acf-font-awesome-v5.php
ADDED
@@ -0,0 +1,841 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class acf_field_font_awesome extends acf_field {
|
4 |
+
|
5 |
+
|
6 |
+
/*
|
7 |
+
* __construct
|
8 |
+
*
|
9 |
+
* This function will setup the field type data
|
10 |
+
*
|
11 |
+
* @type function
|
12 |
+
* @date 5/03/2014
|
13 |
+
* @since 5.0.0
|
14 |
+
*
|
15 |
+
* @param n/a
|
16 |
+
* @return n/a
|
17 |
+
*/
|
18 |
+
|
19 |
+
function __construct() {
|
20 |
+
|
21 |
+
$this->name = 'font-awesome';
|
22 |
+
$this->label = __('Font Awesome Icon');
|
23 |
+
$this->category = __("Content",'acf'); // Basic, Content, Choice, etc
|
24 |
+
$this->defaults = array(
|
25 |
+
'enqueue_fa' => 0,
|
26 |
+
'allow_null' => 0,
|
27 |
+
'save_format' => 'element',
|
28 |
+
'default_value' => '',
|
29 |
+
'fa_live_preview' => '',
|
30 |
+
'choices' => array(
|
31 |
+
'fa-adjust' => ' fa-adjust',
|
32 |
+
'fa-adn' => ' fa-adn',
|
33 |
+
'fa-align-center' => ' fa-align-center',
|
34 |
+
'fa-align-justify' => ' fa-align-justify',
|
35 |
+
'fa-align-left' => ' fa-align-left',
|
36 |
+
'fa-align-right' => ' fa-align-right',
|
37 |
+
'fa-ambulance' => ' fa-ambulance',
|
38 |
+
'fa-anchor' => ' fa-anchor',
|
39 |
+
'fa-android' => ' fa-android',
|
40 |
+
'fa-angle-double-down' => ' fa-angle-double-down',
|
41 |
+
'fa-angle-double-left' => ' fa-angle-double-left',
|
42 |
+
'fa-angle-double-right' => ' fa-angle-double-right',
|
43 |
+
'fa-angle-double-up' => ' fa-angle-double-up',
|
44 |
+
'fa-angle-down' => ' fa-angle-down',
|
45 |
+
'fa-angle-left' => ' fa-angle-left',
|
46 |
+
'fa-angle-right' => ' fa-angle-right',
|
47 |
+
'fa-angle-up' => ' fa-angle-up',
|
48 |
+
'fa-apple' => ' fa-apple',
|
49 |
+
'fa-archive' => ' fa-archive',
|
50 |
+
'fa-arrow-circle-down' => ' fa-arrow-circle-down',
|
51 |
+
'fa-arrow-circle-left' => ' fa-arrow-circle-left',
|
52 |
+
'fa-arrow-circle-o-down' => ' fa-arrow-circle-o-down',
|
53 |
+
'fa-arrow-circle-o-left' => ' fa-arrow-circle-o-left',
|
54 |
+
'fa-arrow-circle-o-right' => ' fa-arrow-circle-o-right',
|
55 |
+
'fa-arrow-circle-o-up' => ' fa-arrow-circle-o-up',
|
56 |
+
'fa-arrow-circle-right' => ' fa-arrow-circle-right',
|
57 |
+
'fa-arrow-circle-up' => ' fa-arrow-circle-up',
|
58 |
+
'fa-arrow-down' => ' fa-arrow-down',
|
59 |
+
'fa-arrow-left' => ' fa-arrow-left',
|
60 |
+
'fa-arrow-right' => ' fa-arrow-right',
|
61 |
+
'fa-arrow-up' => ' fa-arrow-up',
|
62 |
+
'fa-arrows' => ' fa-arrows',
|
63 |
+
'fa-arrows-alt' => ' fa-arrows-alt',
|
64 |
+
'fa-arrows-h' => ' fa-arrows-h',
|
65 |
+
'fa-arrows-v' => ' fa-arrows-v',
|
66 |
+
'fa-asterisk' => ' fa-asterisk',
|
67 |
+
'fa-automobile' => ' fa-automobile',
|
68 |
+
'fa-backward' => ' fa-backward',
|
69 |
+
'fa-ban' => ' fa-ban',
|
70 |
+
'fa-bank' => ' fa-bank',
|
71 |
+
'fa-bar-chart-o' => ' fa-bar-chart-o',
|
72 |
+
'fa-barcode' => ' fa-barcode',
|
73 |
+
'fa-bars' => ' fa-bars',
|
74 |
+
'fa-beer' => ' fa-beer',
|
75 |
+
'fa-behance' => ' fa-behance',
|
76 |
+
'fa-behance-square' => ' fa-behance-square',
|
77 |
+
'fa-bell' => ' fa-bell',
|
78 |
+
'fa-bell-o' => ' fa-bell-o',
|
79 |
+
'fa-bitbucket' => ' fa-bitbucket',
|
80 |
+
'fa-bitbucket-square' => ' fa-bitbucket-square',
|
81 |
+
'fa-bitcoin' => ' fa-bitcoin',
|
82 |
+
'fa-bold' => ' fa-bold',
|
83 |
+
'fa-bolt' => ' fa-bolt',
|
84 |
+
'fa-bomb' => ' fa-bomb',
|
85 |
+
'fa-book' => ' fa-book',
|
86 |
+
'fa-bookmark' => ' fa-bookmark',
|
87 |
+
'fa-bookmark-o' => ' fa-bookmark-o',
|
88 |
+
'fa-briefcase' => ' fa-briefcase',
|
89 |
+
'fa-btc' => ' fa-btc',
|
90 |
+
'fa-bug' => ' fa-bug',
|
91 |
+
'fa-building' => ' fa-building',
|
92 |
+
'fa-building-o' => ' fa-building-o',
|
93 |
+
'fa-bullhorn' => ' fa-bullhorn',
|
94 |
+
'fa-bullseye' => ' fa-bullseye',
|
95 |
+
'fa-cab' => ' fa-cab',
|
96 |
+
'fa-calendar' => ' fa-calendar',
|
97 |
+
'fa-calendar-o' => ' fa-calendar-o',
|
98 |
+
'fa-camera' => ' fa-camera',
|
99 |
+
'fa-camera-retro' => ' fa-camera-retro',
|
100 |
+
'fa-car' => ' fa-car',
|
101 |
+
'fa-caret-down' => ' fa-caret-down',
|
102 |
+
'fa-caret-left' => ' fa-caret-left',
|
103 |
+
'fa-caret-right' => ' fa-caret-right',
|
104 |
+
'fa-caret-square-o-down' => ' fa-caret-square-o-down',
|
105 |
+
'fa-caret-square-o-left' => ' fa-caret-square-o-left',
|
106 |
+
'fa-caret-square-o-right' => ' fa-caret-square-o-right',
|
107 |
+
'fa-caret-square-o-up' => ' fa-caret-square-o-up',
|
108 |
+
'fa-caret-up' => ' fa-caret-up',
|
109 |
+
'fa-certificate' => ' fa-certificate',
|
110 |
+
'fa-chain' => ' fa-chain',
|
111 |
+
'fa-chain-broken' => ' fa-chain-broken',
|
112 |
+
'fa-check' => ' fa-check',
|
113 |
+
'fa-check-circle' => ' fa-check-circle',
|
114 |
+
'fa-check-circle-o' => ' fa-check-circle-o',
|
115 |
+
'fa-check-square' => ' fa-check-square',
|
116 |
+
'fa-check-square-o' => ' fa-check-square-o',
|
117 |
+
'fa-chevron-circle-down' => ' fa-chevron-circle-down',
|
118 |
+
'fa-chevron-circle-left' => ' fa-chevron-circle-left',
|
119 |
+
'fa-chevron-circle-right' => ' fa-chevron-circle-right',
|
120 |
+
'fa-chevron-circle-up' => ' fa-chevron-circle-up',
|
121 |
+
'fa-chevron-down' => ' fa-chevron-down',
|
122 |
+
'fa-chevron-left' => ' fa-chevron-left',
|
123 |
+
'fa-chevron-right' => ' fa-chevron-right',
|
124 |
+
'fa-chevron-up' => ' fa-chevron-up',
|
125 |
+
'fa-child' => ' fa-child',
|
126 |
+
'fa-circle' => ' fa-circle',
|
127 |
+
'fa-circle-o' => ' fa-circle-o',
|
128 |
+
'fa-circle-o-notch' => ' fa-circle-o-notch',
|
129 |
+
'fa-circle-thin' => ' fa-circle-thin',
|
130 |
+
'fa-clipboard' => ' fa-clipboard',
|
131 |
+
'fa-clock-o' => ' fa-clock-o',
|
132 |
+
'fa-cloud' => ' fa-cloud',
|
133 |
+
'fa-cloud-download' => ' fa-cloud-download',
|
134 |
+
'fa-cloud-upload' => ' fa-cloud-upload',
|
135 |
+
'fa-cny' => ' fa-cny',
|
136 |
+
'fa-code' => ' fa-code',
|
137 |
+
'fa-code-fork' => ' fa-code-fork',
|
138 |
+
'fa-codepen' => ' fa-codepen',
|
139 |
+
'fa-coffee' => ' fa-coffee',
|
140 |
+
'fa-cog' => ' fa-cog',
|
141 |
+
'fa-cogs' => ' fa-cogs',
|
142 |
+
'fa-columns' => ' fa-columns',
|
143 |
+
'fa-comment' => ' fa-comment',
|
144 |
+
'fa-comment-o' => ' fa-comment-o',
|
145 |
+
'fa-comments' => ' fa-comments',
|
146 |
+
'fa-comments-o' => ' fa-comments-o',
|
147 |
+
'fa-compass' => ' fa-compass',
|
148 |
+
'fa-compress' => ' fa-compress',
|
149 |
+
'fa-copy' => ' fa-copy',
|
150 |
+
'fa-credit-card' => ' fa-credit-card',
|
151 |
+
'fa-crop' => ' fa-crop',
|
152 |
+
'fa-crosshairs' => ' fa-crosshairs',
|
153 |
+
'fa-css3' => ' fa-css3',
|
154 |
+
'fa-cube' => ' fa-cube',
|
155 |
+
'fa-cubes' => ' fa-cubes',
|
156 |
+
'fa-cut' => ' fa-cut',
|
157 |
+
'fa-cutlery' => ' fa-cutlery',
|
158 |
+
'fa-dashboard' => ' fa-dashboard',
|
159 |
+
'fa-database' => ' fa-database',
|
160 |
+
'fa-dedent' => ' fa-dedent',
|
161 |
+
'fa-delicious' => ' fa-delicious',
|
162 |
+
'fa-desktop' => ' fa-desktop',
|
163 |
+
'fa-deviantart' => ' fa-deviantart',
|
164 |
+
'fa-digg' => ' fa-digg',
|
165 |
+
'fa-dollar' => ' fa-dollar',
|
166 |
+
'fa-dot-circle-o' => ' fa-dot-circle-o',
|
167 |
+
'fa-download' => ' fa-download',
|
168 |
+
'fa-dribbble' => ' fa-dribbble',
|
169 |
+
'fa-dropbox' => ' fa-dropbox',
|
170 |
+
'fa-drupal' => ' fa-drupal',
|
171 |
+
'fa-edit' => ' fa-edit',
|
172 |
+
'fa-eject' => ' fa-eject',
|
173 |
+
'fa-ellipsis-h' => ' fa-ellipsis-h',
|
174 |
+
'fa-ellipsis-v' => ' fa-ellipsis-v',
|
175 |
+
'fa-empire' => ' fa-empire',
|
176 |
+
'fa-envelope' => ' fa-envelope',
|
177 |
+
'fa-envelope-o' => ' fa-envelope-o',
|
178 |
+
'fa-envelope-square' => ' fa-envelope-square',
|
179 |
+
'fa-eraser' => ' fa-eraser',
|
180 |
+
'fa-eur' => ' fa-eur',
|
181 |
+
'fa-euro' => ' fa-euro',
|
182 |
+
'fa-exchange' => ' fa-exchange',
|
183 |
+
'fa-exclamation' => ' fa-exclamation',
|
184 |
+
'fa-exclamation-circle' => ' fa-exclamation-circle',
|
185 |
+
'fa-exclamation-triangle' => ' fa-exclamation-triangle',
|
186 |
+
'fa-expand' => ' fa-expand',
|
187 |
+
'fa-external-link' => ' fa-external-link',
|
188 |
+
'fa-external-link-square' => ' fa-external-link-square',
|
189 |
+
'fa-eye' => ' fa-eye',
|
190 |
+
'fa-eye-slash' => ' fa-eye-slash',
|
191 |
+
'fa-facebook' => ' fa-facebook',
|
192 |
+
'fa-facebook-square' => ' fa-facebook-square',
|
193 |
+
'fa-fast-backward' => ' fa-fast-backward',
|
194 |
+
'fa-fast-forward' => ' fa-fast-forward',
|
195 |
+
'fa-fax' => ' fa-fax',
|
196 |
+
'fa-female' => ' fa-female',
|
197 |
+
'fa-fighter-jet' => ' fa-fighter-jet',
|
198 |
+
'fa-file' => ' fa-file',
|
199 |
+
'fa-file-archive-o' => ' fa-file-archive-o',
|
200 |
+
'fa-file-audio-o' => ' fa-file-audio-o',
|
201 |
+
'fa-file-code-o' => ' fa-file-code-o',
|
202 |
+
'fa-file-excel-o' => ' fa-file-excel-o',
|
203 |
+
'fa-file-image-o' => ' fa-file-image-o',
|
204 |
+
'fa-file-movie-o' => ' fa-file-movie-o',
|
205 |
+
'fa-file-o' => ' fa-file-o',
|
206 |
+
'fa-file-pdf-o' => ' fa-file-pdf-o',
|
207 |
+
'fa-file-photo-o' => ' fa-file-photo-o',
|
208 |
+
'fa-file-picture-o' => ' fa-file-picture-o',
|
209 |
+
'fa-file-powerpoint-o' => ' fa-file-powerpoint-o',
|
210 |
+
'fa-file-sound-o' => ' fa-file-sound-o',
|
211 |
+
'fa-file-text' => ' fa-file-text',
|
212 |
+
'fa-file-text-o' => ' fa-file-text-o',
|
213 |
+
'fa-file-video-o' => ' fa-file-video-o',
|
214 |
+
'fa-file-word-o' => ' fa-file-word-o',
|
215 |
+
'fa-file-zip-o' => ' fa-file-zip-o',
|
216 |
+
'fa-files-o' => ' fa-files-o',
|
217 |
+
'fa-film' => ' fa-film',
|
218 |
+
'fa-filter' => ' fa-filter',
|
219 |
+
'fa-fire' => ' fa-fire',
|
220 |
+
'fa-fire-extinguisher' => ' fa-fire-extinguisher',
|
221 |
+
'fa-flag' => ' fa-flag',
|
222 |
+
'fa-flag-checkered' => ' fa-flag-checkered',
|
223 |
+
'fa-flag-o' => ' fa-flag-o',
|
224 |
+
'fa-flash' => ' fa-flash',
|
225 |
+
'fa-flask' => ' fa-flask',
|
226 |
+
'fa-flickr' => ' fa-flickr',
|
227 |
+
'fa-floppy-o' => ' fa-floppy-o',
|
228 |
+
'fa-folder' => ' fa-folder',
|
229 |
+
'fa-folder-o' => ' fa-folder-o',
|
230 |
+
'fa-folder-open' => ' fa-folder-open',
|
231 |
+
'fa-folder-open-o' => ' fa-folder-open-o',
|
232 |
+
'fa-font' => ' fa-font',
|
233 |
+
'fa-forward' => ' fa-forward',
|
234 |
+
'fa-foursquare' => ' fa-foursquare',
|
235 |
+
'fa-frown-o' => ' fa-frown-o',
|
236 |
+
'fa-gamepad' => ' fa-gamepad',
|
237 |
+
'fa-gavel' => ' fa-gavel',
|
238 |
+
'fa-gbp' => ' fa-gbp',
|
239 |
+
'fa-ge' => ' fa-ge',
|
240 |
+
'fa-gear' => ' fa-gear',
|
241 |
+
'fa-gears' => ' fa-gears',
|
242 |
+
'fa-gift' => ' fa-gift',
|
243 |
+
'fa-git' => ' fa-git',
|
244 |
+
'fa-git-square' => ' fa-git-square',
|
245 |
+
'fa-github' => ' fa-github',
|
246 |
+
'fa-github-alt' => ' fa-github-alt',
|
247 |
+
'fa-github-square' => ' fa-github-square',
|
248 |
+
'fa-gittip' => ' fa-gittip',
|
249 |
+
'fa-glass' => ' fa-glass',
|
250 |
+
'fa-globe' => ' fa-globe',
|
251 |
+
'fa-google' => ' fa-google',
|
252 |
+
'fa-google-plus' => ' fa-google-plus',
|
253 |
+
'fa-google-plus-square' => ' fa-google-plus-square',
|
254 |
+
'fa-graduation-cap' => ' fa-graduation-cap',
|
255 |
+
'fa-group' => ' fa-group',
|
256 |
+
'fa-h-square' => ' fa-h-square',
|
257 |
+
'fa-hacker-news' => ' fa-hacker-news',
|
258 |
+
'fa-hand-o-down' => ' fa-hand-o-down',
|
259 |
+
'fa-hand-o-left' => ' fa-hand-o-left',
|
260 |
+
'fa-hand-o-right' => ' fa-hand-o-right',
|
261 |
+
'fa-hand-o-up' => ' fa-hand-o-up',
|
262 |
+
'fa-hdd-o' => ' fa-hdd-o',
|
263 |
+
'fa-header' => ' fa-header',
|
264 |
+
'fa-headphones' => ' fa-headphones',
|
265 |
+
'fa-heart' => ' fa-heart',
|
266 |
+
'fa-heart-o' => ' fa-heart-o',
|
267 |
+
'fa-history' => ' fa-history',
|
268 |
+
'fa-home' => ' fa-home',
|
269 |
+
'fa-hospital-o' => ' fa-hospital-o',
|
270 |
+
'fa-html5' => ' fa-html5',
|
271 |
+
'fa-image' => ' fa-image',
|
272 |
+
'fa-inbox' => ' fa-inbox',
|
273 |
+
'fa-indent' => ' fa-indent',
|
274 |
+
'fa-info' => ' fa-info',
|
275 |
+
'fa-info-circle' => ' fa-info-circle',
|
276 |
+
'fa-inr' => ' fa-inr',
|
277 |
+
'fa-instagram' => ' fa-instagram',
|
278 |
+
'fa-institution' => ' fa-institution',
|
279 |
+
'fa-italic' => ' fa-italic',
|
280 |
+
'fa-joomla' => ' fa-joomla',
|
281 |
+
'fa-jpy' => ' fa-jpy',
|
282 |
+
'fa-jsfiddle' => ' fa-jsfiddle',
|
283 |
+
'fa-key' => ' fa-key',
|
284 |
+
'fa-keyboard-o' => ' fa-keyboard-o',
|
285 |
+
'fa-krw' => ' fa-krw',
|
286 |
+
'fa-language' => ' fa-language',
|
287 |
+
'fa-laptop' => ' fa-laptop',
|
288 |
+
'fa-leaf' => ' fa-leaf',
|
289 |
+
'fa-legal' => ' fa-legal',
|
290 |
+
'fa-lemon-o' => ' fa-lemon-o',
|
291 |
+
'fa-level-down' => ' fa-level-down',
|
292 |
+
'fa-level-up' => ' fa-level-up',
|
293 |
+
'fa-life-bouy' => ' fa-life-bouy',
|
294 |
+
'fa-life-ring' => ' fa-life-ring',
|
295 |
+
'fa-life-saver' => ' fa-life-saver',
|
296 |
+
'fa-lightbulb-o' => ' fa-lightbulb-o',
|
297 |
+
'fa-link' => ' fa-link',
|
298 |
+
'fa-linkedin' => ' fa-linkedin',
|
299 |
+
'fa-linkedin-square' => ' fa-linkedin-square',
|
300 |
+
'fa-linux' => ' fa-linux',
|
301 |
+
'fa-list' => ' fa-list',
|
302 |
+
'fa-list-alt' => ' fa-list-alt',
|
303 |
+
'fa-list-ol' => ' fa-list-ol',
|
304 |
+
'fa-list-ul' => ' fa-list-ul',
|
305 |
+
'fa-location-arrow' => ' fa-location-arrow',
|
306 |
+
'fa-lock' => ' fa-lock',
|
307 |
+
'fa-long-arrow-down' => ' fa-long-arrow-down',
|
308 |
+
'fa-long-arrow-left' => ' fa-long-arrow-left',
|
309 |
+
'fa-long-arrow-right' => ' fa-long-arrow-right',
|
310 |
+
'fa-long-arrow-up' => ' fa-long-arrow-up',
|
311 |
+
'fa-magic' => ' fa-magic',
|
312 |
+
'fa-magnet' => ' fa-magnet',
|
313 |
+
'fa-mail-forward' => ' fa-mail-forward',
|
314 |
+
'fa-mail-reply' => ' fa-mail-reply',
|
315 |
+
'fa-mail-reply-all' => ' fa-mail-reply-all',
|
316 |
+
'fa-male' => ' fa-male',
|
317 |
+
'fa-map-marker' => ' fa-map-marker',
|
318 |
+
'fa-maxcdn' => ' fa-maxcdn',
|
319 |
+
'fa-medkit' => ' fa-medkit',
|
320 |
+
'fa-meh-o' => ' fa-meh-o',
|
321 |
+
'fa-microphone' => ' fa-microphone',
|
322 |
+
'fa-microphone-slash' => ' fa-microphone-slash',
|
323 |
+
'fa-minus' => ' fa-minus',
|
324 |
+
'fa-minus-circle' => ' fa-minus-circle',
|
325 |
+
'fa-minus-square' => ' fa-minus-square',
|
326 |
+
'fa-minus-square-o' => ' fa-minus-square-o',
|
327 |
+
'fa-mobile' => ' fa-mobile',
|
328 |
+
'fa-mobile-phone' => ' fa-mobile-phone',
|
329 |
+
'fa-money' => ' fa-money',
|
330 |
+
'fa-moon-o' => ' fa-moon-o',
|
331 |
+
'fa-mortar-board' => ' fa-mortar-board',
|
332 |
+
'fa-music' => ' fa-music',
|
333 |
+
'fa-navicon' => ' fa-navicon',
|
334 |
+
'fa-openid' => ' fa-openid',
|
335 |
+
'fa-outdent' => ' fa-outdent',
|
336 |
+
'fa-pagelines' => ' fa-pagelines',
|
337 |
+
'fa-paper-plane' => ' fa-paper-plane',
|
338 |
+
'fa-paper-plane-o' => ' fa-paper-plane-o',
|
339 |
+
'fa-paperclip' => ' fa-paperclip',
|
340 |
+
'fa-paragraph' => ' fa-paragraph',
|
341 |
+
'fa-paste' => ' fa-paste',
|
342 |
+
'fa-pause' => ' fa-pause',
|
343 |
+
'fa-paw' => ' fa-paw',
|
344 |
+
'fa-pencil' => ' fa-pencil',
|
345 |
+
'fa-pencil-square' => ' fa-pencil-square',
|
346 |
+
'fa-pencil-square-o' => ' fa-pencil-square-o',
|
347 |
+
'fa-phone' => ' fa-phone',
|
348 |
+
'fa-phone-square' => ' fa-phone-square',
|
349 |
+
'fa-photo' => ' fa-photo',
|
350 |
+
'fa-picture-o' => ' fa-picture-o',
|
351 |
+
'fa-pied-piper' => ' fa-pied-piper',
|
352 |
+
'fa-pied-piper-alt' => ' fa-pied-piper-alt',
|
353 |
+
'fa-pied-piper-square' => ' fa-pied-piper-square',
|
354 |
+
'fa-pinterest' => ' fa-pinterest',
|
355 |
+
'fa-pinterest-square' => ' fa-pinterest-square',
|
356 |
+
'fa-plane' => ' fa-plane',
|
357 |
+
'fa-play' => ' fa-play',
|
358 |
+
'fa-play-circle' => ' fa-play-circle',
|
359 |
+
'fa-play-circle-o' => ' fa-play-circle-o',
|
360 |
+
'fa-plus' => ' fa-plus',
|
361 |
+
'fa-plus-circle' => ' fa-plus-circle',
|
362 |
+
'fa-plus-square' => ' fa-plus-square',
|
363 |
+
'fa-plus-square-o' => ' fa-plus-square-o',
|
364 |
+
'fa-power-off' => ' fa-power-off',
|
365 |
+
'fa-print' => ' fa-print',
|
366 |
+
'fa-puzzle-piece' => ' fa-puzzle-piece',
|
367 |
+
'fa-qq' => ' fa-qq',
|
368 |
+
'fa-qrcode' => ' fa-qrcode',
|
369 |
+
'fa-question' => ' fa-question',
|
370 |
+
'fa-question-circle' => ' fa-question-circle',
|
371 |
+
'fa-quote-left' => ' fa-quote-left',
|
372 |
+
'fa-quote-right' => ' fa-quote-right',
|
373 |
+
'fa-ra' => ' fa-ra',
|
374 |
+
'fa-random' => ' fa-random',
|
375 |
+
'fa-rebel' => ' fa-rebel',
|
376 |
+
'fa-recycle' => ' fa-recycle',
|
377 |
+
'fa-reddit' => ' fa-reddit',
|
378 |
+
'fa-reddit-square' => ' fa-reddit-square',
|
379 |
+
'fa-refresh' => ' fa-refresh',
|
380 |
+
'fa-renren' => ' fa-renren',
|
381 |
+
'fa-reorder' => ' fa-reorder',
|
382 |
+
'fa-repeat' => ' fa-repeat',
|
383 |
+
'fa-reply' => ' fa-reply',
|
384 |
+
'fa-reply-all' => ' fa-reply-all',
|
385 |
+
'fa-retweet' => ' fa-retweet',
|
386 |
+
'fa-rmb' => ' fa-rmb',
|
387 |
+
'fa-road' => ' fa-road',
|
388 |
+
'fa-rocket' => ' fa-rocket',
|
389 |
+
'fa-rotate-left' => ' fa-rotate-left',
|
390 |
+
'fa-rotate-right' => ' fa-rotate-right',
|
391 |
+
'fa-rouble' => ' fa-rouble',
|
392 |
+
'fa-rss' => ' fa-rss',
|
393 |
+
'fa-rss-square' => ' fa-rss-square',
|
394 |
+
'fa-rub' => ' fa-rub',
|
395 |
+
'fa-ruble' => ' fa-ruble',
|
396 |
+
'fa-rupee' => ' fa-rupee',
|
397 |
+
'fa-save' => ' fa-save',
|
398 |
+
'fa-scissors' => ' fa-scissors',
|
399 |
+
'fa-search' => ' fa-search',
|
400 |
+
'fa-search-minus' => ' fa-search-minus',
|
401 |
+
'fa-search-plus' => ' fa-search-plus',
|
402 |
+
'fa-send' => ' fa-send',
|
403 |
+
'fa-send-o' => ' fa-send-o',
|
404 |
+
'fa-share' => ' fa-share',
|
405 |
+
'fa-share-alt' => ' fa-share-alt',
|
406 |
+
'fa-share-alt-square' => ' fa-share-alt-square',
|
407 |
+
'fa-share-square' => ' fa-share-square',
|
408 |
+
'fa-share-square-o' => ' fa-share-square-o',
|
409 |
+
'fa-shield' => ' fa-shield',
|
410 |
+
'fa-shopping-cart' => ' fa-shopping-cart',
|
411 |
+
'fa-sign-in' => ' fa-sign-in',
|
412 |
+
'fa-sign-out' => ' fa-sign-out',
|
413 |
+
'fa-signal' => ' fa-signal',
|
414 |
+
'fa-sitemap' => ' fa-sitemap',
|
415 |
+
'fa-skype' => ' fa-skype',
|
416 |
+
'fa-slack' => ' fa-slack',
|
417 |
+
'fa-sliders' => ' fa-sliders',
|
418 |
+
'fa-smile-o' => ' fa-smile-o',
|
419 |
+
'fa-sort' => ' fa-sort',
|
420 |
+
'fa-sort-alpha-asc' => ' fa-sort-alpha-asc',
|
421 |
+
'fa-sort-alpha-desc' => ' fa-sort-alpha-desc',
|
422 |
+
'fa-sort-amount-asc' => ' fa-sort-amount-asc',
|
423 |
+
'fa-sort-amount-desc' => ' fa-sort-amount-desc',
|
424 |
+
'fa-sort-asc' => ' fa-sort-asc',
|
425 |
+
'fa-sort-desc' => ' fa-sort-desc',
|
426 |
+
'fa-sort-down' => ' fa-sort-down',
|
427 |
+
'fa-sort-numeric-asc' => ' fa-sort-numeric-asc',
|
428 |
+
'fa-sort-numeric-desc' => ' fa-sort-numeric-desc',
|
429 |
+
'fa-sort-up' => ' fa-sort-up',
|
430 |
+
'fa-soundcloud' => ' fa-soundcloud',
|
431 |
+
'fa-space-shuttle' => ' fa-space-shuttle',
|
432 |
+
'fa-spinner' => ' fa-spinner',
|
433 |
+
'fa-spoon' => ' fa-spoon',
|
434 |
+
'fa-spotify' => ' fa-spotify',
|
435 |
+
'fa-square' => ' fa-square',
|
436 |
+
'fa-square-o' => ' fa-square-o',
|
437 |
+
'fa-stack-exchange' => ' fa-stack-exchange',
|
438 |
+
'fa-stack-overflow' => ' fa-stack-overflow',
|
439 |
+
'fa-star' => ' fa-star',
|
440 |
+
'fa-star-half' => ' fa-star-half',
|
441 |
+
'fa-star-half-empty' => ' fa-star-half-empty',
|
442 |
+
'fa-star-half-full' => ' fa-star-half-full',
|
443 |
+
'fa-star-half-o' => ' fa-star-half-o',
|
444 |
+
'fa-star-o' => ' fa-star-o',
|
445 |
+
'fa-steam' => ' fa-steam',
|
446 |
+
'fa-steam-square' => ' fa-steam-square',
|
447 |
+
'fa-step-backward' => ' fa-step-backward',
|
448 |
+
'fa-step-forward' => ' fa-step-forward',
|
449 |
+
'fa-stethoscope' => ' fa-stethoscope',
|
450 |
+
'fa-stop' => ' fa-stop',
|
451 |
+
'fa-strikethrough' => ' fa-strikethrough',
|
452 |
+
'fa-stumbleupon' => ' fa-stumbleupon',
|
453 |
+
'fa-stumbleupon-circle' => ' fa-stumbleupon-circle',
|
454 |
+
'fa-subscript' => ' fa-subscript',
|
455 |
+
'fa-suitcase' => ' fa-suitcase',
|
456 |
+
'fa-sun-o' => ' fa-sun-o',
|
457 |
+
'fa-superscript' => ' fa-superscript',
|
458 |
+
'fa-support' => ' fa-support',
|
459 |
+
'fa-table' => ' fa-table',
|
460 |
+
'fa-tablet' => ' fa-tablet',
|
461 |
+
'fa-tachometer' => ' fa-tachometer',
|
462 |
+
'fa-tag' => ' fa-tag',
|
463 |
+
'fa-tags' => ' fa-tags',
|
464 |
+
'fa-tasks' => ' fa-tasks',
|
465 |
+
'fa-taxi' => ' fa-taxi',
|
466 |
+
'fa-tencent-weibo' => ' fa-tencent-weibo',
|
467 |
+
'fa-terminal' => ' fa-terminal',
|
468 |
+
'fa-text-height' => ' fa-text-height',
|
469 |
+
'fa-text-width' => ' fa-text-width',
|
470 |
+
'fa-th' => ' fa-th',
|
471 |
+
'fa-th-large' => ' fa-th-large',
|
472 |
+
'fa-th-list' => ' fa-th-list',
|
473 |
+
'fa-thumb-tack' => ' fa-thumb-tack',
|
474 |
+
'fa-thumbs-down' => ' fa-thumbs-down',
|
475 |
+
'fa-thumbs-o-down' => ' fa-thumbs-o-down',
|
476 |
+
'fa-thumbs-o-up' => ' fa-thumbs-o-up',
|
477 |
+
'fa-thumbs-up' => ' fa-thumbs-up',
|
478 |
+
'fa-ticket' => ' fa-ticket',
|
479 |
+
'fa-times' => ' fa-times',
|
480 |
+
'fa-times-circle' => ' fa-times-circle',
|
481 |
+
'fa-times-circle-o' => ' fa-times-circle-o',
|
482 |
+
'fa-tint' => ' fa-tint',
|
483 |
+
'fa-toggle-down' => ' fa-toggle-down',
|
484 |
+
'fa-toggle-left' => ' fa-toggle-left',
|
485 |
+
'fa-toggle-right' => ' fa-toggle-right',
|
486 |
+
'fa-toggle-up' => ' fa-toggle-up',
|
487 |
+
'fa-trash-o' => ' fa-trash-o',
|
488 |
+
'fa-tree' => ' fa-tree',
|
489 |
+
'fa-trello' => ' fa-trello',
|
490 |
+
'fa-trophy' => ' fa-trophy',
|
491 |
+
'fa-truck' => ' fa-truck',
|
492 |
+
'fa-try' => ' fa-try',
|
493 |
+
'fa-tumblr' => ' fa-tumblr',
|
494 |
+
'fa-tumblr-square' => ' fa-tumblr-square',
|
495 |
+
'fa-turkish-lira' => ' fa-turkish-lira',
|
496 |
+
'fa-twitter' => ' fa-twitter',
|
497 |
+
'fa-twitter-square' => ' fa-twitter-square',
|
498 |
+
'fa-umbrella' => ' fa-umbrella',
|
499 |
+
'fa-underline' => ' fa-underline',
|
500 |
+
'fa-undo' => ' fa-undo',
|
501 |
+
'fa-university' => ' fa-university',
|
502 |
+
'fa-unlink' => ' fa-unlink',
|
503 |
+
'fa-unlock' => ' fa-unlock',
|
504 |
+
'fa-unlock-alt' => ' fa-unlock-alt',
|
505 |
+
'fa-unsorted' => ' fa-unsorted',
|
506 |
+
'fa-upload' => ' fa-upload',
|
507 |
+
'fa-usd' => ' fa-usd',
|
508 |
+
'fa-user' => ' fa-user',
|
509 |
+
'fa-user-md' => ' fa-user-md',
|
510 |
+
'fa-users' => ' fa-users',
|
511 |
+
'fa-video-camera' => ' fa-video-camera',
|
512 |
+
'fa-vimeo-square' => ' fa-vimeo-square',
|
513 |
+
'fa-vine' => ' fa-vine',
|
514 |
+
'fa-vk' => ' fa-vk',
|
515 |
+
'fa-volume-down' => ' fa-volume-down',
|
516 |
+
'fa-volume-off' => ' fa-volume-off',
|
517 |
+
'fa-volume-up' => ' fa-volume-up',
|
518 |
+
'fa-warning' => ' fa-warning',
|
519 |
+
'fa-wechat' => ' fa-wechat',
|
520 |
+
'fa-weibo' => ' fa-weibo',
|
521 |
+
'fa-weixin' => ' fa-weixin',
|
522 |
+
'fa-wheelchair' => ' fa-wheelchair',
|
523 |
+
'fa-windows' => ' fa-windows',
|
524 |
+
'fa-won' => ' fa-won',
|
525 |
+
'fa-wordpress' => ' fa-wordpress',
|
526 |
+
'fa-wrench' => ' fa-wrench',
|
527 |
+
'fa-xing' => ' fa-xing',
|
528 |
+
'fa-xing-square' => ' fa-xing-square',
|
529 |
+
'fa-yahoo' => ' fa-yahoo',
|
530 |
+
'fa-yen' => ' fa-yen',
|
531 |
+
'fa-youtube' => ' fa-youtube',
|
532 |
+
'fa-youtube-play' => ' fa-youtube-play',
|
533 |
+
'fa-youtube-square' => ' fa-youtube-square'
|
534 |
+
)
|
535 |
+
);
|
536 |
+
$this->l10n = array();
|
537 |
+
|
538 |
+
$this->settings = array(
|
539 |
+
'path' => dirname(__FILE__),
|
540 |
+
'dir' => plugin_dir_url( __FILE__ ),
|
541 |
+
'version' => '1.3'
|
542 |
+
);
|
543 |
+
|
544 |
+
add_filter('acf/load_field', array( $this, 'maybe_enqueue_font_awesome' ) );
|
545 |
+
|
546 |
+
parent::__construct();
|
547 |
+
}
|
548 |
+
|
549 |
+
|
550 |
+
/*
|
551 |
+
* maybe_enqueue_font_awesome()
|
552 |
+
*
|
553 |
+
* If Enqueue FA is set to true, enqueue it in the footer. We cannot enqueue in the header because wp_head has already been called
|
554 |
+
*
|
555 |
+
*/
|
556 |
+
|
557 |
+
function maybe_enqueue_font_awesome( $field )
|
558 |
+
{
|
559 |
+
if( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {
|
560 |
+
add_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );
|
561 |
+
}
|
562 |
+
|
563 |
+
return $field;
|
564 |
+
}
|
565 |
+
|
566 |
+
/*
|
567 |
+
* frontend_enqueue_scripts()
|
568 |
+
*
|
569 |
+
* This action is called in the wp_enqueue_scripts action on the front end.
|
570 |
+
*
|
571 |
+
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts
|
572 |
+
* @type action
|
573 |
+
*/
|
574 |
+
|
575 |
+
function frontend_enqueue_scripts()
|
576 |
+
{
|
577 |
+
wp_register_style('font-awesome', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
578 |
+
|
579 |
+
wp_enqueue_style(array(
|
580 |
+
'font-awesome'
|
581 |
+
));
|
582 |
+
}
|
583 |
+
|
584 |
+
/*
|
585 |
+
* render_field_settings()
|
586 |
+
*
|
587 |
+
* Create extra settings for your field. These are visible when editing a field
|
588 |
+
*
|
589 |
+
* @type action
|
590 |
+
* @since 3.6
|
591 |
+
* @date 23/01/13
|
592 |
+
*
|
593 |
+
* @param $field (array) the $field being edited
|
594 |
+
* @return n/a
|
595 |
+
*/
|
596 |
+
|
597 |
+
function render_field_settings( $field ) {
|
598 |
+
|
599 |
+
/*
|
600 |
+
* acf_render_field_setting
|
601 |
+
*
|
602 |
+
* This function will create a setting for your field. Simply pass the $field parameter and an array of field settings.
|
603 |
+
* The array of settings does not require a `value` or `prefix`; These settings are found from the $field array.
|
604 |
+
*
|
605 |
+
* More than one setting can be added by copy/paste the above code.
|
606 |
+
* Please note that you must also have a matching $defaults value for the field name (font_size)
|
607 |
+
*/
|
608 |
+
|
609 |
+
acf_render_field_setting( $field, array(
|
610 |
+
'label' => __('Live Preview','acf-font-awesome'),
|
611 |
+
'instructions' => '',
|
612 |
+
'type' => 'message',
|
613 |
+
'name' => 'fa_live_preview',
|
614 |
+
'class' => 'live-preview'
|
615 |
+
));
|
616 |
+
|
617 |
+
acf_render_field_setting( $field, array(
|
618 |
+
'label' => __('Default Icon','acf-font-awesome'),
|
619 |
+
'instructions' => '',
|
620 |
+
'type' => 'select',
|
621 |
+
'name' => 'default_value',
|
622 |
+
'class' => 'fontawesome',
|
623 |
+
'choices' => $field['choices']
|
624 |
+
));
|
625 |
+
|
626 |
+
acf_render_field_setting( $field, array(
|
627 |
+
'label' => __('Return Value','acf-font-awesome'),
|
628 |
+
'instructions' => __('Specify the returned value on front end','acf-font-awesome'),
|
629 |
+
'type' => 'radio',
|
630 |
+
'name' => 'save_format',
|
631 |
+
'choices' => array(
|
632 |
+
'element' => __('Icon Element','acf-font-awesome'),
|
633 |
+
'class' => __('Icon Class','acf-font-awesome'),
|
634 |
+
'unicode' => __('Icon Unicode','acf-font-awesome'),
|
635 |
+
'object' => __('Icon Object','acf-font-awesome'),
|
636 |
+
)
|
637 |
+
));
|
638 |
+
|
639 |
+
acf_render_field_setting( $field, array(
|
640 |
+
'label' => __('Allow Null?','acf-font-awesome'),
|
641 |
+
'instructions' => '',
|
642 |
+
'type' => 'radio',
|
643 |
+
'name' => 'allow_null',
|
644 |
+
'choices' => array(
|
645 |
+
1 => __('Yes','acf-font-awesome'),
|
646 |
+
0 => __('No','acf-font-awesome')
|
647 |
+
)
|
648 |
+
));
|
649 |
+
|
650 |
+
acf_render_field_setting( $field, array(
|
651 |
+
'label' => __('Enqueue FontAwesome?','acf-font-awesome'),
|
652 |
+
'instructions' => __('Set to \'Yes\' to enqueue FA in the footer on any pages using this field.','acf-font-awesome'),
|
653 |
+
'type' => 'radio',
|
654 |
+
'name' => 'enqueue_fa',
|
655 |
+
'choices' => array(
|
656 |
+
1 => __('Yes','acf-font-awesome'),
|
657 |
+
0 => __('No','acf-font-awesome')
|
658 |
+
)
|
659 |
+
));
|
660 |
+
}
|
661 |
+
|
662 |
+
|
663 |
+
/*
|
664 |
+
* render_field()
|
665 |
+
*
|
666 |
+
* Create the HTML interface for your field
|
667 |
+
*
|
668 |
+
* @param $field (array) the $field being rendered
|
669 |
+
*
|
670 |
+
* @type action
|
671 |
+
* @since 3.6
|
672 |
+
* @date 23/01/13
|
673 |
+
*
|
674 |
+
* @param $field (array) the $field being edited
|
675 |
+
* @return n/a
|
676 |
+
*/
|
677 |
+
|
678 |
+
function render_field( $field ) {
|
679 |
+
|
680 |
+
if( 'object' == $field['save_format'] )
|
681 |
+
$field['value'] = array( $field['value']->class );
|
682 |
+
|
683 |
+
// value must be array
|
684 |
+
if( !is_array($field['value']) )
|
685 |
+
{
|
686 |
+
// perhaps this is a default value with new lines in it?
|
687 |
+
if( strpos($field['value'], "\n") !== false )
|
688 |
+
{
|
689 |
+
// found multiple lines, explode it
|
690 |
+
$field['value'] = explode("\n", $field['value']);
|
691 |
+
}
|
692 |
+
else
|
693 |
+
{
|
694 |
+
$field['value'] = array( $field['value'] );
|
695 |
+
}
|
696 |
+
}
|
697 |
+
|
698 |
+
// trim value
|
699 |
+
$field['value'] = array_map('trim', $field['value']);
|
700 |
+
|
701 |
+
// html
|
702 |
+
echo '<div class="fa-field-wrapper">';
|
703 |
+
echo '<div class="fa-live-preview"></div>';
|
704 |
+
echo '<select id="' . $field['id'] . '" class="' . $field['class'] . ' fa-select2-field" name="' . $field['name'] . '" >';
|
705 |
+
|
706 |
+
// null
|
707 |
+
if( $field['allow_null'] )
|
708 |
+
{
|
709 |
+
echo '<option value="null">- ' . __("Select",'acf') . ' -</option>';
|
710 |
+
}
|
711 |
+
|
712 |
+
// loop through values and add them as options
|
713 |
+
if( is_array($field['choices']) )
|
714 |
+
{
|
715 |
+
foreach( $field['choices'] as $key => $value )
|
716 |
+
{
|
717 |
+
$selected = $this->find_selected( $key, $field['value'], $field['save_format'], $field['choices'] );
|
718 |
+
echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>';
|
719 |
+
}
|
720 |
+
}
|
721 |
+
|
722 |
+
echo '</select>';
|
723 |
+
echo '</div>';
|
724 |
+
}
|
725 |
+
|
726 |
+
function find_selected( $needle, $haystack, $type, $choices )
|
727 |
+
{
|
728 |
+
switch( $type )
|
729 |
+
{
|
730 |
+
case 'object':
|
731 |
+
case 'element':
|
732 |
+
$search = array( '<i class="fa ', '"></i>' );
|
733 |
+
$string = str_replace( $search, '', $haystack[0] );
|
734 |
+
break;
|
735 |
+
|
736 |
+
case 'class':
|
737 |
+
$string = $haystack[0];
|
738 |
+
break;
|
739 |
+
}
|
740 |
+
|
741 |
+
if( $string == $needle )
|
742 |
+
return 'selected="selected"';
|
743 |
+
|
744 |
+
return '';
|
745 |
+
}
|
746 |
+
|
747 |
+
/*
|
748 |
+
* input_admin_enqueue_scripts()
|
749 |
+
*
|
750 |
+
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
|
751 |
+
* Use this action to add CSS + JavaScript to assist your render_field() action.
|
752 |
+
*
|
753 |
+
* @type action (admin_enqueue_scripts)
|
754 |
+
* @since 3.6
|
755 |
+
* @date 23/01/13
|
756 |
+
*
|
757 |
+
* @param n/a
|
758 |
+
* @return n/a
|
759 |
+
*/
|
760 |
+
|
761 |
+
function input_admin_enqueue_scripts() {
|
762 |
+
|
763 |
+
// register acf scripts
|
764 |
+
wp_enqueue_script('acf-input-font-awesome-edit-input', $this->settings['dir'] . 'js/edit_input.js', array(), $this->settings['version']);
|
765 |
+
wp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);
|
766 |
+
wp_enqueue_style('acf-input-font-awesome-fa', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
767 |
+
}
|
768 |
+
|
769 |
+
/*
|
770 |
+
* field_group_admin_enqueue_scripts()
|
771 |
+
*
|
772 |
+
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited.
|
773 |
+
* Use this action to add CSS + JavaScript to assist your render_field_options() action.
|
774 |
+
*
|
775 |
+
* @type action (admin_enqueue_scripts)
|
776 |
+
* @since 3.6
|
777 |
+
* @date 23/01/13
|
778 |
+
*
|
779 |
+
* @param n/a
|
780 |
+
* @return n/a
|
781 |
+
*/
|
782 |
+
|
783 |
+
function field_group_admin_enqueue_scripts() {
|
784 |
+
|
785 |
+
// register acf scripts
|
786 |
+
wp_enqueue_script('font-awesome-create-input', $this->settings['dir'] . 'js/create_input.js', array(), $this->settings['version']);
|
787 |
+
wp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);
|
788 |
+
wp_enqueue_style('acf-input-font-awesome-fa', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
789 |
+
}
|
790 |
+
|
791 |
+
/*
|
792 |
+
* load_value()
|
793 |
+
*
|
794 |
+
* This filter is applied to the $value after it is loaded from the db
|
795 |
+
*
|
796 |
+
* @type filter
|
797 |
+
* @since 3.6
|
798 |
+
* @date 23/01/13
|
799 |
+
*
|
800 |
+
* @param $value (mixed) the value found in the database
|
801 |
+
* @param $post_id (mixed) the $post_id from which the value was loaded
|
802 |
+
* @param $field (array) the field array holding all the field options
|
803 |
+
* @return $value
|
804 |
+
*/
|
805 |
+
|
806 |
+
function load_value( $value, $post_id, $field ) {
|
807 |
+
|
808 |
+
switch( $field['save_format'] )
|
809 |
+
{
|
810 |
+
case 'object':
|
811 |
+
$icon_unicode_string = $this->defaults['choices'][ $value ];
|
812 |
+
$icon_unicode_arr = explode( ' ', $icon_unicode_string );
|
813 |
+
$icon_unicode = $icon_unicode_arr[0];
|
814 |
+
$value = (object) array(
|
815 |
+
'unicode' => $icon_unicode,
|
816 |
+
'class' => $value,
|
817 |
+
'element' => '<i class="fa ' . $value . '"></i>'
|
818 |
+
);
|
819 |
+
break;
|
820 |
+
|
821 |
+
case 'unicode':
|
822 |
+
$icon_unicode_string = $this->defaults['choices'][ $value ];
|
823 |
+
$icon_unicode_arr = explode( ' ', $icon_unicode_string );
|
824 |
+
$value = $icon_unicode_arr[0];
|
825 |
+
break;
|
826 |
+
|
827 |
+
case 'element':
|
828 |
+
$value = '<i class="fa ' . $value . '"></i>';
|
829 |
+
break;
|
830 |
+
}
|
831 |
+
|
832 |
+
return $value;
|
833 |
+
}
|
834 |
+
|
835 |
+
}
|
836 |
+
|
837 |
+
|
838 |
+
// create field
|
839 |
+
new acf_field_font_awesome();
|
840 |
+
|
841 |
+
?>
|
acf-font-awesome.php
CHANGED
@@ -2,54 +2,27 @@
|
|
2 |
/*
|
3 |
Plugin Name: Advanced Custom Fields: Font Awesome
|
4 |
Description: Add a Font Awesome field type to Advanced Custom Fields
|
5 |
-
Version: 1.
|
6 |
Author: Matt Keys
|
7 |
Author URI: http://mattkeys.me/
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
{
|
15 |
-
/*
|
16 |
-
* Construct
|
17 |
-
*
|
18 |
-
* @description:
|
19 |
-
* @since: 3.6
|
20 |
-
* @created: 1/04/13
|
21 |
-
*/
|
22 |
-
|
23 |
-
function __construct()
|
24 |
-
{
|
25 |
-
// set text domain
|
26 |
-
/*
|
27 |
-
$domain = 'acf-font-awesome';
|
28 |
-
$mofile = trailingslashit(dirname(__File__)) . 'lang/' . $domain . '-' . get_locale() . '.mo';
|
29 |
-
load_textdomain( $domain, $mofile );
|
30 |
-
*/
|
31 |
-
|
32 |
-
|
33 |
-
// version 4+
|
34 |
-
add_action('acf/register_fields', array($this, 'register_fields'));
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
/*
|
39 |
-
* register_fields
|
40 |
-
*
|
41 |
-
* @description:
|
42 |
-
* @since: 3.6
|
43 |
-
* @created: 1/04/13
|
44 |
-
*/
|
45 |
-
|
46 |
-
function register_fields()
|
47 |
-
{
|
48 |
-
include_once('font-awesome-v4.php');
|
49 |
-
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
?>
|
2 |
/*
|
3 |
Plugin Name: Advanced Custom Fields: Font Awesome
|
4 |
Description: Add a Font Awesome field type to Advanced Custom Fields
|
5 |
+
Version: 1.3
|
6 |
Author: Matt Keys
|
7 |
Author URI: http://mattkeys.me/
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
11 |
|
12 |
+
// Include field type for ACF5
|
13 |
+
function include_field_types_font_awesome( $version ) {
|
14 |
+
|
15 |
+
include_once('acf-font-awesome-v5.php');
|
16 |
+
|
17 |
+
}
|
18 |
|
19 |
+
add_action('acf/include_field_types', 'include_field_types_font_awesome');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
// Include field type for ACF4
|
22 |
+
function register_fields_font_awesome() {
|
23 |
+
|
24 |
+
include_once('acf-font-awesome-v4.php');
|
25 |
+
|
26 |
}
|
27 |
|
28 |
+
add_action('acf/register_fields', 'register_fields_font_awesome');
|
|
|
|
css/fontawesome.css
CHANGED
@@ -9,6 +9,10 @@
|
|
9 |
padding: 10px;
|
10 |
}
|
11 |
|
|
|
|
|
|
|
|
|
12 |
@font-face {
|
13 |
font-family: 'FontAwesome';
|
14 |
src: url('../font/fontawesome-webfont.eot?v=4.1');
|
9 |
padding: 10px;
|
10 |
}
|
11 |
|
12 |
+
[data-name="fa_live_preview"] i {
|
13 |
+
font-size: 50px;
|
14 |
+
}
|
15 |
+
|
16 |
@font-face {
|
17 |
font-family: 'FontAwesome';
|
18 |
src: url('../font/fontawesome-webfont.eot?v=4.1');
|
css/input.css
CHANGED
File without changes
|
font-awesome-v4.php
DELETED
@@ -1,860 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class acf_field_font_awesome extends acf_field
|
4 |
-
{
|
5 |
-
// vars
|
6 |
-
var $settings, // will hold info such as dir / path
|
7 |
-
$defaults; // will hold default field options
|
8 |
-
|
9 |
-
/*
|
10 |
-
* __construct
|
11 |
-
*
|
12 |
-
* Set name / label needed for actions / filters
|
13 |
-
*
|
14 |
-
* @since 3.6
|
15 |
-
* @date 23/01/13
|
16 |
-
*/
|
17 |
-
|
18 |
-
function __construct()
|
19 |
-
{
|
20 |
-
$this->name = 'font-awesome';
|
21 |
-
$this->label = __('Font Awesome Icon');
|
22 |
-
$this->category = __("Content",'acf'); // Basic, Content, Choice, etc
|
23 |
-
$this->defaults = array(
|
24 |
-
'enqueue_fa' => 0,
|
25 |
-
'allow_null' => 0,
|
26 |
-
'save_format' => 'element',
|
27 |
-
'default_value' => '',
|
28 |
-
'choices' => array(
|
29 |
-
'fa-adjust' => '',
|
30 |
-
'fa-adn' => '',
|
31 |
-
'fa-align-center' => '',
|
32 |
-
'fa-align-justify' => '',
|
33 |
-
'fa-align-left' => '',
|
34 |
-
'fa-align-right' => '',
|
35 |
-
'fa-ambulance' => '',
|
36 |
-
'fa-anchor' => '',
|
37 |
-
'fa-android' => '',
|
38 |
-
'fa-angle-double-down' => '',
|
39 |
-
'fa-angle-double-left' => '',
|
40 |
-
'fa-angle-double-right' => '',
|
41 |
-
'fa-angle-double-up' => '',
|
42 |
-
'fa-angle-down' => '',
|
43 |
-
'fa-angle-left' => '',
|
44 |
-
'fa-angle-right' => '',
|
45 |
-
'fa-angle-up' => '',
|
46 |
-
'fa-apple' => '',
|
47 |
-
'fa-archive' => '',
|
48 |
-
'fa-arrow-circle-down' => '',
|
49 |
-
'fa-arrow-circle-left' => '',
|
50 |
-
'fa-arrow-circle-o-down' => '',
|
51 |
-
'fa-arrow-circle-o-left' => '',
|
52 |
-
'fa-arrow-circle-o-right' => '',
|
53 |
-
'fa-arrow-circle-o-up' => '',
|
54 |
-
'fa-arrow-circle-right' => '',
|
55 |
-
'fa-arrow-circle-up' => '',
|
56 |
-
'fa-arrow-down' => '',
|
57 |
-
'fa-arrow-left' => '',
|
58 |
-
'fa-arrow-right' => '',
|
59 |
-
'fa-arrow-up' => '',
|
60 |
-
'fa-arrows' => '',
|
61 |
-
'fa-arrows-alt' => '',
|
62 |
-
'fa-arrows-h' => '',
|
63 |
-
'fa-arrows-v' => '',
|
64 |
-
'fa-asterisk' => '',
|
65 |
-
'fa-automobile' => '',
|
66 |
-
'fa-backward' => '',
|
67 |
-
'fa-ban' => '',
|
68 |
-
'fa-bank' => '',
|
69 |
-
'fa-bar-chart-o' => '',
|
70 |
-
'fa-barcode' => '',
|
71 |
-
'fa-bars' => '',
|
72 |
-
'fa-beer' => '',
|
73 |
-
'fa-behance' => '',
|
74 |
-
'fa-behance-square' => '',
|
75 |
-
'fa-bell' => '',
|
76 |
-
'fa-bell-o' => '',
|
77 |
-
'fa-bitbucket' => '',
|
78 |
-
'fa-bitbucket-square' => '',
|
79 |
-
'fa-bitcoin' => '',
|
80 |
-
'fa-bold' => '',
|
81 |
-
'fa-bolt' => '',
|
82 |
-
'fa-bomb' => '',
|
83 |
-
'fa-book' => '',
|
84 |
-
'fa-bookmark' => '',
|
85 |
-
'fa-bookmark-o' => '',
|
86 |
-
'fa-briefcase' => '',
|
87 |
-
'fa-btc' => '',
|
88 |
-
'fa-bug' => '',
|
89 |
-
'fa-building' => '',
|
90 |
-
'fa-building-o' => '',
|
91 |
-
'fa-bullhorn' => '',
|
92 |
-
'fa-bullseye' => '',
|
93 |
-
'fa-cab' => '',
|
94 |
-
'fa-calendar' => '',
|
95 |
-
'fa-calendar-o' => '',
|
96 |
-
'fa-camera' => '',
|
97 |
-
'fa-camera-retro' => '',
|
98 |
-
'fa-car' => '',
|
99 |
-
'fa-caret-down' => '',
|
100 |
-
'fa-caret-left' => '',
|
101 |
-
'fa-caret-right' => '',
|
102 |
-
'fa-caret-square-o-down' => '',
|
103 |
-
'fa-caret-square-o-left' => '',
|
104 |
-
'fa-caret-square-o-right' => '',
|
105 |
-
'fa-caret-square-o-up' => '',
|
106 |
-
'fa-caret-up' => '',
|
107 |
-
'fa-certificate' => '',
|
108 |
-
'fa-chain' => '',
|
109 |
-
'fa-chain-broken' => '',
|
110 |
-
'fa-check' => '',
|
111 |
-
'fa-check-circle' => '',
|
112 |
-
'fa-check-circle-o' => '',
|
113 |
-
'fa-check-square' => '',
|
114 |
-
'fa-check-square-o' => '',
|
115 |
-
'fa-chevron-circle-down' => '',
|
116 |
-
'fa-chevron-circle-left' => '',
|
117 |
-
'fa-chevron-circle-right' => '',
|
118 |
-
'fa-chevron-circle-up' => '',
|
119 |
-
'fa-chevron-down' => '',
|
120 |
-
'fa-chevron-left' => '',
|
121 |
-
'fa-chevron-right' => '',
|
122 |
-
'fa-chevron-up' => '',
|
123 |
-
'fa-child' => '',
|
124 |
-
'fa-circle' => '',
|
125 |
-
'fa-circle-o' => '',
|
126 |
-
'fa-circle-o-notch' => '',
|
127 |
-
'fa-circle-thin' => '',
|
128 |
-
'fa-clipboard' => '',
|
129 |
-
'fa-clock-o' => '',
|
130 |
-
'fa-cloud' => '',
|
131 |
-
'fa-cloud-download' => '',
|
132 |
-
'fa-cloud-upload' => '',
|
133 |
-
'fa-cny' => '',
|
134 |
-
'fa-code' => '',
|
135 |
-
'fa-code-fork' => '',
|
136 |
-
'fa-codepen' => '',
|
137 |
-
'fa-coffee' => '',
|
138 |
-
'fa-cog' => '',
|
139 |
-
'fa-cogs' => '',
|
140 |
-
'fa-columns' => '',
|
141 |
-
'fa-comment' => '',
|
142 |
-
'fa-comment-o' => '',
|
143 |
-
'fa-comments' => '',
|
144 |
-
'fa-comments-o' => '',
|
145 |
-
'fa-compass' => '',
|
146 |
-
'fa-compress' => '',
|
147 |
-
'fa-copy' => '',
|
148 |
-
'fa-credit-card' => '',
|
149 |
-
'fa-crop' => '',
|
150 |
-
'fa-crosshairs' => '',
|
151 |
-
'fa-css3' => '',
|
152 |
-
'fa-cube' => '',
|
153 |
-
'fa-cubes' => '',
|
154 |
-
'fa-cut' => '',
|
155 |
-
'fa-cutlery' => '',
|
156 |
-
'fa-dashboard' => '',
|
157 |
-
'fa-database' => '',
|
158 |
-
'fa-dedent' => '',
|
159 |
-
'fa-delicious' => '',
|
160 |
-
'fa-desktop' => '',
|
161 |
-
'fa-deviantart' => '',
|
162 |
-
'fa-digg' => '',
|
163 |
-
'fa-dollar' => '',
|
164 |
-
'fa-dot-circle-o' => '',
|
165 |
-
'fa-download' => '',
|
166 |
-
'fa-dribbble' => '',
|
167 |
-
'fa-dropbox' => '',
|
168 |
-
'fa-drupal' => '',
|
169 |
-
'fa-edit' => '',
|
170 |
-
'fa-eject' => '',
|
171 |
-
'fa-ellipsis-h' => '',
|
172 |
-
'fa-ellipsis-v' => '',
|
173 |
-
'fa-empire' => '',
|
174 |
-
'fa-envelope' => '',
|
175 |
-
'fa-envelope-o' => '',
|
176 |
-
'fa-envelope-square' => '',
|
177 |
-
'fa-eraser' => '',
|
178 |
-
'fa-eur' => '',
|
179 |
-
'fa-euro' => '',
|
180 |
-
'fa-exchange' => '',
|
181 |
-
'fa-exclamation' => '',
|
182 |
-
'fa-exclamation-circle' => '',
|
183 |
-
'fa-exclamation-triangle' => '',
|
184 |
-
'fa-expand' => '',
|
185 |
-
'fa-external-link' => '',
|
186 |
-
'fa-external-link-square' => '',
|
187 |
-
'fa-eye' => '',
|
188 |
-
'fa-eye-slash' => '',
|
189 |
-
'fa-facebook' => '',
|
190 |
-
'fa-facebook-square' => '',
|
191 |
-
'fa-fast-backward' => '',
|
192 |
-
'fa-fast-forward' => '',
|
193 |
-
'fa-fax' => '',
|
194 |
-
'fa-female' => '',
|
195 |
-
'fa-fighter-jet' => '',
|
196 |
-
'fa-file' => '',
|
197 |
-
'fa-file-archive-o' => '',
|
198 |
-
'fa-file-audio-o' => '',
|
199 |
-
'fa-file-code-o' => '',
|
200 |
-
'fa-file-excel-o' => '',
|
201 |
-
'fa-file-image-o' => '',
|
202 |
-
'fa-file-movie-o' => '',
|
203 |
-
'fa-file-o' => '',
|
204 |
-
'fa-file-pdf-o' => '',
|
205 |
-
'fa-file-photo-o' => '',
|
206 |
-
'fa-file-picture-o' => '',
|
207 |
-
'fa-file-powerpoint-o' => '',
|
208 |
-
'fa-file-sound-o' => '',
|
209 |
-
'fa-file-text' => '',
|
210 |
-
'fa-file-text-o' => '',
|
211 |
-
'fa-file-video-o' => '',
|
212 |
-
'fa-file-word-o' => '',
|
213 |
-
'fa-file-zip-o' => '',
|
214 |
-
'fa-files-o' => '',
|
215 |
-
'fa-film' => '',
|
216 |
-
'fa-filter' => '',
|
217 |
-
'fa-fire' => '',
|
218 |
-
'fa-fire-extinguisher' => '',
|
219 |
-
'fa-flag' => '',
|
220 |
-
'fa-flag-checkered' => '',
|
221 |
-
'fa-flag-o' => '',
|
222 |
-
'fa-flash' => '',
|
223 |
-
'fa-flask' => '',
|
224 |
-
'fa-flickr' => '',
|
225 |
-
'fa-floppy-o' => '',
|
226 |
-
'fa-folder' => '',
|
227 |
-
'fa-folder-o' => '',
|
228 |
-
'fa-folder-open' => '',
|
229 |
-
'fa-folder-open-o' => '',
|
230 |
-
'fa-font' => '',
|
231 |
-
'fa-forward' => '',
|
232 |
-
'fa-foursquare' => '',
|
233 |
-
'fa-frown-o' => '',
|
234 |
-
'fa-gamepad' => '',
|
235 |
-
'fa-gavel' => '',
|
236 |
-
'fa-gbp' => '',
|
237 |
-
'fa-ge' => '',
|
238 |
-
'fa-gear' => '',
|
239 |
-
'fa-gears' => '',
|
240 |
-
'fa-gift' => '',
|
241 |
-
'fa-git' => '',
|
242 |
-
'fa-git-square' => '',
|
243 |
-
'fa-github' => '',
|
244 |
-
'fa-github-alt' => '',
|
245 |
-
'fa-github-square' => '',
|
246 |
-
'fa-gittip' => '',
|
247 |
-
'fa-glass' => '',
|
248 |
-
'fa-globe' => '',
|
249 |
-
'fa-google' => '',
|
250 |
-
'fa-google-plus' => '',
|
251 |
-
'fa-google-plus-square' => '',
|
252 |
-
'fa-graduation-cap' => '',
|
253 |
-
'fa-group' => '',
|
254 |
-
'fa-h-square' => '',
|
255 |
-
'fa-hacker-news' => '',
|
256 |
-
'fa-hand-o-down' => '',
|
257 |
-
'fa-hand-o-left' => '',
|
258 |
-
'fa-hand-o-right' => '',
|
259 |
-
'fa-hand-o-up' => '',
|
260 |
-
'fa-hdd-o' => '',
|
261 |
-
'fa-header' => '',
|
262 |
-
'fa-headphones' => '',
|
263 |
-
'fa-heart' => '',
|
264 |
-
'fa-heart-o' => '',
|
265 |
-
'fa-history' => '',
|
266 |
-
'fa-home' => '',
|
267 |
-
'fa-hospital-o' => '',
|
268 |
-
'fa-html5' => '',
|
269 |
-
'fa-image' => '',
|
270 |
-
'fa-inbox' => '',
|
271 |
-
'fa-indent' => '',
|
272 |
-
'fa-info' => '',
|
273 |
-
'fa-info-circle' => '',
|
274 |
-
'fa-inr' => '',
|
275 |
-
'fa-instagram' => '',
|
276 |
-
'fa-institution' => '',
|
277 |
-
'fa-italic' => '',
|
278 |
-
'fa-joomla' => '',
|
279 |
-
'fa-jpy' => '',
|
280 |
-
'fa-jsfiddle' => '',
|
281 |
-
'fa-key' => '',
|
282 |
-
'fa-keyboard-o' => '',
|
283 |
-
'fa-krw' => '',
|
284 |
-
'fa-language' => '',
|
285 |
-
'fa-laptop' => '',
|
286 |
-
'fa-leaf' => '',
|
287 |
-
'fa-legal' => '',
|
288 |
-
'fa-lemon-o' => '',
|
289 |
-
'fa-level-down' => '',
|
290 |
-
'fa-level-up' => '',
|
291 |
-
'fa-life-bouy' => '',
|
292 |
-
'fa-life-ring' => '',
|
293 |
-
'fa-life-saver' => '',
|
294 |
-
'fa-lightbulb-o' => '',
|
295 |
-
'fa-link' => '',
|
296 |
-
'fa-linkedin' => '',
|
297 |
-
'fa-linkedin-square' => '',
|
298 |
-
'fa-linux' => '',
|
299 |
-
'fa-list' => '',
|
300 |
-
'fa-list-alt' => '',
|
301 |
-
'fa-list-ol' => '',
|
302 |
-
'fa-list-ul' => '',
|
303 |
-
'fa-location-arrow' => '',
|
304 |
-
'fa-lock' => '',
|
305 |
-
'fa-long-arrow-down' => '',
|
306 |
-
'fa-long-arrow-left' => '',
|
307 |
-
'fa-long-arrow-right' => '',
|
308 |
-
'fa-long-arrow-up' => '',
|
309 |
-
'fa-magic' => '',
|
310 |
-
'fa-magnet' => '',
|
311 |
-
'fa-mail-forward' => '',
|
312 |
-
'fa-mail-reply' => '',
|
313 |
-
'fa-mail-reply-all' => '',
|
314 |
-
'fa-male' => '',
|
315 |
-
'fa-map-marker' => '',
|
316 |
-
'fa-maxcdn' => '',
|
317 |
-
'fa-medkit' => '',
|
318 |
-
'fa-meh-o' => '',
|
319 |
-
'fa-microphone' => '',
|
320 |
-
'fa-microphone-slash' => '',
|
321 |
-
'fa-minus' => '',
|
322 |
-
'fa-minus-circle' => '',
|
323 |
-
'fa-minus-square' => '',
|
324 |
-
'fa-minus-square-o' => '',
|
325 |
-
'fa-mobile' => '',
|
326 |
-
'fa-mobile-phone' => '',
|
327 |
-
'fa-money' => '',
|
328 |
-
'fa-moon-o' => '',
|
329 |
-
'fa-mortar-board' => '',
|
330 |
-
'fa-music' => '',
|
331 |
-
'fa-navicon' => '',
|
332 |
-
'fa-openid' => '',
|
333 |
-
'fa-outdent' => '',
|
334 |
-
'fa-pagelines' => '',
|
335 |
-
'fa-paper-plane' => '',
|
336 |
-
'fa-paper-plane-o' => '',
|
337 |
-
'fa-paperclip' => '',
|
338 |
-
'fa-paragraph' => '',
|
339 |
-
'fa-paste' => '',
|
340 |
-
'fa-pause' => '',
|
341 |
-
'fa-paw' => '',
|
342 |
-
'fa-pencil' => '',
|
343 |
-
'fa-pencil-square' => '',
|
344 |
-
'fa-pencil-square-o' => '',
|
345 |
-
'fa-phone' => '',
|
346 |
-
'fa-phone-square' => '',
|
347 |
-
'fa-photo' => '',
|
348 |
-
'fa-picture-o' => '',
|
349 |
-
'fa-pied-piper' => '',
|
350 |
-
'fa-pied-piper-alt' => '',
|
351 |
-
'fa-pied-piper-square' => '',
|
352 |
-
'fa-pinterest' => '',
|
353 |
-
'fa-pinterest-square' => '',
|
354 |
-
'fa-plane' => '',
|
355 |
-
'fa-play' => '',
|
356 |
-
'fa-play-circle' => '',
|
357 |
-
'fa-play-circle-o' => '',
|
358 |
-
'fa-plus' => '',
|
359 |
-
'fa-plus-circle' => '',
|
360 |
-
'fa-plus-square' => '',
|
361 |
-
'fa-plus-square-o' => '',
|
362 |
-
'fa-power-off' => '',
|
363 |
-
'fa-print' => '',
|
364 |
-
'fa-puzzle-piece' => '',
|
365 |
-
'fa-qq' => '',
|
366 |
-
'fa-qrcode' => '',
|
367 |
-
'fa-question' => '',
|
368 |
-
'fa-question-circle' => '',
|
369 |
-
'fa-quote-left' => '',
|
370 |
-
'fa-quote-right' => '',
|
371 |
-
'fa-ra' => '',
|
372 |
-
'fa-random' => '',
|
373 |
-
'fa-rebel' => '',
|
374 |
-
'fa-recycle' => '',
|
375 |
-
'fa-reddit' => '',
|
376 |
-
'fa-reddit-square' => '',
|
377 |
-
'fa-refresh' => '',
|
378 |
-
'fa-renren' => '',
|
379 |
-
'fa-reorder' => '',
|
380 |
-
'fa-repeat' => '',
|
381 |
-
'fa-reply' => '',
|
382 |
-
'fa-reply-all' => '',
|
383 |
-
'fa-retweet' => '',
|
384 |
-
'fa-rmb' => '',
|
385 |
-
'fa-road' => '',
|
386 |
-
'fa-rocket' => '',
|
387 |
-
'fa-rotate-left' => '',
|
388 |
-
'fa-rotate-right' => '',
|
389 |
-
'fa-rouble' => '',
|
390 |
-
'fa-rss' => '',
|
391 |
-
'fa-rss-square' => '',
|
392 |
-
'fa-rub' => '',
|
393 |
-
'fa-ruble' => '',
|
394 |
-
'fa-rupee' => '',
|
395 |
-
'fa-save' => '',
|
396 |
-
'fa-scissors' => '',
|
397 |
-
'fa-search' => '',
|
398 |
-
'fa-search-minus' => '',
|
399 |
-
'fa-search-plus' => '',
|
400 |
-
'fa-send' => '',
|
401 |
-
'fa-send-o' => '',
|
402 |
-
'fa-share' => '',
|
403 |
-
'fa-share-alt' => '',
|
404 |
-
'fa-share-alt-square' => '',
|
405 |
-
'fa-share-square' => '',
|
406 |
-
'fa-share-square-o' => '',
|
407 |
-
'fa-shield' => '',
|
408 |
-
'fa-shopping-cart' => '',
|
409 |
-
'fa-sign-in' => '',
|
410 |
-
'fa-sign-out' => '',
|
411 |
-
'fa-signal' => '',
|
412 |
-
'fa-sitemap' => '',
|
413 |
-
'fa-skype' => '',
|
414 |
-
'fa-slack' => '',
|
415 |
-
'fa-sliders' => '',
|
416 |
-
'fa-smile-o' => '',
|
417 |
-
'fa-sort' => '',
|
418 |
-
'fa-sort-alpha-asc' => '',
|
419 |
-
'fa-sort-alpha-desc' => '',
|
420 |
-
'fa-sort-amount-asc' => '',
|
421 |
-
'fa-sort-amount-desc' => '',
|
422 |
-
'fa-sort-asc' => '',
|
423 |
-
'fa-sort-desc' => '',
|
424 |
-
'fa-sort-down' => '',
|
425 |
-
'fa-sort-numeric-asc' => '',
|
426 |
-
'fa-sort-numeric-desc' => '',
|
427 |
-
'fa-sort-up' => '',
|
428 |
-
'fa-soundcloud' => '',
|
429 |
-
'fa-space-shuttle' => '',
|
430 |
-
'fa-spinner' => '',
|
431 |
-
'fa-spoon' => '',
|
432 |
-
'fa-spotify' => '',
|
433 |
-
'fa-square' => '',
|
434 |
-
'fa-square-o' => '',
|
435 |
-
'fa-stack-exchange' => '',
|
436 |
-
'fa-stack-overflow' => '',
|
437 |
-
'fa-star' => '',
|
438 |
-
'fa-star-half' => '',
|
439 |
-
'fa-star-half-empty' => '',
|
440 |
-
'fa-star-half-full' => '',
|
441 |
-
'fa-star-half-o' => '',
|
442 |
-
'fa-star-o' => '',
|
443 |
-
'fa-steam' => '',
|
444 |
-
'fa-steam-square' => '',
|
445 |
-
'fa-step-backward' => '',
|
446 |
-
'fa-step-forward' => '',
|
447 |
-
'fa-stethoscope' => '',
|
448 |
-
'fa-stop' => '',
|
449 |
-
'fa-strikethrough' => '',
|
450 |
-
'fa-stumbleupon' => '',
|
451 |
-
'fa-stumbleupon-circle' => '',
|
452 |
-
'fa-subscript' => '',
|
453 |
-
'fa-suitcase' => '',
|
454 |
-
'fa-sun-o' => '',
|
455 |
-
'fa-superscript' => '',
|
456 |
-
'fa-support' => '',
|
457 |
-
'fa-table' => '',
|
458 |
-
'fa-tablet' => '',
|
459 |
-
'fa-tachometer' => '',
|
460 |
-
'fa-tag' => '',
|
461 |
-
'fa-tags' => '',
|
462 |
-
'fa-tasks' => '',
|
463 |
-
'fa-taxi' => '',
|
464 |
-
'fa-tencent-weibo' => '',
|
465 |
-
'fa-terminal' => '',
|
466 |
-
'fa-text-height' => '',
|
467 |
-
'fa-text-width' => '',
|
468 |
-
'fa-th' => '',
|
469 |
-
'fa-th-large' => '',
|
470 |
-
'fa-th-list' => '',
|
471 |
-
'fa-thumb-tack' => '',
|
472 |
-
'fa-thumbs-down' => '',
|
473 |
-
'fa-thumbs-o-down' => '',
|
474 |
-
'fa-thumbs-o-up' => '',
|
475 |
-
'fa-thumbs-up' => '',
|
476 |
-
'fa-ticket' => '',
|
477 |
-
'fa-times' => '',
|
478 |
-
'fa-times-circle' => '',
|
479 |
-
'fa-times-circle-o' => '',
|
480 |
-
'fa-tint' => '',
|
481 |
-
'fa-toggle-down' => '',
|
482 |
-
'fa-toggle-left' => '',
|
483 |
-
'fa-toggle-right' => '',
|
484 |
-
'fa-toggle-up' => '',
|
485 |
-
'fa-trash-o' => '',
|
486 |
-
'fa-tree' => '',
|
487 |
-
'fa-trello' => '',
|
488 |
-
'fa-trophy' => '',
|
489 |
-
'fa-truck' => '',
|
490 |
-
'fa-try' => '',
|
491 |
-
'fa-tumblr' => '',
|
492 |
-
'fa-tumblr-square' => '',
|
493 |
-
'fa-turkish-lira' => '',
|
494 |
-
'fa-twitter' => '',
|
495 |
-
'fa-twitter-square' => '',
|
496 |
-
'fa-umbrella' => '',
|
497 |
-
'fa-underline' => '',
|
498 |
-
'fa-undo' => '',
|
499 |
-
'fa-university' => '',
|
500 |
-
'fa-unlink' => '',
|
501 |
-
'fa-unlock' => '',
|
502 |
-
'fa-unlock-alt' => '',
|
503 |
-
'fa-unsorted' => '',
|
504 |
-
'fa-upload' => '',
|
505 |
-
'fa-usd' => '',
|
506 |
-
'fa-user' => '',
|
507 |
-
'fa-user-md' => '',
|
508 |
-
'fa-users' => '',
|
509 |
-
'fa-video-camera' => '',
|
510 |
-
'fa-vimeo-square' => '',
|
511 |
-
'fa-vine' => '',
|
512 |
-
'fa-vk' => '',
|
513 |
-
'fa-volume-down' => '',
|
514 |
-
'fa-volume-off' => '',
|
515 |
-
'fa-volume-up' => '',
|
516 |
-
'fa-warning' => '',
|
517 |
-
'fa-wechat' => '',
|
518 |
-
'fa-weibo' => '',
|
519 |
-
'fa-weixin' => '',
|
520 |
-
'fa-wheelchair' => '',
|
521 |
-
'fa-windows' => '',
|
522 |
-
'fa-won' => '',
|
523 |
-
'fa-wordpress' => '',
|
524 |
-
'fa-wrench' => '',
|
525 |
-
'fa-xing' => '',
|
526 |
-
'fa-xing-square' => '',
|
527 |
-
'fa-yahoo' => '',
|
528 |
-
'fa-yen' => '',
|
529 |
-
'fa-youtube' => '',
|
530 |
-
'fa-youtube-play' => '',
|
531 |
-
'fa-youtube-square' => ''
|
532 |
-
)
|
533 |
-
);
|
534 |
-
|
535 |
-
$this->settings = array(
|
536 |
-
'path' => apply_filters('acf/helpers/get_path', __FILE__),
|
537 |
-
'dir' => apply_filters('acf/helpers/get_dir', __FILE__),
|
538 |
-
'version' => '1.2'
|
539 |
-
);
|
540 |
-
|
541 |
-
add_filter('acf/load_field', array( $this, 'maybe_enqueue_font_awesome' ) );
|
542 |
-
|
543 |
-
parent::__construct();
|
544 |
-
}
|
545 |
-
|
546 |
-
/*
|
547 |
-
* maybe_enqueue_font_awesome()
|
548 |
-
*
|
549 |
-
* If Enqueue FA is set to true, enqueue it in the footer. We cannot enqueue in the header because wp_head has already been called
|
550 |
-
*
|
551 |
-
*/
|
552 |
-
|
553 |
-
function maybe_enqueue_font_awesome( $field )
|
554 |
-
{
|
555 |
-
if( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {
|
556 |
-
add_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );
|
557 |
-
}
|
558 |
-
|
559 |
-
return $field;
|
560 |
-
}
|
561 |
-
|
562 |
-
/*
|
563 |
-
* create_options()
|
564 |
-
*
|
565 |
-
* Create extra options for your field. This is rendered when editing a field.
|
566 |
-
* The value of $field['name'] can be used (like bellow) to save extra data to the $field
|
567 |
-
*
|
568 |
-
* @type action
|
569 |
-
* @since 3.6
|
570 |
-
* @date 23/01/13
|
571 |
-
*
|
572 |
-
* @param $field - an array holding all the field's data
|
573 |
-
*/
|
574 |
-
|
575 |
-
function create_options($field)
|
576 |
-
{
|
577 |
-
// defaults?
|
578 |
-
$field = array_merge($this->defaults, $field);
|
579 |
-
|
580 |
-
// key is needed in the field names to correctly save the data
|
581 |
-
$key = $field['name'];
|
582 |
-
|
583 |
-
|
584 |
-
// Create Field Options HTML
|
585 |
-
?>
|
586 |
-
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
587 |
-
<td class="label">
|
588 |
-
<label><?php _e("Default Icon", 'acf'); ?></label>
|
589 |
-
</td>
|
590 |
-
<td>
|
591 |
-
<div class="fa-field-wrapper">
|
592 |
-
<div class="fa-live-preview"></div>
|
593 |
-
<?php
|
594 |
-
|
595 |
-
do_action('acf/create_field', array(
|
596 |
-
'type' => 'select',
|
597 |
-
'name' => 'fields[' . $key . '][default_value]',
|
598 |
-
'value' => $field['default_value'],
|
599 |
-
'class' => 'fontawesome',
|
600 |
-
'choices' => array_merge( array( 'null' => __("Select",'acf') ), $field['choices'] )
|
601 |
-
));
|
602 |
-
|
603 |
-
?>
|
604 |
-
</div>
|
605 |
-
</td>
|
606 |
-
</tr>
|
607 |
-
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
608 |
-
<td class="label">
|
609 |
-
<label><?php _e("Return Value",'acf'); ?></label>
|
610 |
-
<p class="description"><?php _e("Specify the returned value on front end", 'acf'); ?></p>
|
611 |
-
</td>
|
612 |
-
<td>
|
613 |
-
<?php
|
614 |
-
do_action('acf/create_field', array(
|
615 |
-
'type' => 'radio',
|
616 |
-
'name' => 'fields['.$key.'][save_format]',
|
617 |
-
'value' => $field['save_format'],
|
618 |
-
'choices' => array(
|
619 |
-
'element' => __("Icon Element",'acf'),
|
620 |
-
'object' => __("Icon Object",'acf'),
|
621 |
-
'class' => __("Icon Class",'acf'),
|
622 |
-
),
|
623 |
-
'layout' => 'horizontal',
|
624 |
-
));
|
625 |
-
?>
|
626 |
-
</td>
|
627 |
-
</tr>
|
628 |
-
|
629 |
-
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
630 |
-
<td class="label">
|
631 |
-
<label><?php _e("Allow Null?",'acf'); ?></label>
|
632 |
-
</td>
|
633 |
-
<td>
|
634 |
-
<?php
|
635 |
-
do_action('acf/create_field', array(
|
636 |
-
'type' => 'radio',
|
637 |
-
'name' => 'fields['.$key.'][allow_null]',
|
638 |
-
'value' => $field['allow_null'],
|
639 |
-
'choices' => array(
|
640 |
-
1 => __("Yes",'acf'),
|
641 |
-
0 => __("No",'acf'),
|
642 |
-
),
|
643 |
-
'layout' => 'horizontal',
|
644 |
-
));
|
645 |
-
?>
|
646 |
-
</td>
|
647 |
-
</tr>
|
648 |
-
|
649 |
-
<tr class="field_option field_option_<?php echo $this->name; ?>">
|
650 |
-
<td class="label">
|
651 |
-
<label><?php _e("Enqueue FontAwesome?",'acf'); ?></label>
|
652 |
-
<p class="description"><?php _e("Set to 'Yes' to enqueue FA in the footer on any pages using this field.", 'acf'); ?></p>
|
653 |
-
</td>
|
654 |
-
<td>
|
655 |
-
<?php
|
656 |
-
do_action('acf/create_field', array(
|
657 |
-
'type' => 'radio',
|
658 |
-
'name' => 'fields['.$key.'][enqueue_fa]',
|
659 |
-
'value' => $field['enqueue_fa'],
|
660 |
-
'choices' => array(
|
661 |
-
1 => __("Yes",'acf'),
|
662 |
-
0 => __("No",'acf'),
|
663 |
-
),
|
664 |
-
'layout' => 'horizontal',
|
665 |
-
));
|
666 |
-
?>
|
667 |
-
</td>
|
668 |
-
</tr>
|
669 |
-
<?php
|
670 |
-
|
671 |
-
}
|
672 |
-
|
673 |
-
/*
|
674 |
-
* create_field()
|
675 |
-
*
|
676 |
-
* Create the HTML interface for your field
|
677 |
-
*
|
678 |
-
* @param $field - an array holding all the field's data
|
679 |
-
*
|
680 |
-
* @type action
|
681 |
-
* @since 3.6
|
682 |
-
* @date 23/01/13
|
683 |
-
*/
|
684 |
-
|
685 |
-
function create_field( $field )
|
686 |
-
{
|
687 |
-
if( 'object' == $field['save_format'] )
|
688 |
-
$field['value'] = array( $field['value']->class );
|
689 |
-
|
690 |
-
// value must be array
|
691 |
-
if( !is_array($field['value']) )
|
692 |
-
{
|
693 |
-
// perhaps this is a default value with new lines in it?
|
694 |
-
if( strpos($field['value'], "\n") !== false )
|
695 |
-
{
|
696 |
-
// found multiple lines, explode it
|
697 |
-
$field['value'] = explode("\n", $field['value']);
|
698 |
-
}
|
699 |
-
else
|
700 |
-
{
|
701 |
-
$field['value'] = array( $field['value'] );
|
702 |
-
}
|
703 |
-
}
|
704 |
-
|
705 |
-
// trim value
|
706 |
-
$field['value'] = array_map('trim', $field['value']);
|
707 |
-
|
708 |
-
// html
|
709 |
-
echo '<div class="fa-field-wrapper">';
|
710 |
-
echo '<div class="fa-live-preview"></div>';
|
711 |
-
echo '<select id="' . $field['id'] . '" class="' . $field['class'] . ' fa-select2-field" name="' . $field['name'] . '" >';
|
712 |
-
|
713 |
-
// null
|
714 |
-
if( $field['allow_null'] )
|
715 |
-
{
|
716 |
-
echo '<option value="null">- ' . __("Select",'acf') . ' -</option>';
|
717 |
-
}
|
718 |
-
|
719 |
-
// loop through values and add them as options
|
720 |
-
if( is_array($field['choices']) )
|
721 |
-
{
|
722 |
-
foreach( $field['choices'] as $key => $value )
|
723 |
-
{
|
724 |
-
$selected = $this->find_selected( $key, $field['value'], $field['save_format'], $field['choices'] );
|
725 |
-
echo '<option value="'.$key.'" '.$selected.'>'.$value.' '.$key.'</option>';
|
726 |
-
}
|
727 |
-
}
|
728 |
-
|
729 |
-
echo '</select>';
|
730 |
-
echo '</div>';
|
731 |
-
}
|
732 |
-
|
733 |
-
function find_selected( $needle, $haystack, $type, $choices )
|
734 |
-
{
|
735 |
-
switch( $type )
|
736 |
-
{
|
737 |
-
case 'object':
|
738 |
-
case 'element':
|
739 |
-
$search = array( '<i class="fa ', '"></i>' );
|
740 |
-
$string = str_replace( $search, '', $haystack[0] );
|
741 |
-
break;
|
742 |
-
|
743 |
-
case 'class':
|
744 |
-
$string = $haystack[0];
|
745 |
-
break;
|
746 |
-
}
|
747 |
-
|
748 |
-
if( $string == $needle )
|
749 |
-
return 'selected="selected"';
|
750 |
-
|
751 |
-
return '';
|
752 |
-
}
|
753 |
-
|
754 |
-
/*
|
755 |
-
* input_admin_enqueue_scripts()
|
756 |
-
*
|
757 |
-
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
|
758 |
-
* Use this action to add css + javascript to assist your create_field() action.
|
759 |
-
*
|
760 |
-
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
|
761 |
-
* @type action
|
762 |
-
* @since 3.6
|
763 |
-
* @date 23/01/13
|
764 |
-
*/
|
765 |
-
|
766 |
-
function input_admin_enqueue_scripts()
|
767 |
-
{
|
768 |
-
// register acf scripts
|
769 |
-
wp_enqueue_script('acf-input-font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);
|
770 |
-
wp_enqueue_script('acf-input-font-awesome-edit-input', $this->settings['dir'] . 'js/edit_input.js', array(), $this->settings['version']);
|
771 |
-
wp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);
|
772 |
-
wp_enqueue_style('acf-input-font-awesome-fa', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
773 |
-
wp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);
|
774 |
-
}
|
775 |
-
|
776 |
-
/*
|
777 |
-
* field_group_admin_enqueue_scripts()
|
778 |
-
*
|
779 |
-
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited.
|
780 |
-
* Use this action to add css + javascript to assist your create_field_options() action.
|
781 |
-
*
|
782 |
-
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
|
783 |
-
* @type action
|
784 |
-
* @since 3.6
|
785 |
-
* @date 23/01/13
|
786 |
-
*/
|
787 |
-
|
788 |
-
function field_group_admin_enqueue_scripts()
|
789 |
-
{
|
790 |
-
// register acf scripts
|
791 |
-
wp_enqueue_script('font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);
|
792 |
-
wp_enqueue_script('font-awesome-create-input', $this->settings['dir'] . 'js/create_input.js', array(), $this->settings['version']);
|
793 |
-
wp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);
|
794 |
-
wp_enqueue_style('acf-input-font-awesome-fa', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
795 |
-
wp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);
|
796 |
-
}
|
797 |
-
|
798 |
-
/*
|
799 |
-
* frontend_enqueue_scripts()
|
800 |
-
*
|
801 |
-
* This action is called in the wp_enqueue_scripts action on the front end.
|
802 |
-
*
|
803 |
-
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts
|
804 |
-
* @type action
|
805 |
-
*/
|
806 |
-
|
807 |
-
function frontend_enqueue_scripts()
|
808 |
-
{
|
809 |
-
wp_register_style('font-awesome', $this->settings['dir'] . 'css/fontawesome.css', array(), $this->settings['version']);
|
810 |
-
|
811 |
-
wp_enqueue_style(array(
|
812 |
-
'font-awesome'
|
813 |
-
));
|
814 |
-
}
|
815 |
-
|
816 |
-
/*
|
817 |
-
* load_value()
|
818 |
-
*
|
819 |
-
* This filter is appied to the $value after it is loaded from the db
|
820 |
-
*
|
821 |
-
* @type filter
|
822 |
-
* @since 3.6
|
823 |
-
* @date 23/01/13
|
824 |
-
*
|
825 |
-
* @param $value - the value found in the database
|
826 |
-
* @param $post_id - the $post_id from which the value was loaded from
|
827 |
-
* @param $field - the field array holding all the field options
|
828 |
-
*
|
829 |
-
* @return $value - the value to be saved in te database
|
830 |
-
*/
|
831 |
-
|
832 |
-
function load_value($value, $post_id, $field)
|
833 |
-
{
|
834 |
-
// Note: This function can be removed if not used
|
835 |
-
switch( $field['save_format'] )
|
836 |
-
{
|
837 |
-
case 'object':
|
838 |
-
$icon_unicode = $this->defaults['choices'][ $value ];
|
839 |
-
$value = (object) array(
|
840 |
-
'unicode' => $icon_unicode,
|
841 |
-
'class' => $value,
|
842 |
-
'element' => '<i class="fa ' . $value . '"></i>'
|
843 |
-
);
|
844 |
-
break;
|
845 |
-
|
846 |
-
case 'unicode':
|
847 |
-
$value = $this->defaults['choices'][ $value ];
|
848 |
-
break;
|
849 |
-
|
850 |
-
case 'element':
|
851 |
-
$value = '<i class="fa ' . $value . '"></i>';
|
852 |
-
break;
|
853 |
-
}
|
854 |
-
|
855 |
-
return $value;
|
856 |
-
}
|
857 |
-
|
858 |
-
}
|
859 |
-
|
860 |
-
new acf_field_font_awesome();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/create_input.js
CHANGED
@@ -1,45 +1,74 @@
|
|
1 |
(function($){
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
if( $(this).val() == 'font-awesome' ) {
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
setTimeout(function() {
|
9 |
-
$( 'select.fontawesome', font_awesome_form )
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}, 1000);
|
14 |
}
|
15 |
|
16 |
});
|
17 |
|
18 |
-
$(document).
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
element = $( 'select.fontawesome'
|
21 |
|
22 |
$( element ).select2({
|
23 |
width : '100%'
|
24 |
});
|
25 |
-
update_preview( element, $(element).val() );
|
26 |
});
|
27 |
|
28 |
$(document).on( 'select2-selecting', 'select.fontawesome', function( object ) {
|
29 |
-
update_preview( this, object.val );
|
30 |
});
|
31 |
|
32 |
$(document).on( 'select2-highlight', 'select.fontawesome', function( object ) {
|
33 |
-
update_preview( this, object.val );
|
34 |
});
|
35 |
|
36 |
$(document).on( 'select2-close', 'select.fontawesome', function( object ) {
|
37 |
-
update_preview( this, $(this).val() );
|
38 |
});
|
39 |
|
40 |
-
function update_preview( element, selected ) {
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
})(jQuery);
|
1 |
(function($){
|
2 |
|
3 |
+
var version_num = 5;
|
4 |
+
|
5 |
+
$(document).on( 'change', '.field_type-select select, .field_type select', function() {
|
6 |
|
7 |
if( $(this).val() == 'font-awesome' ) {
|
8 |
+
|
9 |
+
// ACF 5
|
10 |
+
var font_awesome_form = $(this).closest( '.field-settings' );
|
11 |
+
|
12 |
+
// ACF 4
|
13 |
+
if ( font_awesome_form.length == 0 ) {
|
14 |
+
var font_awesome_form = $(this).closest( '.field_form' );
|
15 |
+
version_num = 4;
|
16 |
+
}
|
17 |
+
|
18 |
setTimeout(function() {
|
19 |
+
var font_awesome_select = $( 'select.fontawesome', font_awesome_form );
|
20 |
+
|
21 |
+
update_preview( font_awesome_select, $( font_awesome_select ).val(), version_num );
|
22 |
+
|
23 |
+
if ( $('.select2-container', font_awesome_form).length == 0 ) {
|
24 |
+
font_awesome_select.select2({
|
25 |
+
width : '100%'
|
26 |
+
});
|
27 |
+
} else {
|
28 |
+
$('.select2-container', font_awesome_form).remove();
|
29 |
+
font_awesome_select.select2({
|
30 |
+
width : '100%'
|
31 |
+
}); }
|
32 |
}, 1000);
|
33 |
}
|
34 |
|
35 |
});
|
36 |
|
37 |
+
$(document).ready(function($) {
|
38 |
+
|
39 |
+
if ( $('.fa-field-wrapper').length > 0 ) {
|
40 |
+
version_num = 4;
|
41 |
+
}
|
42 |
|
43 |
+
element = $( 'select.fontawesome' );
|
44 |
|
45 |
$( element ).select2({
|
46 |
width : '100%'
|
47 |
});
|
48 |
+
update_preview( element, $(element).val(), version_num );
|
49 |
});
|
50 |
|
51 |
$(document).on( 'select2-selecting', 'select.fontawesome', function( object ) {
|
52 |
+
update_preview( this, object.val, version_num );
|
53 |
});
|
54 |
|
55 |
$(document).on( 'select2-highlight', 'select.fontawesome', function( object ) {
|
56 |
+
update_preview( this, object.val, version_num );
|
57 |
});
|
58 |
|
59 |
$(document).on( 'select2-close', 'select.fontawesome', function( object ) {
|
60 |
+
update_preview( this, $(this).val(), version_num );
|
61 |
});
|
62 |
|
63 |
+
function update_preview( element, selected, version ) {
|
64 |
+
if ( version == 4 ) {
|
65 |
+
var parent = $(element).parent();
|
66 |
+
$( '.fa-live-preview', parent ).html( '<i class="fa ' + selected + '"></i>' );
|
67 |
+
} else {
|
68 |
+
var parent = $(element).closest('tr');
|
69 |
+
var sibling = parent.siblings('tr[data-name="fa_live_preview"]');
|
70 |
+
$( 'td.acf-input', sibling ).html( '<i class="fa ' + selected + '"></i>' );
|
71 |
+
}
|
72 |
}
|
73 |
|
74 |
})(jQuery);
|
js/edit_input.js
CHANGED
@@ -1,100 +1,151 @@
|
|
1 |
(function($){
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
* acf/setup_fields
|
5 |
-
*
|
6 |
-
* This event is triggered when ACF adds any new elements to the DOM.
|
7 |
-
*
|
8 |
-
* @type function
|
9 |
-
* @since 1.0.0
|
10 |
-
* @date 01/01/12
|
11 |
-
*
|
12 |
-
* @param event e: an event object. This can be ignored
|
13 |
-
* @param Element postbox: An element which contains the new HTML
|
14 |
-
*
|
15 |
-
* @return N/A
|
16 |
-
*/
|
17 |
-
|
18 |
-
fa_initialized = false;
|
19 |
-
|
20 |
-
$(document).on( 'acf/setup_fields', function( e, postbox ) {
|
21 |
-
|
22 |
-
if( $( '.fa-field-wrapper', postbox ).length > 0 ) {
|
23 |
-
|
24 |
-
if( fa_initialized ) {
|
25 |
-
|
26 |
-
var last_row = $( '.row-clone' ).prev( '.row' );
|
27 |
-
|
28 |
-
$( last_row ).each( function() {
|
29 |
-
$( 'select.fa-select2-field', this ).each( function() {
|
30 |
-
$(this).select2({
|
31 |
-
width : '100%'
|
32 |
-
});
|
33 |
-
update_preview( this, $(this).val() );
|
34 |
-
});
|
35 |
-
});
|
36 |
|
37 |
-
|
38 |
|
39 |
-
|
|
|
40 |
$(this).select2({
|
41 |
width : '100%'
|
42 |
});
|
43 |
update_preview( this, $(this).val() );
|
44 |
});
|
|
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
width : '100%'
|
52 |
-
});
|
53 |
-
update_preview( this, $(this).val() );
|
54 |
-
});
|
55 |
});
|
|
|
|
|
56 |
|
57 |
-
|
58 |
-
$(this).select2({
|
59 |
-
width : '100%'
|
60 |
-
});
|
61 |
-
update_preview( this, $(this).val() );
|
62 |
-
});
|
63 |
|
64 |
-
|
|
|
65 |
$(this).select2({
|
66 |
width : '100%'
|
67 |
});
|
68 |
update_preview( this, $(this).val() );
|
69 |
});
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
$( 'tr.row-clone select.fa-select2-field' ).each(function() {
|
74 |
-
$(this).select2( 'destroy' );
|
75 |
-
});
|
76 |
-
|
77 |
-
$( 'select.fa-select2-field' ).on( 'select2-selecting', function( object ) {
|
78 |
-
update_preview( this, object.val );
|
79 |
});
|
80 |
|
81 |
-
$( 'select.fa-select2-field' ).
|
82 |
-
|
|
|
|
|
|
|
83 |
});
|
84 |
|
85 |
-
$( 'select.fa-select2-field' ).
|
|
|
|
|
|
|
86 |
update_preview( this, $(this).val() );
|
87 |
});
|
88 |
|
89 |
-
fa_initialized = true;
|
90 |
-
|
91 |
}
|
92 |
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
function update_preview( element, selected ) {
|
96 |
var parent = $(element).parent();
|
97 |
$( '.fa-live-preview', parent ).html( '<i class="fa ' + selected + '"></i>' );
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
})(jQuery);
|
1 |
(function($){
|
2 |
+
|
3 |
+
|
4 |
+
function initialize_field( $el ) {
|
5 |
+
|
6 |
+
fa_initialized = false;
|
7 |
|
8 |
+
if( fa_initialized ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
var last_row = $( '.row-clone' ).prev( '.row' );
|
11 |
|
12 |
+
$( last_row ).each( function() {
|
13 |
+
$( 'select.fa-select2-field', this ).each( function() {
|
14 |
$(this).select2({
|
15 |
width : '100%'
|
16 |
});
|
17 |
update_preview( this, $(this).val() );
|
18 |
});
|
19 |
+
});
|
20 |
|
21 |
+
var last_layout = $( '.acf-flexible-content .values' ).last();
|
22 |
|
23 |
+
$( 'tbody > tr.field_type-font-awesome select.fa-select2-field', last_layout ).each( function() {
|
24 |
+
$(this).select2({
|
25 |
+
width : '100%'
|
|
|
|
|
|
|
|
|
26 |
});
|
27 |
+
update_preview( this, $(this).val() );
|
28 |
+
});
|
29 |
|
30 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
$( '.row' ).each( function() {
|
33 |
+
$( 'select.fa-select2-field', this ).each( function() {
|
34 |
$(this).select2({
|
35 |
width : '100%'
|
36 |
});
|
37 |
update_preview( this, $(this).val() );
|
38 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
});
|
40 |
|
41 |
+
$( '.acf-flexible-content .values tbody > tr.field_type-font-awesome select.fa-select2-field' ).each( function() {
|
42 |
+
$(this).select2({
|
43 |
+
width : '100%'
|
44 |
+
});
|
45 |
+
update_preview( this, $(this).val() );
|
46 |
});
|
47 |
|
48 |
+
$( '.field_type-font-awesome select.fa-select2-field' ).each( function() {
|
49 |
+
$(this).select2({
|
50 |
+
width : '100%'
|
51 |
+
});
|
52 |
update_preview( this, $(this).val() );
|
53 |
});
|
54 |
|
|
|
|
|
55 |
}
|
56 |
|
57 |
+
// ACF 5 Flex Clones
|
58 |
+
$( '.clones select.fa-select2-field' ).each(function() {
|
59 |
+
$(this).select2( 'destroy' );
|
60 |
+
});
|
61 |
+
|
62 |
+
// ACF 5 Repeater Clones
|
63 |
+
$( 'tr.acf-row.clone select.fa-select2-field' ).each(function() {
|
64 |
+
$(this).select2( 'destroy' );
|
65 |
+
});
|
66 |
+
|
67 |
+
// ACF 4 Repeater Clones
|
68 |
+
$( 'tr.row-clone select.fa-select2-field' ).each(function() {
|
69 |
+
$(this).select2( 'destroy' );
|
70 |
+
});
|
71 |
+
|
72 |
+
$( 'select.fa-select2-field' ).on( 'select2-selecting', function( object ) {
|
73 |
+
update_preview( this, object.val );
|
74 |
+
});
|
75 |
+
|
76 |
+
$( 'select.fa-select2-field' ).on( 'select2-highlight', function( object ) {
|
77 |
+
update_preview( this, object.val );
|
78 |
+
});
|
79 |
|
80 |
+
$( 'select.fa-select2-field' ).on( 'select2-close', function( object ) {
|
81 |
+
update_preview( this, $(this).val() );
|
82 |
+
});
|
83 |
+
|
84 |
+
fa_initialized = true;
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
function update_preview( element, selected ) {
|
89 |
var parent = $(element).parent();
|
90 |
$( '.fa-live-preview', parent ).html( '<i class="fa ' + selected + '"></i>' );
|
91 |
}
|
92 |
+
|
93 |
+
if( typeof acf.add_action !== 'undefined' ) {
|
94 |
+
|
95 |
+
/*
|
96 |
+
* ready append (ACF5)
|
97 |
+
*
|
98 |
+
* These are 2 events which are fired during the page load
|
99 |
+
* ready = on page load similar to $(document).ready()
|
100 |
+
* append = on new DOM elements appended via repeater field
|
101 |
+
*
|
102 |
+
* @type event
|
103 |
+
* @date 20/07/13
|
104 |
+
*
|
105 |
+
* @param $el (jQuery selection) the jQuery element which contains the ACF fields
|
106 |
+
* @return n/a
|
107 |
+
*/
|
108 |
+
|
109 |
+
acf.add_action('ready append', function( $el ){
|
110 |
+
|
111 |
+
// search $el for fields of type 'FIELD_NAME'
|
112 |
+
acf.get_fields({ type : 'font-awesome'}, $el).each(function(){
|
113 |
+
|
114 |
+
initialize_field( $(this) );
|
115 |
+
|
116 |
+
});
|
117 |
+
|
118 |
+
});
|
119 |
+
|
120 |
+
|
121 |
+
} else {
|
122 |
+
|
123 |
+
|
124 |
+
/*
|
125 |
+
* acf/setup_fields (ACF4)
|
126 |
+
*
|
127 |
+
* This event is triggered when ACF adds any new elements to the DOM.
|
128 |
+
*
|
129 |
+
* @type function
|
130 |
+
* @since 1.0.0
|
131 |
+
* @date 01/01/12
|
132 |
+
*
|
133 |
+
* @param event e: an event object. This can be ignored
|
134 |
+
* @param Element postbox: An element which contains the new HTML
|
135 |
+
*
|
136 |
+
* @return n/a
|
137 |
+
*/
|
138 |
+
|
139 |
+
$(document).live('acf/setup_fields', function(e, postbox){
|
140 |
+
|
141 |
+
$(postbox).find('.field[data-field_type="font-awesome"], .sub_field[data-field_type="font-awesome"]').each(function(){
|
142 |
+
initialize_field( $(this) );
|
143 |
+
});
|
144 |
+
|
145 |
+
});
|
146 |
+
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
|
151 |
})(jQuery);
|
readme.txt
CHANGED
@@ -15,35 +15,20 @@ Adds a new 'Font Awesome Icon' field to the popular Advanced Custom Fields plugi
|
|
15 |
Add a [Font Awesome](http://fontawesome.io/) icon field type to Advanced Custom Fields.
|
16 |
|
17 |
* Optionally set a default icon
|
18 |
-
* Returns Icon Element,
|
19 |
* Optionally enqueues Font Awesome in footer
|
20 |
|
21 |
= Compatibility =
|
22 |
|
23 |
-
This
|
24 |
-
|
25 |
-
*
|
26 |
|
27 |
== Installation ==
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
1. Copy the 'acf-font-awesome' folder into your plugins folder
|
33 |
-
2. Activate the plugin via the Plugins admin page
|
34 |
-
|
35 |
-
= Include =
|
36 |
-
1. Copy the 'acf-font-awesome' folder into your theme folder (can use sub folders). You can place the folder anywhere inside the 'wp-content' directory
|
37 |
-
2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-font-awesome.php file)
|
38 |
-
|
39 |
-
`
|
40 |
-
add_action('acf/register_fields', 'my_register_fields');
|
41 |
-
|
42 |
-
function my_register_fields()
|
43 |
-
{
|
44 |
-
include_once('acf-font-awesome/acf-font-awesome.php');
|
45 |
-
}
|
46 |
-
`
|
47 |
|
48 |
== Screenshots ==
|
49 |
|
@@ -52,6 +37,9 @@ function my_register_fields()
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
55 |
= 1.2 =
|
56 |
* Added support for new icons in FontAwesome 4.1
|
57 |
* Updated included FontAwesome to version 4.1
|
@@ -73,6 +61,9 @@ function my_register_fields()
|
|
73 |
|
74 |
== Upgrade Notice ==
|
75 |
|
|
|
|
|
|
|
76 |
= 1.2 =
|
77 |
Font Awesome version 4.1 support
|
78 |
|
15 |
Add a [Font Awesome](http://fontawesome.io/) icon field type to Advanced Custom Fields.
|
16 |
|
17 |
* Optionally set a default icon
|
18 |
+
* Returns Icon Element, Icon Class, Icon Unicode, or an Object including the element, class, and unicode value
|
19 |
* Optionally enqueues Font Awesome in footer
|
20 |
|
21 |
= Compatibility =
|
22 |
|
23 |
+
This ACF field type is compatible with:
|
24 |
+
* ACF 5
|
25 |
+
* ACF 4
|
26 |
|
27 |
== Installation ==
|
28 |
|
29 |
+
1. Copy the `advanced-custom-fields-font-awesome` folder into your `wp-content/plugins` folder
|
30 |
+
2. Activate the Font Awesome plugin via the plugins admin page
|
31 |
+
3. Create a new field via ACF and select the Font Awesome type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
== Screenshots ==
|
34 |
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= 1.3 =
|
41 |
+
* Added support for ACF version 5.x
|
42 |
+
|
43 |
= 1.2 =
|
44 |
* Added support for new icons in FontAwesome 4.1
|
45 |
* Updated included FontAwesome to version 4.1
|
61 |
|
62 |
== Upgrade Notice ==
|
63 |
|
64 |
+
= 1.3 =
|
65 |
+
Advanced Custom Fields version 5.x support
|
66 |
+
|
67 |
= 1.2 =
|
68 |
Font Awesome version 4.1 support
|
69 |
|