Advanced Custom Fields: Font Awesome Field - Version 1.3

Version Description

  • Added support for ACF version 5.x
Download this release

Release Info

Developer mattkeys
Plugin Icon 128x128 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 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' => '&#xf042; fa-adjust',
30
+ 'fa-adn' => '&#xf170; fa-adn',
31
+ 'fa-align-center' => '&#xf037; fa-align-center',
32
+ 'fa-align-justify' => '&#xf039; fa-align-justify',
33
+ 'fa-align-left' => '&#xf036; fa-align-left',
34
+ 'fa-align-right' => '&#xf038; fa-align-right',
35
+ 'fa-ambulance' => '&#xf0f9; fa-ambulance',
36
+ 'fa-anchor' => '&#xf13d; fa-anchor',
37
+ 'fa-android' => '&#xf17b; fa-android',
38
+ 'fa-angle-double-down' => '&#xf103; fa-angle-double-down',
39
+ 'fa-angle-double-left' => '&#xf100; fa-angle-double-left',
40
+ 'fa-angle-double-right' => '&#xf101; fa-angle-double-right',
41
+ 'fa-angle-double-up' => '&#xf102; fa-angle-double-up',
42
+ 'fa-angle-down' => '&#xf107; fa-angle-down',
43
+ 'fa-angle-left' => '&#xf104; fa-angle-left',
44
+ 'fa-angle-right' => '&#xf105; fa-angle-right',
45
+ 'fa-angle-up' => '&#xf106; fa-angle-up',
46
+ 'fa-apple' => '&#xf179; fa-apple',
47
+ 'fa-archive' => '&#xf187; fa-archive',
48
+ 'fa-arrow-circle-down' => '&#xf0ab; fa-arrow-circle-down',
49
+ 'fa-arrow-circle-left' => '&#xf0a8; fa-arrow-circle-left',
50
+ 'fa-arrow-circle-o-down' => '&#xf01a; fa-arrow-circle-o-down',
51
+ 'fa-arrow-circle-o-left' => '&#xf190; fa-arrow-circle-o-left',
52
+ 'fa-arrow-circle-o-right' => '&#xf18e; fa-arrow-circle-o-right',
53
+ 'fa-arrow-circle-o-up' => '&#xf01b; fa-arrow-circle-o-up',
54
+ 'fa-arrow-circle-right' => '&#xf0a9; fa-arrow-circle-right',
55
+ 'fa-arrow-circle-up' => '&#xf0aa; fa-arrow-circle-up',
56
+ 'fa-arrow-down' => '&#xf063; fa-arrow-down',
57
+ 'fa-arrow-left' => '&#xf060; fa-arrow-left',
58
+ 'fa-arrow-right' => '&#xf061; fa-arrow-right',
59
+ 'fa-arrow-up' => '&#xf062; fa-arrow-up',
60
+ 'fa-arrows' => '&#xf047; fa-arrows',
61
+ 'fa-arrows-alt' => '&#xf0b2; fa-arrows-alt',
62
+ 'fa-arrows-h' => '&#xf07e; fa-arrows-h',
63
+ 'fa-arrows-v' => '&#xf07d; fa-arrows-v',
64
+ 'fa-asterisk' => '&#xf069; fa-asterisk',
65
+ 'fa-automobile' => '&#xf1b9; fa-automobile',
66
+ 'fa-backward' => '&#xf04a; fa-backward',
67
+ 'fa-ban' => '&#xf05e; fa-ban',
68
+ 'fa-bank' => '&#xf19c; fa-bank',
69
+ 'fa-bar-chart-o' => '&#xf080; fa-bar-chart-o',
70
+ 'fa-barcode' => '&#xf02a; fa-barcode',
71
+ 'fa-bars' => '&#xf0c9; fa-bars',
72
+ 'fa-beer' => '&#xf0fc; fa-beer',
73
+ 'fa-behance' => '&#xf1b4; fa-behance',
74
+ 'fa-behance-square' => '&#xf1b5; fa-behance-square',
75
+ 'fa-bell' => '&#xf0f3; fa-bell',
76
+ 'fa-bell-o' => '&#xf0a2; fa-bell-o',
77
+ 'fa-bitbucket' => '&#xf171; fa-bitbucket',
78
+ 'fa-bitbucket-square' => '&#xf172; fa-bitbucket-square',
79
+ 'fa-bitcoin' => '&#xf15a; fa-bitcoin',
80
+ 'fa-bold' => '&#xf032; fa-bold',
81
+ 'fa-bolt' => '&#xf0e7; fa-bolt',
82
+ 'fa-bomb' => '&#xf1e2; fa-bomb',
83
+ 'fa-book' => '&#xf02d; fa-book',
84
+ 'fa-bookmark' => '&#xf02e; fa-bookmark',
85
+ 'fa-bookmark-o' => '&#xf097; fa-bookmark-o',
86
+ 'fa-briefcase' => '&#xf0b1; fa-briefcase',
87
+ 'fa-btc' => '&#xf15a; fa-btc',
88
+ 'fa-bug' => '&#xf188; fa-bug',
89
+ 'fa-building' => '&#xf1ad; fa-building',
90
+ 'fa-building-o' => '&#xf0f7; fa-building-o',
91
+ 'fa-bullhorn' => '&#xf0a1; fa-bullhorn',
92
+ 'fa-bullseye' => '&#xf140; fa-bullseye',
93
+ 'fa-cab' => '&#xf1ba; fa-cab',
94
+ 'fa-calendar' => '&#xf073; fa-calendar',
95
+ 'fa-calendar-o' => '&#xf133; fa-calendar-o',
96
+ 'fa-camera' => '&#xf030; fa-camera',
97
+ 'fa-camera-retro' => '&#xf083; fa-camera-retro',
98
+ 'fa-car' => '&#xf1b9; fa-car',
99
+ 'fa-caret-down' => '&#xf0d7; fa-caret-down',
100
+ 'fa-caret-left' => '&#xf0d9; fa-caret-left',
101
+ 'fa-caret-right' => '&#xf0da; fa-caret-right',
102
+ 'fa-caret-square-o-down' => '&#xf150; fa-caret-square-o-down',
103
+ 'fa-caret-square-o-left' => '&#xf191; fa-caret-square-o-left',
104
+ 'fa-caret-square-o-right' => '&#xf152; fa-caret-square-o-right',
105
+ 'fa-caret-square-o-up' => '&#xf151; fa-caret-square-o-up',
106
+ 'fa-caret-up' => '&#xf0d8; fa-caret-up',
107
+ 'fa-certificate' => '&#xf0a3; fa-certificate',
108
+ 'fa-chain' => '&#xf0c1; fa-chain',
109
+ 'fa-chain-broken' => '&#xf127; fa-chain-broken',
110
+ 'fa-check' => '&#xf00c; fa-check',
111
+ 'fa-check-circle' => '&#xf058; fa-check-circle',
112
+ 'fa-check-circle-o' => '&#xf05d; fa-check-circle-o',
113
+ 'fa-check-square' => '&#xf14a; fa-check-square',
114
+ 'fa-check-square-o' => '&#xf046; fa-check-square-o',
115
+ 'fa-chevron-circle-down' => '&#xf13a; fa-chevron-circle-down',
116
+ 'fa-chevron-circle-left' => '&#xf137; fa-chevron-circle-left',
117
+ 'fa-chevron-circle-right' => '&#xf138; fa-chevron-circle-right',
118
+ 'fa-chevron-circle-up' => '&#xf139; fa-chevron-circle-up',
119
+ 'fa-chevron-down' => '&#xf078; fa-chevron-down',
120
+ 'fa-chevron-left' => '&#xf053; fa-chevron-left',
121
+ 'fa-chevron-right' => '&#xf054; fa-chevron-right',
122
+ 'fa-chevron-up' => '&#xf077; fa-chevron-up',
123
+ 'fa-child' => '&#xf1ae; fa-child',
124
+ 'fa-circle' => '&#xf111; fa-circle',
125
+ 'fa-circle-o' => '&#xf10c; fa-circle-o',
126
+ 'fa-circle-o-notch' => '&#xf1ce; fa-circle-o-notch',
127
+ 'fa-circle-thin' => '&#xf1db; fa-circle-thin',
128
+ 'fa-clipboard' => '&#xf0ea; fa-clipboard',
129
+ 'fa-clock-o' => '&#xf017; fa-clock-o',
130
+ 'fa-cloud' => '&#xf0c2; fa-cloud',
131
+ 'fa-cloud-download' => '&#xf0ed; fa-cloud-download',
132
+ 'fa-cloud-upload' => '&#xf0ee; fa-cloud-upload',
133
+ 'fa-cny' => '&#xf157; fa-cny',
134
+ 'fa-code' => '&#xf121; fa-code',
135
+ 'fa-code-fork' => '&#xf126; fa-code-fork',
136
+ 'fa-codepen' => '&#xf1cb; fa-codepen',
137
+ 'fa-coffee' => '&#xf0f4; fa-coffee',
138
+ 'fa-cog' => '&#xf013; fa-cog',
139
+ 'fa-cogs' => '&#xf085; fa-cogs',
140
+ 'fa-columns' => '&#xf0db; fa-columns',
141
+ 'fa-comment' => '&#xf075; fa-comment',
142
+ 'fa-comment-o' => '&#xf0e5; fa-comment-o',
143
+ 'fa-comments' => '&#xf086; fa-comments',
144
+ 'fa-comments-o' => '&#xf0e6; fa-comments-o',
145
+ 'fa-compass' => '&#xf14e; fa-compass',
146
+ 'fa-compress' => '&#xf066; fa-compress',
147
+ 'fa-copy' => '&#xf0c5; fa-copy',
148
+ 'fa-credit-card' => '&#xf09d; fa-credit-card',
149
+ 'fa-crop' => '&#xf125; fa-crop',
150
+ 'fa-crosshairs' => '&#xf05b; fa-crosshairs',
151
+ 'fa-css3' => '&#xf13c; fa-css3',
152
+ 'fa-cube' => '&#xf1b2; fa-cube',
153
+ 'fa-cubes' => '&#xf1b3; fa-cubes',
154
+ 'fa-cut' => '&#xf0c4; fa-cut',
155
+ 'fa-cutlery' => '&#xf0f5; fa-cutlery',
156
+ 'fa-dashboard' => '&#xf0e4; fa-dashboard',
157
+ 'fa-database' => '&#xf1c0; fa-database',
158
+ 'fa-dedent' => '&#xf03b; fa-dedent',
159
+ 'fa-delicious' => '&#xf1a5; fa-delicious',
160
+ 'fa-desktop' => '&#xf108; fa-desktop',
161
+ 'fa-deviantart' => '&#xf1bd; fa-deviantart',
162
+ 'fa-digg' => '&#xf1a6; fa-digg',
163
+ 'fa-dollar' => '&#xf155; fa-dollar',
164
+ 'fa-dot-circle-o' => '&#xf192; fa-dot-circle-o',
165
+ 'fa-download' => '&#xf019; fa-download',
166
+ 'fa-dribbble' => '&#xf17d; fa-dribbble',
167
+ 'fa-dropbox' => '&#xf16b; fa-dropbox',
168
+ 'fa-drupal' => '&#xf1a9; fa-drupal',
169
+ 'fa-edit' => '&#xf044; fa-edit',
170
+ 'fa-eject' => '&#xf052; fa-eject',
171
+ 'fa-ellipsis-h' => '&#xf141; fa-ellipsis-h',
172
+ 'fa-ellipsis-v' => '&#xf142; fa-ellipsis-v',
173
+ 'fa-empire' => '&#xf1d1; fa-empire',
174
+ 'fa-envelope' => '&#xf0e0; fa-envelope',
175
+ 'fa-envelope-o' => '&#xf003; fa-envelope-o',
176
+ 'fa-envelope-square' => '&#xf199; fa-envelope-square',
177
+ 'fa-eraser' => '&#xf12d; fa-eraser',
178
+ 'fa-eur' => '&#xf153; fa-eur',
179
+ 'fa-euro' => '&#xf153; fa-euro',
180
+ 'fa-exchange' => '&#xf0ec; fa-exchange',
181
+ 'fa-exclamation' => '&#xf12a; fa-exclamation',
182
+ 'fa-exclamation-circle' => '&#xf06a; fa-exclamation-circle',
183
+ 'fa-exclamation-triangle' => '&#xf071; fa-exclamation-triangle',
184
+ 'fa-expand' => '&#xf065; fa-expand',
185
+ 'fa-external-link' => '&#xf08e; fa-external-link',
186
+ 'fa-external-link-square' => '&#xf14c; fa-external-link-square',
187
+ 'fa-eye' => '&#xf06e; fa-eye',
188
+ 'fa-eye-slash' => '&#xf070; fa-eye-slash',
189
+ 'fa-facebook' => '&#xf09a; fa-facebook',
190
+ 'fa-facebook-square' => '&#xf082; fa-facebook-square',
191
+ 'fa-fast-backward' => '&#xf049; fa-fast-backward',
192
+ 'fa-fast-forward' => '&#xf050; fa-fast-forward',
193
+ 'fa-fax' => '&#xf1ac; fa-fax',
194
+ 'fa-female' => '&#xf182; fa-female',
195
+ 'fa-fighter-jet' => '&#xf0fb; fa-fighter-jet',
196
+ 'fa-file' => '&#xf15b; fa-file',
197
+ 'fa-file-archive-o' => '&#xf1c6; fa-file-archive-o',
198
+ 'fa-file-audio-o' => '&#xf1c7; fa-file-audio-o',
199
+ 'fa-file-code-o' => '&#xf1c9; fa-file-code-o',
200
+ 'fa-file-excel-o' => '&#xf1c3; fa-file-excel-o',
201
+ 'fa-file-image-o' => '&#xf1c5; fa-file-image-o',
202
+ 'fa-file-movie-o' => '&#xf1c8; fa-file-movie-o',
203
+ 'fa-file-o' => '&#xf016; fa-file-o',
204
+ 'fa-file-pdf-o' => '&#xf1c1; fa-file-pdf-o',
205
+ 'fa-file-photo-o' => '&#xf1c5; fa-file-photo-o',
206
+ 'fa-file-picture-o' => '&#xf1c5; fa-file-picture-o',
207
+ 'fa-file-powerpoint-o' => '&#xf1c4; fa-file-powerpoint-o',
208
+ 'fa-file-sound-o' => '&#xf1c7; fa-file-sound-o',
209
+ 'fa-file-text' => '&#xf15c; fa-file-text',
210
+ 'fa-file-text-o' => '&#xf0f6; fa-file-text-o',
211
+ 'fa-file-video-o' => '&#xf1c8; fa-file-video-o',
212
+ 'fa-file-word-o' => '&#xf1c2; fa-file-word-o',
213
+ 'fa-file-zip-o' => '&#xf1c6; fa-file-zip-o',
214
+ 'fa-files-o' => '&#xf0c5; fa-files-o',
215
+ 'fa-film' => '&#xf008; fa-film',
216
+ 'fa-filter' => '&#xf0b0; fa-filter',
217
+ 'fa-fire' => '&#xf06d; fa-fire',
218
+ 'fa-fire-extinguisher' => '&#xf134; fa-fire-extinguisher',
219
+ 'fa-flag' => '&#xf024; fa-flag',
220
+ 'fa-flag-checkered' => '&#xf11e; fa-flag-checkered',
221
+ 'fa-flag-o' => '&#xf11d; fa-flag-o',
222
+ 'fa-flash' => '&#xf0e7; fa-flash',
223
+ 'fa-flask' => '&#xf0c3; fa-flask',
224
+ 'fa-flickr' => '&#xf16e; fa-flickr',
225
+ 'fa-floppy-o' => '&#xf0c7; fa-floppy-o',
226
+ 'fa-folder' => '&#xf07b; fa-folder',
227
+ 'fa-folder-o' => '&#xf114; fa-folder-o',
228
+ 'fa-folder-open' => '&#xf07c; fa-folder-open',
229
+ 'fa-folder-open-o' => '&#xf115; fa-folder-open-o',
230
+ 'fa-font' => '&#xf031; fa-font',
231
+ 'fa-forward' => '&#xf04e; fa-forward',
232
+ 'fa-foursquare' => '&#xf180; fa-foursquare',
233
+ 'fa-frown-o' => '&#xf119; fa-frown-o',
234
+ 'fa-gamepad' => '&#xf11b; fa-gamepad',
235
+ 'fa-gavel' => '&#xf0e3; fa-gavel',
236
+ 'fa-gbp' => '&#xf154; fa-gbp',
237
+ 'fa-ge' => '&#xf1d1; fa-ge',
238
+ 'fa-gear' => '&#xf013; fa-gear',
239
+ 'fa-gears' => '&#xf085; fa-gears',
240
+ 'fa-gift' => '&#xf06b; fa-gift',
241
+ 'fa-git' => '&#xf1d3; fa-git',
242
+ 'fa-git-square' => '&#xf1d2; fa-git-square',
243
+ 'fa-github' => '&#xf09b; fa-github',
244
+ 'fa-github-alt' => '&#xf113; fa-github-alt',
245
+ 'fa-github-square' => '&#xf092; fa-github-square',
246
+ 'fa-gittip' => '&#xf184; fa-gittip',
247
+ 'fa-glass' => '&#xf000; fa-glass',
248
+ 'fa-globe' => '&#xf0ac; fa-globe',
249
+ 'fa-google' => '&#xf1a0; fa-google',
250
+ 'fa-google-plus' => '&#xf0d5; fa-google-plus',
251
+ 'fa-google-plus-square' => '&#xf0d4; fa-google-plus-square',
252
+ 'fa-graduation-cap' => '&#xf19d; fa-graduation-cap',
253
+ 'fa-group' => '&#xf0c0; fa-group',
254
+ 'fa-h-square' => '&#xf0fd; fa-h-square',
255
+ 'fa-hacker-news' => '&#xf1d4; fa-hacker-news',
256
+ 'fa-hand-o-down' => '&#xf0a7; fa-hand-o-down',
257
+ 'fa-hand-o-left' => '&#xf0a5; fa-hand-o-left',
258
+ 'fa-hand-o-right' => '&#xf0a4; fa-hand-o-right',
259
+ 'fa-hand-o-up' => '&#xf0a6; fa-hand-o-up',
260
+ 'fa-hdd-o' => '&#xf0a0; fa-hdd-o',
261
+ 'fa-header' => '&#xf1dc; fa-header',
262
+ 'fa-headphones' => '&#xf025; fa-headphones',
263
+ 'fa-heart' => '&#xf004; fa-heart',
264
+ 'fa-heart-o' => '&#xf08a; fa-heart-o',
265
+ 'fa-history' => '&#xf1da; fa-history',
266
+ 'fa-home' => '&#xf015; fa-home',
267
+ 'fa-hospital-o' => '&#xf0f8; fa-hospital-o',
268
+ 'fa-html5' => '&#xf13b; fa-html5',
269
+ 'fa-image' => '&#xf03e; fa-image',
270
+ 'fa-inbox' => '&#xf01c; fa-inbox',
271
+ 'fa-indent' => '&#xf03c; fa-indent',
272
+ 'fa-info' => '&#xf129; fa-info',
273
+ 'fa-info-circle' => '&#xf05a; fa-info-circle',
274
+ 'fa-inr' => '&#xf156; fa-inr',
275
+ 'fa-instagram' => '&#xf16d; fa-instagram',
276
+ 'fa-institution' => '&#xf19c; fa-institution',
277
+ 'fa-italic' => '&#xf033; fa-italic',
278
+ 'fa-joomla' => '&#xf1aa; fa-joomla',
279
+ 'fa-jpy' => '&#xf157; fa-jpy',
280
+ 'fa-jsfiddle' => '&#xf1cc; fa-jsfiddle',
281
+ 'fa-key' => '&#xf084; fa-key',
282
+ 'fa-keyboard-o' => '&#xf11c; fa-keyboard-o',
283
+ 'fa-krw' => '&#xf159; fa-krw',
284
+ 'fa-language' => '&#xf1ab; fa-language',
285
+ 'fa-laptop' => '&#xf109; fa-laptop',
286
+ 'fa-leaf' => '&#xf06c; fa-leaf',
287
+ 'fa-legal' => '&#xf0e3; fa-legal',
288
+ 'fa-lemon-o' => '&#xf094; fa-lemon-o',
289
+ 'fa-level-down' => '&#xf149; fa-level-down',
290
+ 'fa-level-up' => '&#xf148; fa-level-up',
291
+ 'fa-life-bouy' => '&#xf1cd; fa-life-bouy',
292
+ 'fa-life-ring' => '&#xf1cd; fa-life-ring',
293
+ 'fa-life-saver' => '&#xf1cd; fa-life-saver',
294
+ 'fa-lightbulb-o' => '&#xf0eb; fa-lightbulb-o',
295
+ 'fa-link' => '&#xf0c1; fa-link',
296
+ 'fa-linkedin' => '&#xf0e1; fa-linkedin',
297
+ 'fa-linkedin-square' => '&#xf08c; fa-linkedin-square',
298
+ 'fa-linux' => '&#xf17c; fa-linux',
299
+ 'fa-list' => '&#xf03a; fa-list',
300
+ 'fa-list-alt' => '&#xf022; fa-list-alt',
301
+ 'fa-list-ol' => '&#xf0cb; fa-list-ol',
302
+ 'fa-list-ul' => '&#xf0ca; fa-list-ul',
303
+ 'fa-location-arrow' => '&#xf124; fa-location-arrow',
304
+ 'fa-lock' => '&#xf023; fa-lock',
305
+ 'fa-long-arrow-down' => '&#xf175; fa-long-arrow-down',
306
+ 'fa-long-arrow-left' => '&#xf177; fa-long-arrow-left',
307
+ 'fa-long-arrow-right' => '&#xf178; fa-long-arrow-right',
308
+ 'fa-long-arrow-up' => '&#xf176; fa-long-arrow-up',
309
+ 'fa-magic' => '&#xf0d0; fa-magic',
310
+ 'fa-magnet' => '&#xf076; fa-magnet',
311
+ 'fa-mail-forward' => '&#xf064; fa-mail-forward',
312
+ 'fa-mail-reply' => '&#xf112; fa-mail-reply',
313
+ 'fa-mail-reply-all' => '&#xf122; fa-mail-reply-all',
314
+ 'fa-male' => '&#xf183; fa-male',
315
+ 'fa-map-marker' => '&#xf041; fa-map-marker',
316
+ 'fa-maxcdn' => '&#xf136; fa-maxcdn',
317
+ 'fa-medkit' => '&#xf0fa; fa-medkit',
318
+ 'fa-meh-o' => '&#xf11a; fa-meh-o',
319
+ 'fa-microphone' => '&#xf130; fa-microphone',
320
+ 'fa-microphone-slash' => '&#xf131; fa-microphone-slash',
321
+ 'fa-minus' => '&#xf068; fa-minus',
322
+ 'fa-minus-circle' => '&#xf056; fa-minus-circle',
323
+ 'fa-minus-square' => '&#xf146; fa-minus-square',
324
+ 'fa-minus-square-o' => '&#xf147; fa-minus-square-o',
325
+ 'fa-mobile' => '&#xf10b; fa-mobile',
326
+ 'fa-mobile-phone' => '&#xf10b; fa-mobile-phone',
327
+ 'fa-money' => '&#xf0d6; fa-money',
328
+ 'fa-moon-o' => '&#xf186; fa-moon-o',
329
+ 'fa-mortar-board' => '&#xf19d; fa-mortar-board',
330
+ 'fa-music' => '&#xf001; fa-music',
331
+ 'fa-navicon' => '&#xf0c9; fa-navicon',
332
+ 'fa-openid' => '&#xf19b; fa-openid',
333
+ 'fa-outdent' => '&#xf03b; fa-outdent',
334
+ 'fa-pagelines' => '&#xf18c; fa-pagelines',
335
+ 'fa-paper-plane' => '&#xf1d8; fa-paper-plane',
336
+ 'fa-paper-plane-o' => '&#xf1d9; fa-paper-plane-o',
337
+ 'fa-paperclip' => '&#xf0c6; fa-paperclip',
338
+ 'fa-paragraph' => '&#xf1dd; fa-paragraph',
339
+ 'fa-paste' => '&#xf0ea; fa-paste',
340
+ 'fa-pause' => '&#xf04c; fa-pause',
341
+ 'fa-paw' => '&#xf1b0; fa-paw',
342
+ 'fa-pencil' => '&#xf040; fa-pencil',
343
+ 'fa-pencil-square' => '&#xf14b; fa-pencil-square',
344
+ 'fa-pencil-square-o' => '&#xf044; fa-pencil-square-o',
345
+ 'fa-phone' => '&#xf095; fa-phone',
346
+ 'fa-phone-square' => '&#xf098; fa-phone-square',
347
+ 'fa-photo' => '&#xf03e; fa-photo',
348
+ 'fa-picture-o' => '&#xf03e; fa-picture-o',
349
+ 'fa-pied-piper' => '&#xf1a7; fa-pied-piper',
350
+ 'fa-pied-piper-alt' => '&#xf1a8; fa-pied-piper-alt',
351
+ 'fa-pied-piper-square' => '&#xf1a7; fa-pied-piper-square',
352
+ 'fa-pinterest' => '&#xf0d2; fa-pinterest',
353
+ 'fa-pinterest-square' => '&#xf0d3; fa-pinterest-square',
354
+ 'fa-plane' => '&#xf072; fa-plane',
355
+ 'fa-play' => '&#xf04b; fa-play',
356
+ 'fa-play-circle' => '&#xf144; fa-play-circle',
357
+ 'fa-play-circle-o' => '&#xf01d; fa-play-circle-o',
358
+ 'fa-plus' => '&#xf067; fa-plus',
359
+ 'fa-plus-circle' => '&#xf055; fa-plus-circle',
360
+ 'fa-plus-square' => '&#xf0fe; fa-plus-square',
361
+ 'fa-plus-square-o' => '&#xf196; fa-plus-square-o',
362
+ 'fa-power-off' => '&#xf011; fa-power-off',
363
+ 'fa-print' => '&#xf02f; fa-print',
364
+ 'fa-puzzle-piece' => '&#xf12e; fa-puzzle-piece',
365
+ 'fa-qq' => '&#xf1d6; fa-qq',
366
+ 'fa-qrcode' => '&#xf029; fa-qrcode',
367
+ 'fa-question' => '&#xf128; fa-question',
368
+ 'fa-question-circle' => '&#xf059; fa-question-circle',
369
+ 'fa-quote-left' => '&#xf10d; fa-quote-left',
370
+ 'fa-quote-right' => '&#xf10e; fa-quote-right',
371
+ 'fa-ra' => '&#xf1d0; fa-ra',
372
+ 'fa-random' => '&#xf074; fa-random',
373
+ 'fa-rebel' => '&#xf1d0; fa-rebel',
374
+ 'fa-recycle' => '&#xf1b8; fa-recycle',
375
+ 'fa-reddit' => '&#xf1a1; fa-reddit',
376
+ 'fa-reddit-square' => '&#xf1a2; fa-reddit-square',
377
+ 'fa-refresh' => '&#xf021; fa-refresh',
378
+ 'fa-renren' => '&#xf18b; fa-renren',
379
+ 'fa-reorder' => '&#xf0c9; fa-reorder',
380
+ 'fa-repeat' => '&#xf01e; fa-repeat',
381
+ 'fa-reply' => '&#xf112; fa-reply',
382
+ 'fa-reply-all' => '&#xf122; fa-reply-all',
383
+ 'fa-retweet' => '&#xf079; fa-retweet',
384
+ 'fa-rmb' => '&#xf157; fa-rmb',
385
+ 'fa-road' => '&#xf018; fa-road',
386
+ 'fa-rocket' => '&#xf135; fa-rocket',
387
+ 'fa-rotate-left' => '&#xf0e2; fa-rotate-left',
388
+ 'fa-rotate-right' => '&#xf01e; fa-rotate-right',
389
+ 'fa-rouble' => '&#xf158; fa-rouble',
390
+ 'fa-rss' => '&#xf09e; fa-rss',
391
+ 'fa-rss-square' => '&#xf143; fa-rss-square',
392
+ 'fa-rub' => '&#xf158; fa-rub',
393
+ 'fa-ruble' => '&#xf158; fa-ruble',
394
+ 'fa-rupee' => '&#xf156; fa-rupee',
395
+ 'fa-save' => '&#xf0c7; fa-save',
396
+ 'fa-scissors' => '&#xf0c4; fa-scissors',
397
+ 'fa-search' => '&#xf002; fa-search',
398
+ 'fa-search-minus' => '&#xf010; fa-search-minus',
399
+ 'fa-search-plus' => '&#xf00e; fa-search-plus',
400
+ 'fa-send' => '&#xf1d8; fa-send',
401
+ 'fa-send-o' => '&#xf1d9; fa-send-o',
402
+ 'fa-share' => '&#xf064; fa-share',
403
+ 'fa-share-alt' => '&#xf1e0; fa-share-alt',
404
+ 'fa-share-alt-square' => '&#xf1e1; fa-share-alt-square',
405
+ 'fa-share-square' => '&#xf14d; fa-share-square',
406
+ 'fa-share-square-o' => '&#xf045; fa-share-square-o',
407
+ 'fa-shield' => '&#xf132; fa-shield',
408
+ 'fa-shopping-cart' => '&#xf07a; fa-shopping-cart',
409
+ 'fa-sign-in' => '&#xf090; fa-sign-in',
410
+ 'fa-sign-out' => '&#xf08b; fa-sign-out',
411
+ 'fa-signal' => '&#xf012; fa-signal',
412
+ 'fa-sitemap' => '&#xf0e8; fa-sitemap',
413
+ 'fa-skype' => '&#xf17e; fa-skype',
414
+ 'fa-slack' => '&#xf198; fa-slack',
415
+ 'fa-sliders' => '&#xf1de; fa-sliders',
416
+ 'fa-smile-o' => '&#xf118; fa-smile-o',
417
+ 'fa-sort' => '&#xf0dc; fa-sort',
418
+ 'fa-sort-alpha-asc' => '&#xf15d; fa-sort-alpha-asc',
419
+ 'fa-sort-alpha-desc' => '&#xf15e; fa-sort-alpha-desc',
420
+ 'fa-sort-amount-asc' => '&#xf160; fa-sort-amount-asc',
421
+ 'fa-sort-amount-desc' => '&#xf161; fa-sort-amount-desc',
422
+ 'fa-sort-asc' => '&#xf0de; fa-sort-asc',
423
+ 'fa-sort-desc' => '&#xf0dd; fa-sort-desc',
424
+ 'fa-sort-down' => '&#xf0dd; fa-sort-down',
425
+ 'fa-sort-numeric-asc' => '&#xf162; fa-sort-numeric-asc',
426
+ 'fa-sort-numeric-desc' => '&#xf163; fa-sort-numeric-desc',
427
+ 'fa-sort-up' => '&#xf0de; fa-sort-up',
428
+ 'fa-soundcloud' => '&#xf1be; fa-soundcloud',
429
+ 'fa-space-shuttle' => '&#xf197; fa-space-shuttle',
430
+ 'fa-spinner' => '&#xf110; fa-spinner',
431
+ 'fa-spoon' => '&#xf1b1; fa-spoon',
432
+ 'fa-spotify' => '&#xf1bc; fa-spotify',
433
+ 'fa-square' => '&#xf0c8; fa-square',
434
+ 'fa-square-o' => '&#xf096; fa-square-o',
435
+ 'fa-stack-exchange' => '&#xf18d; fa-stack-exchange',
436
+ 'fa-stack-overflow' => '&#xf16c; fa-stack-overflow',
437
+ 'fa-star' => '&#xf005; fa-star',
438
+ 'fa-star-half' => '&#xf089; fa-star-half',
439
+ 'fa-star-half-empty' => '&#xf123; fa-star-half-empty',
440
+ 'fa-star-half-full' => '&#xf123; fa-star-half-full',
441
+ 'fa-star-half-o' => '&#xf123; fa-star-half-o',
442
+ 'fa-star-o' => '&#xf006; fa-star-o',
443
+ 'fa-steam' => '&#xf1b6; fa-steam',
444
+ 'fa-steam-square' => '&#xf1b7; fa-steam-square',
445
+ 'fa-step-backward' => '&#xf048; fa-step-backward',
446
+ 'fa-step-forward' => '&#xf051; fa-step-forward',
447
+ 'fa-stethoscope' => '&#xf0f1; fa-stethoscope',
448
+ 'fa-stop' => '&#xf04d; fa-stop',
449
+ 'fa-strikethrough' => '&#xf0cc; fa-strikethrough',
450
+ 'fa-stumbleupon' => '&#xf1a4; fa-stumbleupon',
451
+ 'fa-stumbleupon-circle' => '&#xf1a3; fa-stumbleupon-circle',
452
+ 'fa-subscript' => '&#xf12c; fa-subscript',
453
+ 'fa-suitcase' => '&#xf0f2; fa-suitcase',
454
+ 'fa-sun-o' => '&#xf185; fa-sun-o',
455
+ 'fa-superscript' => '&#xf12b; fa-superscript',
456
+ 'fa-support' => '&#xf1cd; fa-support',
457
+ 'fa-table' => '&#xf0ce; fa-table',
458
+ 'fa-tablet' => '&#xf10a; fa-tablet',
459
+ 'fa-tachometer' => '&#xf0e4; fa-tachometer',
460
+ 'fa-tag' => '&#xf02b; fa-tag',
461
+ 'fa-tags' => '&#xf02c; fa-tags',
462
+ 'fa-tasks' => '&#xf0ae; fa-tasks',
463
+ 'fa-taxi' => '&#xf1ba; fa-taxi',
464
+ 'fa-tencent-weibo' => '&#xf1d5; fa-tencent-weibo',
465
+ 'fa-terminal' => '&#xf120; fa-terminal',
466
+ 'fa-text-height' => '&#xf034; fa-text-height',
467
+ 'fa-text-width' => '&#xf035; fa-text-width',
468
+ 'fa-th' => '&#xf00a; fa-th',
469
+ 'fa-th-large' => '&#xf009; fa-th-large',
470
+ 'fa-th-list' => '&#xf00b; fa-th-list',
471
+ 'fa-thumb-tack' => '&#xf08d; fa-thumb-tack',
472
+ 'fa-thumbs-down' => '&#xf165; fa-thumbs-down',
473
+ 'fa-thumbs-o-down' => '&#xf088; fa-thumbs-o-down',
474
+ 'fa-thumbs-o-up' => '&#xf087; fa-thumbs-o-up',
475
+ 'fa-thumbs-up' => '&#xf164; fa-thumbs-up',
476
+ 'fa-ticket' => '&#xf145; fa-ticket',
477
+ 'fa-times' => '&#xf00d; fa-times',
478
+ 'fa-times-circle' => '&#xf057; fa-times-circle',
479
+ 'fa-times-circle-o' => '&#xf05c; fa-times-circle-o',
480
+ 'fa-tint' => '&#xf043; fa-tint',
481
+ 'fa-toggle-down' => '&#xf150; fa-toggle-down',
482
+ 'fa-toggle-left' => '&#xf191; fa-toggle-left',
483
+ 'fa-toggle-right' => '&#xf152; fa-toggle-right',
484
+ 'fa-toggle-up' => '&#xf151; fa-toggle-up',
485
+ 'fa-trash-o' => '&#xf014; fa-trash-o',
486
+ 'fa-tree' => '&#xf1bb; fa-tree',
487
+ 'fa-trello' => '&#xf181; fa-trello',
488
+ 'fa-trophy' => '&#xf091; fa-trophy',
489
+ 'fa-truck' => '&#xf0d1; fa-truck',
490
+ 'fa-try' => '&#xf195; fa-try',
491
+ 'fa-tumblr' => '&#xf173; fa-tumblr',
492
+ 'fa-tumblr-square' => '&#xf174; fa-tumblr-square',
493
+ 'fa-turkish-lira' => '&#xf195; fa-turkish-lira',
494
+ 'fa-twitter' => '&#xf099; fa-twitter',
495
+ 'fa-twitter-square' => '&#xf081; fa-twitter-square',
496
+ 'fa-umbrella' => '&#xf0e9; fa-umbrella',
497
+ 'fa-underline' => '&#xf0cd; fa-underline',
498
+ 'fa-undo' => '&#xf0e2; fa-undo',
499
+ 'fa-university' => '&#xf19c; fa-university',
500
+ 'fa-unlink' => '&#xf127; fa-unlink',
501
+ 'fa-unlock' => '&#xf09c; fa-unlock',
502
+ 'fa-unlock-alt' => '&#xf13e; fa-unlock-alt',
503
+ 'fa-unsorted' => '&#xf0dc; fa-unsorted',
504
+ 'fa-upload' => '&#xf093; fa-upload',
505
+ 'fa-usd' => '&#xf155; fa-usd',
506
+ 'fa-user' => '&#xf007; fa-user',
507
+ 'fa-user-md' => '&#xf0f0; fa-user-md',
508
+ 'fa-users' => '&#xf0c0; fa-users',
509
+ 'fa-video-camera' => '&#xf03d; fa-video-camera',
510
+ 'fa-vimeo-square' => '&#xf194; fa-vimeo-square',
511
+ 'fa-vine' => '&#xf1ca; fa-vine',
512
+ 'fa-vk' => '&#xf189; fa-vk',
513
+ 'fa-volume-down' => '&#xf027; fa-volume-down',
514
+ 'fa-volume-off' => '&#xf026; fa-volume-off',
515
+ 'fa-volume-up' => '&#xf028; fa-volume-up',
516
+ 'fa-warning' => '&#xf071; fa-warning',
517
+ 'fa-wechat' => '&#xf1d7; fa-wechat',
518
+ 'fa-weibo' => '&#xf18a; fa-weibo',
519
+ 'fa-weixin' => '&#xf1d7; fa-weixin',
520
+ 'fa-wheelchair' => '&#xf193; fa-wheelchair',
521
+ 'fa-windows' => '&#xf17a; fa-windows',
522
+ 'fa-won' => '&#xf159; fa-won',
523
+ 'fa-wordpress' => '&#xf19a; fa-wordpress',
524
+ 'fa-wrench' => '&#xf0ad; fa-wrench',
525
+ 'fa-xing' => '&#xf168; fa-xing',
526
+ 'fa-xing-square' => '&#xf169; fa-xing-square',
527
+ 'fa-yahoo' => '&#xf19e; fa-yahoo',
528
+ 'fa-yen' => '&#xf157; fa-yen',
529
+ 'fa-youtube' => '&#xf167; fa-youtube',
530
+ 'fa-youtube-play' => '&#xf16a; fa-youtube-play',
531
+ 'fa-youtube-square' => '&#xf166; 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' => '&#xf042; fa-adjust',
32
+ 'fa-adn' => '&#xf170; fa-adn',
33
+ 'fa-align-center' => '&#xf037; fa-align-center',
34
+ 'fa-align-justify' => '&#xf039; fa-align-justify',
35
+ 'fa-align-left' => '&#xf036; fa-align-left',
36
+ 'fa-align-right' => '&#xf038; fa-align-right',
37
+ 'fa-ambulance' => '&#xf0f9; fa-ambulance',
38
+ 'fa-anchor' => '&#xf13d; fa-anchor',
39
+ 'fa-android' => '&#xf17b; fa-android',
40
+ 'fa-angle-double-down' => '&#xf103; fa-angle-double-down',
41
+ 'fa-angle-double-left' => '&#xf100; fa-angle-double-left',
42
+ 'fa-angle-double-right' => '&#xf101; fa-angle-double-right',
43
+ 'fa-angle-double-up' => '&#xf102; fa-angle-double-up',
44
+ 'fa-angle-down' => '&#xf107; fa-angle-down',
45
+ 'fa-angle-left' => '&#xf104; fa-angle-left',
46
+ 'fa-angle-right' => '&#xf105; fa-angle-right',
47
+ 'fa-angle-up' => '&#xf106; fa-angle-up',
48
+ 'fa-apple' => '&#xf179; fa-apple',
49
+ 'fa-archive' => '&#xf187; fa-archive',
50
+ 'fa-arrow-circle-down' => '&#xf0ab; fa-arrow-circle-down',
51
+ 'fa-arrow-circle-left' => '&#xf0a8; fa-arrow-circle-left',
52
+ 'fa-arrow-circle-o-down' => '&#xf01a; fa-arrow-circle-o-down',
53
+ 'fa-arrow-circle-o-left' => '&#xf190; fa-arrow-circle-o-left',
54
+ 'fa-arrow-circle-o-right' => '&#xf18e; fa-arrow-circle-o-right',
55
+ 'fa-arrow-circle-o-up' => '&#xf01b; fa-arrow-circle-o-up',
56
+ 'fa-arrow-circle-right' => '&#xf0a9; fa-arrow-circle-right',
57
+ 'fa-arrow-circle-up' => '&#xf0aa; fa-arrow-circle-up',
58
+ 'fa-arrow-down' => '&#xf063; fa-arrow-down',
59
+ 'fa-arrow-left' => '&#xf060; fa-arrow-left',
60
+ 'fa-arrow-right' => '&#xf061; fa-arrow-right',
61
+ 'fa-arrow-up' => '&#xf062; fa-arrow-up',
62
+ 'fa-arrows' => '&#xf047; fa-arrows',
63
+ 'fa-arrows-alt' => '&#xf0b2; fa-arrows-alt',
64
+ 'fa-arrows-h' => '&#xf07e; fa-arrows-h',
65
+ 'fa-arrows-v' => '&#xf07d; fa-arrows-v',
66
+ 'fa-asterisk' => '&#xf069; fa-asterisk',
67
+ 'fa-automobile' => '&#xf1b9; fa-automobile',
68
+ 'fa-backward' => '&#xf04a; fa-backward',
69
+ 'fa-ban' => '&#xf05e; fa-ban',
70
+ 'fa-bank' => '&#xf19c; fa-bank',
71
+ 'fa-bar-chart-o' => '&#xf080; fa-bar-chart-o',
72
+ 'fa-barcode' => '&#xf02a; fa-barcode',
73
+ 'fa-bars' => '&#xf0c9; fa-bars',
74
+ 'fa-beer' => '&#xf0fc; fa-beer',
75
+ 'fa-behance' => '&#xf1b4; fa-behance',
76
+ 'fa-behance-square' => '&#xf1b5; fa-behance-square',
77
+ 'fa-bell' => '&#xf0f3; fa-bell',
78
+ 'fa-bell-o' => '&#xf0a2; fa-bell-o',
79
+ 'fa-bitbucket' => '&#xf171; fa-bitbucket',
80
+ 'fa-bitbucket-square' => '&#xf172; fa-bitbucket-square',
81
+ 'fa-bitcoin' => '&#xf15a; fa-bitcoin',
82
+ 'fa-bold' => '&#xf032; fa-bold',
83
+ 'fa-bolt' => '&#xf0e7; fa-bolt',
84
+ 'fa-bomb' => '&#xf1e2; fa-bomb',
85
+ 'fa-book' => '&#xf02d; fa-book',
86
+ 'fa-bookmark' => '&#xf02e; fa-bookmark',
87
+ 'fa-bookmark-o' => '&#xf097; fa-bookmark-o',
88
+ 'fa-briefcase' => '&#xf0b1; fa-briefcase',
89
+ 'fa-btc' => '&#xf15a; fa-btc',
90
+ 'fa-bug' => '&#xf188; fa-bug',
91
+ 'fa-building' => '&#xf1ad; fa-building',
92
+ 'fa-building-o' => '&#xf0f7; fa-building-o',
93
+ 'fa-bullhorn' => '&#xf0a1; fa-bullhorn',
94
+ 'fa-bullseye' => '&#xf140; fa-bullseye',
95
+ 'fa-cab' => '&#xf1ba; fa-cab',
96
+ 'fa-calendar' => '&#xf073; fa-calendar',
97
+ 'fa-calendar-o' => '&#xf133; fa-calendar-o',
98
+ 'fa-camera' => '&#xf030; fa-camera',
99
+ 'fa-camera-retro' => '&#xf083; fa-camera-retro',
100
+ 'fa-car' => '&#xf1b9; fa-car',
101
+ 'fa-caret-down' => '&#xf0d7; fa-caret-down',
102
+ 'fa-caret-left' => '&#xf0d9; fa-caret-left',
103
+ 'fa-caret-right' => '&#xf0da; fa-caret-right',
104
+ 'fa-caret-square-o-down' => '&#xf150; fa-caret-square-o-down',
105
+ 'fa-caret-square-o-left' => '&#xf191; fa-caret-square-o-left',
106
+ 'fa-caret-square-o-right' => '&#xf152; fa-caret-square-o-right',
107
+ 'fa-caret-square-o-up' => '&#xf151; fa-caret-square-o-up',
108
+ 'fa-caret-up' => '&#xf0d8; fa-caret-up',
109
+ 'fa-certificate' => '&#xf0a3; fa-certificate',
110
+ 'fa-chain' => '&#xf0c1; fa-chain',
111
+ 'fa-chain-broken' => '&#xf127; fa-chain-broken',
112
+ 'fa-check' => '&#xf00c; fa-check',
113
+ 'fa-check-circle' => '&#xf058; fa-check-circle',
114
+ 'fa-check-circle-o' => '&#xf05d; fa-check-circle-o',
115
+ 'fa-check-square' => '&#xf14a; fa-check-square',
116
+ 'fa-check-square-o' => '&#xf046; fa-check-square-o',
117
+ 'fa-chevron-circle-down' => '&#xf13a; fa-chevron-circle-down',
118
+ 'fa-chevron-circle-left' => '&#xf137; fa-chevron-circle-left',
119
+ 'fa-chevron-circle-right' => '&#xf138; fa-chevron-circle-right',
120
+ 'fa-chevron-circle-up' => '&#xf139; fa-chevron-circle-up',
121
+ 'fa-chevron-down' => '&#xf078; fa-chevron-down',
122
+ 'fa-chevron-left' => '&#xf053; fa-chevron-left',
123
+ 'fa-chevron-right' => '&#xf054; fa-chevron-right',
124
+ 'fa-chevron-up' => '&#xf077; fa-chevron-up',
125
+ 'fa-child' => '&#xf1ae; fa-child',
126
+ 'fa-circle' => '&#xf111; fa-circle',
127
+ 'fa-circle-o' => '&#xf10c; fa-circle-o',
128
+ 'fa-circle-o-notch' => '&#xf1ce; fa-circle-o-notch',
129
+ 'fa-circle-thin' => '&#xf1db; fa-circle-thin',
130
+ 'fa-clipboard' => '&#xf0ea; fa-clipboard',
131
+ 'fa-clock-o' => '&#xf017; fa-clock-o',
132
+ 'fa-cloud' => '&#xf0c2; fa-cloud',
133
+ 'fa-cloud-download' => '&#xf0ed; fa-cloud-download',
134
+ 'fa-cloud-upload' => '&#xf0ee; fa-cloud-upload',
135
+ 'fa-cny' => '&#xf157; fa-cny',
136
+ 'fa-code' => '&#xf121; fa-code',
137
+ 'fa-code-fork' => '&#xf126; fa-code-fork',
138
+ 'fa-codepen' => '&#xf1cb; fa-codepen',
139
+ 'fa-coffee' => '&#xf0f4; fa-coffee',
140
+ 'fa-cog' => '&#xf013; fa-cog',
141
+ 'fa-cogs' => '&#xf085; fa-cogs',
142
+ 'fa-columns' => '&#xf0db; fa-columns',
143
+ 'fa-comment' => '&#xf075; fa-comment',
144
+ 'fa-comment-o' => '&#xf0e5; fa-comment-o',
145
+ 'fa-comments' => '&#xf086; fa-comments',
146
+ 'fa-comments-o' => '&#xf0e6; fa-comments-o',
147
+ 'fa-compass' => '&#xf14e; fa-compass',
148
+ 'fa-compress' => '&#xf066; fa-compress',
149
+ 'fa-copy' => '&#xf0c5; fa-copy',
150
+ 'fa-credit-card' => '&#xf09d; fa-credit-card',
151
+ 'fa-crop' => '&#xf125; fa-crop',
152
+ 'fa-crosshairs' => '&#xf05b; fa-crosshairs',
153
+ 'fa-css3' => '&#xf13c; fa-css3',
154
+ 'fa-cube' => '&#xf1b2; fa-cube',
155
+ 'fa-cubes' => '&#xf1b3; fa-cubes',
156
+ 'fa-cut' => '&#xf0c4; fa-cut',
157
+ 'fa-cutlery' => '&#xf0f5; fa-cutlery',
158
+ 'fa-dashboard' => '&#xf0e4; fa-dashboard',
159
+ 'fa-database' => '&#xf1c0; fa-database',
160
+ 'fa-dedent' => '&#xf03b; fa-dedent',
161
+ 'fa-delicious' => '&#xf1a5; fa-delicious',
162
+ 'fa-desktop' => '&#xf108; fa-desktop',
163
+ 'fa-deviantart' => '&#xf1bd; fa-deviantart',
164
+ 'fa-digg' => '&#xf1a6; fa-digg',
165
+ 'fa-dollar' => '&#xf155; fa-dollar',
166
+ 'fa-dot-circle-o' => '&#xf192; fa-dot-circle-o',
167
+ 'fa-download' => '&#xf019; fa-download',
168
+ 'fa-dribbble' => '&#xf17d; fa-dribbble',
169
+ 'fa-dropbox' => '&#xf16b; fa-dropbox',
170
+ 'fa-drupal' => '&#xf1a9; fa-drupal',
171
+ 'fa-edit' => '&#xf044; fa-edit',
172
+ 'fa-eject' => '&#xf052; fa-eject',
173
+ 'fa-ellipsis-h' => '&#xf141; fa-ellipsis-h',
174
+ 'fa-ellipsis-v' => '&#xf142; fa-ellipsis-v',
175
+ 'fa-empire' => '&#xf1d1; fa-empire',
176
+ 'fa-envelope' => '&#xf0e0; fa-envelope',
177
+ 'fa-envelope-o' => '&#xf003; fa-envelope-o',
178
+ 'fa-envelope-square' => '&#xf199; fa-envelope-square',
179
+ 'fa-eraser' => '&#xf12d; fa-eraser',
180
+ 'fa-eur' => '&#xf153; fa-eur',
181
+ 'fa-euro' => '&#xf153; fa-euro',
182
+ 'fa-exchange' => '&#xf0ec; fa-exchange',
183
+ 'fa-exclamation' => '&#xf12a; fa-exclamation',
184
+ 'fa-exclamation-circle' => '&#xf06a; fa-exclamation-circle',
185
+ 'fa-exclamation-triangle' => '&#xf071; fa-exclamation-triangle',
186
+ 'fa-expand' => '&#xf065; fa-expand',
187
+ 'fa-external-link' => '&#xf08e; fa-external-link',
188
+ 'fa-external-link-square' => '&#xf14c; fa-external-link-square',
189
+ 'fa-eye' => '&#xf06e; fa-eye',
190
+ 'fa-eye-slash' => '&#xf070; fa-eye-slash',
191
+ 'fa-facebook' => '&#xf09a; fa-facebook',
192
+ 'fa-facebook-square' => '&#xf082; fa-facebook-square',
193
+ 'fa-fast-backward' => '&#xf049; fa-fast-backward',
194
+ 'fa-fast-forward' => '&#xf050; fa-fast-forward',
195
+ 'fa-fax' => '&#xf1ac; fa-fax',
196
+ 'fa-female' => '&#xf182; fa-female',
197
+ 'fa-fighter-jet' => '&#xf0fb; fa-fighter-jet',
198
+ 'fa-file' => '&#xf15b; fa-file',
199
+ 'fa-file-archive-o' => '&#xf1c6; fa-file-archive-o',
200
+ 'fa-file-audio-o' => '&#xf1c7; fa-file-audio-o',
201
+ 'fa-file-code-o' => '&#xf1c9; fa-file-code-o',
202
+ 'fa-file-excel-o' => '&#xf1c3; fa-file-excel-o',
203
+ 'fa-file-image-o' => '&#xf1c5; fa-file-image-o',
204
+ 'fa-file-movie-o' => '&#xf1c8; fa-file-movie-o',
205
+ 'fa-file-o' => '&#xf016; fa-file-o',
206
+ 'fa-file-pdf-o' => '&#xf1c1; fa-file-pdf-o',
207
+ 'fa-file-photo-o' => '&#xf1c5; fa-file-photo-o',
208
+ 'fa-file-picture-o' => '&#xf1c5; fa-file-picture-o',
209
+ 'fa-file-powerpoint-o' => '&#xf1c4; fa-file-powerpoint-o',
210
+ 'fa-file-sound-o' => '&#xf1c7; fa-file-sound-o',
211
+ 'fa-file-text' => '&#xf15c; fa-file-text',
212
+ 'fa-file-text-o' => '&#xf0f6; fa-file-text-o',
213
+ 'fa-file-video-o' => '&#xf1c8; fa-file-video-o',
214
+ 'fa-file-word-o' => '&#xf1c2; fa-file-word-o',
215
+ 'fa-file-zip-o' => '&#xf1c6; fa-file-zip-o',
216
+ 'fa-files-o' => '&#xf0c5; fa-files-o',
217
+ 'fa-film' => '&#xf008; fa-film',
218
+ 'fa-filter' => '&#xf0b0; fa-filter',
219
+ 'fa-fire' => '&#xf06d; fa-fire',
220
+ 'fa-fire-extinguisher' => '&#xf134; fa-fire-extinguisher',
221
+ 'fa-flag' => '&#xf024; fa-flag',
222
+ 'fa-flag-checkered' => '&#xf11e; fa-flag-checkered',
223
+ 'fa-flag-o' => '&#xf11d; fa-flag-o',
224
+ 'fa-flash' => '&#xf0e7; fa-flash',
225
+ 'fa-flask' => '&#xf0c3; fa-flask',
226
+ 'fa-flickr' => '&#xf16e; fa-flickr',
227
+ 'fa-floppy-o' => '&#xf0c7; fa-floppy-o',
228
+ 'fa-folder' => '&#xf07b; fa-folder',
229
+ 'fa-folder-o' => '&#xf114; fa-folder-o',
230
+ 'fa-folder-open' => '&#xf07c; fa-folder-open',
231
+ 'fa-folder-open-o' => '&#xf115; fa-folder-open-o',
232
+ 'fa-font' => '&#xf031; fa-font',
233
+ 'fa-forward' => '&#xf04e; fa-forward',
234
+ 'fa-foursquare' => '&#xf180; fa-foursquare',
235
+ 'fa-frown-o' => '&#xf119; fa-frown-o',
236
+ 'fa-gamepad' => '&#xf11b; fa-gamepad',
237
+ 'fa-gavel' => '&#xf0e3; fa-gavel',
238
+ 'fa-gbp' => '&#xf154; fa-gbp',
239
+ 'fa-ge' => '&#xf1d1; fa-ge',
240
+ 'fa-gear' => '&#xf013; fa-gear',
241
+ 'fa-gears' => '&#xf085; fa-gears',
242
+ 'fa-gift' => '&#xf06b; fa-gift',
243
+ 'fa-git' => '&#xf1d3; fa-git',
244
+ 'fa-git-square' => '&#xf1d2; fa-git-square',
245
+ 'fa-github' => '&#xf09b; fa-github',
246
+ 'fa-github-alt' => '&#xf113; fa-github-alt',
247
+ 'fa-github-square' => '&#xf092; fa-github-square',
248
+ 'fa-gittip' => '&#xf184; fa-gittip',
249
+ 'fa-glass' => '&#xf000; fa-glass',
250
+ 'fa-globe' => '&#xf0ac; fa-globe',
251
+ 'fa-google' => '&#xf1a0; fa-google',
252
+ 'fa-google-plus' => '&#xf0d5; fa-google-plus',
253
+ 'fa-google-plus-square' => '&#xf0d4; fa-google-plus-square',
254
+ 'fa-graduation-cap' => '&#xf19d; fa-graduation-cap',
255
+ 'fa-group' => '&#xf0c0; fa-group',
256
+ 'fa-h-square' => '&#xf0fd; fa-h-square',
257
+ 'fa-hacker-news' => '&#xf1d4; fa-hacker-news',
258
+ 'fa-hand-o-down' => '&#xf0a7; fa-hand-o-down',
259
+ 'fa-hand-o-left' => '&#xf0a5; fa-hand-o-left',
260
+ 'fa-hand-o-right' => '&#xf0a4; fa-hand-o-right',
261
+ 'fa-hand-o-up' => '&#xf0a6; fa-hand-o-up',
262
+ 'fa-hdd-o' => '&#xf0a0; fa-hdd-o',
263
+ 'fa-header' => '&#xf1dc; fa-header',
264
+ 'fa-headphones' => '&#xf025; fa-headphones',
265
+ 'fa-heart' => '&#xf004; fa-heart',
266
+ 'fa-heart-o' => '&#xf08a; fa-heart-o',
267
+ 'fa-history' => '&#xf1da; fa-history',
268
+ 'fa-home' => '&#xf015; fa-home',
269
+ 'fa-hospital-o' => '&#xf0f8; fa-hospital-o',
270
+ 'fa-html5' => '&#xf13b; fa-html5',
271
+ 'fa-image' => '&#xf03e; fa-image',
272
+ 'fa-inbox' => '&#xf01c; fa-inbox',
273
+ 'fa-indent' => '&#xf03c; fa-indent',
274
+ 'fa-info' => '&#xf129; fa-info',
275
+ 'fa-info-circle' => '&#xf05a; fa-info-circle',
276
+ 'fa-inr' => '&#xf156; fa-inr',
277
+ 'fa-instagram' => '&#xf16d; fa-instagram',
278
+ 'fa-institution' => '&#xf19c; fa-institution',
279
+ 'fa-italic' => '&#xf033; fa-italic',
280
+ 'fa-joomla' => '&#xf1aa; fa-joomla',
281
+ 'fa-jpy' => '&#xf157; fa-jpy',
282
+ 'fa-jsfiddle' => '&#xf1cc; fa-jsfiddle',
283
+ 'fa-key' => '&#xf084; fa-key',
284
+ 'fa-keyboard-o' => '&#xf11c; fa-keyboard-o',
285
+ 'fa-krw' => '&#xf159; fa-krw',
286
+ 'fa-language' => '&#xf1ab; fa-language',
287
+ 'fa-laptop' => '&#xf109; fa-laptop',
288
+ 'fa-leaf' => '&#xf06c; fa-leaf',
289
+ 'fa-legal' => '&#xf0e3; fa-legal',
290
+ 'fa-lemon-o' => '&#xf094; fa-lemon-o',
291
+ 'fa-level-down' => '&#xf149; fa-level-down',
292
+ 'fa-level-up' => '&#xf148; fa-level-up',
293
+ 'fa-life-bouy' => '&#xf1cd; fa-life-bouy',
294
+ 'fa-life-ring' => '&#xf1cd; fa-life-ring',
295
+ 'fa-life-saver' => '&#xf1cd; fa-life-saver',
296
+ 'fa-lightbulb-o' => '&#xf0eb; fa-lightbulb-o',
297
+ 'fa-link' => '&#xf0c1; fa-link',
298
+ 'fa-linkedin' => '&#xf0e1; fa-linkedin',
299
+ 'fa-linkedin-square' => '&#xf08c; fa-linkedin-square',
300
+ 'fa-linux' => '&#xf17c; fa-linux',
301
+ 'fa-list' => '&#xf03a; fa-list',
302
+ 'fa-list-alt' => '&#xf022; fa-list-alt',
303
+ 'fa-list-ol' => '&#xf0cb; fa-list-ol',
304
+ 'fa-list-ul' => '&#xf0ca; fa-list-ul',
305
+ 'fa-location-arrow' => '&#xf124; fa-location-arrow',
306
+ 'fa-lock' => '&#xf023; fa-lock',
307
+ 'fa-long-arrow-down' => '&#xf175; fa-long-arrow-down',
308
+ 'fa-long-arrow-left' => '&#xf177; fa-long-arrow-left',
309
+ 'fa-long-arrow-right' => '&#xf178; fa-long-arrow-right',
310
+ 'fa-long-arrow-up' => '&#xf176; fa-long-arrow-up',
311
+ 'fa-magic' => '&#xf0d0; fa-magic',
312
+ 'fa-magnet' => '&#xf076; fa-magnet',
313
+ 'fa-mail-forward' => '&#xf064; fa-mail-forward',
314
+ 'fa-mail-reply' => '&#xf112; fa-mail-reply',
315
+ 'fa-mail-reply-all' => '&#xf122; fa-mail-reply-all',
316
+ 'fa-male' => '&#xf183; fa-male',
317
+ 'fa-map-marker' => '&#xf041; fa-map-marker',
318
+ 'fa-maxcdn' => '&#xf136; fa-maxcdn',
319
+ 'fa-medkit' => '&#xf0fa; fa-medkit',
320
+ 'fa-meh-o' => '&#xf11a; fa-meh-o',
321
+ 'fa-microphone' => '&#xf130; fa-microphone',
322
+ 'fa-microphone-slash' => '&#xf131; fa-microphone-slash',
323
+ 'fa-minus' => '&#xf068; fa-minus',
324
+ 'fa-minus-circle' => '&#xf056; fa-minus-circle',
325
+ 'fa-minus-square' => '&#xf146; fa-minus-square',
326
+ 'fa-minus-square-o' => '&#xf147; fa-minus-square-o',
327
+ 'fa-mobile' => '&#xf10b; fa-mobile',
328
+ 'fa-mobile-phone' => '&#xf10b; fa-mobile-phone',
329
+ 'fa-money' => '&#xf0d6; fa-money',
330
+ 'fa-moon-o' => '&#xf186; fa-moon-o',
331
+ 'fa-mortar-board' => '&#xf19d; fa-mortar-board',
332
+ 'fa-music' => '&#xf001; fa-music',
333
+ 'fa-navicon' => '&#xf0c9; fa-navicon',
334
+ 'fa-openid' => '&#xf19b; fa-openid',
335
+ 'fa-outdent' => '&#xf03b; fa-outdent',
336
+ 'fa-pagelines' => '&#xf18c; fa-pagelines',
337
+ 'fa-paper-plane' => '&#xf1d8; fa-paper-plane',
338
+ 'fa-paper-plane-o' => '&#xf1d9; fa-paper-plane-o',
339
+ 'fa-paperclip' => '&#xf0c6; fa-paperclip',
340
+ 'fa-paragraph' => '&#xf1dd; fa-paragraph',
341
+ 'fa-paste' => '&#xf0ea; fa-paste',
342
+ 'fa-pause' => '&#xf04c; fa-pause',
343
+ 'fa-paw' => '&#xf1b0; fa-paw',
344
+ 'fa-pencil' => '&#xf040; fa-pencil',
345
+ 'fa-pencil-square' => '&#xf14b; fa-pencil-square',
346
+ 'fa-pencil-square-o' => '&#xf044; fa-pencil-square-o',
347
+ 'fa-phone' => '&#xf095; fa-phone',
348
+ 'fa-phone-square' => '&#xf098; fa-phone-square',
349
+ 'fa-photo' => '&#xf03e; fa-photo',
350
+ 'fa-picture-o' => '&#xf03e; fa-picture-o',
351
+ 'fa-pied-piper' => '&#xf1a7; fa-pied-piper',
352
+ 'fa-pied-piper-alt' => '&#xf1a8; fa-pied-piper-alt',
353
+ 'fa-pied-piper-square' => '&#xf1a7; fa-pied-piper-square',
354
+ 'fa-pinterest' => '&#xf0d2; fa-pinterest',
355
+ 'fa-pinterest-square' => '&#xf0d3; fa-pinterest-square',
356
+ 'fa-plane' => '&#xf072; fa-plane',
357
+ 'fa-play' => '&#xf04b; fa-play',
358
+ 'fa-play-circle' => '&#xf144; fa-play-circle',
359
+ 'fa-play-circle-o' => '&#xf01d; fa-play-circle-o',
360
+ 'fa-plus' => '&#xf067; fa-plus',
361
+ 'fa-plus-circle' => '&#xf055; fa-plus-circle',
362
+ 'fa-plus-square' => '&#xf0fe; fa-plus-square',
363
+ 'fa-plus-square-o' => '&#xf196; fa-plus-square-o',
364
+ 'fa-power-off' => '&#xf011; fa-power-off',
365
+ 'fa-print' => '&#xf02f; fa-print',
366
+ 'fa-puzzle-piece' => '&#xf12e; fa-puzzle-piece',
367
+ 'fa-qq' => '&#xf1d6; fa-qq',
368
+ 'fa-qrcode' => '&#xf029; fa-qrcode',
369
+ 'fa-question' => '&#xf128; fa-question',
370
+ 'fa-question-circle' => '&#xf059; fa-question-circle',
371
+ 'fa-quote-left' => '&#xf10d; fa-quote-left',
372
+ 'fa-quote-right' => '&#xf10e; fa-quote-right',
373
+ 'fa-ra' => '&#xf1d0; fa-ra',
374
+ 'fa-random' => '&#xf074; fa-random',
375
+ 'fa-rebel' => '&#xf1d0; fa-rebel',
376
+ 'fa-recycle' => '&#xf1b8; fa-recycle',
377
+ 'fa-reddit' => '&#xf1a1; fa-reddit',
378
+ 'fa-reddit-square' => '&#xf1a2; fa-reddit-square',
379
+ 'fa-refresh' => '&#xf021; fa-refresh',
380
+ 'fa-renren' => '&#xf18b; fa-renren',
381
+ 'fa-reorder' => '&#xf0c9; fa-reorder',
382
+ 'fa-repeat' => '&#xf01e; fa-repeat',
383
+ 'fa-reply' => '&#xf112; fa-reply',
384
+ 'fa-reply-all' => '&#xf122; fa-reply-all',
385
+ 'fa-retweet' => '&#xf079; fa-retweet',
386
+ 'fa-rmb' => '&#xf157; fa-rmb',
387
+ 'fa-road' => '&#xf018; fa-road',
388
+ 'fa-rocket' => '&#xf135; fa-rocket',
389
+ 'fa-rotate-left' => '&#xf0e2; fa-rotate-left',
390
+ 'fa-rotate-right' => '&#xf01e; fa-rotate-right',
391
+ 'fa-rouble' => '&#xf158; fa-rouble',
392
+ 'fa-rss' => '&#xf09e; fa-rss',
393
+ 'fa-rss-square' => '&#xf143; fa-rss-square',
394
+ 'fa-rub' => '&#xf158; fa-rub',
395
+ 'fa-ruble' => '&#xf158; fa-ruble',
396
+ 'fa-rupee' => '&#xf156; fa-rupee',
397
+ 'fa-save' => '&#xf0c7; fa-save',
398
+ 'fa-scissors' => '&#xf0c4; fa-scissors',
399
+ 'fa-search' => '&#xf002; fa-search',
400
+ 'fa-search-minus' => '&#xf010; fa-search-minus',
401
+ 'fa-search-plus' => '&#xf00e; fa-search-plus',
402
+ 'fa-send' => '&#xf1d8; fa-send',
403
+ 'fa-send-o' => '&#xf1d9; fa-send-o',
404
+ 'fa-share' => '&#xf064; fa-share',
405
+ 'fa-share-alt' => '&#xf1e0; fa-share-alt',
406
+ 'fa-share-alt-square' => '&#xf1e1; fa-share-alt-square',
407
+ 'fa-share-square' => '&#xf14d; fa-share-square',
408
+ 'fa-share-square-o' => '&#xf045; fa-share-square-o',
409
+ 'fa-shield' => '&#xf132; fa-shield',
410
+ 'fa-shopping-cart' => '&#xf07a; fa-shopping-cart',
411
+ 'fa-sign-in' => '&#xf090; fa-sign-in',
412
+ 'fa-sign-out' => '&#xf08b; fa-sign-out',
413
+ 'fa-signal' => '&#xf012; fa-signal',
414
+ 'fa-sitemap' => '&#xf0e8; fa-sitemap',
415
+ 'fa-skype' => '&#xf17e; fa-skype',
416
+ 'fa-slack' => '&#xf198; fa-slack',
417
+ 'fa-sliders' => '&#xf1de; fa-sliders',
418
+ 'fa-smile-o' => '&#xf118; fa-smile-o',
419
+ 'fa-sort' => '&#xf0dc; fa-sort',
420
+ 'fa-sort-alpha-asc' => '&#xf15d; fa-sort-alpha-asc',
421
+ 'fa-sort-alpha-desc' => '&#xf15e; fa-sort-alpha-desc',
422
+ 'fa-sort-amount-asc' => '&#xf160; fa-sort-amount-asc',
423
+ 'fa-sort-amount-desc' => '&#xf161; fa-sort-amount-desc',
424
+ 'fa-sort-asc' => '&#xf0de; fa-sort-asc',
425
+ 'fa-sort-desc' => '&#xf0dd; fa-sort-desc',
426
+ 'fa-sort-down' => '&#xf0dd; fa-sort-down',
427
+ 'fa-sort-numeric-asc' => '&#xf162; fa-sort-numeric-asc',
428
+ 'fa-sort-numeric-desc' => '&#xf163; fa-sort-numeric-desc',
429
+ 'fa-sort-up' => '&#xf0de; fa-sort-up',
430
+ 'fa-soundcloud' => '&#xf1be; fa-soundcloud',
431
+ 'fa-space-shuttle' => '&#xf197; fa-space-shuttle',
432
+ 'fa-spinner' => '&#xf110; fa-spinner',
433
+ 'fa-spoon' => '&#xf1b1; fa-spoon',
434
+ 'fa-spotify' => '&#xf1bc; fa-spotify',
435
+ 'fa-square' => '&#xf0c8; fa-square',
436
+ 'fa-square-o' => '&#xf096; fa-square-o',
437
+ 'fa-stack-exchange' => '&#xf18d; fa-stack-exchange',
438
+ 'fa-stack-overflow' => '&#xf16c; fa-stack-overflow',
439
+ 'fa-star' => '&#xf005; fa-star',
440
+ 'fa-star-half' => '&#xf089; fa-star-half',
441
+ 'fa-star-half-empty' => '&#xf123; fa-star-half-empty',
442
+ 'fa-star-half-full' => '&#xf123; fa-star-half-full',
443
+ 'fa-star-half-o' => '&#xf123; fa-star-half-o',
444
+ 'fa-star-o' => '&#xf006; fa-star-o',
445
+ 'fa-steam' => '&#xf1b6; fa-steam',
446
+ 'fa-steam-square' => '&#xf1b7; fa-steam-square',
447
+ 'fa-step-backward' => '&#xf048; fa-step-backward',
448
+ 'fa-step-forward' => '&#xf051; fa-step-forward',
449
+ 'fa-stethoscope' => '&#xf0f1; fa-stethoscope',
450
+ 'fa-stop' => '&#xf04d; fa-stop',
451
+ 'fa-strikethrough' => '&#xf0cc; fa-strikethrough',
452
+ 'fa-stumbleupon' => '&#xf1a4; fa-stumbleupon',
453
+ 'fa-stumbleupon-circle' => '&#xf1a3; fa-stumbleupon-circle',
454
+ 'fa-subscript' => '&#xf12c; fa-subscript',
455
+ 'fa-suitcase' => '&#xf0f2; fa-suitcase',
456
+ 'fa-sun-o' => '&#xf185; fa-sun-o',
457
+ 'fa-superscript' => '&#xf12b; fa-superscript',
458
+ 'fa-support' => '&#xf1cd; fa-support',
459
+ 'fa-table' => '&#xf0ce; fa-table',
460
+ 'fa-tablet' => '&#xf10a; fa-tablet',
461
+ 'fa-tachometer' => '&#xf0e4; fa-tachometer',
462
+ 'fa-tag' => '&#xf02b; fa-tag',
463
+ 'fa-tags' => '&#xf02c; fa-tags',
464
+ 'fa-tasks' => '&#xf0ae; fa-tasks',
465
+ 'fa-taxi' => '&#xf1ba; fa-taxi',
466
+ 'fa-tencent-weibo' => '&#xf1d5; fa-tencent-weibo',
467
+ 'fa-terminal' => '&#xf120; fa-terminal',
468
+ 'fa-text-height' => '&#xf034; fa-text-height',
469
+ 'fa-text-width' => '&#xf035; fa-text-width',
470
+ 'fa-th' => '&#xf00a; fa-th',
471
+ 'fa-th-large' => '&#xf009; fa-th-large',
472
+ 'fa-th-list' => '&#xf00b; fa-th-list',
473
+ 'fa-thumb-tack' => '&#xf08d; fa-thumb-tack',
474
+ 'fa-thumbs-down' => '&#xf165; fa-thumbs-down',
475
+ 'fa-thumbs-o-down' => '&#xf088; fa-thumbs-o-down',
476
+ 'fa-thumbs-o-up' => '&#xf087; fa-thumbs-o-up',
477
+ 'fa-thumbs-up' => '&#xf164; fa-thumbs-up',
478
+ 'fa-ticket' => '&#xf145; fa-ticket',
479
+ 'fa-times' => '&#xf00d; fa-times',
480
+ 'fa-times-circle' => '&#xf057; fa-times-circle',
481
+ 'fa-times-circle-o' => '&#xf05c; fa-times-circle-o',
482
+ 'fa-tint' => '&#xf043; fa-tint',
483
+ 'fa-toggle-down' => '&#xf150; fa-toggle-down',
484
+ 'fa-toggle-left' => '&#xf191; fa-toggle-left',
485
+ 'fa-toggle-right' => '&#xf152; fa-toggle-right',
486
+ 'fa-toggle-up' => '&#xf151; fa-toggle-up',
487
+ 'fa-trash-o' => '&#xf014; fa-trash-o',
488
+ 'fa-tree' => '&#xf1bb; fa-tree',
489
+ 'fa-trello' => '&#xf181; fa-trello',
490
+ 'fa-trophy' => '&#xf091; fa-trophy',
491
+ 'fa-truck' => '&#xf0d1; fa-truck',
492
+ 'fa-try' => '&#xf195; fa-try',
493
+ 'fa-tumblr' => '&#xf173; fa-tumblr',
494
+ 'fa-tumblr-square' => '&#xf174; fa-tumblr-square',
495
+ 'fa-turkish-lira' => '&#xf195; fa-turkish-lira',
496
+ 'fa-twitter' => '&#xf099; fa-twitter',
497
+ 'fa-twitter-square' => '&#xf081; fa-twitter-square',
498
+ 'fa-umbrella' => '&#xf0e9; fa-umbrella',
499
+ 'fa-underline' => '&#xf0cd; fa-underline',
500
+ 'fa-undo' => '&#xf0e2; fa-undo',
501
+ 'fa-university' => '&#xf19c; fa-university',
502
+ 'fa-unlink' => '&#xf127; fa-unlink',
503
+ 'fa-unlock' => '&#xf09c; fa-unlock',
504
+ 'fa-unlock-alt' => '&#xf13e; fa-unlock-alt',
505
+ 'fa-unsorted' => '&#xf0dc; fa-unsorted',
506
+ 'fa-upload' => '&#xf093; fa-upload',
507
+ 'fa-usd' => '&#xf155; fa-usd',
508
+ 'fa-user' => '&#xf007; fa-user',
509
+ 'fa-user-md' => '&#xf0f0; fa-user-md',
510
+ 'fa-users' => '&#xf0c0; fa-users',
511
+ 'fa-video-camera' => '&#xf03d; fa-video-camera',
512
+ 'fa-vimeo-square' => '&#xf194; fa-vimeo-square',
513
+ 'fa-vine' => '&#xf1ca; fa-vine',
514
+ 'fa-vk' => '&#xf189; fa-vk',
515
+ 'fa-volume-down' => '&#xf027; fa-volume-down',
516
+ 'fa-volume-off' => '&#xf026; fa-volume-off',
517
+ 'fa-volume-up' => '&#xf028; fa-volume-up',
518
+ 'fa-warning' => '&#xf071; fa-warning',
519
+ 'fa-wechat' => '&#xf1d7; fa-wechat',
520
+ 'fa-weibo' => '&#xf18a; fa-weibo',
521
+ 'fa-weixin' => '&#xf1d7; fa-weixin',
522
+ 'fa-wheelchair' => '&#xf193; fa-wheelchair',
523
+ 'fa-windows' => '&#xf17a; fa-windows',
524
+ 'fa-won' => '&#xf159; fa-won',
525
+ 'fa-wordpress' => '&#xf19a; fa-wordpress',
526
+ 'fa-wrench' => '&#xf0ad; fa-wrench',
527
+ 'fa-xing' => '&#xf168; fa-xing',
528
+ 'fa-xing-square' => '&#xf169; fa-xing-square',
529
+ 'fa-yahoo' => '&#xf19e; fa-yahoo',
530
+ 'fa-yen' => '&#xf157; fa-yen',
531
+ 'fa-youtube' => '&#xf167; fa-youtube',
532
+ 'fa-youtube-play' => '&#xf16a; fa-youtube-play',
533
+ 'fa-youtube-square' => '&#xf166; 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.2
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
- class acf_field_font_awesome_plugin
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
- new acf_field_font_awesome_plugin();
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' => '&#xf042;',
30
- 'fa-adn' => '&#xf170;',
31
- 'fa-align-center' => '&#xf037;',
32
- 'fa-align-justify' => '&#xf039;',
33
- 'fa-align-left' => '&#xf036;',
34
- 'fa-align-right' => '&#xf038;',
35
- 'fa-ambulance' => '&#xf0f9;',
36
- 'fa-anchor' => '&#xf13d;',
37
- 'fa-android' => '&#xf17b;',
38
- 'fa-angle-double-down' => '&#xf103;',
39
- 'fa-angle-double-left' => '&#xf100;',
40
- 'fa-angle-double-right' => '&#xf101;',
41
- 'fa-angle-double-up' => '&#xf102;',
42
- 'fa-angle-down' => '&#xf107;',
43
- 'fa-angle-left' => '&#xf104;',
44
- 'fa-angle-right' => '&#xf105;',
45
- 'fa-angle-up' => '&#xf106;',
46
- 'fa-apple' => '&#xf179;',
47
- 'fa-archive' => '&#xf187;',
48
- 'fa-arrow-circle-down' => '&#xf0ab;',
49
- 'fa-arrow-circle-left' => '&#xf0a8;',
50
- 'fa-arrow-circle-o-down' => '&#xf01a;',
51
- 'fa-arrow-circle-o-left' => '&#xf190;',
52
- 'fa-arrow-circle-o-right' => '&#xf18e;',
53
- 'fa-arrow-circle-o-up' => '&#xf01b;',
54
- 'fa-arrow-circle-right' => '&#xf0a9;',
55
- 'fa-arrow-circle-up' => '&#xf0aa;',
56
- 'fa-arrow-down' => '&#xf063;',
57
- 'fa-arrow-left' => '&#xf060;',
58
- 'fa-arrow-right' => '&#xf061;',
59
- 'fa-arrow-up' => '&#xf062;',
60
- 'fa-arrows' => '&#xf047;',
61
- 'fa-arrows-alt' => '&#xf0b2;',
62
- 'fa-arrows-h' => '&#xf07e;',
63
- 'fa-arrows-v' => '&#xf07d;',
64
- 'fa-asterisk' => '&#xf069;',
65
- 'fa-automobile' => '&#xf1b9;',
66
- 'fa-backward' => '&#xf04a;',
67
- 'fa-ban' => '&#xf05e;',
68
- 'fa-bank' => '&#xf19c;',
69
- 'fa-bar-chart-o' => '&#xf080;',
70
- 'fa-barcode' => '&#xf02a;',
71
- 'fa-bars' => '&#xf0c9;',
72
- 'fa-beer' => '&#xf0fc;',
73
- 'fa-behance' => '&#xf1b4;',
74
- 'fa-behance-square' => '&#xf1b5;',
75
- 'fa-bell' => '&#xf0f3;',
76
- 'fa-bell-o' => '&#xf0a2;',
77
- 'fa-bitbucket' => '&#xf171;',
78
- 'fa-bitbucket-square' => '&#xf172;',
79
- 'fa-bitcoin' => '&#xf15a;',
80
- 'fa-bold' => '&#xf032;',
81
- 'fa-bolt' => '&#xf0e7;',
82
- 'fa-bomb' => '&#xf1e2;',
83
- 'fa-book' => '&#xf02d;',
84
- 'fa-bookmark' => '&#xf02e;',
85
- 'fa-bookmark-o' => '&#xf097;',
86
- 'fa-briefcase' => '&#xf0b1;',
87
- 'fa-btc' => '&#xf15a;',
88
- 'fa-bug' => '&#xf188;',
89
- 'fa-building' => '&#xf1ad;',
90
- 'fa-building-o' => '&#xf0f7;',
91
- 'fa-bullhorn' => '&#xf0a1;',
92
- 'fa-bullseye' => '&#xf140;',
93
- 'fa-cab' => '&#xf1ba;',
94
- 'fa-calendar' => '&#xf073;',
95
- 'fa-calendar-o' => '&#xf133;',
96
- 'fa-camera' => '&#xf030;',
97
- 'fa-camera-retro' => '&#xf083;',
98
- 'fa-car' => '&#xf1b9;',
99
- 'fa-caret-down' => '&#xf0d7;',
100
- 'fa-caret-left' => '&#xf0d9;',
101
- 'fa-caret-right' => '&#xf0da;',
102
- 'fa-caret-square-o-down' => '&#xf150;',
103
- 'fa-caret-square-o-left' => '&#xf191;',
104
- 'fa-caret-square-o-right' => '&#xf152;',
105
- 'fa-caret-square-o-up' => '&#xf151;',
106
- 'fa-caret-up' => '&#xf0d8;',
107
- 'fa-certificate' => '&#xf0a3;',
108
- 'fa-chain' => '&#xf0c1;',
109
- 'fa-chain-broken' => '&#xf127;',
110
- 'fa-check' => '&#xf00c;',
111
- 'fa-check-circle' => '&#xf058;',
112
- 'fa-check-circle-o' => '&#xf05d;',
113
- 'fa-check-square' => '&#xf14a;',
114
- 'fa-check-square-o' => '&#xf046;',
115
- 'fa-chevron-circle-down' => '&#xf13a;',
116
- 'fa-chevron-circle-left' => '&#xf137;',
117
- 'fa-chevron-circle-right' => '&#xf138;',
118
- 'fa-chevron-circle-up' => '&#xf139;',
119
- 'fa-chevron-down' => '&#xf078;',
120
- 'fa-chevron-left' => '&#xf053;',
121
- 'fa-chevron-right' => '&#xf054;',
122
- 'fa-chevron-up' => '&#xf077;',
123
- 'fa-child' => '&#xf1ae;',
124
- 'fa-circle' => '&#xf111;',
125
- 'fa-circle-o' => '&#xf10c;',
126
- 'fa-circle-o-notch' => '&#xf1ce;',
127
- 'fa-circle-thin' => '&#xf1db;',
128
- 'fa-clipboard' => '&#xf0ea;',
129
- 'fa-clock-o' => '&#xf017;',
130
- 'fa-cloud' => '&#xf0c2;',
131
- 'fa-cloud-download' => '&#xf0ed;',
132
- 'fa-cloud-upload' => '&#xf0ee;',
133
- 'fa-cny' => '&#xf157;',
134
- 'fa-code' => '&#xf121;',
135
- 'fa-code-fork' => '&#xf126;',
136
- 'fa-codepen' => '&#xf1cb;',
137
- 'fa-coffee' => '&#xf0f4;',
138
- 'fa-cog' => '&#xf013;',
139
- 'fa-cogs' => '&#xf085;',
140
- 'fa-columns' => '&#xf0db;',
141
- 'fa-comment' => '&#xf075;',
142
- 'fa-comment-o' => '&#xf0e5;',
143
- 'fa-comments' => '&#xf086;',
144
- 'fa-comments-o' => '&#xf0e6;',
145
- 'fa-compass' => '&#xf14e;',
146
- 'fa-compress' => '&#xf066;',
147
- 'fa-copy' => '&#xf0c5;',
148
- 'fa-credit-card' => '&#xf09d;',
149
- 'fa-crop' => '&#xf125;',
150
- 'fa-crosshairs' => '&#xf05b;',
151
- 'fa-css3' => '&#xf13c;',
152
- 'fa-cube' => '&#xf1b2;',
153
- 'fa-cubes' => '&#xf1b3;',
154
- 'fa-cut' => '&#xf0c4;',
155
- 'fa-cutlery' => '&#xf0f5;',
156
- 'fa-dashboard' => '&#xf0e4;',
157
- 'fa-database' => '&#xf1c0;',
158
- 'fa-dedent' => '&#xf03b;',
159
- 'fa-delicious' => '&#xf1a5;',
160
- 'fa-desktop' => '&#xf108;',
161
- 'fa-deviantart' => '&#xf1bd;',
162
- 'fa-digg' => '&#xf1a6;',
163
- 'fa-dollar' => '&#xf155;',
164
- 'fa-dot-circle-o' => '&#xf192;',
165
- 'fa-download' => '&#xf019;',
166
- 'fa-dribbble' => '&#xf17d;',
167
- 'fa-dropbox' => '&#xf16b;',
168
- 'fa-drupal' => '&#xf1a9;',
169
- 'fa-edit' => '&#xf044;',
170
- 'fa-eject' => '&#xf052;',
171
- 'fa-ellipsis-h' => '&#xf141;',
172
- 'fa-ellipsis-v' => '&#xf142;',
173
- 'fa-empire' => '&#xf1d1;',
174
- 'fa-envelope' => '&#xf0e0;',
175
- 'fa-envelope-o' => '&#xf003;',
176
- 'fa-envelope-square' => '&#xf199;',
177
- 'fa-eraser' => '&#xf12d;',
178
- 'fa-eur' => '&#xf153;',
179
- 'fa-euro' => '&#xf153;',
180
- 'fa-exchange' => '&#xf0ec;',
181
- 'fa-exclamation' => '&#xf12a;',
182
- 'fa-exclamation-circle' => '&#xf06a;',
183
- 'fa-exclamation-triangle' => '&#xf071;',
184
- 'fa-expand' => '&#xf065;',
185
- 'fa-external-link' => '&#xf08e;',
186
- 'fa-external-link-square' => '&#xf14c;',
187
- 'fa-eye' => '&#xf06e;',
188
- 'fa-eye-slash' => '&#xf070;',
189
- 'fa-facebook' => '&#xf09a;',
190
- 'fa-facebook-square' => '&#xf082;',
191
- 'fa-fast-backward' => '&#xf049;',
192
- 'fa-fast-forward' => '&#xf050;',
193
- 'fa-fax' => '&#xf1ac;',
194
- 'fa-female' => '&#xf182;',
195
- 'fa-fighter-jet' => '&#xf0fb;',
196
- 'fa-file' => '&#xf15b;',
197
- 'fa-file-archive-o' => '&#xf1c6;',
198
- 'fa-file-audio-o' => '&#xf1c7;',
199
- 'fa-file-code-o' => '&#xf1c9;',
200
- 'fa-file-excel-o' => '&#xf1c3;',
201
- 'fa-file-image-o' => '&#xf1c5;',
202
- 'fa-file-movie-o' => '&#xf1c8;',
203
- 'fa-file-o' => '&#xf016;',
204
- 'fa-file-pdf-o' => '&#xf1c1;',
205
- 'fa-file-photo-o' => '&#xf1c5;',
206
- 'fa-file-picture-o' => '&#xf1c5;',
207
- 'fa-file-powerpoint-o' => '&#xf1c4;',
208
- 'fa-file-sound-o' => '&#xf1c7;',
209
- 'fa-file-text' => '&#xf15c;',
210
- 'fa-file-text-o' => '&#xf0f6;',
211
- 'fa-file-video-o' => '&#xf1c8;',
212
- 'fa-file-word-o' => '&#xf1c2;',
213
- 'fa-file-zip-o' => '&#xf1c6;',
214
- 'fa-files-o' => '&#xf0c5;',
215
- 'fa-film' => '&#xf008;',
216
- 'fa-filter' => '&#xf0b0;',
217
- 'fa-fire' => '&#xf06d;',
218
- 'fa-fire-extinguisher' => '&#xf134;',
219
- 'fa-flag' => '&#xf024;',
220
- 'fa-flag-checkered' => '&#xf11e;',
221
- 'fa-flag-o' => '&#xf11d;',
222
- 'fa-flash' => '&#xf0e7;',
223
- 'fa-flask' => '&#xf0c3;',
224
- 'fa-flickr' => '&#xf16e;',
225
- 'fa-floppy-o' => '&#xf0c7;',
226
- 'fa-folder' => '&#xf07b;',
227
- 'fa-folder-o' => '&#xf114;',
228
- 'fa-folder-open' => '&#xf07c;',
229
- 'fa-folder-open-o' => '&#xf115;',
230
- 'fa-font' => '&#xf031;',
231
- 'fa-forward' => '&#xf04e;',
232
- 'fa-foursquare' => '&#xf180;',
233
- 'fa-frown-o' => '&#xf119;',
234
- 'fa-gamepad' => '&#xf11b;',
235
- 'fa-gavel' => '&#xf0e3;',
236
- 'fa-gbp' => '&#xf154;',
237
- 'fa-ge' => '&#xf1d1;',
238
- 'fa-gear' => '&#xf013;',
239
- 'fa-gears' => '&#xf085;',
240
- 'fa-gift' => '&#xf06b;',
241
- 'fa-git' => '&#xf1d3;',
242
- 'fa-git-square' => '&#xf1d2;',
243
- 'fa-github' => '&#xf09b;',
244
- 'fa-github-alt' => '&#xf113;',
245
- 'fa-github-square' => '&#xf092;',
246
- 'fa-gittip' => '&#xf184;',
247
- 'fa-glass' => '&#xf000;',
248
- 'fa-globe' => '&#xf0ac;',
249
- 'fa-google' => '&#xf1a0;',
250
- 'fa-google-plus' => '&#xf0d5;',
251
- 'fa-google-plus-square' => '&#xf0d4;',
252
- 'fa-graduation-cap' => '&#xf19d;',
253
- 'fa-group' => '&#xf0c0;',
254
- 'fa-h-square' => '&#xf0fd;',
255
- 'fa-hacker-news' => '&#xf1d4;',
256
- 'fa-hand-o-down' => '&#xf0a7;',
257
- 'fa-hand-o-left' => '&#xf0a5;',
258
- 'fa-hand-o-right' => '&#xf0a4;',
259
- 'fa-hand-o-up' => '&#xf0a6;',
260
- 'fa-hdd-o' => '&#xf0a0;',
261
- 'fa-header' => '&#xf1dc;',
262
- 'fa-headphones' => '&#xf025;',
263
- 'fa-heart' => '&#xf004;',
264
- 'fa-heart-o' => '&#xf08a;',
265
- 'fa-history' => '&#xf1da;',
266
- 'fa-home' => '&#xf015;',
267
- 'fa-hospital-o' => '&#xf0f8;',
268
- 'fa-html5' => '&#xf13b;',
269
- 'fa-image' => '&#xf03e;',
270
- 'fa-inbox' => '&#xf01c;',
271
- 'fa-indent' => '&#xf03c;',
272
- 'fa-info' => '&#xf129;',
273
- 'fa-info-circle' => '&#xf05a;',
274
- 'fa-inr' => '&#xf156;',
275
- 'fa-instagram' => '&#xf16d;',
276
- 'fa-institution' => '&#xf19c;',
277
- 'fa-italic' => '&#xf033;',
278
- 'fa-joomla' => '&#xf1aa;',
279
- 'fa-jpy' => '&#xf157;',
280
- 'fa-jsfiddle' => '&#xf1cc;',
281
- 'fa-key' => '&#xf084;',
282
- 'fa-keyboard-o' => '&#xf11c;',
283
- 'fa-krw' => '&#xf159;',
284
- 'fa-language' => '&#xf1ab;',
285
- 'fa-laptop' => '&#xf109;',
286
- 'fa-leaf' => '&#xf06c;',
287
- 'fa-legal' => '&#xf0e3;',
288
- 'fa-lemon-o' => '&#xf094;',
289
- 'fa-level-down' => '&#xf149;',
290
- 'fa-level-up' => '&#xf148;',
291
- 'fa-life-bouy' => '&#xf1cd;',
292
- 'fa-life-ring' => '&#xf1cd;',
293
- 'fa-life-saver' => '&#xf1cd;',
294
- 'fa-lightbulb-o' => '&#xf0eb;',
295
- 'fa-link' => '&#xf0c1;',
296
- 'fa-linkedin' => '&#xf0e1;',
297
- 'fa-linkedin-square' => '&#xf08c;',
298
- 'fa-linux' => '&#xf17c;',
299
- 'fa-list' => '&#xf03a;',
300
- 'fa-list-alt' => '&#xf022;',
301
- 'fa-list-ol' => '&#xf0cb;',
302
- 'fa-list-ul' => '&#xf0ca;',
303
- 'fa-location-arrow' => '&#xf124;',
304
- 'fa-lock' => '&#xf023;',
305
- 'fa-long-arrow-down' => '&#xf175;',
306
- 'fa-long-arrow-left' => '&#xf177;',
307
- 'fa-long-arrow-right' => '&#xf178;',
308
- 'fa-long-arrow-up' => '&#xf176;',
309
- 'fa-magic' => '&#xf0d0;',
310
- 'fa-magnet' => '&#xf076;',
311
- 'fa-mail-forward' => '&#xf064;',
312
- 'fa-mail-reply' => '&#xf112;',
313
- 'fa-mail-reply-all' => '&#xf122;',
314
- 'fa-male' => '&#xf183;',
315
- 'fa-map-marker' => '&#xf041;',
316
- 'fa-maxcdn' => '&#xf136;',
317
- 'fa-medkit' => '&#xf0fa;',
318
- 'fa-meh-o' => '&#xf11a;',
319
- 'fa-microphone' => '&#xf130;',
320
- 'fa-microphone-slash' => '&#xf131;',
321
- 'fa-minus' => '&#xf068;',
322
- 'fa-minus-circle' => '&#xf056;',
323
- 'fa-minus-square' => '&#xf146;',
324
- 'fa-minus-square-o' => '&#xf147;',
325
- 'fa-mobile' => '&#xf10b;',
326
- 'fa-mobile-phone' => '&#xf10b;',
327
- 'fa-money' => '&#xf0d6;',
328
- 'fa-moon-o' => '&#xf186;',
329
- 'fa-mortar-board' => '&#xf19d;',
330
- 'fa-music' => '&#xf001;',
331
- 'fa-navicon' => '&#xf0c9;',
332
- 'fa-openid' => '&#xf19b;',
333
- 'fa-outdent' => '&#xf03b;',
334
- 'fa-pagelines' => '&#xf18c;',
335
- 'fa-paper-plane' => '&#xf1d8;',
336
- 'fa-paper-plane-o' => '&#xf1d9;',
337
- 'fa-paperclip' => '&#xf0c6;',
338
- 'fa-paragraph' => '&#xf1dd;',
339
- 'fa-paste' => '&#xf0ea;',
340
- 'fa-pause' => '&#xf04c;',
341
- 'fa-paw' => '&#xf1b0;',
342
- 'fa-pencil' => '&#xf040;',
343
- 'fa-pencil-square' => '&#xf14b;',
344
- 'fa-pencil-square-o' => '&#xf044;',
345
- 'fa-phone' => '&#xf095;',
346
- 'fa-phone-square' => '&#xf098;',
347
- 'fa-photo' => '&#xf03e;',
348
- 'fa-picture-o' => '&#xf03e;',
349
- 'fa-pied-piper' => '&#xf1a7;',
350
- 'fa-pied-piper-alt' => '&#xf1a8;',
351
- 'fa-pied-piper-square' => '&#xf1a7;',
352
- 'fa-pinterest' => '&#xf0d2;',
353
- 'fa-pinterest-square' => '&#xf0d3;',
354
- 'fa-plane' => '&#xf072;',
355
- 'fa-play' => '&#xf04b;',
356
- 'fa-play-circle' => '&#xf144;',
357
- 'fa-play-circle-o' => '&#xf01d;',
358
- 'fa-plus' => '&#xf067;',
359
- 'fa-plus-circle' => '&#xf055;',
360
- 'fa-plus-square' => '&#xf0fe;',
361
- 'fa-plus-square-o' => '&#xf196;',
362
- 'fa-power-off' => '&#xf011;',
363
- 'fa-print' => '&#xf02f;',
364
- 'fa-puzzle-piece' => '&#xf12e;',
365
- 'fa-qq' => '&#xf1d6;',
366
- 'fa-qrcode' => '&#xf029;',
367
- 'fa-question' => '&#xf128;',
368
- 'fa-question-circle' => '&#xf059;',
369
- 'fa-quote-left' => '&#xf10d;',
370
- 'fa-quote-right' => '&#xf10e;',
371
- 'fa-ra' => '&#xf1d0;',
372
- 'fa-random' => '&#xf074;',
373
- 'fa-rebel' => '&#xf1d0;',
374
- 'fa-recycle' => '&#xf1b8;',
375
- 'fa-reddit' => '&#xf1a1;',
376
- 'fa-reddit-square' => '&#xf1a2;',
377
- 'fa-refresh' => '&#xf021;',
378
- 'fa-renren' => '&#xf18b;',
379
- 'fa-reorder' => '&#xf0c9;',
380
- 'fa-repeat' => '&#xf01e;',
381
- 'fa-reply' => '&#xf112;',
382
- 'fa-reply-all' => '&#xf122;',
383
- 'fa-retweet' => '&#xf079;',
384
- 'fa-rmb' => '&#xf157;',
385
- 'fa-road' => '&#xf018;',
386
- 'fa-rocket' => '&#xf135;',
387
- 'fa-rotate-left' => '&#xf0e2;',
388
- 'fa-rotate-right' => '&#xf01e;',
389
- 'fa-rouble' => '&#xf158;',
390
- 'fa-rss' => '&#xf09e;',
391
- 'fa-rss-square' => '&#xf143;',
392
- 'fa-rub' => '&#xf158;',
393
- 'fa-ruble' => '&#xf158;',
394
- 'fa-rupee' => '&#xf156;',
395
- 'fa-save' => '&#xf0c7;',
396
- 'fa-scissors' => '&#xf0c4;',
397
- 'fa-search' => '&#xf002;',
398
- 'fa-search-minus' => '&#xf010;',
399
- 'fa-search-plus' => '&#xf00e;',
400
- 'fa-send' => '&#xf1d8;',
401
- 'fa-send-o' => '&#xf1d9;',
402
- 'fa-share' => '&#xf064;',
403
- 'fa-share-alt' => '&#xf1e0;',
404
- 'fa-share-alt-square' => '&#xf1e1;',
405
- 'fa-share-square' => '&#xf14d;',
406
- 'fa-share-square-o' => '&#xf045;',
407
- 'fa-shield' => '&#xf132;',
408
- 'fa-shopping-cart' => '&#xf07a;',
409
- 'fa-sign-in' => '&#xf090;',
410
- 'fa-sign-out' => '&#xf08b;',
411
- 'fa-signal' => '&#xf012;',
412
- 'fa-sitemap' => '&#xf0e8;',
413
- 'fa-skype' => '&#xf17e;',
414
- 'fa-slack' => '&#xf198;',
415
- 'fa-sliders' => '&#xf1de;',
416
- 'fa-smile-o' => '&#xf118;',
417
- 'fa-sort' => '&#xf0dc;',
418
- 'fa-sort-alpha-asc' => '&#xf15d;',
419
- 'fa-sort-alpha-desc' => '&#xf15e;',
420
- 'fa-sort-amount-asc' => '&#xf160;',
421
- 'fa-sort-amount-desc' => '&#xf161;',
422
- 'fa-sort-asc' => '&#xf0de;',
423
- 'fa-sort-desc' => '&#xf0dd;',
424
- 'fa-sort-down' => '&#xf0dd;',
425
- 'fa-sort-numeric-asc' => '&#xf162;',
426
- 'fa-sort-numeric-desc' => '&#xf163;',
427
- 'fa-sort-up' => '&#xf0de;',
428
- 'fa-soundcloud' => '&#xf1be;',
429
- 'fa-space-shuttle' => '&#xf197;',
430
- 'fa-spinner' => '&#xf110;',
431
- 'fa-spoon' => '&#xf1b1;',
432
- 'fa-spotify' => '&#xf1bc;',
433
- 'fa-square' => '&#xf0c8;',
434
- 'fa-square-o' => '&#xf096;',
435
- 'fa-stack-exchange' => '&#xf18d;',
436
- 'fa-stack-overflow' => '&#xf16c;',
437
- 'fa-star' => '&#xf005;',
438
- 'fa-star-half' => '&#xf089;',
439
- 'fa-star-half-empty' => '&#xf123;',
440
- 'fa-star-half-full' => '&#xf123;',
441
- 'fa-star-half-o' => '&#xf123;',
442
- 'fa-star-o' => '&#xf006;',
443
- 'fa-steam' => '&#xf1b6;',
444
- 'fa-steam-square' => '&#xf1b7;',
445
- 'fa-step-backward' => '&#xf048;',
446
- 'fa-step-forward' => '&#xf051;',
447
- 'fa-stethoscope' => '&#xf0f1;',
448
- 'fa-stop' => '&#xf04d;',
449
- 'fa-strikethrough' => '&#xf0cc;',
450
- 'fa-stumbleupon' => '&#xf1a4;',
451
- 'fa-stumbleupon-circle' => '&#xf1a3;',
452
- 'fa-subscript' => '&#xf12c;',
453
- 'fa-suitcase' => '&#xf0f2;',
454
- 'fa-sun-o' => '&#xf185;',
455
- 'fa-superscript' => '&#xf12b;',
456
- 'fa-support' => '&#xf1cd;',
457
- 'fa-table' => '&#xf0ce;',
458
- 'fa-tablet' => '&#xf10a;',
459
- 'fa-tachometer' => '&#xf0e4;',
460
- 'fa-tag' => '&#xf02b;',
461
- 'fa-tags' => '&#xf02c;',
462
- 'fa-tasks' => '&#xf0ae;',
463
- 'fa-taxi' => '&#xf1ba;',
464
- 'fa-tencent-weibo' => '&#xf1d5;',
465
- 'fa-terminal' => '&#xf120;',
466
- 'fa-text-height' => '&#xf034;',
467
- 'fa-text-width' => '&#xf035;',
468
- 'fa-th' => '&#xf00a;',
469
- 'fa-th-large' => '&#xf009;',
470
- 'fa-th-list' => '&#xf00b;',
471
- 'fa-thumb-tack' => '&#xf08d;',
472
- 'fa-thumbs-down' => '&#xf165;',
473
- 'fa-thumbs-o-down' => '&#xf088;',
474
- 'fa-thumbs-o-up' => '&#xf087;',
475
- 'fa-thumbs-up' => '&#xf164;',
476
- 'fa-ticket' => '&#xf145;',
477
- 'fa-times' => '&#xf00d;',
478
- 'fa-times-circle' => '&#xf057;',
479
- 'fa-times-circle-o' => '&#xf05c;',
480
- 'fa-tint' => '&#xf043;',
481
- 'fa-toggle-down' => '&#xf150;',
482
- 'fa-toggle-left' => '&#xf191;',
483
- 'fa-toggle-right' => '&#xf152;',
484
- 'fa-toggle-up' => '&#xf151;',
485
- 'fa-trash-o' => '&#xf014;',
486
- 'fa-tree' => '&#xf1bb;',
487
- 'fa-trello' => '&#xf181;',
488
- 'fa-trophy' => '&#xf091;',
489
- 'fa-truck' => '&#xf0d1;',
490
- 'fa-try' => '&#xf195;',
491
- 'fa-tumblr' => '&#xf173;',
492
- 'fa-tumblr-square' => '&#xf174;',
493
- 'fa-turkish-lira' => '&#xf195;',
494
- 'fa-twitter' => '&#xf099;',
495
- 'fa-twitter-square' => '&#xf081;',
496
- 'fa-umbrella' => '&#xf0e9;',
497
- 'fa-underline' => '&#xf0cd;',
498
- 'fa-undo' => '&#xf0e2;',
499
- 'fa-university' => '&#xf19c;',
500
- 'fa-unlink' => '&#xf127;',
501
- 'fa-unlock' => '&#xf09c;',
502
- 'fa-unlock-alt' => '&#xf13e;',
503
- 'fa-unsorted' => '&#xf0dc;',
504
- 'fa-upload' => '&#xf093;',
505
- 'fa-usd' => '&#xf155;',
506
- 'fa-user' => '&#xf007;',
507
- 'fa-user-md' => '&#xf0f0;',
508
- 'fa-users' => '&#xf0c0;',
509
- 'fa-video-camera' => '&#xf03d;',
510
- 'fa-vimeo-square' => '&#xf194;',
511
- 'fa-vine' => '&#xf1ca;',
512
- 'fa-vk' => '&#xf189;',
513
- 'fa-volume-down' => '&#xf027;',
514
- 'fa-volume-off' => '&#xf026;',
515
- 'fa-volume-up' => '&#xf028;',
516
- 'fa-warning' => '&#xf071;',
517
- 'fa-wechat' => '&#xf1d7;',
518
- 'fa-weibo' => '&#xf18a;',
519
- 'fa-weixin' => '&#xf1d7;',
520
- 'fa-wheelchair' => '&#xf193;',
521
- 'fa-windows' => '&#xf17a;',
522
- 'fa-won' => '&#xf159;',
523
- 'fa-wordpress' => '&#xf19a;',
524
- 'fa-wrench' => '&#xf0ad;',
525
- 'fa-xing' => '&#xf168;',
526
- 'fa-xing-square' => '&#xf169;',
527
- 'fa-yahoo' => '&#xf19e;',
528
- 'fa-yen' => '&#xf157;',
529
- 'fa-youtube' => '&#xf167;',
530
- 'fa-youtube-play' => '&#xf16a;',
531
- 'fa-youtube-square' => '&#xf166;'
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
- $(document).on( 'change', '.field_type select', function() {
 
 
4
 
5
  if( $(this).val() == 'font-awesome' ) {
6
- var font_awesome_form = $(this).closest( '.field_form' );
7
- var font_awesome_select = $( 'select.fontawesome', font_awesome_form );
 
 
 
 
 
 
 
 
8
  setTimeout(function() {
9
- $( 'select.fontawesome', font_awesome_form ).select2({
10
- width : '100%'
11
- });
12
- update_preview( font_awesome_select, $( font_awesome_select ).val() );
 
 
 
 
 
 
 
 
 
13
  }, 1000);
14
  }
15
 
16
  });
17
 
18
- $(document).on( 'acf/field_form-open', function( e, field ) {
 
 
 
 
19
 
20
- element = $( 'select.fontawesome', field );
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
- var parent = $(element).parent();
42
- $( '.fa-live-preview', parent ).html( '<i class="fa ' + selected + '"></i>' );
 
 
 
 
 
 
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
- var last_layout = $( '.acf-flexible-content .values' ).last();
38
 
39
- $( 'tbody > tr.field_type-font-awesome select.fa-select2-field', last_layout ).each( function() {
 
40
  $(this).select2({
41
  width : '100%'
42
  });
43
  update_preview( this, $(this).val() );
44
  });
 
45
 
46
- } else {
47
 
48
- $( '.row' ).each( function() {
49
- $( 'select.fa-select2-field', this ).each( function() {
50
- $(this).select2({
51
- width : '100%'
52
- });
53
- update_preview( this, $(this).val() );
54
- });
55
  });
 
 
56
 
57
- $( '.acf-flexible-content .values tbody > tr.field_type-font-awesome select.fa-select2-field' ).each( function() {
58
- $(this).select2({
59
- width : '100%'
60
- });
61
- update_preview( this, $(this).val() );
62
- });
63
 
64
- $( '.field_type-font-awesome select.fa-select2-field' ).each( function() {
 
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' ).on( 'select2-highlight', function( object ) {
82
- update_preview( this, object.val );
 
 
 
83
  });
84
 
85
- $( 'select.fa-select2-field' ).on( 'select2-close', function( object ) {
 
 
 
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, or Icon Class, or an Object including the class, element, and unicode value
19
  * Optionally enqueues Font Awesome in footer
20
 
21
  = Compatibility =
22
 
23
- This add-on will work with:
24
-
25
- * version 4 and up
26
 
27
  == Installation ==
28
 
29
- This add-on can be treated as both a WP plugin and a theme include (Use one or the other, plugin method is best practice).
30
-
31
- = Plugin =
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