WordPress Page Builder – Beaver Builder - Version 1.10.6.3

Version Description

Download this release

Release Info

Developer justinbusa
Plugin Icon 128x128 WordPress Page Builder – Beaver Builder
Version 1.10.6.3
Comparing to
See all releases

Code changes from version 1.10.5.1 to 1.10.6.3

changelog.txt CHANGED
@@ -1,3 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>1.10.5.1 - 6/5/2017</h4>
2
  <p><strong>Bug Fixes</strong></p>
3
  <ul>
@@ -5,8 +57,8 @@
5
  </ul>
6
 
7
  <h4>1.10.5 - 6/5/2017</h4>
8
- <p><strong>Enhancements</strong></p>
9
- <ul>
10
  <li>Added color connection for row backgrounds.</li>
11
  <li>Added responsive breakpoint settings to Menu Module.</li>
12
  <li>Subscribe form module - enable enter key to submit form.</li>
@@ -16,15 +68,15 @@
16
  <li>Added action <code>fl_builder_loop_settings_before_form</code>.</li>
17
  <li>Added action <code>fl_builder_loop_settings_after_form</code>.</li>
18
  <li>Updated language files, new language added: <code>en_GB</code>.</li>
19
- </ul>
20
- <p><strong>Bug Fixes</strong></p>
21
- <ul>
22
- <li>Fixed password protected posts breaking Themer layouts.</li>
23
  <li>Fixed conflict with WP Courseware.</li>
24
- <li>Fixed setting toggles not working in nested forms.</li>
25
- <li>Fixed broken images in the Zen Life template.</li>
26
- <li>Fixed hidden nodes showing when the builder is active for layouts that aren't currently being edited.</li>
27
- <li>Fixed not being able to save user access settings with no role set.</li>
28
  <li>Fixed subscription downloads showing up when the builder is white labeled.</li>
29
  <li>Fixed issue with cropped images when Jetpacks Photon module is enabled.</li>
30
  <li>Fixed posts module when multiple authors are selected.</li>
@@ -37,1883 +89,1883 @@
37
  <li>Fixed JS error on older versions of WordPress.</li>
38
  </ul>
39
 
40
- <h4>1.10.4 - 5/18/2017</h4>
41
- <p><strong>Bug Fixes</strong></p>
42
- <ul>
43
- <li>Fixed the builder admin menu not showing up for some people with Beaver Themer installed.</li>
44
- </ul>
45
-
46
- <h4>1.10.3 - 5/17/2017</h4>
47
- <p><strong>Enhancements</strong></p>
48
- <ul>
49
- <li>Added 'bottom' as an alignment option for row contents.</li>
50
- <li>Testimonials Module, new setting added to control slider direction.</li>
51
- <li>Subscribe module MailPoet 3 beta support added.</li>
52
- <li>Updated pt_PT translation.</li>
53
- <li>Added the same <a href="http://kb.wpbeaverbuilder.com/article/139-set-up-a-mega-menu" target="_blank">mega menu logic as the theme</a> to the Menu module.</li>
54
- <li>Added a submenu spacing setting to the Menu module.</li>
55
- </ul>
56
- <p><strong>Bug Fixes</strong></p>
57
- <ul>
58
- <li>Fixed the column width for reversed stacking order on mobile.</li>
59
- <li>Fixed a translation error in wp-admin. 'This is a global %s' was not being parsed.</li>
60
- <li>Fixed RTL issue with testimonials module.</li>
61
- <li>Fixed a js error if breakpoint was left blank in global settings. Now a required numeric field.</li>
62
- <li>Fixed an issue where it was possible to have two versions of the plugin active on GoDaddy.</li>
63
- <li>Fixed an issue with mobile menu flashing unstyled content on initial load.</li>
64
- <li>Fixed reCaptcha errors in Subscribe & Contact Form Modules.</li>
65
- <li>Fixed vertical alignment center on full height rows in IE11.</li>
66
- <li>Fixed an issue with BuddyPress. Builder activate link removed from BuddyPress generated pages.</li>
67
- <li>Fixed a padding issue on reverse stacked video module.</li>
68
  <li>Fixed Subscribe Module, GetRespone API would throw an error and not subscribe if name field is hidden.</li>
69
- <li>Fixed a translation compatibility issue with Beaver Themer plugin.</li>
70
- <li>Fixed read more link in the Posts module not going below the content and causing line-height issues in the list layout.</li>
71
- <li>Fixed color picker closing when the mouse goes outside of the picker during drag.</li>
72
- <li>Fixed hidden global row and module labels when they have long titles.</li>
73
- </ul>
74
-
75
- <h4>1.10.2 - 5/2/2017</h4>
76
- <p><strong>Enhancements</strong></p>
77
- <ul>
78
- <li>Added dot indicating whether the builder is enabled or not on builder launch links.</li>
79
- <li>Added field connections for row background videos.</li>
80
- <li>Added tinyPNG compatibility for images stored in the builder's cache folder.</li>
81
- </ul>
82
- <p><strong>Bug Fixes</strong></p>
83
- <ul>
84
- <li>Fixed memory exhausted fatal error when loading templates on servers without enough memory.</li>
85
- <li>Fixed comments showing in the Posts module when they should not.</li>
86
- <li>Fixed Posts module pagination when WPML's URL variable is set to lang= rather than directories.</li>
87
- <li>Fixed JS error in the Posts module when switching from the gallery layout.</li>
88
- <li>Fixed JetPack sharing icons not showing in the Posts module.</li>
89
- <li>Fixed line height issue with the Map module.</li>
90
- <li>Fixed editing templates in the Beaver Builder theme not going full width.</li>
91
- <li>Fixed some module assets not being re-rendered when working in the builder.</li>
92
- <li>Fixed issues with preview refresh and responsive editing.</li>
93
- <li>Fixed subscription check if the site has no internet access and cannot check the subscription state.</li>
94
- <li>Fixed PHP warning when rendering CSS/JS assets.</li>
95
- <li>Fixed misc translation issues.</li>
96
- <li>Fixed image uploads if FORCE_SSL_ADMIN is true and site is non-ssl.</li>
97
- </ul>
98
-
99
- <h4>1.10.1 - 4/25/2017</h4>
100
- <p><strong>Bug Fixes</strong></p>
101
- <ul>
102
- <li>Fixed issue with super admins on multisite that aren't admins of a site not being able to use the full builder.</li>
103
- </ul>
104
-
105
- <h4>1.10 - 04/24/2017</h4>
106
- <p><strong>General Enhancements</strong></p>
107
- <ul>
108
- <li>Added User Access settings to the Page Builder admin settings for choosing which user roles can access certain features.</li>
109
- <li>Saved rows and modules can now be created via the Builder admin menu (formerly Templates admin menu).</li>
110
- <li>Templates, saved rows and saved modules now have their on individual pages in the admin.</li>
111
- <li>Added caching for registering templates to prevent issues with servers that have low memory.</li>
112
- <li>Changed priority of UI script loading to try and prevent issues with themes that load scripts that should be loaded from WordPress core.</li>
113
- <li>Added field connections to video module embed field.</li>
114
- <li>Added the ability to order posts in the post modules by meta value.</li>
115
- <li>Paged post modules are now scrolled to when clicking a link to the next page.</li>
116
- <li>Added Enormail integration to the Subscribe Form module.</li>
117
- <li>Multiple calls to Google Fonts from the theme and plugin are now combined into one request.</li>
118
- <li>Added connections to Number Counter module fields.</li>
119
- <li>Added fl_builder_loop_query filter.</li>
120
- <li>Removed the loading graphic when saving settings. Elements are now slightly faded until they are updated.</li>
121
- <li>Module and row duplicating is now instantaneous instead of having to wait with a loading graphic.</li>
122
- <li>All drag and drop operations now load inline instead of taking over the page with a loader.</li>
123
- <li>Added module name to the module settings overlay tooltip.</li>
124
- <li>Added custom field connections to Contact Form module email field.</li>
125
- <li>Added support for exporting a single theme layout or a group of theme layouts.</li>
126
- <li>Added support for theme layouts to the template data exporter.</li>
127
- </ul>
128
- <p><strong>Post Module Enhancements</strong></p>
129
- <ul>
130
- <li>Added “columns” layout to the layout setting.</li>
131
- <li>Added more layout and styling settings.</li>
132
- <li>The “no results” message is now shown when no posts are found.</li>
133
- <li>Added a setting to show a search form if no posts are found.</li>
134
- <li>Added the ability to exclude posts in the content filter for the query.</li>
135
- </ul>
136
- <p><strong>Menu Module Enhancements</strong></p>
137
- <ul>
138
- <li>Added “below row" option for mobile menu position.</li>
139
- <li>Added font family setting.</li>
140
- <li>Misc CSS improvements.</li>
141
- </ul>
142
- <p><strong>Changes</strong></p>
143
- <ul>
144
- <li>Changed Templates to Builder in the admin menu.</li>
145
- <li>Merged Uninstall and Cache into Tools in the Page Builder admin settings.</li>
146
- <li>Removed Editing section in the Page Builder admin settings in favor of the new User Access settings.</li>
147
- <li>Removed Templates Admin setting in the Page Builder admin settings in favor of the new User Access settings.</li>
148
- <li>Removed Template Data Exporter setting in the Page Builder admin settings in favor of the new User Access settings.</li>
149
- <li>Changed edit button text on the admin edit screen for templates to say Launch Page Builder.</li>
150
- </ul>
151
- <p><strong>Bug Fixes</strong></p>
152
- <ul>
153
- <li>Fixed the builder layout shortcode not working with Beaver Themer.</li>
154
- <li>Fixed some photos not going full-width on mobile.</li>
155
- <li>Fixed pre-instantiated widgets not working.</li>
156
- <li>Fixed anchor links in the theme header causing the builder done actions to show.</li>
157
- <li>Fixed multisite issues with render query.</li>
158
- <li>Fixed post list spacing not working when using a custom post layout.</li>
159
- <li>Fixed layout JS breaking when you save a JS array in the code field.</li>
160
- <li>Fixed color picker alpha slider.</li>
161
- <li>Fixed parallax background position being applied to child rows inserted using a shortcode.</li>
162
- <li>Fixed unescaped attributes in the heading module causing HTML errors.</li>
163
- <li>Fixed fatal error when inserting layouts via shortcode in certain cases.</li>
164
- <li>Fixed PHP warning when first dropping a post module on the page.</li>
165
- </ul>
166
-
167
- <h4>1.9.5.3 - 4/4/2017</h4>
168
- <p><strong>Bug Fixes</strong></p>
169
- <ul>
170
- <li>Fixed a bug in 1.9.5 preventing columns in full height rows from stacking on mobile.</li>
171
- </ul>
172
-
173
- <h4>1.9.5.2 - 3/31/2017</h4>
174
- <p><strong>Bug Fixes</strong></p>
175
- <ul>
176
- <li>Fixed an issue with rewrites being flushed on every page load.</li>
177
- </ul>
178
-
179
- <h4>1.9.5.1 - 3/21/2017</h4>
180
- <p><strong>Bug Fixes</strong></p>
181
- <ul>
182
- <li>Rolled back change in 1.9.5 that fixed some photos not going full width on mobile. That was causing all photos to go full width on mobile even when not intended. We’ll revisit that fix in 1.10.</li>
183
- </ul>
184
-
185
- <h4>1.9.5 - 3/20/2017</h4>
186
- <p><strong>Enhancements</strong></p>
187
- <ul>
188
- <li>Posts module pagination now works separately when multiple Posts modules are on a page.</li>
189
- <li>Added support for WooCommerce Memberships.</li>
190
- <li>Added support for setting a custom subject in the Contact Form and Subscribe Form modules.</li>
191
- <li>Added JS config for overriding the offset of waypoint animations.</li>
192
- <li>Added support for font-weights that have 'i' at the end of their value string.</li>
193
- <li>Added fl_builder_editing_enabled filter.</li>
194
- <li>Added fl_builder_module_details filter.</li>
195
- <li>Added logic to prevent bad JS entered into the layout settings from breaking the builder.</li>
196
- <li>Added post_class() call to the Posts module.</li>
197
- <li>Update Google Fonts.</li>
198
- </ul>
199
- <p><strong>Changes</strong></p>
200
- <ul>
201
- <li>Changed Video module embed field to a code editor.</li>
202
- <li>Removed outline from the Accordion module when an item has focus.</li>
203
- </ul>
204
- <p><strong>Bug Fixes</strong></p>
205
- <ul>
206
- <li>Fixed content disappearing or being ordered incorrectly when dragging and dropping nested columns.</li>
207
- <li>Fixed Posts module pagination not working when rendered via a shortcode.</li>
208
- <li>Fixed module settings JS errors in Safari.</li>
209
- <li>Fixed warning caused when DOING_AJAX is already defined.</li>
210
- <li>Fixed Gravity Forms not showing in the Button module lightbox.</li>
211
- <li>Fixed IE flexbox issues with full-height rows.</li>
212
- <li>Fixed nested menu items not opening in the Menu module's accordion layout.</li>
213
- <li>Fixed module export/import not working.</li>
214
- <li>Fixed non-breaking space in the Number module.</li>
215
- <li>Fixed content in nested columns not being exported to the default WordPress editor.</li>
216
- <li>Fixed Posts Carousel and Posts Gallery icons always showing even when set not to display.</li>
217
- <li>Fixed YouTube and Vimeo video backgrounds not filling the full width and height of a row.</li>
218
- <li>Fixed photos not going full width on mobile devices.</li>
219
- <li>Fixed pagination double slashes when using permalinks with no ending slash.</li>
220
- <li>Fixed multiple translation issues.</li>
221
- <li>Fixed photo fields showing incorrect selection when switching site to HTTPS.</li>
222
- <li>Fixed layout settings css not applying when overriding/appending a user template.</li>
223
- <li>Fixed validation errors with Map module.</li>
224
- <li>Fixed conflict with WPEngine's PHP Compatibility plugin reporting a PHP7 warning.</li>
225
- <li>Fixed ReCaptcha conflicts with other plugins.</li>
226
- <li>Fixed linking to a specific tab in the Tabs module.</li>
227
- <li>Fixed name being set to 0 in the Subscribe Form module when using ConvertKit.</li>
228
- <li>Fixed PHP warning in the Gallery module when an image doesn't have an ID.</li>
229
- <li>Fixed JavaScript error in FireFox.</li>
230
- </ul>
231
-
232
- <h4>1.9.4 - 01/18/2017</h4>
233
- <p><strong>Bug Fixes</strong></p>
234
- <ul>
235
- <li>Fixed a bug with font fields introduced in 1.9.3.</li>
236
- </ul>
237
-
238
- <h4>1.9.3 - 01/17/2017</h4>
239
- <p><strong>Enhancements</strong></p>
240
- <ul>
241
- <li>Accessibility enhancements to Accordion, Contact Form, Content Slider, Icon, Menu, Post Carousel, Post Slider, Subscribe Form and Tabs modules. Thanks to John Russell (@laubsterboy) for the contribution!</li>
242
- <li>Added reCAPTCHA support to the Subscribe Form and Contact Form modules.</li>
243
- <li>Vimeo and YouTube scripts are now only loaded in the builder UI when a video from those services is present.</li>
244
- <li>Removed the Read More button from the text editor in the builder UI as it does not work with builder layouts.</li>
245
- </ul>
246
- <p><strong>Bug Fixes</strong></p>
247
- <ul>
248
- <li>Fixed global rows and modules not working after being duplicated under Tools > Duplicate Layout.</li>
249
- <li>Fixed SSL mixed content issues with the Slideshow module.</li>
250
- <li>Fixed the thumbnail navigation in the Slideshow module not showing on touch enabled desktops.</li>
251
- <li>Fixed Menu module showing category descriptions for WooCommerce product categories.</li>
252
- <li>Fixed issues with empty parent links in the Menu module.</li>
253
- <li>Fixed Menu module not adding current-menu-item class when loaded from a template.</li>
254
- <li>Fixed Menu module sub-menu background color being overridden by the menu background color.</li>
255
- <li>Fixed a PHP warning in the Post Slider module with random ordering when using an offset.</li>
256
- <li>Fixed IE layout issue with top aligned full height rows.</li>
257
- <li>Fixed fonts with numbers in their names not working in font fields.</li>
258
- <li>Fixed PHP warnings with Madmimi and MailerLite.</li>
259
- <li>Fixed Maps module trying to open the Google Maps app in the Facebook Messenger app.</li>
260
- <li>Fixed issues with autoplaying videos in the Content Slider module.</li>
261
- <li>Fixed posts with double quotes in their names breaking suggest fields.</li>
262
- <li>Fixed Number Counter modules in Tabs modules not displaying correctly.</li>
263
- <li>Fixed row text color overriding colors set in the Pricing Table module.</li>
264
- <li>Fixed Button module popup content being duplicated when rendered inside a Content Slider module via shortcode.</li>
265
- </ul>
266
-
267
- <h4>1.9.2 - 12/13/2016</h4>
268
- <p><strong>Bug Fixes</strong></p>
269
- <ul>
270
- <li>Fixed a bug introduced in 1.9.1 that broke live preview when editing settings.</li>
271
- <li>Fixed gallery fields not working when images are saved as part of a template and don't exist on the site.</li>
272
- </ul>
273
-
274
- <h4>1.9.1 - 12/12/2016</h4>
275
- <p><strong>Enhancements</strong></p>
276
- <ul>
277
- <li>Updated Google fonts.</li>
278
- <li>Updated translations.</li>
279
- </ul>
280
- <p><strong>Bug Fixes</strong></p>
281
- <ul>
282
- <li>Fixed rows and modules not appearing when first added to the page.</li>
283
- <li>Fixed column settings dropdown disappearing when the column has a background overlay color.</li>
284
- <li>Fixed the button module lightbox opening all lightboxes on the page.</li>
285
- <li>Fixed multiple RTL language CSS issues.</li>
286
- <li>Fixed row and column text colors affecting select inputs.</li>
287
- <li>Fixed CSS conflicts with third party themes and the builder UI.</li>
288
- <li>Fixed parallax backgrounds being applied to child rows when inserting layouts via a shortcode.</li>
289
- </ul>
290
-
291
- <h4>1.9 - 12/06/2016</h4>
292
- <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-9-shasta/">the blog post</a> for detailed info on what was added.</p>
293
- <p><strong>Enhancements</strong></p>
294
- <ul>
295
- <li>Added the ability to drop columns into columns.</li>
296
- <li>Added the ability to drag and drop existing columns.</li>
297
- <li>Made multiple improvements for more accurate dragging and dropping.</li>
298
- <li>Added responsive settings for margins, padding and borders.</li>
299
- <li>Added new content page templates.</li>
300
- <li>Template images are now loaded via HTTPS.</li>
301
- <li>Added the ability to open a lightbox via a button.</li>
302
- <li>Added the ability to add an alpha slider to color fields.</li>
303
- </ul>
304
- <p><strong>Bug Fixes</strong></p>
305
- <ul>
306
- <li>Fixed responsive spacing not working when defaults are zeroed out in the global settings.</li>
307
- <li>Fixed format select not showing in text editor fields.</li>
308
- <li>Fixed incorrect color picker width in third party themes.</li>
309
- <li>Fixed incorrect column group positions when dropping an existing module into a row.</li>
310
- <li>Fixed multiple issues with responsive margins/padding not working.</li>
311
- <li>Fixed a fatal error caused by modules that are no longer registered.</li>
312
- <li>Fixed broken modules that have nested forms such as the Accordion module.</li>
313
- <li>Fixed live preview issues for nested columns when editing the parent column.</li>
314
- <li>Fixed issues with live preview not working correctly for responsive fields.</li>
315
- <li>Fixed issues with global responsive margins and padding not working.</li>
316
- <li>Fixed issues with equal height columns and nested columns.</li>
317
- <li>Fixed Button module lightbox close button jump when placing the mouse over it.</li>
318
- <li>Fixed Button module lightbox close button positioning.</li>
319
- <li>Fixed drag and drop placeholder animation lag.</li>
320
- </ul>
321
-
322
- <h4>1.8.8 - 11/08/2016</h4>
323
- <p><strong>Enhancements</strong></p>
324
- <ul>
325
- <li>Updated FontAwesome to 4.7.</li>
326
- <li>Add tags support for AWeber and ActiveCampaign.</li>
327
- <li>Added the "site" parameter to the fl_builder_insert_layout shortcode for inserting layouts from other sites on a network.</li>
328
- </ul>
329
- <p><strong>Bug Fixes</strong></p>
330
- <ul>
331
- <li>Fixed module settings not loading when the site language is set to Farsi.</li>
332
- <li>Fixed HTML validation error with the Icon module.</li>
333
- <li>Fixed an error when setting the default editor to HTML using the wp_default_editor filter.</li>
334
- <li>Fixed YouTube videos not working when column stacking order is reversed.</li>
335
- <li>Fixed Content Slider module's navigation arrows not showing in IE11.</li>
336
- <li>Fixed not being able to translate the comments popup link in the Posts module.</li>
337
- <li>Fixed long template names not showing ellipses in the content panel.</li>
338
- <li>Fixed empty global rows when sending a global row to the trash in wp-admin.</li>
339
- <li>Fixed the Posts module breaking the render_query method in certain cases.</li>
340
- <li>Fixed the position of the settings lightbox resize icon on RTL sites.</li>
341
- <li>Fixed not being able to close accordion submenus in the Menu module.</li>
342
- </ul>
343
-
344
- <h4>1.8.7.1 - 10/13/2016</h4>
345
- <p><strong>Bug Fixes</strong></p>
346
- <ul>
347
- <li>Fixed a bug with row and column text colors not working in 1.8.7.</li>
348
- </ul>
349
-
350
- <h4>1.8.7 - 10/09/2016</h4>
351
- <p><strong>Enhancements</strong></p>
352
- <ul>
353
- <li>The mobile version of the Menu module now collapses when an anchor link is clicked.</li>
354
- <li>Added the option to enable audio for YouTube and Vimeo row backgrounds.</li>
355
- <li>Added MailerLite support to the Subscribe Form module.</li>
356
- <li>Added the fl_builder_is_node_visible filter.</li>
357
- <li>Added the fl_builder_form_field_preview_text filter.</li>
358
- </ul>
359
- <p><strong>Bug Fixes</strong></p>
360
- <ul>
361
- <li>Fixed the lightbox not working in the Photo module.</li>
362
- <li>Fixed broken slideshow backgrounds when no transition speed is set.</li>
363
- <li>Fixed a CSS inheritance issue with the hamburger icon in the Menu module.</li>
364
- <li>Fixed CSS compatibility issues with the builder UI in the Paperback theme from Array Themes.</li>
365
- <li>Fixed a JS error on the post edit screen when the plugin branding contains a single quote.</li>
366
- <li>Fixed the editing capability preventing editing of global templates.</li>
367
- <li>Fixed layout CSS/JS 404 errors when the same layout is included on the page twice.</li>
368
- <li>Fixed slideshow captions not changing on touch.</li>
369
- <li>Fixed photo not removing when the remove link is clicked for the photo field.</li>
370
- <li>Fixed a PHP warning with incorrect filter arguments in the Menu module.</li>
371
- <li>Fixed SSL issue in IE caused by the YUI3 library.</li>
372
- </ul>
373
-
374
- <h4>1.8.6 - 09/19/2016</h4>
375
- <p><strong>Enhancements</strong></p>
376
- <ul>
377
- <li>Added YouTube and Vimeo support for row backgrounds.</li>
378
- <li>Added a no follow setting to the Button module and modules that have buttons in them.</li>
379
- <li>Added a loader icon when opening a lightbox for the Gallery and Photo modules.</li>
380
- </ul>
381
- <p><strong>Bug Fixes</strong></p>
382
- <ul>
383
- <li>Fixed Gallery module lightbox ordering when using the collage layout.</li>
384
- <li>Fixed multiple color picker issues by changing the mode to HSV.</li>
385
- <li>Fixed auto suggest fields breaking in the Posts module.</li>
386
- <li>Fixed themes that load older versions of jQuery Waypoints breaking animations.</li>
387
- <li>Fixed negative column and module margins covering row overlay actions.</li>
388
- <li>Fixed SSL issues caused by the YUI3 script.</li>
389
- <li>Fixed Posts Carousel error when added to an Accordion module via shortcode.</li>
390
- <li>Fixed memory limit issue with loading in template data files.</li>
391
- <li>Fixed width rounding issues in the Gallery module.</li>
392
- <li>Fixed module animations not running when the module is too far down the page.</li>
393
- <li>Fixed lightbox close button being hidden by the admin bar.</li>
394
- <li>Fixed PHP notices when only user templates are enabled but none have been saved.</li>
395
- <li>Fixed skipping slides in the Content Slider module when clicking too fast.</li>
396
- <li>Fixed error caused by removing a photo from a photo field before the single photo selector is initialized.</li>
397
- <li>Fixed Menu module dropdowns in older browsers.</li>
398
- <li>Fixed API errors with the Active Campaign integration.</li>
399
- <li>Fixed unstripped slashes in theme branding fields.</li>
400
- <li>Fixed fonts not being enqueued for font fields in nested forms.</li>
401
- </ul>
402
-
403
- <h4>1.8.5 - 08/26/2016</h4>
404
- <p><strong>Enhancements</strong></p>
405
- <ul>
406
- <li>Added 15 new translations. Updated 24 existing translations.</li>
407
- <li>Added bottom alignment setting for equal height columns.</li>
408
- <li>Added fl_builder_rendered_content filter.</li>
409
- <li>Added fl_builder_exporter_template filter.</li>
410
- <li>Added fl_builder_ui_panel_before_rows action.</li>
411
- <li>Added fl_builder_ui_panel_before_modules action.</li>
412
- </ul>
413
- <p><strong>Bug Fixes</strong></p>
414
- <ul>
415
- <li>Fixed an error with our smooth scrolling JavaScript when #! is in the page URL.</li>
416
- <li>Fixed help text for filters in the Loop Settings. Using a comma in the list breaks the functionality.</li>
417
- </ul>
418
-
419
- <h4>1.8.4 - 08/09/2016</h4>
420
- <p><strong>Enhancements</strong></p>
421
- <ul>
422
- <li>Tested compatibility with WordPress 4.6.</li>
423
- <li>Added oEmbed support to editor fields in all modules.</li>
424
- <li>Added wpautop param for editor fields so it can be disabled on a per-field basis.</li>
425
- <li>Added JS hooks for column resizing.</li>
426
- <li>Added fl_builder_google_fonts_domain filter for countries that block Google domains.</li>
427
- <li>Added fl_builder_before_render_shortcodes filter.</li>
428
- <li>Added Arial as the default fallback font for Windows users.</li>
429
- </ul>
430
- <p><strong>Bug Fixes</strong></p>
431
- <ul>
432
- <li>Fixed issues with updater caching preventing updates from showing in some cases.</li>
433
- <li>Fixed theme white labeling not working in the Customizer.</li>
434
- <li>Fixed PHP notices caused by the importer.</li>
435
- <li>Fixed full height rows overlapping in IE 11.</li>
436
- <li>Fixed custom global CSS being included on the page more than once when a layout is inserted with the shortcode or render_query.</li>
437
- <li>Fixed SSL certificate error with MailChimp.</li>
438
- <li>Fixed double slash in the pagination URL for the Posts module.</li>
439
- <li>Fixed empty background-size CSS property for rows and columns.</li>
440
- <li>Fixed equal height columns not vertically aligning in FireFox.</li>
441
- <li>Fixed Gallery module breaking module animations.</li>
442
- <li>Fixed Google Fonts not being loaded for layouts rendered using the shortcode when Google Fonts have already been loaded for the main layout.</li>
443
- <li>Fixed IE 11 content classes not being applied when caching is present.</li>
444
- <li>Fixed YUI3 making too many requests when on HTTPS.</li>
445
- <li>Fixed Gallery module affecting the position of anchor links when first loaded.</li>
446
- </ul>
447
-
448
- <h4>1.8.3 - 07/15/2016</h4>
449
- <p><strong>Bug Fixes</strong></p>
450
- <ul>
451
- <li>Fixed a bug with asset cache not being cleared for content rendered via shortcode or the render_query method.</li>
452
- </ul>
453
-
454
- <h4>1.8.2 - 07/12/2016</h4>
455
- <p><strong>Enhancements</strong></p>
456
- <ul>
457
- <li>Beaver Builder theme cache is now cleared when the builder cache is cleared via Settings > Page Builder > Cache.</li>
458
- <li>Added support for clearing the builder cache using WP-CLI (wp beaver clearcache).</li>
459
- <li>Added support for white labeling the theme name in the At a Glance dashboard widget.</li>
460
- <li>Added the option to choose a form or list for ActiveCampaign connections in the Subscribe Form module as forms trigger the autoresponder where lists do not.</li>
461
- <li>Added support for option groups in the select field type.</li>
462
- <li>Added an admin notice on the settings page alerting users when Beaver Builder can't write files.</li>
463
- </ul>
464
- <p><strong>Bug Fixes</strong></p>
465
- <ul>
466
- <li>Fixed a bug with the layout of the Post Grid, Post Carousel, Content Slider, Post Slider and Testimonial modules when inserted into a Tabs or Accordion module via shortcode.</li>
467
- <li>Fixed a bug with pagination in the Posts module when added via shortcode.</li>
468
- <li>Fixed a bug with the responsive styling of the Heading module.</li>
469
- <li>Fixed a bug with the Heading module and live preview.</li>
470
- <li>Fixed a bug with the toggle behavior of button style options when the background color is not set.</li>
471
- <li>Fixed a bug with white labeling not showing for the Beaver Builder theme in the network admin.</li>
472
- <li>Fixed a bug with vertically centered columns horizontally centering content.</li>
473
- <li>Fixed a bug with vertically centered columns preventing slideshows from showing.</li>
474
- <li>Fixed a bug with Menu module styling of list items.</li>
475
- <li>Fixed a bug with Menu module alignment not working on mobile.</li>
476
- <li>Fixed a bug with builder content loaded via shortcode causing non-builder content to go full-width.</li>
477
- <li>Fixed a bug with TinyMCE in nested settings forms on FireFox.</li>
478
- <li>Fixed a bug with full height rows overlapping in IE11.</li>
479
- <li>Fixed a bug with row video backgrounds not working when added via URL.</li>
480
- <li>Fixed a bug with cache files not being created with the correct file permissions.</li>
481
- <li>Fixed a bug with column border colors being rendered when none are set.</li>
482
- <li>Fixed a bug with reversed column stacking not working on Safari.</li>
483
- <li>Fixed a bug with column resizing and global rows.</li>
484
- <li>Fixed a bug with delayed CSS loading when using the layout shortcode or render_query function.</li>
485
- <li>Fixed a bug with CSS specificity when multiple Subscribe Form modules are on the same page.</li>
486
- <li>Fixed a bug with the Campaign Monitor integration causing warnings in PHP7. </li>
487
- <li>Fixed a bug with row text colors overriding text colors in the Number module.</li>
488
- <li>Fixed a bug with the lightbox not working for Gallery modules inside of a Tabs module.</li>
489
- <li>Fixed a bug with FontAwesome icons in the headings of Tabs modules converting to a plus icon when clicked.</li>
490
- <li>Fixed a bug with audio players not going full width in the Accordion module.</li>
491
- </ul>
492
-
493
- <h4>1.8.1 - 06/15/2016</h4>
494
- <p><strong>Bug Fixes</strong></p>
495
- <ul>
496
- <li>Fixed a bug with the text editor field stripping line breaks in 1.8.</li>
497
- <li>Fixed a bug that caused the visual text editor to break in 1.8.</li>
498
- <li>Fixed a bug with the index.html file in the icons cache folder causing an error.</li>
499
- <li>Fixed a bug with vertically centered columns also centering content horizontally.</li>
500
- <li>Fixed a bug with hooking rows via the shortcode breaking the builder UI.</li>
501
- <li>Fixed a bug with layout templates showing in row/module positions in the content sidebar when using the Agency override feature.</li>
502
- <li>Fixed a bug with backgrounds, padding, and margins where they were applied to all elements when using the shortcode.</li>
503
- <li>Fixed a bug with resizing the Testimonials module on large/medium devices.</li>
504
- <li>Fixed a number of minor CSS bugs.</li>
505
- <li>Fixed a number of minor issues with the Menu module.</li>
506
- <li>Fixed editing performance issues with AJAX layout rendering on large pages.</li>
507
- </ul>
508
-
509
- <h4>1.8 - 06/07/2016</h4>
510
- <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-8-gordon/">the blog post</a> for detailed info on what was added.</p>
511
- <p><strong>Enhancements</strong></p>
512
- <ul>
513
- <li>Added 16 new home page templates.</li>
514
- <li>Added the ability for theme authors to load third party templates into all version of the builder (including the lite) using the new Template Data Exporter. Please <a href="https://www.wpbeaverbuilder.com/knowledge-base/theme-author-templates/">read the docs</a> for more info on that.</li>
515
- <li>Added the ability to export single templates or groups of templates using the WordPress Exporter.</li>
516
- <li>Added a patch for the WordPress Importer to prevent it from breaking imports in certain situations.</li>
517
- <li>Added a setting in the advanced tab to show rows/modules/columns based on if a user is logged in, logged out, or never show them (they only appear while editing). You can also choose the capability logged in users must have to see a row/column/module.</li>
518
- <li>Added a setting in the advanced tab to reverse the column stacking order on smaller devices.</li>
519
- <li>Added settings to vertically center or top align content in full height rows and equal height columns.</li>
520
- <li>Added settings to add a video background to a row using external links instead of the media library.</li>
521
- <li>Added settings in the Icon Group module to choose individual icon colors and link targets.</li>
522
- <li>Added settings in the Heading module to set the line-height and letter spacing.</li>
523
- <li>Added settings in the Separator module to set the width and alignment.</li>
524
- <li>Added a setting to the Accordion module that makes the first item open by default.</li>
525
- <li>Added a setting in the Posts module to customize the "No Posts Found" message.</li>
526
- <li>Added settings to all modules with buttons for fading in icons on hover and choosing a hover opacity for transparent backgrounds.</li>
527
- <li>Added settings to the Contact Form module for customizing the button.</li>
528
- <li>Made changes to the Contact Form module so the recipient's email address is no longer visible in the markup.</li>
529
- <li>Captions are now displayed in the Gallery module's lightbox.</li>
530
- <li>PHP files can now be used to register templates and load template data from the database.</li>
531
- <li>Added caching to FLBuilderModel::get_user_template_type to cut down on the number of queries it runs.</li>
532
- <li>The form validation required message is now translatable.</li>
533
- <li>Empty index files are now added the cache directories to prevent browsing.</li>
534
- <li>Added a button for resizing settings lightboxes so they fill the screen.</li>
535
- <li>Added support for oEmbeds in the Text Editor module.</li>
536
- <li>Changed row and module templates to saved rows and modules.</li>
537
- <li>Tweaked templates admin settings terminology.</li>
538
- <li>Tweaked draft and discard button terminology.</li>
539
- <li>Added CSS/JavaScript to layout settings button and panel.</li>
540
- <li>Increased size of the publish button.</li>
541
- <li>Added a setting to collapse inactive items in accordion mode for the Menu module.</li>
542
- <li>Updated Font Awesome.</li>
543
- <li>Sticky posts are no longer included when using the fl_builder_insert_layout shortcode.</li>
544
- <li>Added an above title option for image position in the Posts module.</li>
545
- </ul>
546
- <p><strong>Bug Fixes</strong></p>
547
- <ul>
548
- <li>Fixed issues with exporting and importing new templates.</li>
549
- <li>Fixed issues with layout CSS/JS not exporting and importing.</li>
550
- <li>Fixed incorrect module paths on Windows servers.</li>
551
- <li>Fixed the alignment setting preview for the Heading module. </li>
552
- <li>Fixed the incorrect load order of FLBuilder::render_query CSS in IE.</li>
553
- <li>Fixed RTL issues with the Content Slider and Post Slider modules.</li>
554
- <li>Fixed an IE11 bug with images that have height:auto in equal height columns.</li>
555
- <li>Fixed a PHP notice when adding Post Slider and Post Carousel modules to the page.</li>
556
- <li>Fixed a PHP error when the time field is used inside a nested form.</li>
557
- <li>Fixed a bug with duplicate rows adding backslashes to text.</li>
558
- <li>Fixed a bug with nested Tab modules via the fl_builder_insert_layout shortcode.</li>
559
- <li>Fixed an issue with sticky posts being included when using the fl_builder_insert_layout shortcode.</li>
560
- <li>Fixed a PHP notice when using the fl_builder_insert_layout shortcode on a 404 page.</li>
561
- <li>Fixed TinyMCE link editor not closing since WordPress 4.5.</li>
562
- <li>Fixed a fatal error with the new Template Data Exporter caused by unsupported syntax in certain PHP versions.</li>
563
- <li>Fixed a PHP warning caused by plugin activation.</li>
564
- <li>Fixed the display of SVG files in the Photo module.</li>
565
- <li>Fixed CSS specificity issues in IE when using the fl_builder_render_layout shortcode.</li>
566
- </ul>
567
-
568
- <h4>1.7.8 - 04/20/2016</h4>
569
- <p><strong>Bug Fixes</strong></p>
570
- <ul>
571
- <li>Fixed a bug in the Post Carousel and Post Slider modules caused in 1.7.7 that broke the offset setting.</li>
572
- </ul>
573
-
574
- <h4>1.7.7 - 04/19/2016</h4>
575
- <p><strong>Enhancements</strong></p>
576
- <ul>
577
- <li>Added support for HTML in the Number Counter module.</li>
578
- <li>Added a loop setting to the Content Slider module to toggle looping so sliders with a single slide can't be swiped on mobile.</li>
579
- <li>Added fl_builder_loop_taxonomies filter.</li>
580
- <li>Upgrade links in the lite version now open in a new window.</li>
581
- </ul>
582
- <p><strong>Bug Fixes</strong></p>
583
- <ul>
584
- <li>Fixed a bug with Japanese characters breaking nested forms.</li>
585
- <li>Fixed a PHP warning caused by font fields.</li>
586
- <li>Fixed a backwards compatibility issue with the Tesseract theme caused in the 1.7.6 update.</li>
587
- <li>Fixed a fatal error when uninstalling via Settings > Page Builder > Uninstall.</li>
588
- <li>Fixed a bug in the Post Carousel and Post Slider modules preventing slides from showing when pagination parameters are present.</li>
589
- <li>Fixed a bug in the Menu module causing the page to scroll horizontally.</li>
590
- <li>Fixed a bug with images in templates disappearing in nested forms when no image is selected.</li>
591
- <li>Fixed a bug with the media library not working in certain themes in WordPress 4.5.</li>
592
- </ul>
593
-
594
- <h4>1.7.6 - 03/29/2016</h4>
595
- <p><strong>Enhancements</strong></p>
596
- <ul>
597
- <li>Optimized database calls for global rows and modules.</li>
598
- <li>URLs in the builder's CSS cache are now saved as HTTPS if the site has SSL enabled.</li>
599
- <li>Font Awesome and Foundation icon files are now loaded via CDN.</li>
600
- <li>The "Publish Changes" button in the builder now says "Submit for Review" for drafts when a user doesn't have the capability to publish.</li>
601
- <li>Changed the error message in the Subscribe Form module to mention tags instead of lists for Drip and Hatchbuck.</li>
602
- <li>Added responsive alignment settings to the Icon module. Props to Ben on his first Beaver Builder commit! :)</li>
603
- <li>Added the option to have uncropped photos in the Posts Carousel and Posts Slider modules.</li>
604
- <li>Added the fl_builder_loop_query_args filter for filtering query args in the FLBuilderLoop class.</li>
605
- <li>Added the fl_builder_posts_module_layout_path filter for filtering the path of layout files in the Posts module.</li>
606
- <li>Added the fl_builder_color_presets filter for adding color presets to the builder's color picker.</li>
607
- <li>Added the fl_builder_after_render_css and fl_builder_after_render_js actions for hooking into after assets are rendered.</li>
608
- <li>Added the "remove" method for modules that is only called when they are removed from the page.</li>
609
- <li>Exposed bxSlider object in the Posts Carousel and Posts Slider modules so it can be accessed by third party code.</li>
610
- <li>Updated bxSlider.</li>
611
- <li>Updated translations.</li>
612
- </ul>
613
- <p><strong>Bug Fixes</strong></p>
614
- <ul>
615
- <li>Fixed styling issues with the column settings dropdown in certain themes.</li>
616
- <li>Fixed styling issues with column resize handles and global rows and modules.</li>
617
- <li>Fixed styling issues with IE11 and full-height rows.</li>
618
- <li>Fixed styling issues with the Heading module.</li>
619
- <li>Fixed styling issues with the Callout module.</li>
620
- <li>Fixed styling issues with the Content Slider module.</li>
621
- <li>Fixed a bug with icon fields in nested forms throwing warnings.</li>
622
- <li>Fixed a bug with the color picker breaking when the core WordPress color picker scripts are loaded.</li>
623
- <li>Fixed a bug with modules set to animate below a slideshow would animate immediately.</li>
624
- <li>Fixed a bug with smooth scrolling links having the same ID on two different pages.</li>
625
- <li>Fixed a bug with sub-menus going off the right side of the page in the Menu module.</li>
626
- <li>Fixed a bug with module classes being serialized in saved layout data when a row is copied.</li>
627
- <li>Fixed a bug with mixed double quotes breaking the JS for the FLBuilder::render_query method.</li>
628
- <li>Fixed a bug caused by the WPide plugin.</li>
629
- <li>Fixed a select field bug where the value of the 'selected' function was being echoed instead of returned.</li>
630
- <li>Fixed a bug with the Google Plus button not working in the Slideshow module.</li>
631
- <li>Fixed a bug with wbr tags breaking nested forms.</li>
632
- </ul>
633
-
634
- <h4>1.7.5 - 02/24/2016</h4>
635
- <p><strong>Bug Fixes</strong></p>
636
- <ul>
637
- <li>Fixed a CSS bug with row background color overlays preventing module access in 1.7.4.</li>
638
- <li>Fixed a bug where setting a blank default page heading selector in the global settings would hide the entire page.</li>
639
- <li>Fixed an IE11 bug with full height rows that have fixed width content.</li>
640
- <li>Fixed a bug with the read more link not showing in the Posts Carousel module when the content is hidden.</li>
641
- </ul>
642
-
643
- <h4>1.7.4 - 02/22/2016</h4>
644
- <p><strong>Enhancements</strong></p>
645
- <ul>
646
- <li>Added a welcome page to the admin settings.</li>
647
- <li>Added updater enhancements to support the new domain manager.</li>
648
- <li>Pagination in the Gallery module's lightbox is now sequential instead of top to bottom.</li>
649
- <li>Changed the column settings icon from a wrench icon to columns icon for consistency with the module overlay.</li>
650
- <li>The Content Slider module now adds the srcset attribute to images when it can.</li>
651
- <li>The URL is now updated when a smooth scroll link has finished scrolling.</li>
652
- <li>Args can now be passed to auto suggest fields for modifying any of the auto suggest settings.</li>
653
- <li>Misc translation updates.</li>
654
- </ul>
655
- <p><strong>Bug Fixes</strong></p>
656
- <ul>
657
- <li>Fixed a bug with flashing slides in the Content Slider module.</li>
658
- <li>Fixed a bug with column display settings when equal heights are enabled.</li>
659
- <li>Fixed a bug with shortcodes not rendering on bbPress pages.</li>
660
- <li>Fixed a bug with the Gallery module not working in the tabs module when added via a shortcode.</li>
661
- <li>Fixed a bug with the fl-builder class being added to archive pages.</li>
662
- <li>Fixed a bug with the number showing in the Number Counter module before it has animated.</li>
663
- <li>Fixed a bug with duplicate videos showing in Video modules when using the browser's back button.</li>
664
- <li>Fixed issues with bad Layout Settings JavaScript breaking the builder.</li>
665
- <li>Fixed module CSS bugs with empty values.</li>
666
- <li>Fixed a translation bug in the Posts module with translating the comments string.</li>
667
- <li>Fixed issues with schema structured data in all post modules.</li>
668
- <li>Fixed a JavaScript bug with the Accordion module.</li>
669
- <li>Fixes edge case issues with widget/shortcode scripts firing before they should. Specifically fixes issues with Hero Slider.</li>
670
- <li>Fixed CSS issues with post titles being hidden when loading builder content via a shortcode.</li>
671
- <li>Fixed Thai translation.</li>
672
- </ul>
673
-
674
- <h4>1.7.3 - 02/01/2016</h4>
675
- <p><strong>Enhancements</strong></p>
676
- <ul>
677
- <li>Developers can now hook into AJAX requests using the fl_ajax_* hooks.</li>
678
- <li>Added the fl_builder_render_js filter for filtering JavaScript cached by the builder.</li>
679
- <li>Added the fl_builder_render_shortcodes filter for disabling shortcode parsing by the builder.</li>
680
- <li>Added the fl_builder_get_upload_dir and fl_builder_get_cache_dir filters for filtering those paths.</li>
681
- <li>Added the fl_builder_before_save_layout and fl_builder_after_save_layout actions for hooking into when layout data is saved .</li>
682
- </ul>
683
- <p><strong>Bug Fixes</strong></p>
684
- <ul>
685
- <li>Fixed a bug with vertically centered content in full height rows on iOS devices.</li>
686
- <li>Fixed a bug with the read more link not showing in the Posts Slider module when the content is hidden.</li>
687
- <li>Fixed a bug with backslashes being stripped out of the layout settings.</li>
688
- <li>Fixed a bug with the Pricing Table module buttons caused in 1.7.</li>
689
- <li>Fixed a bug with the link field's auto suggest.</li>
690
- </ul>
691
-
692
- <h4>1.7.2 - 01/26/2016</h4>
693
- <p><strong>Bug Fixes</strong></p>
694
- <ul>
695
- <li>Fixed an AJAX bug caused in the last update that broke all auto suggest fields.</li>
696
- <li>Fixed post status issues when publishing a pending post via the builder. Also fixes published posts becoming pending when the Revisionary plugin is being used.</li>
697
- </ul>
698
-
699
- <h4>1.7.1 - 01/24/2016</h4>
700
- <p><strong>Security</strong></p>
701
- <ul>
702
- <li>Fixed a security issue that could allow a logged in user that doesn't have permission to edit a page to make calls to the builder's editing functions by spoofing an AJAX request. While this issue mainly affects sites that allow anyone to register, it is still recommended that everyone update immediately.</li>
703
- <li>Now using nonces in AJAX requests for additional security.</li>
704
- </ul>
705
- <p><strong>Enhancements</strong></p>
706
- <ul>
707
- <li>The Number Counter module now uses thousands separators.</li>
708
- <li>Updated multiple translations.</li>
709
- <li>The parent node id is now passed when nested forms are rendered so the parent settings can be accessed by the nested form's controls.</li>
710
- </ul>
711
- <p><strong>Bug Fixes</strong></p>
712
- <ul>
713
- <li>Fixed multiple translation issues.</li>
714
- <li>Fixed a bug causing an error on the post list admin screen.</li>
715
- <li>Fixed a bug with the read more link not showing in the Posts module when the content is hidden.</li>
716
- <li>Fixed a bug with the default value in font fields.</li>
717
- <li>Fixed a bug with button style settings showing when no background color is selected.</li>
718
- <li>Fixed a bug with nested form preview text on PHP 7.</li>
719
- </ul>
720
-
721
- <h4>1.7 - 01/18/2016</h4>
722
- <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-7-now-with-partial-refresh-per-page-code-settings-and-our-first-shortcode/">the blog post</a> for detailed info on what was added.</p>
723
- <p><strong>Enhancements</strong></p>
724
- <ul>
725
- <li>Added partial refresh for all rows, columns, and modules. Developers will need to read the custom module docs for info on making their modules compatible with partial refresh.</li>
726
- <li>Added the Layout Settings panel with per-page CSS and JavaScript settings.</li>
727
- <li>Added CSS and JavaScript settings to the Global Settings panel.</li>
728
- <li>Added the Audio module.</li>
729
- <li>Added the Countdown module.</li>
730
- <li>Added new style settings to the Pricing Table module for achieving a variety of different looks.</li>
731
- <li>Added the fl_builder_insert_layout shortcode for inserting builder saved templates, rows, modules anywhere in your posts.</li>
732
- <li>Added the FLBuilder::render_query method for rendering layouts anywhere within a theme's PHP files.</li>
733
- <li>Refactored frontend AJAX actions and rendering to support partial refresh. Developers tapping into those actions may need to update their code.</li>
734
- <li>Optimized loading of the builder UI by concatenating and minifying all core CSS and JavaScript files.</li>
735
- <li>Builder caching is now disabled when WP_DEBUG is set to true.</li>
736
- <li>The editing capability setting now supports multiple comma seperated values.</li>
737
- <li>Updated Google fonts.</li>
738
- </ul>
739
- <p><strong>Bug Fixes</strong></p>
740
- <ul>
741
- <li>Fixed a bug with the Subscribe Form module.</li>
742
- <li>Fixed CSS specificity issues with the new builder shortcode.</li>
743
- <li>Fixed a CSS bug with custom column widths on small devices.</li>
744
- </ul>
745
-
746
- <h4>1.6.4.7 - 1/10/2016</h4>
747
- <p><strong>Enhancements</strong></p>
748
- <ul>
749
- <li>Minor enhancements to the Number Counter module. Added new number position setting (above, inside, below) for number bars. Thanks Kathy Darling for the contribution!</li>
750
- <li>Row background color settings are now always available for adding a fallback for other background types such as videos and slideshows. Thanks Justin Proffitt for the contribution!</li>
751
- <li>Added limit property to suggest fields for limiting the number of selections that can be made.</li>
752
- <li>Added the fl_builder_register_settings_form filter to the register_module method.</li>
753
- <li>Added core WordPress image classes to the Photo module. This allows WordPress to handle srcsets instead of us, fixing a number of issues and adding support for the WP Retina plugin.</li>
754
- <li>Added Czech translation.</li>
755
- <li>Added Farsi translation.</li>
756
- <li>Added Thai translation.</li>
757
- </ul>
758
- <p><strong>Bug Fixes</strong></p>
759
- <ul>
760
- <li>Fixed a bug with scripts in shortcodes and widgets being rendered more than once when a CDN is used. Primarily fixes issues with the Gravity Forms widget, but should help others as well.</li>
761
- <li>Fixed a bug with users that can only submit for review being able to publish posts from within the builder.</li>
762
- <li>Fixed a bug breaking responsive display settings for equal height columns.</li>
763
- <li>Fixed a bug caused by the WP 4.4.1 update that makes it so all templates show in the template selector, saved rows, and saved modules sections.</li>
764
- <li>Fixed a bug with values selected in auto suggest fields not retaining their order.</li>
765
- <li>Fixed a bug with multiple email addresses in the Contact Form module.</li>
766
- <li>Fixed a bug with videos in the Content Slider module continuing to play when the slider advances to the next slide.</li>
767
- <li>Fixed a bug with edge cases where git configurations convert line endings and break the serialized data in the templates.dat file.</li>
768
- </ul>
769
-
770
- <h4>1.6.4.6 - 12/22/2015</h4>
771
- <p><strong>Enhancements</strong></p>
772
- <ul>
773
- <li>Added Hungarian translation.</li>
774
- <li>The Contact Form module now supports a comma separated list of email addresses.</li>
775
- </ul>
776
- <p><strong>Bug Fixes</strong></p>
777
- <ul>
778
- <li>Fixed a bug causing the row and column link color setting to not work.</li>
779
- <li>Fixed a bug with srcsets in the Photo module and custom image sizes.</li>
780
- <li>Fixed a bug making it impossible to edit modules that don't have a height.</li>
781
- <li>Fixed a bug with IE11 and row alignment.</li>
782
- </ul>
783
-
784
- <h4>1.6.4.5 - 12/15/2015</h4>
785
- <p><strong>Enhancements</strong></p>
786
- <ul>
787
- <li>WordPress 4.4's responsive image code is now applied to all images that contain an attachment ID.</li>
788
- <li>Added support for the Autoptimize caching plugin.</li>
789
- </ul>
790
- <p><strong>Bug Fixes</strong></p>
791
- <ul>
792
- <li>Fixed a bug in the Photo module with srcsets and custom image sizes.</li>
793
- <li>Fixed a bug with using shortcodes in link fields.</li>
794
- <li>Fixed a bug with smooth scrolling and the Tabs module.</li>
795
- <li>Fixed a bug with equal heights in the Posts module.</li>
796
- <li>Fixed a bug with icon positioning in the Callout module.</li>
797
- <li>Fixed a bug with Menu module text being searched in searches.</li>
798
- <li>Fixed a bug with full height rows and content alignment in IE11.</li>
799
- <li>Fixed a bug causing the text in textareas to be white.</li>
800
- </ul>
801
-
802
- <h4>1.6.4.4 - 12/08/2015</h4>
803
- <p><strong>Enhancements</strong></p>
804
- <ul>
805
- <li>Added Success Action setting to the Contact Form module to show a message or redirect to a URL when the form is submitted.</li>
806
- <li>The from email address for Contact Form module submissions is now set to the email of the person that filled out the form.</li>
807
- <li>Added WebM fallback support to the Video module.</li>
808
- <li>Added srcset support to the Photo module for better responsiveness of images in anticipation of WordPress 4.4.</li>
809
- <li>Added ConvertKit integration to the Subscribe Form module.</li>
810
- <li>Added Drip integration to the Subscribe Form module.</li>
811
- <li>Added Campayn integration to the Subscribe Form module.</li>
812
- <li>Added Mailrelay integration to the Subscribe Form module.</li>
813
- <li>Added Sendy integration to the Subscribe Form module.</li>
814
- <li>Added two new filters for working with post types that the builder is enabled on.</li>
815
- <li>Added JavaScript event to the Accordion module for when sections are toggled.</li>
816
- <li>Updated Font Awesome.</li>
817
- </ul>
818
- <p><strong>Bug Fixes</strong></p>
819
- <ul>
820
- <li>Fixed a bug with theme white labeling and child themes.</li>
821
- <li>Fixed a bug with theme white labeling and the Customizer.</li>
822
- <li>Fixed a bug with Gantry framework compatibility.</li>
823
- <li>Fixed a bug with floating content in the Tabs module.</li>
824
- <li>Fixed a bug with blurry background photos in the Post Slider module.</li>
825
- <li>Fixed a bug causing global translations to be overridden by local translations.</li>
826
- <li>Fixed a bug with cache flushing in the Widget module.</li>
827
- </ul>
828
-
829
- <h4>1.6.4.3 - 11/23/2015</h4>
830
- <p><strong>Enhancements</strong></p>
831
- <ul>
832
- <li>Added theme branding to the page builder's branding settings for Agency customers.</li>
833
- <li>Added show_remove option to photo fields for developers.</li>
834
- </ul>
835
- <p><strong>Bug Fixes</strong></p>
836
- <ul>
837
- <li>Fixed CSS conflicts with third party themes and the core WordPress media uploader UI.</li>
838
- <li>Fixed multiple color picker bugs.</li>
839
- <li>Fixed a bug with the media library not showing on older versions of Safari.</li>
840
- <li>Fixed a bug with the Accordion module not applying the correct class to all open items.</li>
841
- <li>Fixed a bug caused by entering text strings into the Number Counter settings.</li>
842
- <li>Fixed a bug with template assets not loading with the fl_builder_global_posts filter.</li>
843
- <li>Fixed a bug with the Slideshow module where thumbnail pagination would disappear when two slideshows were on the same page.</li>
844
- <li>Fixed a bug with module animations not running when positioned below a gallery module.</li>
845
- <li>Fixed a bug with video background positions being messed up when images haven't fully loaded within a row.</li>
846
- <li>Fixed a bug causing random sorting of posts in the Posts module not to work.</li>
847
- </ul>
848
-
849
- <h4>1.6.4.2 - 11/05/2015</h4>
850
- <p><strong>Enhancements</strong></p>
851
- <ul>
852
- <li>Added a Match Height setting to the Posts module's Grid layout.</li>
853
- <li>Custom module categories now show up before the WordPress Widgets category.</li>
854
- <li>Added the fl_builder_module_categories filter.</li>
855
- <li>Text field enhancements for developers that allow for a list of predefined options. Thanks Oliver!</li>
856
- <li>Added Danish translation.</li>
857
- <li>Added Hebrew translation.</li>
858
- </ul>
859
- <p><strong>Bug Fixes</strong></p>
860
- <ul>
861
- <li>Fixed a bug with cropping photos that have a query string in their URL. Fixes issues with Jetpack's Photon module.</li>
862
- <li>Fixed a bug with custom image size titles showing as undefined.</li>
863
- <li>Fixed a bug with margins not working on equal height columns in FireFox.</li>
864
- <li>Fixed a bug with UI images for the Slideshow module loading from an external domain not on HTTPS.</li>
865
- <li>Fixed a bug with the Slideshow module caused when the body color is set to an rgba value.</li>
866
- <li>Fixed a bug with the Subscribe Form module not working in global rows.</li>
867
- <li>Fixed a bug with full height rows on iOS devices.</li>
868
- <li>Fixed a bug with the Posts module and the Append extensions on Pages plugin.</li>
869
- <li>Fixed a bug with editing templates in the Sage theme.</li>
870
- <li>Fixed a bug with Slideshow module transitions in IE11.</li>
871
- <li>Fixed a bug with the Insert Pages plugin not working when used within a builder layout.</li>
872
- </ul>
873
-
874
- <h4>1.6.4.1 - 10/21/2015</h4>
875
- <p><strong>Enhancements</strong></p>
876
- <ul>
877
- <li>Images in the Content Slider module now have alt tags.</li>
878
- <li>Updated various translations.</li>
879
- </ul>
880
- <p><strong>Bug Fixes</strong></p>
881
- <ul>
882
- <li>Fixed a content rendering bug that caused pages to become unresponsive with some shortcodes.</li>
883
- <li>Fixed an edge case multisite domain mapping issue with scripts/styles loading under the incorrect domain.</li>
884
- <li>Fixed an issue making it so you couldn't have fixed width content in a full height row.</li>
885
- <li>Fixed an issue with widgets such as the GeoDirectory plugin that output the widget_id as a JavaScript variable name.</li>
886
- <li>Fixed a post date bug with the feed layout in the Posts module.</li>
887
- <li>Fixed a bug caused by plugins that use a forward slash in the browser hash.</li>
888
- </ul>
889
-
890
- <h4>1.6.4 - 10/13/2015</h4>
891
- <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-6-4-featuring-a-new-color-picker-full-height-rows-the-number-counter-module-and-more/" target="_blank">the blog post</a> for detailed info on what was added.
892
- <p><strong>Enhancements</strong></p>
893
- <ul>
894
- <li>Added an all new modern color picker that allows you to save color presets.</li>
895
- <li>Added the ability to create full height rows.</li>
896
- <li>Added the ability to create equal height columns.</li>
897
- <li>Added a column settings dropdown that allows you to edit, delete and insert new columns.</li>
898
- <li>Added the ability to resize columns by dragging.</li>
899
- <li>Added the Number Counter module.</li>
900
- <li>Added a new font setting to the Heading module for picking custom font families.</li>
901
- <li>Misc UI improvements.</li>
902
- </ul>
903
- <p><strong>Bug Fixes</strong></p>
904
- <ul>
905
- <li>Fixed a bug with saving a template where hitting enter loads a 404 page.</li>
906
- <li>Fixed a bug with the Content Slider module's mobile images not showing.</li>
907
- <li>Removed generic lightbox button styling that caused issues with third party themes.</li>
908
- </ul>
909
-
910
- <h4>1.6.3.4 - 10/10/2015</h4>
911
- <p><strong>Bug Fixes</strong></p>
912
- <ul>
913
- <li>Fixed a content rendering issue that can cause an infinite loop with certain shortcodes or widgets.</li>
914
- </ul>
915
-
916
- <h4>1.6.3.3 - 10/06/2015</h4>
917
- <p><strong>Enhancements</strong></p>
918
- <ul>
919
- <li>Added a default option to the date format setting in the post modules. When set to default, the date format set in wp-admin will be used.</li>
920
- <li>Added FLBuilderLayoutConfig JS global with path vars and anchor link animation vars. Allows you to override anchor link animation settings.</li>
921
- <li>Added the ability to add MP4 and WebM videos to row backgrounds.</li>
922
- </ul>
923
- <p><strong>Bug Fixes</strong></p>
924
- <ul>
925
- <li>Fixed a bug with widgets that have nested settings arrays.</li>
926
- <li>Fixed a bug with the Post Carousel moduel's image size setting.</li>
927
- <li>Fixed a bug with white text in inputs fields.</li>
928
- <li>Fixed a bug with plugins like Soil that remove the ID attribute from link tags.</li>
929
- <li>Fixed a bug with row background videos when caching is enabled.</li>
930
- <li>Fixed a bug with multiple fields.</li>
931
- <li>Fixed a bug with the Content Slider module where text/photo content renders below the video when the background is set to a video.</li>
932
- <li>Fixed a bug that caused row actions to be inaccessible when negative margins are present.</li>
933
- </ul>
934
-
935
- <h4>1.6.3.2 - 09/14/2015</h4>
936
- <p><strong>Enhancements</strong></p>
937
- <ul>
938
- <li>Updated Font Awesome.</li>
939
- <li>Added Mobile Width setting to the Menu Module.</li>
940
- <li>The $id variable is now always available in a module's frontend.php file.</li>
941
- <li>Added fl_builder_layout_style_media filter.</li>
942
- <li>Added fl_builder_render_css filter.</li>
943
- </ul>
944
- <p><strong>Bug Fixes</strong></p>
945
- <ul>
946
- <li>Added more specificity to link color selectors in the Menu module to prevent them from being overridden by themes.</li>
947
- <li>Reworked parallax logic so it works on touch screen laptops.</li>
948
- </ul>
949
-
950
- <h4>1.6.3.1 - 09/03/2015</h4>
951
- <p><strong>Bug Fixes</strong></p>
952
- <ul>
953
- <li>Fixed an issue with deleting rows and resizing columns.</li>
954
- <li>CSS tweak to fix overlay global tag when a row color is set.</li>
955
- <li>CSS tweak to fix media modal close button.</li>
956
- </ul>
957
-
958
- <h4>1.6.3 - 09/01/2015</h4>
959
- <p><strong>Enhancements</strong></p>
960
- <ul>
961
- <li>Rows and modules can now be saved as either standard or global templates! Be sure to check out <a href="https://www.wpbeaverbuilder.com/row-and-module-templates-are-now-in-beta/" target="_blank">the blog post</a> for more info on how that works.</li>
962
- <li>Agency members now have the option to add categorized sections of their row and module templates to the builder's panel.</li>
963
- <li>Added a new admin setting under Settings > Page Builder > Editing to disable the ability to edit global rows and modules.</li>
964
- <li>Duplicating global row and module templates now converts them to standard templates.</li>
965
- <li>The text editor font size setting now uses px instead of pt.</li>
966
- <li>Added additional sizes to the text editor font size setting.</li>
967
- <li>Added access to the $settings object in the fl_builder_control_ action.</li>
968
- </ul>
969
- <p><strong>Bug Fixes</strong></p>
970
- <ul>
971
- <li>Added AJAX check for the builder's init method to prevent issues with WooCommerce AJAX.</li>
972
- <li>Added more specificity to selectors for row and column colors to prevent themes from overriding them.</li>
973
- <li>Fixed Menu module typo.</li>
974
- <li>Fixed linking issues with the content slider.</li>
975
- </ul>
976
-
977
- <h4>1.6.2.1 - 08/25/2015</h4>
978
- <p><strong>Enhancements</strong></p>
979
- <ul>
980
- <li>Replaced image arrows with SVG arrows in the Content Slider module.</li>
981
- <li>Added a setting to the Post Slider module for selecting the thumbnail size.</li>
982
- </ul>
983
- <p><strong>Bug Fixes</strong></p>
984
- <ul>
985
- <li>Fixed a rendering issue with widgets that output styles in wp_enqueue_script.</li>
986
- <li>Fixed an issue with the edit_url method so all urls get set_url_scheme.</li>
987
- <li>Fixed styling issues with the Menu module.</li>
988
- <li>Fixed styling issues with the Posts module.</li>
989
- <li>Fixed broken arrows in the Posts Slider module.</li>
990
- </ul>
991
-
992
- <h4>1.6.2 - 08/16/2015</h4>
993
- <p><strong>Enhancements</strong></p>
994
- <ul>
995
- <li>The Menu module is now out of beta! Be sure to check out <a href="https://www.wpbeaverbuilder.com/the-menu-module-is-now-in-beta/" target="_blank">the blog post</a> for more info on how that works.</li>
996
- <li>Added opacity settings for menu background colors in the Menu module.</li>
997
- <li>Added vertical and horizontal spacing settings for menu items in the Menu module.</li>
998
- <li>Added Polish translation.</li>
999
- </ul>
1000
- <p><strong>Bug Fixes</strong></p>
1001
- <ul>
1002
- <li>Fixed an issue with the Menu module when an empty menu is selected.</li>
1003
- <li>Fixed an issue with the Menu module when resizing from desktop to mobile.</li>
1004
- <li>Fixed an issue with the width of the Menu module accordion layout.</li>
1005
- <li>Fixed an issue with widgets such as the Master Slider widget that only register their scripts in the wp_enqueue_scripts action instead of enqueuing them there.</li>
1006
- </ul>
1007
-
1008
- <h4>1.6.1.1 - 08/11/2015</h4>
1009
- <p><strong>Enhancements</strong></p>
1010
- <ul>
1011
- <li>Tested WordPress 4.3 compatibility.</li>
1012
- <li>Updated translation files.</li>
1013
- <li>The CSS class fl-scroll-link can now be added to links to have them scroll to an element on the page.</li>
1014
- </ul>
1015
- <p><strong>Bug Fixes</strong></p>
1016
- <ul>
1017
- <li>Fixed a bug with toggling settings tabs in the Posts module.</li>
1018
- <li>Fixed a bug with images in the Posts module gallery layout getting stretched on mobile.</li>
1019
- </ul>
1020
-
1021
- <h4>1.6.1 - 08/03/2015</h4>
1022
- <p><strong>Enhancements</strong></p>
1023
- <ul>
1024
- <li>Added the Posts Carousel module.</li>
1025
- <li>Added the Posts Slider module.</li>
1026
- <li>Added style options to the Posts module gallery layout.</li>
1027
- <li>The builder is now compatible with scheduled posts.</li>
1028
- <li>The fullscreen slideshow button now shows at smaller sizes.</li>
1029
- </ul>
1030
- <p><strong>Bug Fixes</strong></p>
1031
- <ul>
1032
- <li>Fixed a bug with row margins not working when a slideshow or video background is present.</li>
1033
- </ul>
1034
-
1035
- <h4>1.6.0.3 - 07/21/2015</h4>
1036
- <p><strong>Bug Fixes</strong></p>
1037
- <ul>
1038
- <li>Fixed a bug with the fl_builder_global_posts filter not returning all posts.</li>
1039
- <li>Fixed a bug with all checkboxes being checked in some widgets when saving.</li>
1040
- <li>Fixed a bug with floating content breaking out of tabs.</li>
1041
- <li>Fixed a bug with autosuggest fields breaking when posts have special characters in the title.</li>
1042
- </ul>
1043
-
1044
- <h4>1.6.0.2 - 07/08/2015</h4>
1045
- <p><strong>Enhancements</strong></p>
1046
- <ul>
1047
- <li>Added support for comma separated selectors in CSS preview fields.</li>
1048
- <li>Added support for an array of rules in CSS preview fields.</li>
1049
- </ul>
1050
- <p><strong>Bug Fixes</strong></p>
1051
- <ul>
1052
- <li>Added exclude_from_search for the templates post type so templates don't so in searches.</li>
1053
- <li>Fixed a bug with nested modules such as buttons causing errors when they are disabled using fl_builder_register_module.</li>
1054
- <li>Fixed a bug with slideshow and gallery templates.</li>
1055
- <li>Fixed a bug with the Posts module that made it so two on the same page couldn't have different post widths.</li>
1056
- <li>Fixed a bug that prevented two accordions on the same page from having open sections at the same time.</li>
1057
- <li>Fixed a bug causing the Facebook comments popup in the Social Buttons module from showing.</li>
1058
- </ul>
1059
-
1060
- <h4>1.6.0.1 - 06/28/2015</h4>
1061
- <p><strong>Enhancements</strong></p>
1062
- <ul>
1063
- <li>Added fl_builder_layout_style_dependencies filter.</li>
1064
- </ul>
1065
- <p><strong>Bug Fixes</strong></p>
1066
- <ul>
1067
- <li>Fixed a bug with importing templates that have slideshows or galleries.</li>
1068
- <li>Fixed a bug with row margins when the background is set to a slideshow or video.</li>
1069
- </ul>
1070
-
1071
- <h4>1.6.0 - 06/22/2015</h4>
1072
- <p><strong>Enhancements</strong></p>
1073
- <ul>
1074
- <li>Added link, hover and heading color settings to rows and columns.</li>
1075
- <li>Tab and accordion items now open when linked to from another page.</li>
1076
- <li>Accordion items now have an active class when open.</li>
1077
- <li>Column layouts now support RTL languages.</li>
1078
- <li>Added an email address option to the Subscribe Form module so signups can be sent to your email address.</li>
1079
- <li>Added support for MailChimp groups to the Subscribe Form module.</li>
1080
- <li>Added ActiveCampaign integration.</li>
1081
- </ul>
1082
- <p><strong>Bug Fixes</strong></p>
1083
- <ul>
1084
- <li>Fixed a bug with the window closing when publishing changes.</li>
1085
- <li>Fixed a bug with getting the correct ID for the current post.</li>
1086
- <li>Fixed a bug with row borders showing when none are set and the background is a slideshow.</li>
1087
- <li>Fixed a bug with the multiple photos field when used in a nested form.</li>
1088
- </ul>
1089
-
1090
- <h4>1.5.9 - 06/01/2015</h4>
1091
- <p><strong>Enhancements</strong></p>
1092
- <ul>
1093
- <li>Accordion and tab items can now be linked to. Please see this <a href="https://www.wpbeaverbuilder.com/knowledge-base/linking-to-tabs-and-accordions/">knowledge base entry</a> for more info.</li>
1094
- <li>Button icons can now be added after the button text.</li>
1095
- <li>Added background color overlay for columns.</li>
1096
- <li>Added Dutch translation.</li>
1097
- </ul>
1098
- <p><strong>Bug Fixes</strong></p>
1099
- <ul>
1100
- <li>Fixed issues with modules, widgets and shortcodes that create secondary loops causing the page to become unresponsive.</li>
1101
- <li>Fixed a bug with widgets that use checkbox groups.</li>
1102
- <li>Fixed a bug with the pricing table module that caused some styling not to show.</li>
1103
- <li>The map module no longer scrolls as you scroll the page.</li>
1104
- <li>CSS tweak to prevent the text editor from breaking when the body's position is set to relative.</li>
1105
- <li>CSS tweak for photos to prevent extra space below them.</li>
1106
- <li>CSS tweak to make fixed background photos scroll on iOS to prevent them from getting blown up too big.</li>
1107
- <li>CSS tweak to fix a FireFox bug with callouts.</li>
1108
- <li>Added jQuery as a dependency for fl-builder-layout-(POST_ID).js so it's included after jquery.js if jquery.js is moved to wp_footer.</li>
1109
- </ul>
1110
-
1111
- <h4>1.5.8 - 05/17/2015</h4>
1112
- <p>Please see <a href="https://www.wpbeaverbuilder.com/?p=14686" target="_blank">the blog post</a> for more info on this release.</p>
1113
- <p><strong>Enhancements</strong></p>
1114
- <ul>
1115
- <li>User defined templates can now be categorized and ordered.</li>
1116
- <li>Revisions are now enabled for user defined templates.</li>
1117
- <li>Added a setting to enable the templates admin interface for editing templates in the WordPress admin.</li>
1118
- <li>Added a setting for Agency members to override core templates.</li>
1119
- <li>Added Hatchbuck integration to the Subscribe Form module.</li>
1120
- <li>Photo backgrounds can now be added to columns.</li>
1121
- </ul>
1122
- <p><strong>Bug Fixes</strong></p>
1123
- <ul>
1124
- <li>Fixed a CSS z-index bug with the Content Slider module's next/prev buttons.</li>
1125
- </ul>
1126
-
1127
- <h4>1.5.7.2 - 05/12/2015</h4>
1128
- <p><strong>Bug Fixes</strong></p>
1129
- <ul>
1130
- <li>Fixed a bug with shortcodes not being rendered when the Posts module is present on a page.</li>
1131
- </ul>
1132
-
1133
- <h4>1.5.7.1 - 05/10/2015</h4>
1134
- <p><strong>Bug Fixes</strong></p>
1135
- <ul>
1136
- <li>Fixed a FireFox and IE bug with the Photo module introduced in 1.5.7.</li>
1137
- <li>Fixed a CSS bug with the height of the Content Slider module when multiple sliders are on the same page.</li>
1138
- <li>Fixed a bug that prevented shortcodes from being escaped with double brackets.</li>
1139
- <li>Fixed a bug that caused the Video module to freeze the builder with videos that are uploaded to WordPress.</li>
1140
- </ul>
1141
-
1142
- <h4>1.5.7 - 05/04/2015</h4>
1143
- <p><strong>Enhancements</strong></p>
1144
- <ul>
1145
- <li>Added Infusionsoft integration.</li>
1146
- </ul>
1147
- <p><strong>Bug Fixes</strong></p>
1148
- <ul>
1149
- <li>Fixed a bug causing MailPoet to be unavailable in the Subscribe Form module.</li>
1150
- <li>Fixed a bug causing the builder's admin settings to be unavailable when DISALLOW_FILE_MODS is set to true.</li>
1151
- <li>Fixed a bug with new lines in photo captions breaking the Slideshow module.</li>
1152
- <li>Fixed a CSS bug with photo captions that are shown on hover.</li>
1153
- <li>Fixed floating content issues with the Accordion module.</li>
1154
- </ul>
1155
-
1156
- <h4>1.5.6 - 04/26/2015</h4>
1157
- <p><strong>Enhancements</strong></p>
1158
- <ul>
1159
- <li>Added SendinBlue integration.</li>
1160
- <li>Added filters for MailChimp single optin and disabling the welcome message.</li>
1161
- <li>Most of the builder's PHP and JavaScript files now have much better inline documentation of classes, properties and methods (we still need to do the modules).</li>
1162
- </ul>
1163
- <p><strong>Tweaks</strong></p>
1164
- <ul>
1165
- <li>Removed phone number validation from the Contact Form module to support international phone numbers.</li>
1166
- <li>Updated FontAwesome.</li>
1167
- <li>Tweaked the Heading module CSS to prevent Dynamik from overriding our styles.</li>
1168
- <li>Added CSS to fix margins issue with the WordPress editor link lightbox and some third party themes.</li>
1169
- </ul>
1170
- <p><strong>Bug Fixes</strong></p>
1171
- <ul>
1172
- <li>Fixed a bug that didn't allow backslashes to be saved.</li>
1173
- <li>Fixed a bug that prevented namespaced widgets from working.</li>
1174
- <li>Fixed a bug with the Posts module that prevented the date from being hidden in the gallery layout.</li>
1175
- </ul>
1176
-
1177
- <h4>1.5.5 - 04/12/2015</h4>
1178
- <p><strong>Enhancements</strong></p>
1179
- <ul>
1180
- <li>The Subscribe Form module is here! Please see <a href="https://www.wpbeaverbuilder.com/build-your-email-lists-with-beaver-builders-new-subscribe-form-module/">the blog post</a> for complete details.</li>
1181
- <li>Added four new templates.</li>
1182
- </ul>
1183
-
1184
- <h4>1.5.4 - 04/08/2015</h4>
1185
- <p><strong>Enhancements</strong></p>
1186
- <ul>
1187
- <li>Added offset setting to the Posts module.</li>
1188
- <li>Added getting started video to the help button.</li>
1189
- <li>Added auto spacing setting to the global settings for turning off auto spacing on responsive layouts.</li>
1190
- <li>Added SVG support to the photo field for sites that have SVG enabled as an mime type.</li>
1191
- </ul>
1192
- <p><strong>Bug Fixes</strong></p>
1193
- <ul>
1194
- <li>Fixed a bug with switching back to the WordPress editor.</li>
1195
- <li>Fixed a bug with textarea text color being overridden by row text color.</li>
1196
- <li>Fixed an issue with varnish by removing the question mark from the URL when publishing.</li>
1197
- <li>Removed FLBuilderModel::delete_asset_cache_domain_change as it's causing issues and we now have the clear cache button.</li>
1198
- </ul>
1199
-
1200
- <h4>1.5.3 - 03/31/2015</h4>
1201
- <p><strong>Enhancements</strong></p>
1202
- <ul>
1203
- <li>Added admin settings section for clearing the builder's CSS and JavaScript cache.</li>
1204
- <li>Added a setting to show the full content in the posts module.</li>
1205
- </ul>
1206
- <p><strong>Bug Fixes</strong></p>
1207
- <ul>
1208
- <li>CSS fix for three column layouts in the WooCommerce module.</li>
1209
- <li>Fixed a preview bug with row background overlay colors.</li>
1210
- <li>Fixed an issue with the PHP glob function not returning an array on some systems.</li>
1211
- <li>Fixed CSS conflicts with third party themes and the WordPress editor.</li>
1212
- </ul>
1213
-
1214
- <h4>1.5.2 - 03/24/2015</h4>
1215
- <p><strong>Enhancements</strong></p>
1216
- <ul>
1217
- <li>Added logic to the accordion module that scrolls a section into view on mobile if it's not visible.</li>
1218
- </ul>
1219
- <p><strong>Bug Fixes</strong></p>
1220
- <ul>
1221
- <li>Rolling back part of the last update that removed the style tag from columns. This is due to the fact that many existing sites have old CSS cached that doesn't contain the column width. We'll be releasing this change again in the near future to give sites time to update their cache with the new CSS.</li>
1222
- <li>Icons in accordion titles don't get replaced anymore when clicked.</li>
1223
- <li>Fixed an unescaped translation string JavaScript bug.</li>
1224
- </ul>
1225
-
1226
- <h4>1.5.1 - 03/22/2015</h4>
1227
- <p><strong>Enhancements</strong></p>
1228
- <ul>
1229
- <li>Added German translation.</li>
1230
- <li>Added Russian translation.</li>
1231
- <li>Smooth scrolling now works for all links on a page including links in the header on third party themes.</li>
1232
- <li>Added phone and subject fields to the contact form module.</li>
1233
- <li>Added settings to the contact form module for showing and hiding fields.</li>
1234
- <li>Builder cache now clears itself if the domain name of a website changes.</li>
1235
- <li>Modules in the backend are now categorized the same as they are on the frontend.</li>
1236
- <li>Moved column width from the style attribute in the markup to the generated css file.</li>
1237
- </ul>
1238
- <p><strong>Bug Fixes</strong></p>
1239
- <ul>
1240
- <li>Fixed a bug with text editor refresh previews.</li>
1241
- <li>Added position:static to the body tag when the builder is active to fix issues with WordPress editor popups when the body is set to position:relative.</li>
1242
- <li>Fixed bugs with setting the product order in the WooCommerce module.</li>
1243
- <li>CSS fix for row/column colors overriding the color of elements in the heading module such as em tags.</li>
1244
- <li>Added ignore_sticky_posts to post module queries to prevent sticky posts from showing when not desired.</li>
1245
- <li>Smooth scrolling is only applied to rows, columns and modules to avoid conflicts with third party scripts.</li>
1246
- <li>Autosuggest fields such as links now work on pre WordPress 4.0.</li>
1247
- </ul>
1248
-
1249
- <h4>1.5.0 - 03/02/2015</h4>
1250
- <p><strong>Enhancements</strong></p>
1251
- <ul>
1252
- <li>Updated Slovak translation.</li>
1253
- </ul>
1254
- <p><strong>Bug Fixes</strong></p>
1255
- <ul>
1256
- <li>Fixed a bug with the JavaScript for smooth scrolling links.</li>
1257
- <li>Fixed a spelling error in the help tour. Thanks Gerard!</li>
1258
- </ul>
1259
-
1260
- <h4>1.4.9 - 03/01/2015</h4>
1261
- <p><strong>Enhancements</strong></p>
1262
- <ul>
1263
- <li>Added a help button to the builder interface that gives users access to a tour, video (coming soon), forums and documentation.</li>
1264
- <li>Added network settings for white labeling the help button. Agency members can customize or disable all help button features such as adding their own video or knowledge base links. Unfortunately, the tour is too complex to make customizable, but it can be disabled and is disabled by default while in simple editing mode.</li>
1265
- <li>Added a welcome message for the first time a user launchs the builder on a site asking if they would like to view the tour.</li>
1266
- <li>Added a new style setting to the button module for creating flat, gradient or transparent buttons.</li>
1267
- <li>Added Arabic and Spanish translations.</li>
1268
- <li>Added display:inline to builder images to prevent themes that set images to display:block from breaking alignment.</li>
1269
- <li>Added JavaScript logic for smooth scrolling of all anchor links in a builder layout.</li>
1270
- </ul>
1271
- <p><strong>Bug Fixes</strong></p>
1272
- <ul>
1273
- <li>Row overlay actions are now fixed to the bottom of the overlay if the actions are hidden by the builder header or are off the page.</li>
1274
- <li>Fixed a bug with background video fallbacks not showing on mobile.</li>
1275
- <li>Fixed a bug with custom modules on Windows servers.</li>
1276
- <li>Fixed a CSS bug with the callout module when the photo sits to the left of the text.</li>
1277
- <li>Fixed a bug that prevented the builder from working with domain masking.</li>
1278
- <li>Fixed a bug caused by W3 Total Cache's HTML minification by disabling minify while the builder is active.</li>
1279
- </ul>
1280
-
1281
- <h4>1.4.8 - 02/22/2015</h4>
1282
- <p><strong>Enhancements</strong></p>
1283
- <ul>
1284
- <li>Added a background color overlay setting for rows. A huge thanks to <a href="http://favolla.com.br/" target="_blank">Diego de Oliveira</a> for this contribution!</li>
1285
- <li>Added global settings for default row width.</li>
1286
- <li>Added a confirmation popup for switching back to text editor mode.</li>
1287
- </ul>
1288
- <p><strong>Bug Fixes</strong></p>
1289
- <ul>
1290
- <li>Fixed a bug with custom icons that only happens on certain sites as PHP's glob function doesn't always return an array.</li>
1291
- <li>Fixed an admin settings JavaScript error caused by unescaped translation strings.</li>
1292
- <li>Fixed a bug causing row background slideshows to show up on archive pages.</li>
1293
- </ul>
1294
-
1295
- <h4>1.4.7 - 02/16/2015</h4>
1296
- <p><strong>Bug Fixes</strong></p>
1297
- <ul>
1298
- <li>Fixed a bug that broke the builder's admin settings page on the standard version.</li>
1299
- </ul>
1300
-
1301
- <h4>1.4.6 - 02/15/2015</h4>
1302
- <p><strong>Enhancements</strong></p>
1303
- <ul>
1304
- <li>Added the ability to upload Icomoon and Fontello font icons under Settings > Page Builder > Icons.</li>
1305
- <li>Added the ability to disable core font icons.</li>
1306
- <li>Added an ID field to row, column and module settings.</li>
1307
- <li>Added French translation.</li>
1308
- <li>Added Itailian translation.</li>
1309
- <li>Added fl_builder_upgrade_url filter. This filter can be used by theme developers to add their affiliate link to the upgrade buttons in the lite version.</li>
1310
- <li>Added fl_builder_settings_form_defaults filter for overriding default form settings.</li>
1311
- <li>Enhanced SSL check for servers behind load balancers.</li>
1312
- <li>Single repeater fields can now be duplicated.</li>
1313
- </ul>
1314
- <p><strong>Bug Fixes</strong></p>
1315
- <ul>
1316
- <li>Row text color no longer overrides heading text color.</li>
1317
- <li>Preview text for form fields now shows the option label for select inputs instead of the option value.</li>
1318
- </ul>
1319
-
1320
- <h4>1.4.5 - 01/26/2015</h4>
1321
- <p><strong>Enhancements</strong></p>
1322
- <ul>
1323
- <li>Added a search field to the icon selector.</li>
1324
- </ul>
1325
- <p><strong>Bug Fixes</strong></p>
1326
- <ul>
1327
- <li>Fixed a bug introduced in 1.4.4 that caused PHP warnings when creating new pages.</li>
1328
- </ul>
1329
-
1330
- <h4>1.4.4 - 01/26/2015</h4>
1331
- <p><strong>Enhancements</strong></p>
1332
- <ul>
1333
- <li>Major improvements to how translations are handled. A huge thanks to Oliver Juhas of <a href="http://www.webmandesign.eu/" target="_blank">WebMan Design</a> for making that happen. <strong>Please Note:</strong> Older translations are not compatible with this update need to be redone. Please get in touch with us if you're interested in helping with that.</li>
1334
- <li>Widgets in the builder now run the widget update method.</li>
1335
- <li>Content for the tabs module now scrolls into view on smaller devices.</li>
1336
- <li>Added filters for working with custom css classes on rows, columns and modules.</li>
1337
- <li>Updated class filenames to follow WordPress standards.</li>
1338
- </ul>
1339
- <p><strong>Bug Fixes</strong></p>
1340
- <ul>
1341
- <li>Fixed icon hover color.</li>
1342
- <li>Fixed a bug with slideshows showing up in the header on archive pages.</li>
1343
- <li>Fixed a bug causing the heading module color to not work when linked.</li>
1344
- <li>Fixed a bug with overriding modules in a theme when the name of the wp-content directory is changed.</li>
1345
- </ul>
1346
-
1347
- <h4>1.4.3 - 01/11/2015</h4>
1348
- <p><strong>Enhancements</strong></p>
1349
- <ul>
1350
- <li>Added Foundation Icons and WordPress Dashicons to the icon selector.</li>
1351
- <li>Added icons for buttons in the Callout, Call To Action, and Content Slider modules.</li>
1352
- <li>Added support for right-to-left languages.</li>
1353
- <li>Read more text can now be customized in posts module.</li>
1354
- <li>Module ids are now accessible in frontend.php using the $id variable.</li>
1355
- </ul>
1356
- <p><strong>Bug Fixes</strong></p>
1357
- <ul>
1358
- <li>Fixed a bug with WordPress installs where core files are installed in a subdirectoy and the index file is in the root.</li>
1359
- </ul>
1360
-
1361
- <h4>1.4.2</h4>
1362
- <p><strong>Bug Fixes</strong></p>
1363
- <ul>
1364
- <li>Fixes for widgets that load in JavaScripts or forget to reset the loop.</li>
1365
- <li>Minor adjustments to how data is passed to the server to prevent 406 errors.</li>
1366
- </ul>
1367
-
1368
- <h4>1.4.1</h4>
1369
- <p><strong>Enhancements</strong></p>
1370
- <ul>
1371
- <li>Added a new responsive breakpoint in the global settings for medium devices.</li>
1372
- <li>Added new column width settings for medium and small devices.</li>
1373
- <li>Added the ability to hide rows, columns and modules at a number of new breakpoints.</li>
1374
- <li>Improved the UI/UX for editing user defined templates.</li>
1375
- <li>User defined templates are now ordered by title instead of id.</li>
1376
- <li>Optimized the loading of images for the gallery module's collage layout.</li>
1377
- <li>White label settings for Agency members are now available on single site installs.</li>
1378
- <li>Updated the custom modules docs and examples with info on the new link field type.</li>
1379
- </ul>
1380
- <p><strong>Bug Fixes</strong></p>
1381
- <ul>
1382
- <li>Fixed a bug that kept some third party widgets from being styled correctly.</li>
1383
- <li>Fixed bugs that caused a secondary layout on a page to be editable when it shouldn't be.</li>
1384
- <li>Replaced the word update with save in AJAX requests to prevent mod security from blocking them.</li>
1385
- <li>Fixed a bug where publishing a layout in multiple tabs caused it to disappear.</li>
1386
- <li>Fixed a bug causing the builder to break in rare cases when canceling out of a preview.</li>
1387
- </ul>
1388
-
1389
- <h4>1.4.0</h4>
1390
- <p><strong>Bug Fixes</strong></p>
1391
- <ul>
1392
- <li>Fixed a bug introduced in 1.3.9 with moving modules into the main layout to create a new row.</li>
1393
- <li>Fixed classname conflicts with the pricing table module that broke the builder in some cases.</li>
1394
- </ul>
1395
-
1396
- <h4>1.3.9</h4>
1397
- <p><strong>Enhancements</strong></p>
1398
- <ul>
1399
- <li>Clicking a Beaver Builder theme header link now asks if you want to publish before launching the builder on a new page.</li>
1400
- <li>Added support for multiple builder layouts on the same page.</li>
1401
- <li>Color picker hex inputs now accept the # symbol.</li>
1402
- <li>Added a new link field that allows you to search for a post of any type to link to.</li>
1403
- <li>Added white labeling to the plugins page.</li>
1404
- <li>Added an admin setting for disabling advanced editing functionality such as adding, deleting and moving modules.</li>
1405
- </ul>
1406
- <p><strong>Bug Fixes</strong></p>
1407
- <ul>
1408
- <li>Fixed a compatibility issue with themes that use older versions of Option Tree.</li>
1409
- <li>Removed deprecated like_escape function from FLBuilderLoop class.</li>
1410
- </ul>
1411
-
1412
- <h4>1.3.8</h4>
1413
- <p><strong>Enhancements</strong></p>
1414
- <ul>
1415
- <li>Single photos can now be opened in a lightbox by choosing lightbox in the photo module's link settings.</li>
1416
- <li>Added the ability to define custom fields through actions. Developers should review the custom module docs and examples for detailed info on how that works.</li>
1417
- <li>Added the ability to duplicate rows.</li>
1418
- </ul>
1419
- <p><strong>Bug Fixes</strong></p>
1420
- <ul>
1421
- <li>Fixed a bug that made it so you could only have one text or code editor within a builder settings panel. Thanks to Nicholas Joannes for the fix!</li>
1422
- <li>Reworked the load order and definitions for the main builder JavaScript class to prevent issues with some minification plugins.</li>
1423
- <li>Fixed a bug with generating new builder node ids that was affecting templates in some cases.</li>
1424
- </ul>
1425
-
1426
- <h4>1.3.7</h4>
1427
- <p><strong>Enhancements</strong></p>
1428
- <ul>
1429
- <li>Added circle crop option to the photo module.</li>
1430
- <li>Added icon setting for white labeling.</li>
1431
- </ul>
1432
- <p><strong>Bug Fixes</strong></p>
1433
- <ul>
1434
- <li>Fixed a bug with the posts module that kept shortcodes from rendering.</li>
1435
- <li>Fixed a bug that made it impossible to append the same template twice.</li>
1436
- <li>Fixed a bug that broke photo cropping.</li>
1437
- </ul>
1438
-
1439
- <h4>1.3.6</h4>
1440
- <p><strong>Enhancements</strong></p>
1441
- <ul>
1442
- <li>The Pricing Table module is here!</li>
1443
- <li>Added page builder icon to admin bar link.</li>
1444
- <li>Added data sanitization to admin settings for better security.</li>
1445
- </ul>
1446
- <p><strong>Bug Fixes</strong></p>
1447
- <ul>
1448
- <li>Minor code refactoring and bug fixes.</li>
1449
- <li>WebKit scrollbar CSS fix.</li>
1450
- </ul>
1451
-
1452
- <h4>1.3.5</h4>
1453
- <p><strong>Enhancements</strong></p>
1454
- <ul>
1455
- <li>Reworked the FLBuilderModel class to drastically lower the number of database operations.</li>
1456
- <li>Updated Swedish translation.</li>
1457
- </ul>
1458
- <p><strong>Bug Fixes</strong></p>
1459
- <ul>
1460
- <li>Fixed a bug with revision support that was causing layout data to be lost in some cases.</li>
1461
- <li>Fixed a bug causing the builder to be active for BuddyPress pages.</li>
1462
- <li>Fixed a bug with the post module's category filtering when a custom post type is present that uses standard categories.</li>
1463
- <li>Fixed post module layout bug caused by images not being fully loaded before layout happens.</li>
1464
- <li>Fixed oversized parallax backgrounds for tablets.</li>
1465
- <li>Fixed a bug with nested settings forms that was causing apostrophes to render incorrectly.</li>
1466
- <li>Replaced jQuery finish call with stop for legacy support.</li>
1467
- <li>Small CSS fix for the builder logo on third party themes.</li>
1468
- </ul>
1469
-
1470
- <h4>1.3.4</h4>
1471
- <p><strong>Enhancements</strong></p>
1472
- <ul>
1473
- <li>The tabs module is here!</li>
1474
- </ul>
1475
- <p><strong>Bug Fixes</strong></p>
1476
- <ul>
1477
- <li>Fixed a bug caused by widgets that embed jQuery inline.</li>
1478
- <li>Fixed a bug caused by the recent update that broke the ability to switch back to the text editor on the post edit screen.</li>
1479
- </ul>
1480
-
1481
- <h4>1.3.3</h4>
1482
- <p><strong>Enhancements</strong></p>
1483
- <ul>
1484
- <li>Live previews are here! We've done away with the "Save &amp; Preview" button as changes will now take effect as soon as you edit a setting. Clicking the cancel button from within a settings panel will now revert any changes made while that panel was active. Developers should test their custom modules before updating and check out the new custom module docs for more information on the live preview APIs.</li>
1485
- <li>Updated custom module docs and examples.</li>
1486
- <li>Updated layout template PSD files.</li>
1487
- <li>Optimized AJAX requests for adding new rows and columns.</li>
1488
- </ul>
1489
- <p><strong>Bug Fixes</strong></p>
1490
- <ul>
1491
- <li>Reworked handling of post data to prevent mod_security 406 and 503 errors.</li>
1492
- </ul>
1493
-
1494
- <h4>1.3.2</h4>
1495
- <p><strong>Enhancements</strong></p>
1496
- <ul>
1497
- <li>Updated custom module docs for developer members.</li>
1498
- </ul>
1499
- <p><strong>Bug Fixes</strong></p>
1500
- <ul>
1501
- <li>Removed do_shortcode from the builder's render content method as it isn't necessary and causes issues.</li>
1502
- <li>Fixed a bug where the builder was removing third party editor buttons from the post edit screen's editor.</li>
1503
- <li>Fixed path to blank builder template thumbnail.</li>
1504
- <li>Reworked the FLBuilderModel::generate_node_id method to account for duplicate ids being generated, specifically on Windows servers.</li>
1505
- <li>Fixed a bug with row ordering caused by plugins that insert script tags within the builder's content area.</li>
1506
- <li>Fixed bug where password protected posts show that the builder is inactive even when it's active.</li>
1507
- </ul>
1508
-
1509
- <h4>1.3.1</h4>
1510
- <p><strong>Enhancements</strong></p>
1511
- <ul>
1512
- <li>Relaunching as Beaver Builder! Check out the new site at <a href="http://www.wpbeaverbuilder.com" target="_blank">www.wpbeaverbuilder.com</a>.</li>
1513
- <li>Developer members can now white label the builder under Settings > Page Builder > Branding.</li>
1514
- </ul>
1515
-
1516
- <h4>1.3.0</h4>
1517
- <p><strong>Enhancements</strong></p>
1518
- <ul>
1519
- <li>Multiple accordian items can now be open at the same time.</li>
1520
- <li>Added Swedish translation.</li>
1521
- </ul>
1522
- <p><strong>Bug Fixes</strong></p>
1523
- <ul>
1524
- <li>Added a version number to builder assets to prevent caching when the builder is active.</li>
1525
- <li>Fixed an issue with editing the same page in multiple tabs.</li>
1526
- <li>Renamed JSMin class to avoid conflicts with W3TC.</li>
1527
- <li>Reworked how builder edit URLs are generated.</li>
1528
- <li>Reworked the fix for shortcodes that load jquery since it's already loaded when the builder is active.</li>
1529
- </ul>
1530
-
1531
- <h4>1.2.9</h4>
1532
- <p><strong>Enhancements</strong></p>
1533
- <ul>
1534
- <li>Updated Font Awesome.</li>
1535
- </ul>
1536
- <p><strong>Bug Fixes</strong></p>
1537
- <ul>
1538
- <li>Fixed Chrome layout bug with the template selector.</li>
1539
- <li>Added back wp_reset_postdata() to the Posts module.</li>
1540
- <li>Fixed a bug where the column size field didn't accept decimals.</li>
1541
- <li>Fixed a bug with the Text Editor module when the visual editor is disabled in the user settings.</li>
1542
- <li>Now forcing auto height and width for builder photos.</li>
1543
- </ul>
1544
-
1545
- <h4>1.2.8</h4>
1546
- <p><strong>Enhancements</strong></p>
1547
- <ul>
1548
- <li>Post meta is now used to store data instead of a custom database table.</li>
1549
- <li>Post revisions are now supported. NOTE: Old revisions will not contain builder data. Only revisions saved after updating to 1.2.8 or later will contain builder data.</li>
1550
- <li>Modules can now be overridden from within a theme directory.</li>
1551
- </ul>
1552
- <p><strong>Bug Fixes</strong></p>
1553
- <ul>
1554
- <li>Scripts and styles enqueued by shortcodes are now rendered in the builder's ajax layout method.</li>
1555
- <li>Fixed an issue with shortcodes when the posts module is present.</li>
1556
- <li>Fixed an issue with WordPress widgets that no longer exist.</li>
1557
- <li>Fixed color picker hex input width so all characters are visible.</li>
1558
- <li>Increased the memory limit for photo crop operations.</li>
1559
- </ul>
1560
-
1561
- <h4>1.2.7</h4>
1562
- <p><strong>Bug Fixes</strong></p>
1563
- <ul>
1564
- <li>Fixed a pagination bug with the posts module when used on a homepage.</li>
1565
- <li>Fixed a compatibility issue with shortcodes that incorrectly output html.</li>
1566
- <li>Added compatibility for password protected pages.</li>
1567
- </ul>
1568
-
1569
- <h4>1.2.6</h4>
1570
- <p><strong>Enhancements</strong></p>
1571
- <ul>
1572
- <li>Added new homepage layout templates.</li>
1573
- <li>Refined existing homepage layout templates.</li>
1574
- </ul>
1575
- <p><strong>Bug Fixes</strong></p>
1576
- <ul>
1577
- <li>The custom post type for user templates doesn't show up in the admin UI anymore.</li>
1578
- </ul>
1579
-
1580
- <h4>1.2.5</h4>
1581
- <p><strong>Enhancements</strong></p>
1582
- <ul>
1583
- <li>Added new gallery layout to the posts module.</li>
1584
- <li>Added new blog gallery template.</li>
1585
- </ul>
1586
- <p><strong>Bug Fixes</strong></p>
1587
- <ul>
1588
- <li>Custom image sizes now show up correctly in the photo module.</li>
1589
- <li>The WordPress heartbeat API is only used when available.</li>
1590
- <li>Fixed a FireFox scrolling issue with the modules panel.</li>
1591
- <li>Cleaned up the WordPress link dialog layout for the text module.</li>
1592
- </ul>
1593
-
1594
- <h4>1.2.4</h4>
1595
- <ul>
1596
- <li>Ok, let's try this again. The posts module is here! :)</li>
1597
- <li>Added updated Italian translation files.</li>
1598
- </ul>
1599
-
1600
- <h4>1.2.3</h4>
1601
- <ul>
1602
- <li>The posts module is here! Add a feed or grid of posts to any page on your website!</li>
1603
- <li>Added five new layout templates.</li>
1604
- </ul>
1605
-
1606
- <h4>1.2.2</h4>
1607
- <p><strong>Enhancements</strong></p>
1608
- <ul>
1609
- <li>Media is now attached to the current post when using the media uploader within the builder.</li>
1610
- </ul>
1611
- <p><strong>Bug Fixes</strong></p>
1612
- <ul>
1613
- <li>Fixed a bug that kept iframes from being exported to the WordPress editor.</li>
1614
- <li>Fixed a bug where private posts were published when saving a layout.</li>
1615
- <li>Fixed initial flash of all testimonials when the testimonials module is loading.</li>
1616
- <li>Fixed woocommerce css issues.</li>
1617
- </ul>
1618
-
1619
- <h4>1.2.1</h4>
1620
- <p><strong>Enhancements</strong></p>
1621
- <ul>
1622
- <li>Updated custom module docs and examples.</li>
1623
- <li>Added an "all" option for toggling which modules are active.</li>
1624
- <li>Added an admin settings section for enabling or disabling templates.</li>
1625
- </ul>
1626
- <p><strong>Bug Fixes</strong></p>
1627
- <ul>
1628
- <li>Fixed a bug with custom module settings sections that have no fields. </li>
1629
- <li>Removed module animations for touch.</li>
1630
- </ul>
1631
-
1632
- <h4>1.2.0</h4>
1633
- <p><strong>Enhancements</strong></p>
1634
- <ul>
1635
- <li>Added support for core MCE plugins.</li>
1636
- <li>Added new translations.</li>
1637
- </ul>
1638
- <p><strong>Bug Fixes</strong></p>
1639
- <ul>
1640
- <li>Builder settings are now loaded after the text domain.</li>
1641
- <li>Fixed an infinite loop bug caused by widgets that call the_content filter.</li>
1642
- </ul>
1643
-
1644
- <h4>1.1.9</h4>
1645
- <p><strong>Enhancements</strong></p>
1646
- <ul>
1647
- <li>Reworked the builder ui to make templates more prominent.</li>
1648
- <li>Separated built in templates into home pages and content pages.</li>
1649
- <li>Templates can now be appended to an existing layout.</li>
1650
- <li>Added custom class and responsive visibility settings to rows, columns and modules.</li>
1651
- <li>Added border settings for rows.</li>
1652
- <li>Columns now have their own settings panel.</li>
1653
- <li>Added column settings button to module actions.</li>
1654
- <li>Removed column width from module settings as it's now available in the column settings.</li>
1655
- <li>Added help tooltips to row, column and module actions.</li>
1656
- <li>The row and module settings spacing tab has been renamed to advanced.</li>
1657
- <li>Added CSS animations for modules under the advanced settings tab.</li>
1658
- <li>Added opacity to seperator module.</li>
1659
- <li>License activation has been moved from Settings &gt; FastLine Themes to Settings &gt; Page Builder &gt; License.</li>
1660
- <li>The builder is now disabled by default for posts.</li>
1661
- <li>Added new font awesome icons.</li>
1662
- </ul>
1663
- <p><strong>Bug Fixes</strong></p>
1664
- <ul>
1665
- <li>Layout templates are no longer visible on the admin menus page.</li>
1666
- <li>Fixed a few bugs with the content slider module and upgraded bxslider.</li>
1667
- <li>Removed the builder's the_content filter while content is being rendered. That prevents modules, widgets or shortcodes that call apply_filters from causing an infinite loop.</li>
1668
- </ul>
1669
-
1670
- <h4>1.1.8</h4>
1671
- <p>The FastLine Page Builder is now licensed under the GNU General Public License v2.0.</p>
1672
-
1673
- <h4>1.1.7</h4>
1674
- <p><strong>Enhancements</strong></p>
1675
- <ul>
1676
- <li>Added scheme.org markup to the photo and video modules.</li>
1677
- <li>Added autoembed to the video module.</li>
1678
- <li>Added support for WPML's copy and duplicate functionality.</li>
1679
- </ul>
1680
- <p><strong>Bug Fixes</strong></p>
1681
- <ul>
1682
- <li>Added a workaround for wp_upload_dir since it doesn't support SSL.</li>
1683
- </ul>
1684
-
1685
- <h4>1.1.6</h4>
1686
- <p>The builder is now compatible with WP Minify.</p>
1687
-
1688
- <h4>1.1.5</h4>
1689
- <p><strong>Bug Fixes</strong></p>
1690
- <ul>
1691
- <li>Fixed an issue with themes that load in an older version of jQuery after wp_head is called.</li>
1692
- <li>Fixed a bug with parallax backgrounds in Chrome.</li>
1693
- <li>External scripts such as YUI3 are now loaded via HTTPS if the site is using HTTPS.</li>
1694
- </ul>
1695
-
1696
- <h4>1.1.4</h4>
1697
- <p><strong>Enhancements</strong></p>
1698
- <ul>
1699
- <li>Added video, slideshow and parallax row backgrounds.</li>
1700
- <li>Video shortcode embeds are now responsive.</li>
1701
- <li>Added poster, loop and autoplay options to the video module when using videos from the media library.</li>
1702
- <li>Developer members now have access to documentation and examples for building custom modules.</li>
1703
- </ul>
1704
- <p><strong>Bug Fixes</strong></p>
1705
- <ul>
1706
- <li>Fixed a bug where posts in secondary loops were showing that the builder was active even when it wasn't.</li>
1707
- <li>Fixed another jQuery conflict caused by 3rd party plugins.</li>
1708
- <li>Fixed a bug with the gallery module that was causing full size photos to be loaded.</li>
1709
- <li>3rd party editor plugins are now removed from the builder to prevent JavaScript conflicts.</li>
1710
- <li>Fixed a bug that was causing button colors not to stick.</li>
1711
- </ul>
1712
-
1713
- <h4>1.1.3</h4>
1714
- <p><strong>Enhancements</strong></p>
1715
- <ul>
1716
- <li>Added the ability for users to save, import and export their own templates.</li>
1717
- <li>Added custom width option for buttons.</li>
1718
- <li>Added fl_builder_global_posts filter for loading layout assets globally.</li>
1719
- </ul>
1720
- <p><strong>Bug Fixes</strong></p>
1721
- <ul>
1722
- <li>Reworked how shortcodes are handled to fix compatibility issues with shortcodes that create secondary loops.</li>
1723
- <li>Various minor bug fixes.</li>
1724
- </ul>
1725
-
1726
- <h4>1.1.2</h4>
1727
- <p><strong>Enhancements</strong></p>
1728
- <ul>
1729
- <li>Split modules up into two groups, Basic Modules and Advanced Modules.</li>
1730
- <li>Added Italian translation. Thanks Davide Pante!</li>
1731
- </ul>
1732
- <p><strong>Bug Fixes</strong></p>
1733
- <ul>
1734
- <li>In the last update we added higher z-indexes to the builder interface to deal with theme compatibility issues. That broke the media uploader and has been fixed.</li>
1735
- </ul>
1736
-
1737
- <h4>1.1.1</h4>
1738
- <ul>
1739
- <li>Fixed a webkit issue that was breaking the builder lightbox when displayed over an HTML5 video.</li>
1740
- <li>Fixed a bug with shortcodes that create custom loops.</li>
1741
- <li>Assets for all posts on a category page are now loaded.</li>
1742
- <li>Fixed an issue where WordPress widgets, such as Gravity Forms, were loading in jQuery a second time.</li>
1743
- <li>Added higher z-indexes to the builder interface to deal with theme compatibility issues.</li>
1744
- </ul>
1745
-
1746
- <h4>1.1.0</h4>
1747
- <p><strong>Enhancements</strong></p>
1748
- <ul>
1749
- <li>Added support for plugins that duplicate posts.</li>
1750
- </ul>
1751
- <p><strong>Bug Fixes</strong></p>
1752
- <ul>
1753
- <li>Fixed a compatibility issue with the WP-simpleviewer plugin.</li>
1754
- <li>Fixed a bug with orphaned modules when duplicating a layout.</li>
1755
- <li>Fixed a bug with 404 pages and launching the builder on an unsaved post.</li>
1756
- </ul>
1757
-
1758
- <h4>1.0.9</h4>
1759
- <p><strong>Enhancements</strong></p>
1760
- <ul>
1761
- <li>Enhancements that allow developers to create custom modules as plugins.</li>
1762
- </ul>
1763
- <p><strong>Bug Fixes</strong></p>
1764
- <ul>
1765
- <li>Fixed a bug that was breaking the builder when disabling a module that has been inserted into a layout.</li>
1766
- <li>Minor bug fixes for the CTA module.</li>
1767
- </ul>
1768
-
1769
- <h4>1.0.8</h4>
1770
- <p><strong>Enhancements</strong></p>
1771
- <ul>
1772
- <li>Stripped down builder content is now exported to the default WordPress editor.</li>
1773
- <li>Added new settings tab for enabling or disabling builder modules.</li>
1774
- <li>Builder layouts are now reimported on plugin activation, even if you use the uninstall feature on the settings page. </li>
1775
- <li>Minor tweaks to the button module CSS to prevent third party themes from overriding colors.</li>
1776
- </ul>
1777
- <p><strong>Bug Fixes</strong></p>
1778
- <ul>
1779
- <li>Fixed a bug with the CSS for the contact form.</li>
1780
- </ul>
1781
-
1782
- <h4>1.0.7</h4>
1783
- <ul>
1784
- <li>Fixed a JavaScript bug that was breaking the builder in WordPress 3.9.</li>
1785
- <li>Fixed a bug with third party video embeds.</li>
1786
- <li>Now using fitVids.js for responsive video embeds.</li>
1787
- </ul>
1788
-
1789
- <h4>1.0.6</h4>
1790
- <p><strong>Enhancements</strong></p>
1791
- <ul>
1792
- <li>Added warning for leaving the page when editing settings.</li>
1793
- <li>Builder layouts are now locked when editing using the built in WordPress post locking system.</li>
1794
- <li>Video module now excepts formats other than MP4.</li>
1795
- <li>Video module is now responsive for media library embeds.</li>
1796
- <li>Removed manage subscription link from plugins page. Subscriptions can be managed under Settings > FastLine Themes.</li>
1797
- </ul>
1798
- <p><strong>Bug Fixes</strong></p>
1799
- <ul>
1800
- <li>Fixed a bug with widget modules. Now when you uninstall a custom widget that was inserted into the builder, it doesn't break.</li>
1801
- <li>Fixed an issue with button css being overriden by third party themes.</li>
1802
- </ul>
1803
-
1804
- <h4>1.0.5</h4>
1805
- <p><strong>Enhancements</strong></p>
1806
- <ul>
1807
- <li>Added three new layout templates.</li>
1808
- <li>Added new icon group module.</li>
1809
- </ul>
1810
- <p><strong>Bug Fixes</strong></p>
1811
- <ul>
1812
- <li>Fixed an issue with single quotes in fields within nested forms.</li>
1813
- <li>Added wp_reset_query to ensure the correct post is being loaded.</li>
1814
- </ul>
1815
-
1816
- <h4>1.0.4</h4>
1817
- <p><strong>Enhancements</strong></p>
1818
- <ul>
1819
- <li>Added new Accordion module.</li>
1820
- </ul>
1821
- <p><strong>Bug Fixes</strong></p>
1822
- <ul>
1823
- <li>Added nocache headers for when the builder is active to prevent the draft layout from being cached. This keeps the builder from breaking when the browser's back button is used.</li>
1824
- </ul>
1825
-
1826
- <h4>1.0.3</h4>
1827
- <p>Fixed a bug with the text editor and html modules that was introduced in the last update.</p>
1828
-
1829
- <h4>1.0.2</h4>
1830
- <p><strong>Enhancements</strong></p>
1831
- <ul>
1832
- <li>Updated Font Awesome to include new icons in 4.0.3.</li>
1833
- <li>Added custom post type support under Settings > Page Builder.</li>
1834
- <li>Minor enhancements to the drag and drop experience.</li>
1835
- </ul>
1836
- <p><strong>Bug Fixes</strong></p>
1837
- <ul>
1838
- <li>Fixed a bug with column resizing.</li>
1839
- <li>Fixed bug where publishing a draft doesn't set the post slug.</li>
1840
- <li>Photo module now accepts relative urls for links.</li>
1841
- <li>Fixed theme compatibility issue with drag and drop.</li>
1842
- <li>Fixed an issue with JSMin being redeclared by other plugins.</li>
1843
- <li>Reworked how the builder handles loading in jQuery.</li>
1844
- </ul>
1845
-
1846
- <h4>1.0.1</h4>
1847
- <p><strong>Enhancements</strong></p>
1848
- <ul>
1849
- <li>Major enhancements to the drag and drop experience.</li>
1850
- </ul>
1851
- <p><strong>Bug Fixes</strong></p>
1852
- <ul>
1853
- <li>Fixed text editor module for the upcoming WordPress 3.9 release.</li>
1854
- <li>Fixed a bug with deleting rows that contain a single column.</li>
1855
- </ul>
1856
-
1857
- <h4>1.0</h4>
1858
- <p>Version 1.0 is here!</p>
1859
- <ul>
1860
- <li>Builder layouts are now only enabled once the publish button is clicked within the builder, not when the builder button is clicked from the post edit screen or admin toolbar. This allows people to work on builder layouts while still keeping their original WP editor content.</li>
1861
- <li>Changed 'Discard Changes' to 'Discard Draft' so users know they are discarding the current draft layout.</li>
1862
- <li>Existing post content is now migrated to a text module when launching the builder.</li>
1863
- <li>Publishing a builder layout now publishes the parent post if it is a draft.</li>
1864
- <li>Default page title is now only hidden for pages, not blog posts.</li>
1865
- </ul>
1866
-
1867
- <h4>0.8.7</h4>
1868
- <p><strong>Enhancements</strong></p>
1869
- <ul>
1870
- <li>Modules can now be dropped into column positions to create new column groups.</li>
1871
- <li>Added new pre-built layouts.</li>
1872
- <li>Added "click action" setting to the gallery module so users can turn off the lightbox if their theme is using a custom one.</li>
1873
- </ul>
1874
- <p><strong>Bug Fixes</strong></p>
1875
- <ul>
1876
- <li>Row overlay height now resets when column groups are deleted.</li>
1877
- <li>Fixed caching issue that kept WordPress widgets from updating.</li>
1878
- <li>Fixed a bug with the content slider module that flashed all of the slides before loading.</li>
1879
- </ul>
1880
-
1881
- <h4>0.8.6</h4>
1882
- <p><strong>Enhancements</strong></p>
1883
- <ul>
1884
- <li>Added contact form module.</li>
1885
- </ul>
1886
- <p><strong>Bug Fixes</strong></p>
1887
- <ul>
1888
- <li>Added jQuery migrate so the builder is compatible with plugins running on older versions of jQuery.</li>
1889
- </ul>
1890
-
1891
- <h4>0.8.5</h4>
1892
- <p><strong>Enhancements</strong></p>
1893
- <ul>
1894
- <li>Added new pre-built layout templates.</li>
1895
- </ul>
1896
- <p><strong>Bug Fixes</strong></p>
1897
- <ul>
1898
- <li>Row backgrounds now revert to background-attachment scroll on mobile.</li>
1899
- <li>Fixed alignment bug with icon module.</li>
1900
- <li>Fixed slideshow resize bug when exiting fullscreen.</li>
1901
- <li>Fixed bug with row drag helper position.</li>
1902
- </ul>
1903
-
1904
- <h4>0.8.4</h4>
1905
- <p><strong>Bug Fixes</strong></p>
1906
- <ul>
1907
- <li>Fixed bug with shortcodes not rendering.</li>
1908
- <li>Fixed module duplication bug.</li>
1909
- <li>Fixed bug with textareas in the HTML module.</li>
1910
- </ul>
1911
-
1912
- <h4>0.8.3</h4>
1913
- <p>Fixed lightbox button hover bug for builder gallery module.</p>
1914
-
1915
- <h4>0.8.2</h4>
1916
- <p>Responsive module margins now only reset if negative or greater than the default.</p>
1917
-
1918
- <h4>0.8.1</h4>
1919
- <p>Initial beta release.</p>
1
+ <h4>1.10.6.3 7/05/2017</h4>
2
+ <p><strong>Bug Fixes</strong></p>
3
+ <ul>
4
+ <li>Fixed google fonts script logic introduced in 1.10</li>
5
+ </ul>
6
+
7
+ <h4>1.10.6.2 6/21/2017</h4>
8
+ <p><strong>Bug Fixes</strong></p>
9
+ <ul>
10
+ <li>Fixed a minor bug with adding new rows, sometimes they would appear below the content</li>
11
+ </ul>
12
+
13
+ <h4>1.10.6.1 6/21/2017</h4>
14
+ <p><strong>Bug Fixes</strong></p>
15
+ <ul>
16
+ <li>Fix broken markup caused by changes to posts module list mode introduced in 1.10.6</li>
17
+ </ul>
18
+
19
+ <h4>1.10.6 6/19/2017</h4>
20
+ <p><strong>Enhancements</strong></p>
21
+ <ul>
22
+ <li>Subscribe Form module: New service for iContact Pro.</li>
23
+ <li>Subscribe Form module: Added support for Godaddy Email Marketing.</li>
24
+ <li>Saved rows in Builder UI now sorted alphabetically.</li>
25
+ <li>Enhanced WP-CLI support. See <a href="http://kb.wpbeaverbuilder.com/article/504-wp-cli">documentation</a>.</li>
26
+ <li>New action <code>fl_builder_subscribe_form_submission_complete</code> added to Subscribe Form module.</li>
27
+ <li>New filter <code>fl_builder_render_module_settings_assets</code> added to settings form assets.</li>
28
+ </ul>
29
+ <p><strong>Bug Fixes</strong></p>
30
+ <ul>
31
+ <li>Removed the new core media widgets from the builder since they don’t work in the builder and we have modules that do the same thing.</li>
32
+ <li>Fixed the core text widget form in the builder so the legacy form loads since the new form in 4.8 doesn’t. The text widget is also removed from the module list in favor of the Text Editor and HTML modules. Sites previously using the text widget will still render and they can still be edited, they just won’t be able to add new text widgets.</li>
33
+ <li>Fixed Slideshow module not showing in the Tabs module.</li>
34
+ <li>Fixed JS error in Row > Background > Slideshow on touch-enabled devices.</li>
35
+ <li>Increased the video ratio to 16:9 to fix the top/bottom black border on responsive layout.</li>
36
+ <li>Changed span to div element for the Accordion label to avoid possible W3C validation error.</li>
37
+ <li>Disabled click event while transitioning on Posts Carousel and Posts Slider.</li>
38
+ <li>Fixed a row duplication issue if the row contains a layout shortcode.</li>
39
+ <li>Fixed Posts module infinite scroll if Posts Slider module is on same page.</li>
40
+ <li>Added sans-serif as Google Fonts fallback.</li>
41
+ <li>Throw an error if wrong type of Icomoon icons are uploaded.</li>
42
+ <li>Fixed PHP notice on 404 pages if layout shortcode is used via a hook.</li>
43
+ <li>Reduced encoding issues when copying template.dat files between Windows and UNIX servers.</li>
44
+ <li>Disabled click event on Testimonial module's navigation dots and arrows while transitioning to avoid skipping slide item.</li>
45
+ <li>Pagination issue with Posts module if page URL has a query parameter.</li>
46
+ <li>Fixed menu current item class not working on front page when menu is rendered via a hook.</li>
47
+ <li>Fixed menu overlay layout issue on responsive style.</li>
48
+ <li>Make sure submenu closes on pages with scroll-to link.</li>
49
+ <li>Featured image should now be displayed below title and beside text for both left and right position Posts module list.</li>
50
+ <li>Fixed pagination on single custom post types with Posts module caused by canonical redirection.</li>
51
+ </ul>
52
+
53
  <h4>1.10.5.1 - 6/5/2017</h4>
54
  <p><strong>Bug Fixes</strong></p>
55
  <ul>
57
  </ul>
58
 
59
  <h4>1.10.5 - 6/5/2017</h4>
60
+ <p><strong>Enhancements</strong></p>
61
+ <ul>
62
  <li>Added color connection for row backgrounds.</li>
63
  <li>Added responsive breakpoint settings to Menu Module.</li>
64
  <li>Subscribe form module - enable enter key to submit form.</li>
68
  <li>Added action <code>fl_builder_loop_settings_before_form</code>.</li>
69
  <li>Added action <code>fl_builder_loop_settings_after_form</code>.</li>
70
  <li>Updated language files, new language added: <code>en_GB</code>.</li>
71
+ </ul>
72
+ <p><strong>Bug Fixes</strong></p>
73
+ <ul>
74
+ <li>Fixed password protected posts breaking Themer layouts.</li>
75
  <li>Fixed conflict with WP Courseware.</li>
76
+ <li>Fixed setting toggles not working in nested forms.</li>
77
+ <li>Fixed broken images in the Zen Life template.</li>
78
+ <li>Fixed hidden nodes showing when the builder is active for layouts that aren't currently being edited.</li>
79
+ <li>Fixed not being able to save user access settings with no role set.</li>
80
  <li>Fixed subscription downloads showing up when the builder is white labeled.</li>
81
  <li>Fixed issue with cropped images when Jetpacks Photon module is enabled.</li>
82
  <li>Fixed posts module when multiple authors are selected.</li>
89
  <li>Fixed JS error on older versions of WordPress.</li>
90
  </ul>
91
 
92
+ <h4>1.10.4 - 5/18/2017</h4>
93
+ <p><strong>Bug Fixes</strong></p>
94
+ <ul>
95
+ <li>Fixed the builder admin menu not showing up for some people with Beaver Themer installed.</li>
96
+ </ul>
97
+
98
+ <h4>1.10.3 - 5/17/2017</h4>
99
+ <p><strong>Enhancements</strong></p>
100
+ <ul>
101
+ <li>Added 'bottom' as an alignment option for row contents.</li>
102
+ <li>Testimonials Module, new setting added to control slider direction.</li>
103
+ <li>Subscribe module MailPoet 3 beta support added.</li>
104
+ <li>Updated pt_PT translation.</li>
105
+ <li>Added the same <a href="http://kb.wpbeaverbuilder.com/article/139-set-up-a-mega-menu" target="_blank">mega menu logic as the theme</a> to the Menu module.</li>
106
+ <li>Added a submenu spacing setting to the Menu module.</li>
107
+ </ul>
108
+ <p><strong>Bug Fixes</strong></p>
109
+ <ul>
110
+ <li>Fixed the column width for reversed stacking order on mobile.</li>
111
+ <li>Fixed a translation error in wp-admin. 'This is a global %s' was not being parsed.</li>
112
+ <li>Fixed RTL issue with testimonials module.</li>
113
+ <li>Fixed a js error if breakpoint was left blank in global settings. Now a required numeric field.</li>
114
+ <li>Fixed an issue where it was possible to have two versions of the plugin active on GoDaddy.</li>
115
+ <li>Fixed an issue with mobile menu flashing unstyled content on initial load.</li>
116
+ <li>Fixed reCaptcha errors in Subscribe & Contact Form Modules.</li>
117
+ <li>Fixed vertical alignment center on full height rows in IE11.</li>
118
+ <li>Fixed an issue with BuddyPress. Builder activate link removed from BuddyPress generated pages.</li>
119
+ <li>Fixed a padding issue on reverse stacked video module.</li>
120
  <li>Fixed Subscribe Module, GetRespone API would throw an error and not subscribe if name field is hidden.</li>
121
+ <li>Fixed a translation compatibility issue with Beaver Themer plugin.</li>
122
+ <li>Fixed read more link in the Posts module not going below the content and causing line-height issues in the list layout.</li>
123
+ <li>Fixed color picker closing when the mouse goes outside of the picker during drag.</li>
124
+ <li>Fixed hidden global row and module labels when they have long titles.</li>
125
+ </ul>
126
+
127
+ <h4>1.10.2 - 5/2/2017</h4>
128
+ <p><strong>Enhancements</strong></p>
129
+ <ul>
130
+ <li>Added dot indicating whether the builder is enabled or not on builder launch links.</li>
131
+ <li>Added field connections for row background videos.</li>
132
+ <li>Added tinyPNG compatibility for images stored in the builder's cache folder.</li>
133
+ </ul>
134
+ <p><strong>Bug Fixes</strong></p>
135
+ <ul>
136
+ <li>Fixed memory exhausted fatal error when loading templates on servers without enough memory.</li>
137
+ <li>Fixed comments showing in the Posts module when they should not.</li>
138
+ <li>Fixed Posts module pagination when WPML's URL variable is set to lang= rather than directories.</li>
139
+ <li>Fixed JS error in the Posts module when switching from the gallery layout.</li>
140
+ <li>Fixed JetPack sharing icons not showing in the Posts module.</li>
141
+ <li>Fixed line height issue with the Map module.</li>
142
+ <li>Fixed editing templates in the Beaver Builder theme not going full width.</li>
143
+ <li>Fixed some module assets not being re-rendered when working in the builder.</li>
144
+ <li>Fixed issues with preview refresh and responsive editing.</li>
145
+ <li>Fixed subscription check if the site has no internet access and cannot check the subscription state.</li>
146
+ <li>Fixed PHP warning when rendering CSS/JS assets.</li>
147
+ <li>Fixed misc translation issues.</li>
148
+ <li>Fixed image uploads if FORCE_SSL_ADMIN is true and site is non-ssl.</li>
149
+ </ul>
150
+
151
+ <h4>1.10.1 - 4/25/2017</h4>
152
+ <p><strong>Bug Fixes</strong></p>
153
+ <ul>
154
+ <li>Fixed issue with super admins on multisite that aren't admins of a site not being able to use the full builder.</li>
155
+ </ul>
156
+
157
+ <h4>1.10 - 04/24/2017</h4>
158
+ <p><strong>General Enhancements</strong></p>
159
+ <ul>
160
+ <li>Added User Access settings to the Page Builder admin settings for choosing which user roles can access certain features.</li>
161
+ <li>Saved rows and modules can now be created via the Builder admin menu (formerly Templates admin menu).</li>
162
+ <li>Templates, saved rows and saved modules now have their on individual pages in the admin.</li>
163
+ <li>Added caching for registering templates to prevent issues with servers that have low memory.</li>
164
+ <li>Changed priority of UI script loading to try and prevent issues with themes that load scripts that should be loaded from WordPress core.</li>
165
+ <li>Added field connections to video module embed field.</li>
166
+ <li>Added the ability to order posts in the post modules by meta value.</li>
167
+ <li>Paged post modules are now scrolled to when clicking a link to the next page.</li>
168
+ <li>Added Enormail integration to the Subscribe Form module.</li>
169
+ <li>Multiple calls to Google Fonts from the theme and plugin are now combined into one request.</li>
170
+ <li>Added connections to Number Counter module fields.</li>
171
+ <li>Added fl_builder_loop_query filter.</li>
172
+ <li>Removed the loading graphic when saving settings. Elements are now slightly faded until they are updated.</li>
173
+ <li>Module and row duplicating is now instantaneous instead of having to wait with a loading graphic.</li>
174
+ <li>All drag and drop operations now load inline instead of taking over the page with a loader.</li>
175
+ <li>Added module name to the module settings overlay tooltip.</li>
176
+ <li>Added custom field connections to Contact Form module email field.</li>
177
+ <li>Added support for exporting a single theme layout or a group of theme layouts.</li>
178
+ <li>Added support for theme layouts to the template data exporter.</li>
179
+ </ul>
180
+ <p><strong>Post Module Enhancements</strong></p>
181
+ <ul>
182
+ <li>Added “columns” layout to the layout setting.</li>
183
+ <li>Added more layout and styling settings.</li>
184
+ <li>The “no results” message is now shown when no posts are found.</li>
185
+ <li>Added a setting to show a search form if no posts are found.</li>
186
+ <li>Added the ability to exclude posts in the content filter for the query.</li>
187
+ </ul>
188
+ <p><strong>Menu Module Enhancements</strong></p>
189
+ <ul>
190
+ <li>Added “below row" option for mobile menu position.</li>
191
+ <li>Added font family setting.</li>
192
+ <li>Misc CSS improvements.</li>
193
+ </ul>
194
+ <p><strong>Changes</strong></p>
195
+ <ul>
196
+ <li>Changed Templates to Builder in the admin menu.</li>
197
+ <li>Merged Uninstall and Cache into Tools in the Page Builder admin settings.</li>
198
+ <li>Removed Editing section in the Page Builder admin settings in favor of the new User Access settings.</li>
199
+ <li>Removed Templates Admin setting in the Page Builder admin settings in favor of the new User Access settings.</li>
200
+ <li>Removed Template Data Exporter setting in the Page Builder admin settings in favor of the new User Access settings.</li>
201
+ <li>Changed edit button text on the admin edit screen for templates to say Launch Page Builder.</li>
202
+ </ul>
203
+ <p><strong>Bug Fixes</strong></p>
204
+ <ul>
205
+ <li>Fixed the builder layout shortcode not working with Beaver Themer.</li>
206
+ <li>Fixed some photos not going full-width on mobile.</li>
207
+ <li>Fixed pre-instantiated widgets not working.</li>
208
+ <li>Fixed anchor links in the theme header causing the builder done actions to show.</li>
209
+ <li>Fixed multisite issues with render query.</li>
210
+ <li>Fixed post list spacing not working when using a custom post layout.</li>
211
+ <li>Fixed layout JS breaking when you save a JS array in the code field.</li>
212
+ <li>Fixed color picker alpha slider.</li>
213
+ <li>Fixed parallax background position being applied to child rows inserted using a shortcode.</li>
214
+ <li>Fixed unescaped attributes in the heading module causing HTML errors.</li>
215
+ <li>Fixed fatal error when inserting layouts via shortcode in certain cases.</li>
216
+ <li>Fixed PHP warning when first dropping a post module on the page.</li>
217
+ </ul>
218
+
219
+ <h4>1.9.5.3 - 4/4/2017</h4>
220
+ <p><strong>Bug Fixes</strong></p>
221
+ <ul>
222
+ <li>Fixed a bug in 1.9.5 preventing columns in full height rows from stacking on mobile.</li>
223
+ </ul>
224
+
225
+ <h4>1.9.5.2 - 3/31/2017</h4>
226
+ <p><strong>Bug Fixes</strong></p>
227
+ <ul>
228
+ <li>Fixed an issue with rewrites being flushed on every page load.</li>
229
+ </ul>
230
+
231
+ <h4>1.9.5.1 - 3/21/2017</h4>
232
+ <p><strong>Bug Fixes</strong></p>
233
+ <ul>
234
+ <li>Rolled back change in 1.9.5 that fixed some photos not going full width on mobile. That was causing all photos to go full width on mobile even when not intended. We’ll revisit that fix in 1.10.</li>
235
+ </ul>
236
+
237
+ <h4>1.9.5 - 3/20/2017</h4>
238
+ <p><strong>Enhancements</strong></p>
239
+ <ul>
240
+ <li>Posts module pagination now works separately when multiple Posts modules are on a page.</li>
241
+ <li>Added support for WooCommerce Memberships.</li>
242
+ <li>Added support for setting a custom subject in the Contact Form and Subscribe Form modules.</li>
243
+ <li>Added JS config for overriding the offset of waypoint animations.</li>
244
+ <li>Added support for font-weights that have 'i' at the end of their value string.</li>
245
+ <li>Added fl_builder_editing_enabled filter.</li>
246
+ <li>Added fl_builder_module_details filter.</li>
247
+ <li>Added logic to prevent bad JS entered into the layout settings from breaking the builder.</li>
248
+ <li>Added post_class() call to the Posts module.</li>
249
+ <li>Update Google Fonts.</li>
250
+ </ul>
251
+ <p><strong>Changes</strong></p>
252
+ <ul>
253
+ <li>Changed Video module embed field to a code editor.</li>
254
+ <li>Removed outline from the Accordion module when an item has focus.</li>
255
+ </ul>
256
+ <p><strong>Bug Fixes</strong></p>
257
+ <ul>
258
+ <li>Fixed content disappearing or being ordered incorrectly when dragging and dropping nested columns.</li>
259
+ <li>Fixed Posts module pagination not working when rendered via a shortcode.</li>
260
+ <li>Fixed module settings JS errors in Safari.</li>
261
+ <li>Fixed warning caused when DOING_AJAX is already defined.</li>
262
+ <li>Fixed Gravity Forms not showing in the Button module lightbox.</li>
263
+ <li>Fixed IE flexbox issues with full-height rows.</li>
264
+ <li>Fixed nested menu items not opening in the Menu module's accordion layout.</li>
265
+ <li>Fixed module export/import not working.</li>
266
+ <li>Fixed non-breaking space in the Number module.</li>
267
+ <li>Fixed content in nested columns not being exported to the default WordPress editor.</li>
268
+ <li>Fixed Posts Carousel and Posts Gallery icons always showing even when set not to display.</li>
269
+ <li>Fixed YouTube and Vimeo video backgrounds not filling the full width and height of a row.</li>
270
+ <li>Fixed photos not going full width on mobile devices.</li>
271
+ <li>Fixed pagination double slashes when using permalinks with no ending slash.</li>
272
+ <li>Fixed multiple translation issues.</li>
273
+ <li>Fixed photo fields showing incorrect selection when switching site to HTTPS.</li>
274
+ <li>Fixed layout settings css not applying when overriding/appending a user template.</li>
275
+ <li>Fixed validation errors with Map module.</li>
276
+ <li>Fixed conflict with WPEngine's PHP Compatibility plugin reporting a PHP7 warning.</li>
277
+ <li>Fixed ReCaptcha conflicts with other plugins.</li>
278
+ <li>Fixed linking to a specific tab in the Tabs module.</li>
279
+ <li>Fixed name being set to 0 in the Subscribe Form module when using ConvertKit.</li>
280
+ <li>Fixed PHP warning in the Gallery module when an image doesn't have an ID.</li>
281
+ <li>Fixed JavaScript error in FireFox.</li>
282
+ </ul>
283
+
284
+ <h4>1.9.4 - 01/18/2017</h4>
285
+ <p><strong>Bug Fixes</strong></p>
286
+ <ul>
287
+ <li>Fixed a bug with font fields introduced in 1.9.3.</li>
288
+ </ul>
289
+
290
+ <h4>1.9.3 - 01/17/2017</h4>
291
+ <p><strong>Enhancements</strong></p>
292
+ <ul>
293
+ <li>Accessibility enhancements to Accordion, Contact Form, Content Slider, Icon, Menu, Post Carousel, Post Slider, Subscribe Form and Tabs modules. Thanks to John Russell (@laubsterboy) for the contribution!</li>
294
+ <li>Added reCAPTCHA support to the Subscribe Form and Contact Form modules.</li>
295
+ <li>Vimeo and YouTube scripts are now only loaded in the builder UI when a video from those services is present.</li>
296
+ <li>Removed the Read More button from the text editor in the builder UI as it does not work with builder layouts.</li>
297
+ </ul>
298
+ <p><strong>Bug Fixes</strong></p>
299
+ <ul>
300
+ <li>Fixed global rows and modules not working after being duplicated under Tools > Duplicate Layout.</li>
301
+ <li>Fixed SSL mixed content issues with the Slideshow module.</li>
302
+ <li>Fixed the thumbnail navigation in the Slideshow module not showing on touch enabled desktops.</li>
303
+ <li>Fixed Menu module showing category descriptions for WooCommerce product categories.</li>
304
+ <li>Fixed issues with empty parent links in the Menu module.</li>
305
+ <li>Fixed Menu module not adding current-menu-item class when loaded from a template.</li>
306
+ <li>Fixed Menu module sub-menu background color being overridden by the menu background color.</li>
307
+ <li>Fixed a PHP warning in the Post Slider module with random ordering when using an offset.</li>
308
+ <li>Fixed IE layout issue with top aligned full height rows.</li>
309
+ <li>Fixed fonts with numbers in their names not working in font fields.</li>
310
+ <li>Fixed PHP warnings with Madmimi and MailerLite.</li>
311
+ <li>Fixed Maps module trying to open the Google Maps app in the Facebook Messenger app.</li>
312
+ <li>Fixed issues with autoplaying videos in the Content Slider module.</li>
313
+ <li>Fixed posts with double quotes in their names breaking suggest fields.</li>
314
+ <li>Fixed Number Counter modules in Tabs modules not displaying correctly.</li>
315
+ <li>Fixed row text color overriding colors set in the Pricing Table module.</li>
316
+ <li>Fixed Button module popup content being duplicated when rendered inside a Content Slider module via shortcode.</li>
317
+ </ul>
318
+
319
+ <h4>1.9.2 - 12/13/2016</h4>
320
+ <p><strong>Bug Fixes</strong></p>
321
+ <ul>
322
+ <li>Fixed a bug introduced in 1.9.1 that broke live preview when editing settings.</li>
323
+ <li>Fixed gallery fields not working when images are saved as part of a template and don't exist on the site.</li>
324
+ </ul>
325
+
326
+ <h4>1.9.1 - 12/12/2016</h4>
327
+ <p><strong>Enhancements</strong></p>
328
+ <ul>
329
+ <li>Updated Google fonts.</li>
330
+ <li>Updated translations.</li>
331
+ </ul>
332
+ <p><strong>Bug Fixes</strong></p>
333
+ <ul>
334
+ <li>Fixed rows and modules not appearing when first added to the page.</li>
335
+ <li>Fixed column settings dropdown disappearing when the column has a background overlay color.</li>
336
+ <li>Fixed the button module lightbox opening all lightboxes on the page.</li>
337
+ <li>Fixed multiple RTL language CSS issues.</li>
338
+ <li>Fixed row and column text colors affecting select inputs.</li>
339
+ <li>Fixed CSS conflicts with third party themes and the builder UI.</li>
340
+ <li>Fixed parallax backgrounds being applied to child rows when inserting layouts via a shortcode.</li>
341
+ </ul>
342
+
343
+ <h4>1.9 - 12/06/2016</h4>
344
+ <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-9-shasta/">the blog post</a> for detailed info on what was added.</p>
345
+ <p><strong>Enhancements</strong></p>
346
+ <ul>
347
+ <li>Added the ability to drop columns into columns.</li>
348
+ <li>Added the ability to drag and drop existing columns.</li>
349
+ <li>Made multiple improvements for more accurate dragging and dropping.</li>
350
+ <li>Added responsive settings for margins, padding and borders.</li>
351
+ <li>Added new content page templates.</li>
352
+ <li>Template images are now loaded via HTTPS.</li>
353
+ <li>Added the ability to open a lightbox via a button.</li>
354
+ <li>Added the ability to add an alpha slider to color fields.</li>
355
+ </ul>
356
+ <p><strong>Bug Fixes</strong></p>
357
+ <ul>
358
+ <li>Fixed responsive spacing not working when defaults are zeroed out in the global settings.</li>
359
+ <li>Fixed format select not showing in text editor fields.</li>
360
+ <li>Fixed incorrect color picker width in third party themes.</li>
361
+ <li>Fixed incorrect column group positions when dropping an existing module into a row.</li>
362
+ <li>Fixed multiple issues with responsive margins/padding not working.</li>
363
+ <li>Fixed a fatal error caused by modules that are no longer registered.</li>
364
+ <li>Fixed broken modules that have nested forms such as the Accordion module.</li>
365
+ <li>Fixed live preview issues for nested columns when editing the parent column.</li>
366
+ <li>Fixed issues with live preview not working correctly for responsive fields.</li>
367
+ <li>Fixed issues with global responsive margins and padding not working.</li>
368
+ <li>Fixed issues with equal height columns and nested columns.</li>
369
+ <li>Fixed Button module lightbox close button jump when placing the mouse over it.</li>
370
+ <li>Fixed Button module lightbox close button positioning.</li>
371
+ <li>Fixed drag and drop placeholder animation lag.</li>
372
+ </ul>
373
+
374
+ <h4>1.8.8 - 11/08/2016</h4>
375
+ <p><strong>Enhancements</strong></p>
376
+ <ul>
377
+ <li>Updated FontAwesome to 4.7.</li>
378
+ <li>Add tags support for AWeber and ActiveCampaign.</li>
379
+ <li>Added the "site" parameter to the fl_builder_insert_layout shortcode for inserting layouts from other sites on a network.</li>
380
+ </ul>
381
+ <p><strong>Bug Fixes</strong></p>
382
+ <ul>
383
+ <li>Fixed module settings not loading when the site language is set to Farsi.</li>
384
+ <li>Fixed HTML validation error with the Icon module.</li>
385
+ <li>Fixed an error when setting the default editor to HTML using the wp_default_editor filter.</li>
386
+ <li>Fixed YouTube videos not working when column stacking order is reversed.</li>
387
+ <li>Fixed Content Slider module's navigation arrows not showing in IE11.</li>
388
+ <li>Fixed not being able to translate the comments popup link in the Posts module.</li>
389
+ <li>Fixed long template names not showing ellipses in the content panel.</li>
390
+ <li>Fixed empty global rows when sending a global row to the trash in wp-admin.</li>
391
+ <li>Fixed the Posts module breaking the render_query method in certain cases.</li>
392
+ <li>Fixed the position of the settings lightbox resize icon on RTL sites.</li>
393
+ <li>Fixed not being able to close accordion submenus in the Menu module.</li>
394
+ </ul>
395
+
396
+ <h4>1.8.7.1 - 10/13/2016</h4>
397
+ <p><strong>Bug Fixes</strong></p>
398
+ <ul>
399
+ <li>Fixed a bug with row and column text colors not working in 1.8.7.</li>
400
+ </ul>
401
+
402
+ <h4>1.8.7 - 10/09/2016</h4>
403
+ <p><strong>Enhancements</strong></p>
404
+ <ul>
405
+ <li>The mobile version of the Menu module now collapses when an anchor link is clicked.</li>
406
+ <li>Added the option to enable audio for YouTube and Vimeo row backgrounds.</li>
407
+ <li>Added MailerLite support to the Subscribe Form module.</li>
408
+ <li>Added the fl_builder_is_node_visible filter.</li>
409
+ <li>Added the fl_builder_form_field_preview_text filter.</li>
410
+ </ul>
411
+ <p><strong>Bug Fixes</strong></p>
412
+ <ul>
413
+ <li>Fixed the lightbox not working in the Photo module.</li>
414
+ <li>Fixed broken slideshow backgrounds when no transition speed is set.</li>
415
+ <li>Fixed a CSS inheritance issue with the hamburger icon in the Menu module.</li>
416
+ <li>Fixed CSS compatibility issues with the builder UI in the Paperback theme from Array Themes.</li>
417
+ <li>Fixed a JS error on the post edit screen when the plugin branding contains a single quote.</li>
418
+ <li>Fixed the editing capability preventing editing of global templates.</li>
419
+ <li>Fixed layout CSS/JS 404 errors when the same layout is included on the page twice.</li>
420
+ <li>Fixed slideshow captions not changing on touch.</li>
421
+ <li>Fixed photo not removing when the remove link is clicked for the photo field.</li>
422
+ <li>Fixed a PHP warning with incorrect filter arguments in the Menu module.</li>
423
+ <li>Fixed SSL issue in IE caused by the YUI3 library.</li>
424
+ </ul>
425
+
426
+ <h4>1.8.6 - 09/19/2016</h4>
427
+ <p><strong>Enhancements</strong></p>
428
+ <ul>
429
+ <li>Added YouTube and Vimeo support for row backgrounds.</li>
430
+ <li>Added a no follow setting to the Button module and modules that have buttons in them.</li>
431
+ <li>Added a loader icon when opening a lightbox for the Gallery and Photo modules.</li>
432
+ </ul>
433
+ <p><strong>Bug Fixes</strong></p>
434
+ <ul>
435
+ <li>Fixed Gallery module lightbox ordering when using the collage layout.</li>
436
+ <li>Fixed multiple color picker issues by changing the mode to HSV.</li>
437
+ <li>Fixed auto suggest fields breaking in the Posts module.</li>
438
+ <li>Fixed themes that load older versions of jQuery Waypoints breaking animations.</li>
439
+ <li>Fixed negative column and module margins covering row overlay actions.</li>
440
+ <li>Fixed SSL issues caused by the YUI3 script.</li>
441
+ <li>Fixed Posts Carousel error when added to an Accordion module via shortcode.</li>
442
+ <li>Fixed memory limit issue with loading in template data files.</li>
443
+ <li>Fixed width rounding issues in the Gallery module.</li>
444
+ <li>Fixed module animations not running when the module is too far down the page.</li>
445
+ <li>Fixed lightbox close button being hidden by the admin bar.</li>
446
+ <li>Fixed PHP notices when only user templates are enabled but none have been saved.</li>
447
+ <li>Fixed skipping slides in the Content Slider module when clicking too fast.</li>
448
+ <li>Fixed error caused by removing a photo from a photo field before the single photo selector is initialized.</li>
449
+ <li>Fixed Menu module dropdowns in older browsers.</li>
450
+ <li>Fixed API errors with the Active Campaign integration.</li>
451
+ <li>Fixed unstripped slashes in theme branding fields.</li>
452
+ <li>Fixed fonts not being enqueued for font fields in nested forms.</li>
453
+ </ul>
454
+
455
+ <h4>1.8.5 - 08/26/2016</h4>
456
+ <p><strong>Enhancements</strong></p>
457
+ <ul>
458
+ <li>Added 15 new translations. Updated 24 existing translations.</li>
459
+ <li>Added bottom alignment setting for equal height columns.</li>
460
+ <li>Added fl_builder_rendered_content filter.</li>
461
+ <li>Added fl_builder_exporter_template filter.</li>
462
+ <li>Added fl_builder_ui_panel_before_rows action.</li>
463
+ <li>Added fl_builder_ui_panel_before_modules action.</li>
464
+ </ul>
465
+ <p><strong>Bug Fixes</strong></p>
466
+ <ul>
467
+ <li>Fixed an error with our smooth scrolling JavaScript when #! is in the page URL.</li>
468
+ <li>Fixed help text for filters in the Loop Settings. Using a comma in the list breaks the functionality.</li>
469
+ </ul>
470
+
471
+ <h4>1.8.4 - 08/09/2016</h4>
472
+ <p><strong>Enhancements</strong></p>
473
+ <ul>
474
+ <li>Tested compatibility with WordPress 4.6.</li>
475
+ <li>Added oEmbed support to editor fields in all modules.</li>
476
+ <li>Added wpautop param for editor fields so it can be disabled on a per-field basis.</li>
477
+ <li>Added JS hooks for column resizing.</li>
478
+ <li>Added fl_builder_google_fonts_domain filter for countries that block Google domains.</li>
479
+ <li>Added fl_builder_before_render_shortcodes filter.</li>
480
+ <li>Added Arial as the default fallback font for Windows users.</li>
481
+ </ul>
482
+ <p><strong>Bug Fixes</strong></p>
483
+ <ul>
484
+ <li>Fixed issues with updater caching preventing updates from showing in some cases.</li>
485
+ <li>Fixed theme white labeling not working in the Customizer.</li>
486
+ <li>Fixed PHP notices caused by the importer.</li>
487
+ <li>Fixed full height rows overlapping in IE 11.</li>
488
+ <li>Fixed custom global CSS being included on the page more than once when a layout is inserted with the shortcode or render_query.</li>
489
+ <li>Fixed SSL certificate error with MailChimp.</li>
490
+ <li>Fixed double slash in the pagination URL for the Posts module.</li>
491
+ <li>Fixed empty background-size CSS property for rows and columns.</li>
492
+ <li>Fixed equal height columns not vertically aligning in FireFox.</li>
493
+ <li>Fixed Gallery module breaking module animations.</li>
494
+ <li>Fixed Google Fonts not being loaded for layouts rendered using the shortcode when Google Fonts have already been loaded for the main layout.</li>
495
+ <li>Fixed IE 11 content classes not being applied when caching is present.</li>
496
+ <li>Fixed YUI3 making too many requests when on HTTPS.</li>
497
+ <li>Fixed Gallery module affecting the position of anchor links when first loaded.</li>
498
+ </ul>
499
+
500
+ <h4>1.8.3 - 07/15/2016</h4>
501
+ <p><strong>Bug Fixes</strong></p>
502
+ <ul>
503
+ <li>Fixed a bug with asset cache not being cleared for content rendered via shortcode or the render_query method.</li>
504
+ </ul>
505
+
506
+ <h4>1.8.2 - 07/12/2016</h4>
507
+ <p><strong>Enhancements</strong></p>
508
+ <ul>
509
+ <li>Beaver Builder theme cache is now cleared when the builder cache is cleared via Settings > Page Builder > Cache.</li>
510
+ <li>Added support for clearing the builder cache using WP-CLI (wp beaver clearcache).</li>
511
+ <li>Added support for white labeling the theme name in the At a Glance dashboard widget.</li>
512
+ <li>Added the option to choose a form or list for ActiveCampaign connections in the Subscribe Form module as forms trigger the autoresponder where lists do not.</li>
513
+ <li>Added support for option groups in the select field type.</li>
514
+ <li>Added an admin notice on the settings page alerting users when Beaver Builder can't write files.</li>
515
+ </ul>
516
+ <p><strong>Bug Fixes</strong></p>
517
+ <ul>
518
+ <li>Fixed a bug with the layout of the Post Grid, Post Carousel, Content Slider, Post Slider and Testimonial modules when inserted into a Tabs or Accordion module via shortcode.</li>
519
+ <li>Fixed a bug with pagination in the Posts module when added via shortcode.</li>
520
+ <li>Fixed a bug with the responsive styling of the Heading module.</li>
521
+ <li>Fixed a bug with the Heading module and live preview.</li>
522
+ <li>Fixed a bug with the toggle behavior of button style options when the background color is not set.</li>
523
+ <li>Fixed a bug with white labeling not showing for the Beaver Builder theme in the network admin.</li>
524
+ <li>Fixed a bug with vertically centered columns horizontally centering content.</li>
525
+ <li>Fixed a bug with vertically centered columns preventing slideshows from showing.</li>
526
+ <li>Fixed a bug with Menu module styling of list items.</li>
527
+ <li>Fixed a bug with Menu module alignment not working on mobile.</li>
528
+ <li>Fixed a bug with builder content loaded via shortcode causing non-builder content to go full-width.</li>
529
+ <li>Fixed a bug with TinyMCE in nested settings forms on FireFox.</li>
530
+ <li>Fixed a bug with full height rows overlapping in IE11.</li>
531
+ <li>Fixed a bug with row video backgrounds not working when added via URL.</li>
532
+ <li>Fixed a bug with cache files not being created with the correct file permissions.</li>
533
+ <li>Fixed a bug with column border colors being rendered when none are set.</li>
534
+ <li>Fixed a bug with reversed column stacking not working on Safari.</li>
535
+ <li>Fixed a bug with column resizing and global rows.</li>
536
+ <li>Fixed a bug with delayed CSS loading when using the layout shortcode or render_query function.</li>
537
+ <li>Fixed a bug with CSS specificity when multiple Subscribe Form modules are on the same page.</li>
538
+ <li>Fixed a bug with the Campaign Monitor integration causing warnings in PHP7. </li>
539
+ <li>Fixed a bug with row text colors overriding text colors in the Number module.</li>
540
+ <li>Fixed a bug with the lightbox not working for Gallery modules inside of a Tabs module.</li>
541
+ <li>Fixed a bug with FontAwesome icons in the headings of Tabs modules converting to a plus icon when clicked.</li>
542
+ <li>Fixed a bug with audio players not going full width in the Accordion module.</li>
543
+ </ul>
544
+
545
+ <h4>1.8.1 - 06/15/2016</h4>
546
+ <p><strong>Bug Fixes</strong></p>
547
+ <ul>
548
+ <li>Fixed a bug with the text editor field stripping line breaks in 1.8.</li>
549
+ <li>Fixed a bug that caused the visual text editor to break in 1.8.</li>
550
+ <li>Fixed a bug with the index.html file in the icons cache folder causing an error.</li>
551
+ <li>Fixed a bug with vertically centered columns also centering content horizontally.</li>
552
+ <li>Fixed a bug with hooking rows via the shortcode breaking the builder UI.</li>
553
+ <li>Fixed a bug with layout templates showing in row/module positions in the content sidebar when using the Agency override feature.</li>
554
+ <li>Fixed a bug with backgrounds, padding, and margins where they were applied to all elements when using the shortcode.</li>
555
+ <li>Fixed a bug with resizing the Testimonials module on large/medium devices.</li>
556
+ <li>Fixed a number of minor CSS bugs.</li>
557
+ <li>Fixed a number of minor issues with the Menu module.</li>
558
+ <li>Fixed editing performance issues with AJAX layout rendering on large pages.</li>
559
+ </ul>
560
+
561
+ <h4>1.8 - 06/07/2016</h4>
562
+ <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-8-gordon/">the blog post</a> for detailed info on what was added.</p>
563
+ <p><strong>Enhancements</strong></p>
564
+ <ul>
565
+ <li>Added 16 new home page templates.</li>
566
+ <li>Added the ability for theme authors to load third party templates into all version of the builder (including the lite) using the new Template Data Exporter. Please <a href="https://www.wpbeaverbuilder.com/knowledge-base/theme-author-templates/">read the docs</a> for more info on that.</li>
567
+ <li>Added the ability to export single templates or groups of templates using the WordPress Exporter.</li>
568
+ <li>Added a patch for the WordPress Importer to prevent it from breaking imports in certain situations.</li>
569
+ <li>Added a setting in the advanced tab to show rows/modules/columns based on if a user is logged in, logged out, or never show them (they only appear while editing). You can also choose the capability logged in users must have to see a row/column/module.</li>
570
+ <li>Added a setting in the advanced tab to reverse the column stacking order on smaller devices.</li>
571
+ <li>Added settings to vertically center or top align content in full height rows and equal height columns.</li>
572
+ <li>Added settings to add a video background to a row using external links instead of the media library.</li>
573
+ <li>Added settings in the Icon Group module to choose individual icon colors and link targets.</li>
574
+ <li>Added settings in the Heading module to set the line-height and letter spacing.</li>
575
+ <li>Added settings in the Separator module to set the width and alignment.</li>
576
+ <li>Added a setting to the Accordion module that makes the first item open by default.</li>
577
+ <li>Added a setting in the Posts module to customize the "No Posts Found" message.</li>
578
+ <li>Added settings to all modules with buttons for fading in icons on hover and choosing a hover opacity for transparent backgrounds.</li>
579
+ <li>Added settings to the Contact Form module for customizing the button.</li>
580
+ <li>Made changes to the Contact Form module so the recipient's email address is no longer visible in the markup.</li>
581
+ <li>Captions are now displayed in the Gallery module's lightbox.</li>
582
+ <li>PHP files can now be used to register templates and load template data from the database.</li>
583
+ <li>Added caching to FLBuilderModel::get_user_template_type to cut down on the number of queries it runs.</li>
584
+ <li>The form validation required message is now translatable.</li>
585
+ <li>Empty index files are now added the cache directories to prevent browsing.</li>
586
+ <li>Added a button for resizing settings lightboxes so they fill the screen.</li>
587
+ <li>Added support for oEmbeds in the Text Editor module.</li>
588
+ <li>Changed row and module templates to saved rows and modules.</li>
589
+ <li>Tweaked templates admin settings terminology.</li>
590
+ <li>Tweaked draft and discard button terminology.</li>
591
+ <li>Added CSS/JavaScript to layout settings button and panel.</li>
592
+ <li>Increased size of the publish button.</li>
593
+ <li>Added a setting to collapse inactive items in accordion mode for the Menu module.</li>
594
+ <li>Updated Font Awesome.</li>
595
+ <li>Sticky posts are no longer included when using the fl_builder_insert_layout shortcode.</li>
596
+ <li>Added an above title option for image position in the Posts module.</li>
597
+ </ul>
598
+ <p><strong>Bug Fixes</strong></p>
599
+ <ul>
600
+ <li>Fixed issues with exporting and importing new templates.</li>
601
+ <li>Fixed issues with layout CSS/JS not exporting and importing.</li>
602
+ <li>Fixed incorrect module paths on Windows servers.</li>
603
+ <li>Fixed the alignment setting preview for the Heading module. </li>
604
+ <li>Fixed the incorrect load order of FLBuilder::render_query CSS in IE.</li>
605
+ <li>Fixed RTL issues with the Content Slider and Post Slider modules.</li>
606
+ <li>Fixed an IE11 bug with images that have height:auto in equal height columns.</li>
607
+ <li>Fixed a PHP notice when adding Post Slider and Post Carousel modules to the page.</li>
608
+ <li>Fixed a PHP error when the time field is used inside a nested form.</li>
609
+ <li>Fixed a bug with duplicate rows adding backslashes to text.</li>
610
+ <li>Fixed a bug with nested Tab modules via the fl_builder_insert_layout shortcode.</li>
611
+ <li>Fixed an issue with sticky posts being included when using the fl_builder_insert_layout shortcode.</li>
612
+ <li>Fixed a PHP notice when using the fl_builder_insert_layout shortcode on a 404 page.</li>
613
+ <li>Fixed TinyMCE link editor not closing since WordPress 4.5.</li>
614
+ <li>Fixed a fatal error with the new Template Data Exporter caused by unsupported syntax in certain PHP versions.</li>
615
+ <li>Fixed a PHP warning caused by plugin activation.</li>
616
+ <li>Fixed the display of SVG files in the Photo module.</li>
617
+ <li>Fixed CSS specificity issues in IE when using the fl_builder_render_layout shortcode.</li>
618
+ </ul>
619
+
620
+ <h4>1.7.8 - 04/20/2016</h4>
621
+ <p><strong>Bug Fixes</strong></p>
622
+ <ul>
623
+ <li>Fixed a bug in the Post Carousel and Post Slider modules caused in 1.7.7 that broke the offset setting.</li>
624
+ </ul>
625
+
626
+ <h4>1.7.7 - 04/19/2016</h4>
627
+ <p><strong>Enhancements</strong></p>
628
+ <ul>
629
+ <li>Added support for HTML in the Number Counter module.</li>
630
+ <li>Added a loop setting to the Content Slider module to toggle looping so sliders with a single slide can't be swiped on mobile.</li>
631
+ <li>Added fl_builder_loop_taxonomies filter.</li>
632
+ <li>Upgrade links in the lite version now open in a new window.</li>
633
+ </ul>
634
+ <p><strong>Bug Fixes</strong></p>
635
+ <ul>
636
+ <li>Fixed a bug with Japanese characters breaking nested forms.</li>
637
+ <li>Fixed a PHP warning caused by font fields.</li>
638
+ <li>Fixed a backwards compatibility issue with the Tesseract theme caused in the 1.7.6 update.</li>
639
+ <li>Fixed a fatal error when uninstalling via Settings > Page Builder > Uninstall.</li>
640
+ <li>Fixed a bug in the Post Carousel and Post Slider modules preventing slides from showing when pagination parameters are present.</li>
641
+ <li>Fixed a bug in the Menu module causing the page to scroll horizontally.</li>
642
+ <li>Fixed a bug with images in templates disappearing in nested forms when no image is selected.</li>
643
+ <li>Fixed a bug with the media library not working in certain themes in WordPress 4.5.</li>
644
+ </ul>
645
+
646
+ <h4>1.7.6 - 03/29/2016</h4>
647
+ <p><strong>Enhancements</strong></p>
648
+ <ul>
649
+ <li>Optimized database calls for global rows and modules.</li>
650
+ <li>URLs in the builder's CSS cache are now saved as HTTPS if the site has SSL enabled.</li>
651
+ <li>Font Awesome and Foundation icon files are now loaded via CDN.</li>
652
+ <li>The "Publish Changes" button in the builder now says "Submit for Review" for drafts when a user doesn't have the capability to publish.</li>
653
+ <li>Changed the error message in the Subscribe Form module to mention tags instead of lists for Drip and Hatchbuck.</li>
654
+ <li>Added responsive alignment settings to the Icon module. Props to Ben on his first Beaver Builder commit! :)</li>
655
+ <li>Added the option to have uncropped photos in the Posts Carousel and Posts Slider modules.</li>
656
+ <li>Added the fl_builder_loop_query_args filter for filtering query args in the FLBuilderLoop class.</li>
657
+ <li>Added the fl_builder_posts_module_layout_path filter for filtering the path of layout files in the Posts module.</li>
658
+ <li>Added the fl_builder_color_presets filter for adding color presets to the builder's color picker.</li>
659
+ <li>Added the fl_builder_after_render_css and fl_builder_after_render_js actions for hooking into after assets are rendered.</li>
660
+ <li>Added the "remove" method for modules that is only called when they are removed from the page.</li>
661
+ <li>Exposed bxSlider object in the Posts Carousel and Posts Slider modules so it can be accessed by third party code.</li>
662
+ <li>Updated bxSlider.</li>
663
+ <li>Updated translations.</li>
664
+ </ul>
665
+ <p><strong>Bug Fixes</strong></p>
666
+ <ul>
667
+ <li>Fixed styling issues with the column settings dropdown in certain themes.</li>
668
+ <li>Fixed styling issues with column resize handles and global rows and modules.</li>
669
+ <li>Fixed styling issues with IE11 and full-height rows.</li>
670
+ <li>Fixed styling issues with the Heading module.</li>
671
+ <li>Fixed styling issues with the Callout module.</li>
672
+ <li>Fixed styling issues with the Content Slider module.</li>
673
+ <li>Fixed a bug with icon fields in nested forms throwing warnings.</li>
674
+ <li>Fixed a bug with the color picker breaking when the core WordPress color picker scripts are loaded.</li>
675
+ <li>Fixed a bug with modules set to animate below a slideshow would animate immediately.</li>
676
+ <li>Fixed a bug with smooth scrolling links having the same ID on two different pages.</li>
677
+ <li>Fixed a bug with sub-menus going off the right side of the page in the Menu module.</li>
678
+ <li>Fixed a bug with module classes being serialized in saved layout data when a row is copied.</li>
679
+ <li>Fixed a bug with mixed double quotes breaking the JS for the FLBuilder::render_query method.</li>
680
+ <li>Fixed a bug caused by the WPide plugin.</li>
681
+ <li>Fixed a select field bug where the value of the 'selected' function was being echoed instead of returned.</li>
682
+ <li>Fixed a bug with the Google Plus button not working in the Slideshow module.</li>
683
+ <li>Fixed a bug with wbr tags breaking nested forms.</li>
684
+ </ul>
685
+
686
+ <h4>1.7.5 - 02/24/2016</h4>
687
+ <p><strong>Bug Fixes</strong></p>
688
+ <ul>
689
+ <li>Fixed a CSS bug with row background color overlays preventing module access in 1.7.4.</li>
690
+ <li>Fixed a bug where setting a blank default page heading selector in the global settings would hide the entire page.</li>
691
+ <li>Fixed an IE11 bug with full height rows that have fixed width content.</li>
692
+ <li>Fixed a bug with the read more link not showing in the Posts Carousel module when the content is hidden.</li>
693
+ </ul>
694
+
695
+ <h4>1.7.4 - 02/22/2016</h4>
696
+ <p><strong>Enhancements</strong></p>
697
+ <ul>
698
+ <li>Added a welcome page to the admin settings.</li>
699
+ <li>Added updater enhancements to support the new domain manager.</li>
700
+ <li>Pagination in the Gallery module's lightbox is now sequential instead of top to bottom.</li>
701
+ <li>Changed the column settings icon from a wrench icon to columns icon for consistency with the module overlay.</li>
702
+ <li>The Content Slider module now adds the srcset attribute to images when it can.</li>
703
+ <li>The URL is now updated when a smooth scroll link has finished scrolling.</li>
704
+ <li>Args can now be passed to auto suggest fields for modifying any of the auto suggest settings.</li>
705
+ <li>Misc translation updates.</li>
706
+ </ul>
707
+ <p><strong>Bug Fixes</strong></p>
708
+ <ul>
709
+ <li>Fixed a bug with flashing slides in the Content Slider module.</li>
710
+ <li>Fixed a bug with column display settings when equal heights are enabled.</li>
711
+ <li>Fixed a bug with shortcodes not rendering on bbPress pages.</li>
712
+ <li>Fixed a bug with the Gallery module not working in the tabs module when added via a shortcode.</li>
713
+ <li>Fixed a bug with the fl-builder class being added to archive pages.</li>
714
+ <li>Fixed a bug with the number showing in the Number Counter module before it has animated.</li>
715
+ <li>Fixed a bug with duplicate videos showing in Video modules when using the browser's back button.</li>
716
+ <li>Fixed issues with bad Layout Settings JavaScript breaking the builder.</li>
717
+ <li>Fixed module CSS bugs with empty values.</li>
718
+ <li>Fixed a translation bug in the Posts module with translating the comments string.</li>
719
+ <li>Fixed issues with schema structured data in all post modules.</li>
720
+ <li>Fixed a JavaScript bug with the Accordion module.</li>
721
+ <li>Fixes edge case issues with widget/shortcode scripts firing before they should. Specifically fixes issues with Hero Slider.</li>
722
+ <li>Fixed CSS issues with post titles being hidden when loading builder content via a shortcode.</li>
723
+ <li>Fixed Thai translation.</li>
724
+ </ul>
725
+
726
+ <h4>1.7.3 - 02/01/2016</h4>
727
+ <p><strong>Enhancements</strong></p>
728
+ <ul>
729
+ <li>Developers can now hook into AJAX requests using the fl_ajax_* hooks.</li>
730
+ <li>Added the fl_builder_render_js filter for filtering JavaScript cached by the builder.</li>
731
+ <li>Added the fl_builder_render_shortcodes filter for disabling shortcode parsing by the builder.</li>
732
+ <li>Added the fl_builder_get_upload_dir and fl_builder_get_cache_dir filters for filtering those paths.</li>
733
+ <li>Added the fl_builder_before_save_layout and fl_builder_after_save_layout actions for hooking into when layout data is saved .</li>
734
+ </ul>
735
+ <p><strong>Bug Fixes</strong></p>
736
+ <ul>
737
+ <li>Fixed a bug with vertically centered content in full height rows on iOS devices.</li>
738
+ <li>Fixed a bug with the read more link not showing in the Posts Slider module when the content is hidden.</li>
739
+ <li>Fixed a bug with backslashes being stripped out of the layout settings.</li>
740
+ <li>Fixed a bug with the Pricing Table module buttons caused in 1.7.</li>
741
+ <li>Fixed a bug with the link field's auto suggest.</li>
742
+ </ul>
743
+
744
+ <h4>1.7.2 - 01/26/2016</h4>
745
+ <p><strong>Bug Fixes</strong></p>
746
+ <ul>
747
+ <li>Fixed an AJAX bug caused in the last update that broke all auto suggest fields.</li>
748
+ <li>Fixed post status issues when publishing a pending post via the builder. Also fixes published posts becoming pending when the Revisionary plugin is being used.</li>
749
+ </ul>
750
+
751
+ <h4>1.7.1 - 01/24/2016</h4>
752
+ <p><strong>Security</strong></p>
753
+ <ul>
754
+ <li>Fixed a security issue that could allow a logged in user that doesn't have permission to edit a page to make calls to the builder's editing functions by spoofing an AJAX request. While this issue mainly affects sites that allow anyone to register, it is still recommended that everyone update immediately.</li>
755
+ <li>Now using nonces in AJAX requests for additional security.</li>
756
+ </ul>
757
+ <p><strong>Enhancements</strong></p>
758
+ <ul>
759
+ <li>The Number Counter module now uses thousands separators.</li>
760
+ <li>Updated multiple translations.</li>
761
+ <li>The parent node id is now passed when nested forms are rendered so the parent settings can be accessed by the nested form's controls.</li>
762
+ </ul>
763
+ <p><strong>Bug Fixes</strong></p>
764
+ <ul>
765
+ <li>Fixed multiple translation issues.</li>
766
+ <li>Fixed a bug causing an error on the post list admin screen.</li>
767
+ <li>Fixed a bug with the read more link not showing in the Posts module when the content is hidden.</li>
768
+ <li>Fixed a bug with the default value in font fields.</li>
769
+ <li>Fixed a bug with button style settings showing when no background color is selected.</li>
770
+ <li>Fixed a bug with nested form preview text on PHP 7.</li>
771
+ </ul>
772
+
773
+ <h4>1.7 - 01/18/2016</h4>
774
+ <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-7-now-with-partial-refresh-per-page-code-settings-and-our-first-shortcode/">the blog post</a> for detailed info on what was added.</p>
775
+ <p><strong>Enhancements</strong></p>
776
+ <ul>
777
+ <li>Added partial refresh for all rows, columns, and modules. Developers will need to read the custom module docs for info on making their modules compatible with partial refresh.</li>
778
+ <li>Added the Layout Settings panel with per-page CSS and JavaScript settings.</li>
779
+ <li>Added CSS and JavaScript settings to the Global Settings panel.</li>
780
+ <li>Added the Audio module.</li>
781
+ <li>Added the Countdown module.</li>
782
+ <li>Added new style settings to the Pricing Table module for achieving a variety of different looks.</li>
783
+ <li>Added the fl_builder_insert_layout shortcode for inserting builder saved templates, rows, modules anywhere in your posts.</li>
784
+ <li>Added the FLBuilder::render_query method for rendering layouts anywhere within a theme's PHP files.</li>
785
+ <li>Refactored frontend AJAX actions and rendering to support partial refresh. Developers tapping into those actions may need to update their code.</li>
786
+ <li>Optimized loading of the builder UI by concatenating and minifying all core CSS and JavaScript files.</li>
787
+ <li>Builder caching is now disabled when WP_DEBUG is set to true.</li>
788
+ <li>The editing capability setting now supports multiple comma seperated values.</li>
789
+ <li>Updated Google fonts.</li>
790
+ </ul>
791
+ <p><strong>Bug Fixes</strong></p>
792
+ <ul>
793
+ <li>Fixed a bug with the Subscribe Form module.</li>
794
+ <li>Fixed CSS specificity issues with the new builder shortcode.</li>
795
+ <li>Fixed a CSS bug with custom column widths on small devices.</li>
796
+ </ul>
797
+
798
+ <h4>1.6.4.7 - 1/10/2016</h4>
799
+ <p><strong>Enhancements</strong></p>
800
+ <ul>
801
+ <li>Minor enhancements to the Number Counter module. Added new number position setting (above, inside, below) for number bars. Thanks Kathy Darling for the contribution!</li>
802
+ <li>Row background color settings are now always available for adding a fallback for other background types such as videos and slideshows. Thanks Justin Proffitt for the contribution!</li>
803
+ <li>Added limit property to suggest fields for limiting the number of selections that can be made.</li>
804
+ <li>Added the fl_builder_register_settings_form filter to the register_module method.</li>
805
+ <li>Added core WordPress image classes to the Photo module. This allows WordPress to handle srcsets instead of us, fixing a number of issues and adding support for the WP Retina plugin.</li>
806
+ <li>Added Czech translation.</li>
807
+ <li>Added Farsi translation.</li>
808
+ <li>Added Thai translation.</li>
809
+ </ul>
810
+ <p><strong>Bug Fixes</strong></p>
811
+ <ul>
812
+ <li>Fixed a bug with scripts in shortcodes and widgets being rendered more than once when a CDN is used. Primarily fixes issues with the Gravity Forms widget, but should help others as well.</li>
813
+ <li>Fixed a bug with users that can only submit for review being able to publish posts from within the builder.</li>
814
+ <li>Fixed a bug breaking responsive display settings for equal height columns.</li>
815
+ <li>Fixed a bug caused by the WP 4.4.1 update that makes it so all templates show in the template selector, saved rows, and saved modules sections.</li>
816
+ <li>Fixed a bug with values selected in auto suggest fields not retaining their order.</li>
817
+ <li>Fixed a bug with multiple email addresses in the Contact Form module.</li>
818
+ <li>Fixed a bug with videos in the Content Slider module continuing to play when the slider advances to the next slide.</li>
819
+ <li>Fixed a bug with edge cases where git configurations convert line endings and break the serialized data in the templates.dat file.</li>
820
+ </ul>
821
+
822
+ <h4>1.6.4.6 - 12/22/2015</h4>
823
+ <p><strong>Enhancements</strong></p>
824
+ <ul>
825
+ <li>Added Hungarian translation.</li>
826
+ <li>The Contact Form module now supports a comma separated list of email addresses.</li>
827
+ </ul>
828
+ <p><strong>Bug Fixes</strong></p>
829
+ <ul>
830
+ <li>Fixed a bug causing the row and column link color setting to not work.</li>
831
+ <li>Fixed a bug with srcsets in the Photo module and custom image sizes.</li>
832
+ <li>Fixed a bug making it impossible to edit modules that don't have a height.</li>
833
+ <li>Fixed a bug with IE11 and row alignment.</li>
834
+ </ul>
835
+
836
+ <h4>1.6.4.5 - 12/15/2015</h4>
837
+ <p><strong>Enhancements</strong></p>
838
+ <ul>
839
+ <li>WordPress 4.4's responsive image code is now applied to all images that contain an attachment ID.</li>
840
+ <li>Added support for the Autoptimize caching plugin.</li>
841
+ </ul>
842
+ <p><strong>Bug Fixes</strong></p>
843
+ <ul>
844
+ <li>Fixed a bug in the Photo module with srcsets and custom image sizes.</li>
845
+ <li>Fixed a bug with using shortcodes in link fields.</li>
846
+ <li>Fixed a bug with smooth scrolling and the Tabs module.</li>
847
+ <li>Fixed a bug with equal heights in the Posts module.</li>
848
+ <li>Fixed a bug with icon positioning in the Callout module.</li>
849
+ <li>Fixed a bug with Menu module text being searched in searches.</li>
850
+ <li>Fixed a bug with full height rows and content alignment in IE11.</li>
851
+ <li>Fixed a bug causing the text in textareas to be white.</li>
852
+ </ul>
853
+
854
+ <h4>1.6.4.4 - 12/08/2015</h4>
855
+ <p><strong>Enhancements</strong></p>
856
+ <ul>
857
+ <li>Added Success Action setting to the Contact Form module to show a message or redirect to a URL when the form is submitted.</li>
858
+ <li>The from email address for Contact Form module submissions is now set to the email of the person that filled out the form.</li>
859
+ <li>Added WebM fallback support to the Video module.</li>
860
+ <li>Added srcset support to the Photo module for better responsiveness of images in anticipation of WordPress 4.4.</li>
861
+ <li>Added ConvertKit integration to the Subscribe Form module.</li>
862
+ <li>Added Drip integration to the Subscribe Form module.</li>
863
+ <li>Added Campayn integration to the Subscribe Form module.</li>
864
+ <li>Added Mailrelay integration to the Subscribe Form module.</li>
865
+ <li>Added Sendy integration to the Subscribe Form module.</li>
866
+ <li>Added two new filters for working with post types that the builder is enabled on.</li>
867
+ <li>Added JavaScript event to the Accordion module for when sections are toggled.</li>
868
+ <li>Updated Font Awesome.</li>
869
+ </ul>
870
+ <p><strong>Bug Fixes</strong></p>
871
+ <ul>
872
+ <li>Fixed a bug with theme white labeling and child themes.</li>
873
+ <li>Fixed a bug with theme white labeling and the Customizer.</li>
874
+ <li>Fixed a bug with Gantry framework compatibility.</li>
875
+ <li>Fixed a bug with floating content in the Tabs module.</li>
876
+ <li>Fixed a bug with blurry background photos in the Post Slider module.</li>
877
+ <li>Fixed a bug causing global translations to be overridden by local translations.</li>
878
+ <li>Fixed a bug with cache flushing in the Widget module.</li>
879
+ </ul>
880
+
881
+ <h4>1.6.4.3 - 11/23/2015</h4>
882
+ <p><strong>Enhancements</strong></p>
883
+ <ul>
884
+ <li>Added theme branding to the page builder's branding settings for Agency customers.</li>
885
+ <li>Added show_remove option to photo fields for developers.</li>
886
+ </ul>
887
+ <p><strong>Bug Fixes</strong></p>
888
+ <ul>
889
+ <li>Fixed CSS conflicts with third party themes and the core WordPress media uploader UI.</li>
890
+ <li>Fixed multiple color picker bugs.</li>
891
+ <li>Fixed a bug with the media library not showing on older versions of Safari.</li>
892
+ <li>Fixed a bug with the Accordion module not applying the correct class to all open items.</li>
893
+ <li>Fixed a bug caused by entering text strings into the Number Counter settings.</li>
894
+ <li>Fixed a bug with template assets not loading with the fl_builder_global_posts filter.</li>
895
+ <li>Fixed a bug with the Slideshow module where thumbnail pagination would disappear when two slideshows were on the same page.</li>
896
+ <li>Fixed a bug with module animations not running when positioned below a gallery module.</li>
897
+ <li>Fixed a bug with video background positions being messed up when images haven't fully loaded within a row.</li>
898
+ <li>Fixed a bug causing random sorting of posts in the Posts module not to work.</li>
899
+ </ul>
900
+
901
+ <h4>1.6.4.2 - 11/05/2015</h4>
902
+ <p><strong>Enhancements</strong></p>
903
+ <ul>
904
+ <li>Added a Match Height setting to the Posts module's Grid layout.</li>
905
+ <li>Custom module categories now show up before the WordPress Widgets category.</li>
906
+ <li>Added the fl_builder_module_categories filter.</li>
907
+ <li>Text field enhancements for developers that allow for a list of predefined options. Thanks Oliver!</li>
908
+ <li>Added Danish translation.</li>
909
+ <li>Added Hebrew translation.</li>
910
+ </ul>
911
+ <p><strong>Bug Fixes</strong></p>
912
+ <ul>
913
+ <li>Fixed a bug with cropping photos that have a query string in their URL. Fixes issues with Jetpack's Photon module.</li>
914
+ <li>Fixed a bug with custom image size titles showing as undefined.</li>
915
+ <li>Fixed a bug with margins not working on equal height columns in FireFox.</li>
916
+ <li>Fixed a bug with UI images for the Slideshow module loading from an external domain not on HTTPS.</li>
917
+ <li>Fixed a bug with the Slideshow module caused when the body color is set to an rgba value.</li>
918
+ <li>Fixed a bug with the Subscribe Form module not working in global rows.</li>
919
+ <li>Fixed a bug with full height rows on iOS devices.</li>
920
+ <li>Fixed a bug with the Posts module and the Append extensions on Pages plugin.</li>
921
+ <li>Fixed a bug with editing templates in the Sage theme.</li>
922
+ <li>Fixed a bug with Slideshow module transitions in IE11.</li>
923
+ <li>Fixed a bug with the Insert Pages plugin not working when used within a builder layout.</li>
924
+ </ul>
925
+
926
+ <h4>1.6.4.1 - 10/21/2015</h4>
927
+ <p><strong>Enhancements</strong></p>
928
+ <ul>
929
+ <li>Images in the Content Slider module now have alt tags.</li>
930
+ <li>Updated various translations.</li>
931
+ </ul>
932
+ <p><strong>Bug Fixes</strong></p>
933
+ <ul>
934
+ <li>Fixed a content rendering bug that caused pages to become unresponsive with some shortcodes.</li>
935
+ <li>Fixed an edge case multisite domain mapping issue with scripts/styles loading under the incorrect domain.</li>
936
+ <li>Fixed an issue making it so you couldn't have fixed width content in a full height row.</li>
937
+ <li>Fixed an issue with widgets such as the GeoDirectory plugin that output the widget_id as a JavaScript variable name.</li>
938
+ <li>Fixed a post date bug with the feed layout in the Posts module.</li>
939
+ <li>Fixed a bug caused by plugins that use a forward slash in the browser hash.</li>
940
+ </ul>
941
+
942
+ <h4>1.6.4 - 10/13/2015</h4>
943
+ <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-6-4-featuring-a-new-color-picker-full-height-rows-the-number-counter-module-and-more/" target="_blank">the blog post</a> for detailed info on what was added.
944
+ <p><strong>Enhancements</strong></p>
945
+ <ul>
946
+ <li>Added an all new modern color picker that allows you to save color presets.</li>
947
+ <li>Added the ability to create full height rows.</li>
948
+ <li>Added the ability to create equal height columns.</li>
949
+ <li>Added a column settings dropdown that allows you to edit, delete and insert new columns.</li>
950
+ <li>Added the ability to resize columns by dragging.</li>
951
+ <li>Added the Number Counter module.</li>
952
+ <li>Added a new font setting to the Heading module for picking custom font families.</li>
953
+ <li>Misc UI improvements.</li>
954
+ </ul>
955
+ <p><strong>Bug Fixes</strong></p>
956
+ <ul>
957
+ <li>Fixed a bug with saving a template where hitting enter loads a 404 page.</li>
958
+ <li>Fixed a bug with the Content Slider module's mobile images not showing.</li>
959
+ <li>Removed generic lightbox button styling that caused issues with third party themes.</li>
960
+ </ul>
961
+
962
+ <h4>1.6.3.4 - 10/10/2015</h4>
963
+ <p><strong>Bug Fixes</strong></p>
964
+ <ul>
965
+ <li>Fixed a content rendering issue that can cause an infinite loop with certain shortcodes or widgets.</li>
966
+ </ul>
967
+
968
+ <h4>1.6.3.3 - 10/06/2015</h4>
969
+ <p><strong>Enhancements</strong></p>
970
+ <ul>
971
+ <li>Added a default option to the date format setting in the post modules. When set to default, the date format set in wp-admin will be used.</li>
972
+ <li>Added FLBuilderLayoutConfig JS global with path vars and anchor link animation vars. Allows you to override anchor link animation settings.</li>
973
+ <li>Added the ability to add MP4 and WebM videos to row backgrounds.</li>
974
+ </ul>
975
+ <p><strong>Bug Fixes</strong></p>
976
+ <ul>
977
+ <li>Fixed a bug with widgets that have nested settings arrays.</li>
978
+ <li>Fixed a bug with the Post Carousel moduel's image size setting.</li>
979
+ <li>Fixed a bug with white text in inputs fields.</li>
980
+ <li>Fixed a bug with plugins like Soil that remove the ID attribute from link tags.</li>
981
+ <li>Fixed a bug with row background videos when caching is enabled.</li>
982
+ <li>Fixed a bug with multiple fields.</li>
983
+ <li>Fixed a bug with the Content Slider module where text/photo content renders below the video when the background is set to a video.</li>
984
+ <li>Fixed a bug that caused row actions to be inaccessible when negative margins are present.</li>
985
+ </ul>
986
+
987
+ <h4>1.6.3.2 - 09/14/2015</h4>
988
+ <p><strong>Enhancements</strong></p>
989
+ <ul>
990
+ <li>Updated Font Awesome.</li>
991
+ <li>Added Mobile Width setting to the Menu Module.</li>
992
+ <li>The $id variable is now always available in a module's frontend.php file.</li>
993
+ <li>Added fl_builder_layout_style_media filter.</li>
994
+ <li>Added fl_builder_render_css filter.</li>
995
+ </ul>
996
+ <p><strong>Bug Fixes</strong></p>
997
+ <ul>
998
+ <li>Added more specificity to link color selectors in the Menu module to prevent them from being overridden by themes.</li>
999
+ <li>Reworked parallax logic so it works on touch screen laptops.</li>
1000
+ </ul>
1001
+
1002
+ <h4>1.6.3.1 - 09/03/2015</h4>
1003
+ <p><strong>Bug Fixes</strong></p>
1004
+ <ul>
1005
+ <li>Fixed an issue with deleting rows and resizing columns.</li>
1006
+ <li>CSS tweak to fix overlay global tag when a row color is set.</li>
1007
+ <li>CSS tweak to fix media modal close button.</li>
1008
+ </ul>
1009
+
1010
+ <h4>1.6.3 - 09/01/2015</h4>
1011
+ <p><strong>Enhancements</strong></p>
1012
+ <ul>
1013
+ <li>Rows and modules can now be saved as either standard or global templates! Be sure to check out <a href="https://www.wpbeaverbuilder.com/row-and-module-templates-are-now-in-beta/" target="_blank">the blog post</a> for more info on how that works.</li>
1014
+ <li>Agency members now have the option to add categorized sections of their row and module templates to the builder's panel.</li>
1015
+ <li>Added a new admin setting under Settings > Page Builder > Editing to disable the ability to edit global rows and modules.</li>
1016
+ <li>Duplicating global row and module templates now converts them to standard templates.</li>
1017
+ <li>The text editor font size setting now uses px instead of pt.</li>
1018
+ <li>Added additional sizes to the text editor font size setting.</li>
1019
+ <li>Added access to the $settings object in the fl_builder_control_ action.</li>
1020
+ </ul>
1021
+ <p><strong>Bug Fixes</strong></p>
1022
+ <ul>
1023
+ <li>Added AJAX check for the builder's init method to prevent issues with WooCommerce AJAX.</li>
1024
+ <li>Added more specificity to selectors for row and column colors to prevent themes from overriding them.</li>
1025
+ <li>Fixed Menu module typo.</li>
1026
+ <li>Fixed linking issues with the content slider.</li>
1027
+ </ul>
1028
+
1029
+ <h4>1.6.2.1 - 08/25/2015</h4>
1030
+ <p><strong>Enhancements</strong></p>
1031
+ <ul>
1032
+ <li>Replaced image arrows with SVG arrows in the Content Slider module.</li>
1033
+ <li>Added a setting to the Post Slider module for selecting the thumbnail size.</li>
1034
+ </ul>
1035
+ <p><strong>Bug Fixes</strong></p>
1036
+ <ul>
1037
+ <li>Fixed a rendering issue with widgets that output styles in wp_enqueue_script.</li>
1038
+ <li>Fixed an issue with the edit_url method so all urls get set_url_scheme.</li>
1039
+ <li>Fixed styling issues with the Menu module.</li>
1040
+ <li>Fixed styling issues with the Posts module.</li>
1041
+ <li>Fixed broken arrows in the Posts Slider module.</li>
1042
+ </ul>
1043
+
1044
+ <h4>1.6.2 - 08/16/2015</h4>
1045
+ <p><strong>Enhancements</strong></p>
1046
+ <ul>
1047
+ <li>The Menu module is now out of beta! Be sure to check out <a href="https://www.wpbeaverbuilder.com/the-menu-module-is-now-in-beta/" target="_blank">the blog post</a> for more info on how that works.</li>
1048
+ <li>Added opacity settings for menu background colors in the Menu module.</li>
1049
+ <li>Added vertical and horizontal spacing settings for menu items in the Menu module.</li>
1050
+ <li>Added Polish translation.</li>
1051
+ </ul>
1052
+ <p><strong>Bug Fixes</strong></p>
1053
+ <ul>
1054
+ <li>Fixed an issue with the Menu module when an empty menu is selected.</li>
1055
+ <li>Fixed an issue with the Menu module when resizing from desktop to mobile.</li>
1056
+ <li>Fixed an issue with the width of the Menu module accordion layout.</li>
1057
+ <li>Fixed an issue with widgets such as the Master Slider widget that only register their scripts in the wp_enqueue_scripts action instead of enqueuing them there.</li>
1058
+ </ul>
1059
+
1060
+ <h4>1.6.1.1 - 08/11/2015</h4>
1061
+ <p><strong>Enhancements</strong></p>
1062
+ <ul>
1063
+ <li>Tested WordPress 4.3 compatibility.</li>
1064
+ <li>Updated translation files.</li>
1065
+ <li>The CSS class fl-scroll-link can now be added to links to have them scroll to an element on the page.</li>
1066
+ </ul>
1067
+ <p><strong>Bug Fixes</strong></p>
1068
+ <ul>
1069
+ <li>Fixed a bug with toggling settings tabs in the Posts module.</li>
1070
+ <li>Fixed a bug with images in the Posts module gallery layout getting stretched on mobile.</li>
1071
+ </ul>
1072
+
1073
+ <h4>1.6.1 - 08/03/2015</h4>
1074
+ <p><strong>Enhancements</strong></p>
1075
+ <ul>
1076
+ <li>Added the Posts Carousel module.</li>
1077
+ <li>Added the Posts Slider module.</li>
1078
+ <li>Added style options to the Posts module gallery layout.</li>
1079
+ <li>The builder is now compatible with scheduled posts.</li>
1080
+ <li>The fullscreen slideshow button now shows at smaller sizes.</li>
1081
+ </ul>
1082
+ <p><strong>Bug Fixes</strong></p>
1083
+ <ul>
1084
+ <li>Fixed a bug with row margins not working when a slideshow or video background is present.</li>
1085
+ </ul>
1086
+
1087
+ <h4>1.6.0.3 - 07/21/2015</h4>
1088
+ <p><strong>Bug Fixes</strong></p>
1089
+ <ul>
1090
+ <li>Fixed a bug with the fl_builder_global_posts filter not returning all posts.</li>
1091
+ <li>Fixed a bug with all checkboxes being checked in some widgets when saving.</li>
1092
+ <li>Fixed a bug with floating content breaking out of tabs.</li>
1093
+ <li>Fixed a bug with autosuggest fields breaking when posts have special characters in the title.</li>
1094
+ </ul>
1095
+
1096
+ <h4>1.6.0.2 - 07/08/2015</h4>
1097
+ <p><strong>Enhancements</strong></p>
1098
+ <ul>
1099
+ <li>Added support for comma separated selectors in CSS preview fields.</li>
1100
+ <li>Added support for an array of rules in CSS preview fields.</li>
1101
+ </ul>
1102
+ <p><strong>Bug Fixes</strong></p>
1103
+ <ul>
1104
+ <li>Added exclude_from_search for the templates post type so templates don't so in searches.</li>
1105
+ <li>Fixed a bug with nested modules such as buttons causing errors when they are disabled using fl_builder_register_module.</li>
1106
+ <li>Fixed a bug with slideshow and gallery templates.</li>
1107
+ <li>Fixed a bug with the Posts module that made it so two on the same page couldn't have different post widths.</li>
1108
+ <li>Fixed a bug that prevented two accordions on the same page from having open sections at the same time.</li>
1109
+ <li>Fixed a bug causing the Facebook comments popup in the Social Buttons module from showing.</li>
1110
+ </ul>
1111
+
1112
+ <h4>1.6.0.1 - 06/28/2015</h4>
1113
+ <p><strong>Enhancements</strong></p>
1114
+ <ul>
1115
+ <li>Added fl_builder_layout_style_dependencies filter.</li>
1116
+ </ul>
1117
+ <p><strong>Bug Fixes</strong></p>
1118
+ <ul>
1119
+ <li>Fixed a bug with importing templates that have slideshows or galleries.</li>
1120
+ <li>Fixed a bug with row margins when the background is set to a slideshow or video.</li>
1121
+ </ul>
1122
+
1123
+ <h4>1.6.0 - 06/22/2015</h4>
1124
+ <p><strong>Enhancements</strong></p>
1125
+ <ul>
1126
+ <li>Added link, hover and heading color settings to rows and columns.</li>
1127
+ <li>Tab and accordion items now open when linked to from another page.</li>
1128
+ <li>Accordion items now have an active class when open.</li>
1129
+ <li>Column layouts now support RTL languages.</li>
1130
+ <li>Added an email address option to the Subscribe Form module so signups can be sent to your email address.</li>
1131
+ <li>Added support for MailChimp groups to the Subscribe Form module.</li>
1132
+ <li>Added ActiveCampaign integration.</li>
1133
+ </ul>
1134
+ <p><strong>Bug Fixes</strong></p>
1135
+ <ul>
1136
+ <li>Fixed a bug with the window closing when publishing changes.</li>
1137
+ <li>Fixed a bug with getting the correct ID for the current post.</li>
1138
+ <li>Fixed a bug with row borders showing when none are set and the background is a slideshow.</li>
1139
+ <li>Fixed a bug with the multiple photos field when used in a nested form.</li>
1140
+ </ul>
1141
+
1142
+ <h4>1.5.9 - 06/01/2015</h4>
1143
+ <p><strong>Enhancements</strong></p>
1144
+ <ul>
1145
+ <li>Accordion and tab items can now be linked to. Please see this <a href="https://www.wpbeaverbuilder.com/knowledge-base/linking-to-tabs-and-accordions/">knowledge base entry</a> for more info.</li>
1146
+ <li>Button icons can now be added after the button text.</li>
1147
+ <li>Added background color overlay for columns.</li>
1148
+ <li>Added Dutch translation.</li>
1149
+ </ul>
1150
+ <p><strong>Bug Fixes</strong></p>
1151
+ <ul>
1152
+ <li>Fixed issues with modules, widgets and shortcodes that create secondary loops causing the page to become unresponsive.</li>
1153
+ <li>Fixed a bug with widgets that use checkbox groups.</li>
1154
+ <li>Fixed a bug with the pricing table module that caused some styling not to show.</li>
1155
+ <li>The map module no longer scrolls as you scroll the page.</li>
1156
+ <li>CSS tweak to prevent the text editor from breaking when the body's position is set to relative.</li>
1157
+ <li>CSS tweak for photos to prevent extra space below them.</li>
1158
+ <li>CSS tweak to make fixed background photos scroll on iOS to prevent them from getting blown up too big.</li>
1159
+ <li>CSS tweak to fix a FireFox bug with callouts.</li>
1160
+ <li>Added jQuery as a dependency for fl-builder-layout-(POST_ID).js so it's included after jquery.js if jquery.js is moved to wp_footer.</li>
1161
+ </ul>
1162
+
1163
+ <h4>1.5.8 - 05/17/2015</h4>
1164
+ <p>Please see <a href="https://www.wpbeaverbuilder.com/?p=14686" target="_blank">the blog post</a> for more info on this release.</p>
1165
+ <p><strong>Enhancements</strong></p>
1166
+ <ul>
1167
+ <li>User defined templates can now be categorized and ordered.</li>
1168
+ <li>Revisions are now enabled for user defined templates.</li>
1169
+ <li>Added a setting to enable the templates admin interface for editing templates in the WordPress admin.</li>
1170
+ <li>Added a setting for Agency members to override core templates.</li>
1171
+ <li>Added Hatchbuck integration to the Subscribe Form module.</li>
1172
+ <li>Photo backgrounds can now be added to columns.</li>
1173
+ </ul>
1174
+ <p><strong>Bug Fixes</strong></p>
1175
+ <ul>
1176
+ <li>Fixed a CSS z-index bug with the Content Slider module's next/prev buttons.</li>
1177
+ </ul>
1178
+
1179
+ <h4>1.5.7.2 - 05/12/2015</h4>
1180
+ <p><strong>Bug Fixes</strong></p>
1181
+ <ul>
1182
+ <li>Fixed a bug with shortcodes not being rendered when the Posts module is present on a page.</li>
1183
+ </ul>
1184
+
1185
+ <h4>1.5.7.1 - 05/10/2015</h4>
1186
+ <p><strong>Bug Fixes</strong></p>
1187
+ <ul>
1188
+ <li>Fixed a FireFox and IE bug with the Photo module introduced in 1.5.7.</li>
1189
+ <li>Fixed a CSS bug with the height of the Content Slider module when multiple sliders are on the same page.</li>
1190
+ <li>Fixed a bug that prevented shortcodes from being escaped with double brackets.</li>
1191
+ <li>Fixed a bug that caused the Video module to freeze the builder with videos that are uploaded to WordPress.</li>
1192
+ </ul>
1193
+
1194
+ <h4>1.5.7 - 05/04/2015</h4>
1195
+ <p><strong>Enhancements</strong></p>
1196
+ <ul>
1197
+ <li>Added Infusionsoft integration.</li>
1198
+ </ul>
1199
+ <p><strong>Bug Fixes</strong></p>
1200
+ <ul>
1201
+ <li>Fixed a bug causing MailPoet to be unavailable in the Subscribe Form module.</li>
1202
+ <li>Fixed a bug causing the builder's admin settings to be unavailable when DISALLOW_FILE_MODS is set to true.</li>
1203
+ <li>Fixed a bug with new lines in photo captions breaking the Slideshow module.</li>
1204
+ <li>Fixed a CSS bug with photo captions that are shown on hover.</li>
1205
+ <li>Fixed floating content issues with the Accordion module.</li>
1206
+ </ul>
1207
+
1208
+ <h4>1.5.6 - 04/26/2015</h4>
1209
+ <p><strong>Enhancements</strong></p>
1210
+ <ul>
1211
+ <li>Added SendinBlue integration.</li>
1212
+ <li>Added filters for MailChimp single optin and disabling the welcome message.</li>
1213
+ <li>Most of the builder's PHP and JavaScript files now have much better inline documentation of classes, properties and methods (we still need to do the modules).</li>
1214
+ </ul>
1215
+ <p><strong>Tweaks</strong></p>
1216
+ <ul>
1217
+ <li>Removed phone number validation from the Contact Form module to support international phone numbers.</li>
1218
+ <li>Updated FontAwesome.</li>
1219
+ <li>Tweaked the Heading module CSS to prevent Dynamik from overriding our styles.</li>
1220
+ <li>Added CSS to fix margins issue with the WordPress editor link lightbox and some third party themes.</li>
1221
+ </ul>
1222
+ <p><strong>Bug Fixes</strong></p>
1223
+ <ul>
1224
+ <li>Fixed a bug that didn't allow backslashes to be saved.</li>
1225
+ <li>Fixed a bug that prevented namespaced widgets from working.</li>
1226
+ <li>Fixed a bug with the Posts module that prevented the date from being hidden in the gallery layout.</li>
1227
+ </ul>
1228
+
1229
+ <h4>1.5.5 - 04/12/2015</h4>
1230
+ <p><strong>Enhancements</strong></p>
1231
+ <ul>
1232
+ <li>The Subscribe Form module is here! Please see <a href="https://www.wpbeaverbuilder.com/build-your-email-lists-with-beaver-builders-new-subscribe-form-module/">the blog post</a> for complete details.</li>
1233
+ <li>Added four new templates.</li>
1234
+ </ul>
1235
+
1236
+ <h4>1.5.4 - 04/08/2015</h4>
1237
+ <p><strong>Enhancements</strong></p>
1238
+ <ul>
1239
+ <li>Added offset setting to the Posts module.</li>
1240
+ <li>Added getting started video to the help button.</li>
1241
+ <li>Added auto spacing setting to the global settings for turning off auto spacing on responsive layouts.</li>
1242
+ <li>Added SVG support to the photo field for sites that have SVG enabled as an mime type.</li>
1243
+ </ul>
1244
+ <p><strong>Bug Fixes</strong></p>
1245
+ <ul>
1246
+ <li>Fixed a bug with switching back to the WordPress editor.</li>
1247
+ <li>Fixed a bug with textarea text color being overridden by row text color.</li>
1248
+ <li>Fixed an issue with varnish by removing the question mark from the URL when publishing.</li>
1249
+ <li>Removed FLBuilderModel::delete_asset_cache_domain_change as it's causing issues and we now have the clear cache button.</li>
1250
+ </ul>
1251
+
1252
+ <h4>1.5.3 - 03/31/2015</h4>
1253
+ <p><strong>Enhancements</strong></p>
1254
+ <ul>
1255
+ <li>Added admin settings section for clearing the builder's CSS and JavaScript cache.</li>
1256
+ <li>Added a setting to show the full content in the posts module.</li>
1257
+ </ul>
1258
+ <p><strong>Bug Fixes</strong></p>
1259
+ <ul>
1260
+ <li>CSS fix for three column layouts in the WooCommerce module.</li>
1261
+ <li>Fixed a preview bug with row background overlay colors.</li>
1262
+ <li>Fixed an issue with the PHP glob function not returning an array on some systems.</li>
1263
+ <li>Fixed CSS conflicts with third party themes and the WordPress editor.</li>
1264
+ </ul>
1265
+
1266
+ <h4>1.5.2 - 03/24/2015</h4>
1267
+ <p><strong>Enhancements</strong></p>
1268
+ <ul>
1269
+ <li>Added logic to the accordion module that scrolls a section into view on mobile if it's not visible.</li>
1270
+ </ul>
1271
+ <p><strong>Bug Fixes</strong></p>
1272
+ <ul>
1273
+ <li>Rolling back part of the last update that removed the style tag from columns. This is due to the fact that many existing sites have old CSS cached that doesn't contain the column width. We'll be releasing this change again in the near future to give sites time to update their cache with the new CSS.</li>
1274
+ <li>Icons in accordion titles don't get replaced anymore when clicked.</li>
1275
+ <li>Fixed an unescaped translation string JavaScript bug.</li>
1276
+ </ul>
1277
+
1278
+ <h4>1.5.1 - 03/22/2015</h4>
1279
+ <p><strong>Enhancements</strong></p>
1280
+ <ul>
1281
+ <li>Added German translation.</li>
1282
+ <li>Added Russian translation.</li>
1283
+ <li>Smooth scrolling now works for all links on a page including links in the header on third party themes.</li>
1284
+ <li>Added phone and subject fields to the contact form module.</li>
1285
+ <li>Added settings to the contact form module for showing and hiding fields.</li>
1286
+ <li>Builder cache now clears itself if the domain name of a website changes.</li>
1287
+ <li>Modules in the backend are now categorized the same as they are on the frontend.</li>
1288
+ <li>Moved column width from the style attribute in the markup to the generated css file.</li>
1289
+ </ul>
1290
+ <p><strong>Bug Fixes</strong></p>
1291
+ <ul>
1292
+ <li>Fixed a bug with text editor refresh previews.</li>
1293
+ <li>Added position:static to the body tag when the builder is active to fix issues with WordPress editor popups when the body is set to position:relative.</li>
1294
+ <li>Fixed bugs with setting the product order in the WooCommerce module.</li>
1295
+ <li>CSS fix for row/column colors overriding the color of elements in the heading module such as em tags.</li>
1296
+ <li>Added ignore_sticky_posts to post module queries to prevent sticky posts from showing when not desired.</li>
1297
+ <li>Smooth scrolling is only applied to rows, columns and modules to avoid conflicts with third party scripts.</li>
1298
+ <li>Autosuggest fields such as links now work on pre WordPress 4.0.</li>
1299
+ </ul>
1300
+
1301
+ <h4>1.5.0 - 03/02/2015</h4>
1302
+ <p><strong>Enhancements</strong></p>
1303
+ <ul>
1304
+ <li>Updated Slovak translation.</li>
1305
+ </ul>
1306
+ <p><strong>Bug Fixes</strong></p>
1307
+ <ul>
1308
+ <li>Fixed a bug with the JavaScript for smooth scrolling links.</li>
1309
+ <li>Fixed a spelling error in the help tour. Thanks Gerard!</li>
1310
+ </ul>
1311
+
1312
+ <h4>1.4.9 - 03/01/2015</h4>
1313
+ <p><strong>Enhancements</strong></p>
1314
+ <ul>
1315
+ <li>Added a help button to the builder interface that gives users access to a tour, video (coming soon), forums and documentation.</li>
1316
+ <li>Added network settings for white labeling the help button. Agency members can customize or disable all help button features such as adding their own video or knowledge base links. Unfortunately, the tour is too complex to make customizable, but it can be disabled and is disabled by default while in simple editing mode.</li>
1317
+ <li>Added a welcome message for the first time a user launchs the builder on a site asking if they would like to view the tour.</li>
1318
+ <li>Added a new style setting to the button module for creating flat, gradient or transparent buttons.</li>
1319
+ <li>Added Arabic and Spanish translations.</li>
1320
+ <li>Added display:inline to builder images to prevent themes that set images to display:block from breaking alignment.</li>
1321
+ <li>Added JavaScript logic for smooth scrolling of all anchor links in a builder layout.</li>
1322
+ </ul>
1323
+ <p><strong>Bug Fixes</strong></p>
1324
+ <ul>
1325
+ <li>Row overlay actions are now fixed to the bottom of the overlay if the actions are hidden by the builder header or are off the page.</li>
1326
+ <li>Fixed a bug with background video fallbacks not showing on mobile.</li>
1327
+ <li>Fixed a bug with custom modules on Windows servers.</li>
1328
+ <li>Fixed a CSS bug with the callout module when the photo sits to the left of the text.</li>
1329
+ <li>Fixed a bug that prevented the builder from working with domain masking.</li>
1330
+ <li>Fixed a bug caused by W3 Total Cache's HTML minification by disabling minify while the builder is active.</li>
1331
+ </ul>
1332
+
1333
+ <h4>1.4.8 - 02/22/2015</h4>
1334
+ <p><strong>Enhancements</strong></p>
1335
+ <ul>
1336
+ <li>Added a background color overlay setting for rows. A huge thanks to <a href="http://favolla.com.br/" target="_blank">Diego de Oliveira</a> for this contribution!</li>
1337
+ <li>Added global settings for default row width.</li>
1338
+ <li>Added a confirmation popup for switching back to text editor mode.</li>
1339
+ </ul>
1340
+ <p><strong>Bug Fixes</strong></p>
1341
+ <ul>
1342
+ <li>Fixed a bug with custom icons that only happens on certain sites as PHP's glob function doesn't always return an array.</li>
1343
+ <li>Fixed an admin settings JavaScript error caused by unescaped translation strings.</li>
1344
+ <li>Fixed a bug causing row background slideshows to show up on archive pages.</li>
1345
+ </ul>
1346
+
1347
+ <h4>1.4.7 - 02/16/2015</h4>
1348
+ <p><strong>Bug Fixes</strong></p>
1349
+ <ul>
1350
+ <li>Fixed a bug that broke the builder's admin settings page on the standard version.</li>
1351
+ </ul>
1352
+
1353
+ <h4>1.4.6 - 02/15/2015</h4>
1354
+ <p><strong>Enhancements</strong></p>
1355
+ <ul>
1356
+ <li>Added the ability to upload Icomoon and Fontello font icons under Settings > Page Builder > Icons.</li>
1357
+ <li>Added the ability to disable core font icons.</li>
1358
+ <li>Added an ID field to row, column and module settings.</li>
1359
+ <li>Added French translation.</li>
1360
+ <li>Added Itailian translation.</li>
1361
+ <li>Added fl_builder_upgrade_url filter. This filter can be used by theme developers to add their affiliate link to the upgrade buttons in the lite version.</li>
1362
+ <li>Added fl_builder_settings_form_defaults filter for overriding default form settings.</li>
1363
+ <li>Enhanced SSL check for servers behind load balancers.</li>
1364
+ <li>Single repeater fields can now be duplicated.</li>
1365
+ </ul>
1366
+ <p><strong>Bug Fixes</strong></p>
1367
+ <ul>
1368
+ <li>Row text color no longer overrides heading text color.</li>
1369
+ <li>Preview text for form fields now shows the option label for select inputs instead of the option value.</li>
1370
+ </ul>
1371
+
1372
+ <h4>1.4.5 - 01/26/2015</h4>
1373
+ <p><strong>Enhancements</strong></p>
1374
+ <ul>
1375
+ <li>Added a search field to the icon selector.</li>
1376
+ </ul>
1377
+ <p><strong>Bug Fixes</strong></p>
1378
+ <ul>
1379
+ <li>Fixed a bug introduced in 1.4.4 that caused PHP warnings when creating new pages.</li>
1380
+ </ul>
1381
+
1382
+ <h4>1.4.4 - 01/26/2015</h4>
1383
+ <p><strong>Enhancements</strong></p>
1384
+ <ul>
1385
+ <li>Major improvements to how translations are handled. A huge thanks to Oliver Juhas of <a href="http://www.webmandesign.eu/" target="_blank">WebMan Design</a> for making that happen. <strong>Please Note:</strong> Older translations are not compatible with this update need to be redone. Please get in touch with us if you're interested in helping with that.</li>
1386
+ <li>Widgets in the builder now run the widget update method.</li>
1387
+ <li>Content for the tabs module now scrolls into view on smaller devices.</li>
1388
+ <li>Added filters for working with custom css classes on rows, columns and modules.</li>
1389
+ <li>Updated class filenames to follow WordPress standards.</li>
1390
+ </ul>
1391
+ <p><strong>Bug Fixes</strong></p>
1392
+ <ul>
1393
+ <li>Fixed icon hover color.</li>
1394
+ <li>Fixed a bug with slideshows showing up in the header on archive pages.</li>
1395
+ <li>Fixed a bug causing the heading module color to not work when linked.</li>
1396
+ <li>Fixed a bug with overriding modules in a theme when the name of the wp-content directory is changed.</li>
1397
+ </ul>
1398
+
1399
+ <h4>1.4.3 - 01/11/2015</h4>
1400
+ <p><strong>Enhancements</strong></p>
1401
+ <ul>
1402
+ <li>Added Foundation Icons and WordPress Dashicons to the icon selector.</li>
1403
+ <li>Added icons for buttons in the Callout, Call To Action, and Content Slider modules.</li>
1404
+ <li>Added support for right-to-left languages.</li>
1405
+ <li>Read more text can now be customized in posts module.</li>
1406
+ <li>Module ids are now accessible in frontend.php using the $id variable.</li>
1407
+ </ul>
1408
+ <p><strong>Bug Fixes</strong></p>
1409
+ <ul>
1410
+ <li>Fixed a bug with WordPress installs where core files are installed in a subdirectoy and the index file is in the root.</li>
1411
+ </ul>
1412
+
1413
+ <h4>1.4.2</h4>
1414
+ <p><strong>Bug Fixes</strong></p>
1415
+ <ul>
1416
+ <li>Fixes for widgets that load in JavaScripts or forget to reset the loop.</li>
1417
+ <li>Minor adjustments to how data is passed to the server to prevent 406 errors.</li>
1418
+ </ul>
1419
+
1420
+ <h4>1.4.1</h4>
1421
+ <p><strong>Enhancements</strong></p>
1422
+ <ul>
1423
+ <li>Added a new responsive breakpoint in the global settings for medium devices.</li>
1424
+ <li>Added new column width settings for medium and small devices.</li>
1425
+ <li>Added the ability to hide rows, columns and modules at a number of new breakpoints.</li>
1426
+ <li>Improved the UI/UX for editing user defined templates.</li>
1427
+ <li>User defined templates are now ordered by title instead of id.</li>
1428
+ <li>Optimized the loading of images for the gallery module's collage layout.</li>
1429
+ <li>White label settings for Agency members are now available on single site installs.</li>
1430
+ <li>Updated the custom modules docs and examples with info on the new link field type.</li>
1431
+ </ul>
1432
+ <p><strong>Bug Fixes</strong></p>
1433
+ <ul>
1434
+ <li>Fixed a bug that kept some third party widgets from being styled correctly.</li>
1435
+ <li>Fixed bugs that caused a secondary layout on a page to be editable when it shouldn't be.</li>
1436
+ <li>Replaced the word update with save in AJAX requests to prevent mod security from blocking them.</li>
1437
+ <li>Fixed a bug where publishing a layout in multiple tabs caused it to disappear.</li>
1438
+ <li>Fixed a bug causing the builder to break in rare cases when canceling out of a preview.</li>
1439
+ </ul>
1440
+
1441
+ <h4>1.4.0</h4>
1442
+ <p><strong>Bug Fixes</strong></p>
1443
+ <ul>
1444
+ <li>Fixed a bug introduced in 1.3.9 with moving modules into the main layout to create a new row.</li>
1445
+ <li>Fixed classname conflicts with the pricing table module that broke the builder in some cases.</li>
1446
+ </ul>
1447
+
1448
+ <h4>1.3.9</h4>
1449
+ <p><strong>Enhancements</strong></p>
1450
+ <ul>
1451
+ <li>Clicking a Beaver Builder theme header link now asks if you want to publish before launching the builder on a new page.</li>
1452
+ <li>Added support for multiple builder layouts on the same page.</li>
1453
+ <li>Color picker hex inputs now accept the # symbol.</li>
1454
+ <li>Added a new link field that allows you to search for a post of any type to link to.</li>
1455
+ <li>Added white labeling to the plugins page.</li>
1456
+ <li>Added an admin setting for disabling advanced editing functionality such as adding, deleting and moving modules.</li>
1457
+ </ul>
1458
+ <p><strong>Bug Fixes</strong></p>
1459
+ <ul>
1460
+ <li>Fixed a compatibility issue with themes that use older versions of Option Tree.</li>
1461
+ <li>Removed deprecated like_escape function from FLBuilderLoop class.</li>
1462
+ </ul>
1463
+
1464
+ <h4>1.3.8</h4>
1465
+ <p><strong>Enhancements</strong></p>
1466
+ <ul>
1467
+ <li>Single photos can now be opened in a lightbox by choosing lightbox in the photo module's link settings.</li>
1468
+ <li>Added the ability to define custom fields through actions. Developers should review the custom module docs and examples for detailed info on how that works.</li>
1469
+ <li>Added the ability to duplicate rows.</li>
1470
+ </ul>
1471
+ <p><strong>Bug Fixes</strong></p>
1472
+ <ul>
1473
+ <li>Fixed a bug that made it so you could only have one text or code editor within a builder settings panel. Thanks to Nicholas Joannes for the fix!</li>
1474
+ <li>Reworked the load order and definitions for the main builder JavaScript class to prevent issues with some minification plugins.</li>
1475
+ <li>Fixed a bug with generating new builder node ids that was affecting templates in some cases.</li>
1476
+ </ul>
1477
+
1478
+ <h4>1.3.7</h4>
1479
+ <p><strong>Enhancements</strong></p>
1480
+ <ul>
1481
+ <li>Added circle crop option to the photo module.</li>
1482
+ <li>Added icon setting for white labeling.</li>
1483
+ </ul>
1484
+ <p><strong>Bug Fixes</strong></p>
1485
+ <ul>
1486
+ <li>Fixed a bug with the posts module that kept shortcodes from rendering.</li>
1487
+ <li>Fixed a bug that made it impossible to append the same template twice.</li>
1488
+ <li>Fixed a bug that broke photo cropping.</li>
1489
+ </ul>
1490
+
1491
+ <h4>1.3.6</h4>
1492
+ <p><strong>Enhancements</strong></p>
1493
+ <ul>
1494
+ <li>The Pricing Table module is here!</li>
1495
+ <li>Added page builder icon to admin bar link.</li>
1496
+ <li>Added data sanitization to admin settings for better security.</li>
1497
+ </ul>
1498
+ <p><strong>Bug Fixes</strong></p>
1499
+ <ul>
1500
+ <li>Minor code refactoring and bug fixes.</li>
1501
+ <li>WebKit scrollbar CSS fix.</li>
1502
+ </ul>
1503
+
1504
+ <h4>1.3.5</h4>
1505
+ <p><strong>Enhancements</strong></p>
1506
+ <ul>
1507
+ <li>Reworked the FLBuilderModel class to drastically lower the number of database operations.</li>
1508
+ <li>Updated Swedish translation.</li>
1509
+ </ul>
1510
+ <p><strong>Bug Fixes</strong></p>
1511
+ <ul>
1512
+ <li>Fixed a bug with revision support that was causing layout data to be lost in some cases.</li>
1513
+ <li>Fixed a bug causing the builder to be active for BuddyPress pages.</li>
1514
+ <li>Fixed a bug with the post module's category filtering when a custom post type is present that uses standard categories.</li>
1515
+ <li>Fixed post module layout bug caused by images not being fully loaded before layout happens.</li>
1516
+ <li>Fixed oversized parallax backgrounds for tablets.</li>
1517
+ <li>Fixed a bug with nested settings forms that was causing apostrophes to render incorrectly.</li>
1518
+ <li>Replaced jQuery finish call with stop for legacy support.</li>
1519
+ <li>Small CSS fix for the builder logo on third party themes.</li>
1520
+ </ul>
1521
+
1522
+ <h4>1.3.4</h4>
1523
+ <p><strong>Enhancements</strong></p>
1524
+ <ul>
1525
+ <li>The tabs module is here!</li>
1526
+ </ul>
1527
+ <p><strong>Bug Fixes</strong></p>
1528
+ <ul>
1529
+ <li>Fixed a bug caused by widgets that embed jQuery inline.</li>
1530
+ <li>Fixed a bug caused by the recent update that broke the ability to switch back to the text editor on the post edit screen.</li>
1531
+ </ul>
1532
+
1533
+ <h4>1.3.3</h4>
1534
+ <p><strong>Enhancements</strong></p>
1535
+ <ul>
1536
+ <li>Live previews are here! We've done away with the "Save &amp; Preview" button as changes will now take effect as soon as you edit a setting. Clicking the cancel button from within a settings panel will now revert any changes made while that panel was active. Developers should test their custom modules before updating and check out the new custom module docs for more information on the live preview APIs.</li>
1537
+ <li>Updated custom module docs and examples.</li>
1538
+ <li>Updated layout template PSD files.</li>
1539
+ <li>Optimized AJAX requests for adding new rows and columns.</li>
1540
+ </ul>
1541
+ <p><strong>Bug Fixes</strong></p>
1542
+ <ul>
1543
+ <li>Reworked handling of post data to prevent mod_security 406 and 503 errors.</li>
1544
+ </ul>
1545
+
1546
+ <h4>1.3.2</h4>
1547
+ <p><strong>Enhancements</strong></p>
1548
+ <ul>
1549
+ <li>Updated custom module docs for developer members.</li>
1550
+ </ul>
1551
+ <p><strong>Bug Fixes</strong></p>
1552
+ <ul>
1553
+ <li>Removed do_shortcode from the builder's render content method as it isn't necessary and causes issues.</li>
1554
+ <li>Fixed a bug where the builder was removing third party editor buttons from the post edit screen's editor.</li>
1555
+ <li>Fixed path to blank builder template thumbnail.</li>
1556
+ <li>Reworked the FLBuilderModel::generate_node_id method to account for duplicate ids being generated, specifically on Windows servers.</li>
1557
+ <li>Fixed a bug with row ordering caused by plugins that insert script tags within the builder's content area.</li>
1558
+ <li>Fixed bug where password protected posts show that the builder is inactive even when it's active.</li>
1559
+ </ul>
1560
+
1561
+ <h4>1.3.1</h4>
1562
+ <p><strong>Enhancements</strong></p>
1563
+ <ul>
1564
+ <li>Relaunching as Beaver Builder! Check out the new site at <a href="http://www.wpbeaverbuilder.com" target="_blank">www.wpbeaverbuilder.com</a>.</li>
1565
+ <li>Developer members can now white label the builder under Settings > Page Builder > Branding.</li>
1566
+ </ul>
1567
+
1568
+ <h4>1.3.0</h4>
1569
+ <p><strong>Enhancements</strong></p>
1570
+ <ul>
1571
+ <li>Multiple accordian items can now be open at the same time.</li>
1572
+ <li>Added Swedish translation.</li>
1573
+ </ul>
1574
+ <p><strong>Bug Fixes</strong></p>
1575
+ <ul>
1576
+ <li>Added a version number to builder assets to prevent caching when the builder is active.</li>
1577
+ <li>Fixed an issue with editing the same page in multiple tabs.</li>
1578
+ <li>Renamed JSMin class to avoid conflicts with W3TC.</li>
1579
+ <li>Reworked how builder edit URLs are generated.</li>
1580
+ <li>Reworked the fix for shortcodes that load jquery since it's already loaded when the builder is active.</li>
1581
+ </ul>
1582
+
1583
+ <h4>1.2.9</h4>
1584
+ <p><strong>Enhancements</strong></p>
1585
+ <ul>
1586
+ <li>Updated Font Awesome.</li>
1587
+ </ul>
1588
+ <p><strong>Bug Fixes</strong></p>
1589
+ <ul>
1590
+ <li>Fixed Chrome layout bug with the template selector.</li>
1591
+ <li>Added back wp_reset_postdata() to the Posts module.</li>
1592
+ <li>Fixed a bug where the column size field didn't accept decimals.</li>
1593
+ <li>Fixed a bug with the Text Editor module when the visual editor is disabled in the user settings.</li>
1594
+ <li>Now forcing auto height and width for builder photos.</li>
1595
+ </ul>
1596
+
1597
+ <h4>1.2.8</h4>
1598
+ <p><strong>Enhancements</strong></p>
1599
+ <ul>
1600
+ <li>Post meta is now used to store data instead of a custom database table.</li>
1601
+ <li>Post revisions are now supported. NOTE: Old revisions will not contain builder data. Only revisions saved after updating to 1.2.8 or later will contain builder data.</li>
1602
+ <li>Modules can now be overridden from within a theme directory.</li>
1603
+ </ul>
1604
+ <p><strong>Bug Fixes</strong></p>
1605
+ <ul>
1606
+ <li>Scripts and styles enqueued by shortcodes are now rendered in the builder's ajax layout method.</li>
1607
+ <li>Fixed an issue with shortcodes when the posts module is present.</li>
1608
+ <li>Fixed an issue with WordPress widgets that no longer exist.</li>
1609
+ <li>Fixed color picker hex input width so all characters are visible.</li>
1610
+ <li>Increased the memory limit for photo crop operations.</li>
1611
+ </ul>
1612
+
1613
+ <h4>1.2.7</h4>
1614
+ <p><strong>Bug Fixes</strong></p>
1615
+ <ul>
1616
+ <li>Fixed a pagination bug with the posts module when used on a homepage.</li>
1617
+ <li>Fixed a compatibility issue with shortcodes that incorrectly output html.</li>
1618
+ <li>Added compatibility for password protected pages.</li>
1619
+ </ul>
1620
+
1621
+ <h4>1.2.6</h4>
1622
+ <p><strong>Enhancements</strong></p>
1623
+ <ul>
1624
+ <li>Added new homepage layout templates.</li>
1625
+ <li>Refined existing homepage layout templates.</li>
1626
+ </ul>
1627
+ <p><strong>Bug Fixes</strong></p>
1628
+ <ul>
1629
+ <li>The custom post type for user templates doesn't show up in the admin UI anymore.</li>
1630
+ </ul>
1631
+
1632
+ <h4>1.2.5</h4>
1633
+ <p><strong>Enhancements</strong></p>
1634
+ <ul>
1635
+ <li>Added new gallery layout to the posts module.</li>
1636
+ <li>Added new blog gallery template.</li>
1637
+ </ul>
1638
+ <p><strong>Bug Fixes</strong></p>
1639
+ <ul>
1640
+ <li>Custom image sizes now show up correctly in the photo module.</li>
1641
+ <li>The WordPress heartbeat API is only used when available.</li>
1642
+ <li>Fixed a FireFox scrolling issue with the modules panel.</li>
1643
+ <li>Cleaned up the WordPress link dialog layout for the text module.</li>
1644
+ </ul>
1645
+
1646
+ <h4>1.2.4</h4>
1647
+ <ul>
1648
+ <li>Ok, let's try this again. The posts module is here! :)</li>
1649
+ <li>Added updated Italian translation files.</li>
1650
+ </ul>
1651
+
1652
+ <h4>1.2.3</h4>
1653
+ <ul>
1654
+ <li>The posts module is here! Add a feed or grid of posts to any page on your website!</li>
1655
+ <li>Added five new layout templates.</li>
1656
+ </ul>
1657
+
1658
+ <h4>1.2.2</h4>
1659
+ <p><strong>Enhancements</strong></p>
1660
+ <ul>
1661
+ <li>Media is now attached to the current post when using the media uploader within the builder.</li>
1662
+ </ul>
1663
+ <p><strong>Bug Fixes</strong></p>
1664
+ <ul>
1665
+ <li>Fixed a bug that kept iframes from being exported to the WordPress editor.</li>
1666
+ <li>Fixed a bug where private posts were published when saving a layout.</li>
1667
+ <li>Fixed initial flash of all testimonials when the testimonials module is loading.</li>
1668
+ <li>Fixed woocommerce css issues.</li>
1669
+ </ul>
1670
+
1671
+ <h4>1.2.1</h4>
1672
+ <p><strong>Enhancements</strong></p>
1673
+ <ul>
1674
+ <li>Updated custom module docs and examples.</li>
1675
+ <li>Added an "all" option for toggling which modules are active.</li>
1676
+ <li>Added an admin settings section for enabling or disabling templates.</li>
1677
+ </ul>
1678
+ <p><strong>Bug Fixes</strong></p>
1679
+ <ul>
1680
+ <li>Fixed a bug with custom module settings sections that have no fields. </li>
1681
+ <li>Removed module animations for touch.</li>
1682
+ </ul>
1683
+
1684
+ <h4>1.2.0</h4>
1685
+ <p><strong>Enhancements</strong></p>
1686
+ <ul>
1687
+ <li>Added support for core MCE plugins.</li>
1688
+ <li>Added new translations.</li>
1689
+ </ul>
1690
+ <p><strong>Bug Fixes</strong></p>
1691
+ <ul>
1692
+ <li>Builder settings are now loaded after the text domain.</li>
1693
+ <li>Fixed an infinite loop bug caused by widgets that call the_content filter.</li>
1694
+ </ul>
1695
+
1696
+ <h4>1.1.9</h4>
1697
+ <p><strong>Enhancements</strong></p>
1698
+ <ul>
1699
+ <li>Reworked the builder ui to make templates more prominent.</li>
1700
+ <li>Separated built in templates into home pages and content pages.</li>
1701
+ <li>Templates can now be appended to an existing layout.</li>
1702
+ <li>Added custom class and responsive visibility settings to rows, columns and modules.</li>
1703
+ <li>Added border settings for rows.</li>
1704
+ <li>Columns now have their own settings panel.</li>
1705
+ <li>Added column settings button to module actions.</li>
1706
+ <li>Removed column width from module settings as it's now available in the column settings.</li>
1707
+ <li>Added help tooltips to row, column and module actions.</li>
1708
+ <li>The row and module settings spacing tab has been renamed to advanced.</li>
1709
+ <li>Added CSS animations for modules under the advanced settings tab.</li>
1710
+ <li>Added opacity to seperator module.</li>
1711
+ <li>License activation has been moved from Settings &gt; FastLine Themes to Settings &gt; Page Builder &gt; License.</li>
1712
+ <li>The builder is now disabled by default for posts.</li>
1713
+ <li>Added new font awesome icons.</li>
1714
+ </ul>
1715
+ <p><strong>Bug Fixes</strong></p>
1716
+ <ul>
1717
+ <li>Layout templates are no longer visible on the admin menus page.</li>
1718
+ <li>Fixed a few bugs with the content slider module and upgraded bxslider.</li>
1719
+ <li>Removed the builder's the_content filter while content is being rendered. That prevents modules, widgets or shortcodes that call apply_filters from causing an infinite loop.</li>
1720
+ </ul>
1721
+
1722
+ <h4>1.1.8</h4>
1723
+ <p>The FastLine Page Builder is now licensed under the GNU General Public License v2.0.</p>
1724
+
1725
+ <h4>1.1.7</h4>
1726
+ <p><strong>Enhancements</strong></p>
1727
+ <ul>
1728
+ <li>Added scheme.org markup to the photo and video modules.</li>
1729
+ <li>Added autoembed to the video module.</li>
1730
+ <li>Added support for WPML's copy and duplicate functionality.</li>
1731
+ </ul>
1732
+ <p><strong>Bug Fixes</strong></p>
1733
+ <ul>
1734
+ <li>Added a workaround for wp_upload_dir since it doesn't support SSL.</li>
1735
+ </ul>
1736
+
1737
+ <h4>1.1.6</h4>
1738
+ <p>The builder is now compatible with WP Minify.</p>
1739
+
1740
+ <h4>1.1.5</h4>
1741
+ <p><strong>Bug Fixes</strong></p>
1742
+ <ul>
1743
+ <li>Fixed an issue with themes that load in an older version of jQuery after wp_head is called.</li>
1744
+ <li>Fixed a bug with parallax backgrounds in Chrome.</li>
1745
+ <li>External scripts such as YUI3 are now loaded via HTTPS if the site is using HTTPS.</li>
1746
+ </ul>
1747
+
1748
+ <h4>1.1.4</h4>
1749
+ <p><strong>Enhancements</strong></p>
1750
+ <ul>
1751
+ <li>Added video, slideshow and parallax row backgrounds.</li>
1752
+ <li>Video shortcode embeds are now responsive.</li>
1753
+ <li>Added poster, loop and autoplay options to the video module when using videos from the media library.</li>
1754
+ <li>Developer members now have access to documentation and examples for building custom modules.</li>
1755
+ </ul>
1756
+ <p><strong>Bug Fixes</strong></p>
1757
+ <ul>
1758
+ <li>Fixed a bug where posts in secondary loops were showing that the builder was active even when it wasn't.</li>
1759
+ <li>Fixed another jQuery conflict caused by 3rd party plugins.</li>
1760
+ <li>Fixed a bug with the gallery module that was causing full size photos to be loaded.</li>
1761
+ <li>3rd party editor plugins are now removed from the builder to prevent JavaScript conflicts.</li>
1762
+ <li>Fixed a bug that was causing button colors not to stick.</li>
1763
+ </ul>
1764
+
1765
+ <h4>1.1.3</h4>
1766
+ <p><strong>Enhancements</strong></p>
1767
+ <ul>
1768
+ <li>Added the ability for users to save, import and export their own templates.</li>
1769
+ <li>Added custom width option for buttons.</li>
1770
+ <li>Added fl_builder_global_posts filter for loading layout assets globally.</li>
1771
+ </ul>
1772
+ <p><strong>Bug Fixes</strong></p>
1773
+ <ul>
1774
+ <li>Reworked how shortcodes are handled to fix compatibility issues with shortcodes that create secondary loops.</li>
1775
+ <li>Various minor bug fixes.</li>
1776
+ </ul>
1777
+
1778
+ <h4>1.1.2</h4>
1779
+ <p><strong>Enhancements</strong></p>
1780
+ <ul>
1781
+ <li>Split modules up into two groups, Basic Modules and Advanced Modules.</li>
1782
+ <li>Added Italian translation. Thanks Davide Pante!</li>
1783
+ </ul>
1784
+ <p><strong>Bug Fixes</strong></p>
1785
+ <ul>
1786
+ <li>In the last update we added higher z-indexes to the builder interface to deal with theme compatibility issues. That broke the media uploader and has been fixed.</li>
1787
+ </ul>
1788
+
1789
+ <h4>1.1.1</h4>
1790
+ <ul>
1791
+ <li>Fixed a webkit issue that was breaking the builder lightbox when displayed over an HTML5 video.</li>
1792
+ <li>Fixed a bug with shortcodes that create custom loops.</li>
1793
+ <li>Assets for all posts on a category page are now loaded.</li>
1794
+ <li>Fixed an issue where WordPress widgets, such as Gravity Forms, were loading in jQuery a second time.</li>
1795
+ <li>Added higher z-indexes to the builder interface to deal with theme compatibility issues.</li>
1796
+ </ul>
1797
+
1798
+ <h4>1.1.0</h4>
1799
+ <p><strong>Enhancements</strong></p>
1800
+ <ul>
1801
+ <li>Added support for plugins that duplicate posts.</li>
1802
+ </ul>
1803
+ <p><strong>Bug Fixes</strong></p>
1804
+ <ul>
1805
+ <li>Fixed a compatibility issue with the WP-simpleviewer plugin.</li>
1806
+ <li>Fixed a bug with orphaned modules when duplicating a layout.</li>
1807
+ <li>Fixed a bug with 404 pages and launching the builder on an unsaved post.</li>
1808
+ </ul>
1809
+
1810
+ <h4>1.0.9</h4>
1811
+ <p><strong>Enhancements</strong></p>
1812
+ <ul>
1813
+ <li>Enhancements that allow developers to create custom modules as plugins.</li>
1814
+ </ul>
1815
+ <p><strong>Bug Fixes</strong></p>
1816
+ <ul>
1817
+ <li>Fixed a bug that was breaking the builder when disabling a module that has been inserted into a layout.</li>
1818
+ <li>Minor bug fixes for the CTA module.</li>
1819
+ </ul>
1820
+
1821
+ <h4>1.0.8</h4>
1822
+ <p><strong>Enhancements</strong></p>
1823
+ <ul>
1824
+ <li>Stripped down builder content is now exported to the default WordPress editor.</li>
1825
+ <li>Added new settings tab for enabling or disabling builder modules.</li>
1826
+ <li>Builder layouts are now reimported on plugin activation, even if you use the uninstall feature on the settings page. </li>
1827
+ <li>Minor tweaks to the button module CSS to prevent third party themes from overriding colors.</li>
1828
+ </ul>
1829
+ <p><strong>Bug Fixes</strong></p>
1830
+ <ul>
1831
+ <li>Fixed a bug with the CSS for the contact form.</li>
1832
+ </ul>
1833
+
1834
+ <h4>1.0.7</h4>
1835
+ <ul>
1836
+ <li>Fixed a JavaScript bug that was breaking the builder in WordPress 3.9.</li>
1837
+ <li>Fixed a bug with third party video embeds.</li>
1838
+ <li>Now using fitVids.js for responsive video embeds.</li>
1839
+ </ul>
1840
+
1841
+ <h4>1.0.6</h4>
1842
+ <p><strong>Enhancements</strong></p>
1843
+ <ul>
1844
+ <li>Added warning for leaving the page when editing settings.</li>
1845
+ <li>Builder layouts are now locked when editing using the built in WordPress post locking system.</li>
1846
+ <li>Video module now excepts formats other than MP4.</li>
1847
+ <li>Video module is now responsive for media library embeds.</li>
1848
+ <li>Removed manage subscription link from plugins page. Subscriptions can be managed under Settings > FastLine Themes.</li>
1849
+ </ul>
1850
+ <p><strong>Bug Fixes</strong></p>
1851
+ <ul>
1852
+ <li>Fixed a bug with widget modules. Now when you uninstall a custom widget that was inserted into the builder, it doesn't break.</li>
1853
+ <li>Fixed an issue with button css being overriden by third party themes.</li>
1854
+ </ul>
1855
+
1856
+ <h4>1.0.5</h4>
1857
+ <p><strong>Enhancements</strong></p>
1858
+ <ul>
1859
+ <li>Added three new layout templates.</li>
1860
+ <li>Added new icon group module.</li>
1861
+ </ul>
1862
+ <p><strong>Bug Fixes</strong></p>
1863
+ <ul>
1864
+ <li>Fixed an issue with single quotes in fields within nested forms.</li>
1865
+ <li>Added wp_reset_query to ensure the correct post is being loaded.</li>
1866
+ </ul>
1867
+
1868
+ <h4>1.0.4</h4>
1869
+ <p><strong>Enhancements</strong></p>
1870
+ <ul>
1871
+ <li>Added new Accordion module.</li>
1872
+ </ul>
1873
+ <p><strong>Bug Fixes</strong></p>
1874
+ <ul>
1875
+ <li>Added nocache headers for when the builder is active to prevent the draft layout from being cached. This keeps the builder from breaking when the browser's back button is used.</li>
1876
+ </ul>
1877
+
1878
+ <h4>1.0.3</h4>
1879
+ <p>Fixed a bug with the text editor and html modules that was introduced in the last update.</p>
1880
+
1881
+ <h4>1.0.2</h4>
1882
+ <p><strong>Enhancements</strong></p>
1883
+ <ul>
1884
+ <li>Updated Font Awesome to include new icons in 4.0.3.</li>
1885
+ <li>Added custom post type support under Settings > Page Builder.</li>
1886
+ <li>Minor enhancements to the drag and drop experience.</li>
1887
+ </ul>
1888
+ <p><strong>Bug Fixes</strong></p>
1889
+ <ul>
1890
+ <li>Fixed a bug with column resizing.</li>
1891
+ <li>Fixed bug where publishing a draft doesn't set the post slug.</li>
1892
+ <li>Photo module now accepts relative urls for links.</li>
1893
+ <li>Fixed theme compatibility issue with drag and drop.</li>
1894
+ <li>Fixed an issue with JSMin being redeclared by other plugins.</li>
1895
+ <li>Reworked how the builder handles loading in jQuery.</li>
1896
+ </ul>
1897
+
1898
+ <h4>1.0.1</h4>
1899
+ <p><strong>Enhancements</strong></p>
1900
+ <ul>
1901
+ <li>Major enhancements to the drag and drop experience.</li>
1902
+ </ul>
1903
+ <p><strong>Bug Fixes</strong></p>
1904
+ <ul>
1905
+ <li>Fixed text editor module for the upcoming WordPress 3.9 release.</li>
1906
+ <li>Fixed a bug with deleting rows that contain a single column.</li>
1907
+ </ul>
1908
+
1909
+ <h4>1.0</h4>
1910
+ <p>Version 1.0 is here!</p>
1911
+ <ul>
1912
+ <li>Builder layouts are now only enabled once the publish button is clicked within the builder, not when the builder button is clicked from the post edit screen or admin toolbar. This allows people to work on builder layouts while still keeping their original WP editor content.</li>
1913
+ <li>Changed 'Discard Changes' to 'Discard Draft' so users know they are discarding the current draft layout.</li>
1914
+ <li>Existing post content is now migrated to a text module when launching the builder.</li>
1915
+ <li>Publishing a builder layout now publishes the parent post if it is a draft.</li>
1916
+ <li>Default page title is now only hidden for pages, not blog posts.</li>
1917
+ </ul>
1918
+
1919
+ <h4>0.8.7</h4>
1920
+ <p><strong>Enhancements</strong></p>
1921
+ <ul>
1922
+ <li>Modules can now be dropped into column positions to create new column groups.</li>
1923
+ <li>Added new pre-built layouts.</li>
1924
+ <li>Added "click action" setting to the gallery module so users can turn off the lightbox if their theme is using a custom one.</li>
1925
+ </ul>
1926
+ <p><strong>Bug Fixes</strong></p>
1927
+ <ul>
1928
+ <li>Row overlay height now resets when column groups are deleted.</li>
1929
+ <li>Fixed caching issue that kept WordPress widgets from updating.</li>
1930
+ <li>Fixed a bug with the content slider module that flashed all of the slides before loading.</li>
1931
+ </ul>
1932
+
1933
+ <h4>0.8.6</h4>
1934
+ <p><strong>Enhancements</strong></p>
1935
+ <ul>
1936
+ <li>Added contact form module.</li>
1937
+ </ul>
1938
+ <p><strong>Bug Fixes</strong></p>
1939
+ <ul>
1940
+ <li>Added jQuery migrate so the builder is compatible with plugins running on older versions of jQuery.</li>
1941
+ </ul>
1942
+
1943
+ <h4>0.8.5</h4>
1944
+ <p><strong>Enhancements</strong></p>
1945
+ <ul>
1946
+ <li>Added new pre-built layout templates.</li>
1947
+ </ul>
1948
+ <p><strong>Bug Fixes</strong></p>
1949
+ <ul>
1950
+ <li>Row backgrounds now revert to background-attachment scroll on mobile.</li>
1951
+ <li>Fixed alignment bug with icon module.</li>
1952
+ <li>Fixed slideshow resize bug when exiting fullscreen.</li>
1953
+ <li>Fixed bug with row drag helper position.</li>
1954
+ </ul>
1955
+
1956
+ <h4>0.8.4</h4>
1957
+ <p><strong>Bug Fixes</strong></p>
1958
+ <ul>
1959
+ <li>Fixed bug with shortcodes not rendering.</li>
1960
+ <li>Fixed module duplication bug.</li>
1961
+ <li>Fixed bug with textareas in the HTML module.</li>
1962
+ </ul>
1963
+
1964
+ <h4>0.8.3</h4>
1965
+ <p>Fixed lightbox button hover bug for builder gallery module.</p>
1966
+
1967
+ <h4>0.8.2</h4>
1968
+ <p>Responsive module margins now only reset if negative or greater than the default.</p>
1969
+
1970
+ <h4>0.8.1</h4>
1971
+ <p>Initial beta release.</p>
classes/class-fl-builder-admin-settings.php CHANGED
@@ -22,8 +22,7 @@ final class FLBuilderAdminSettings {
22
  * @since 1.0
23
  * @return void
24
  */
25
- static public function init()
26
- {
27
  add_action( 'after_setup_theme', __CLASS__ . '::init_hooks', 11 );
28
  }
29
 
@@ -34,8 +33,7 @@ final class FLBuilderAdminSettings {
34
  * @since 1.0
35
  * @return void
36
  */
37
- static public function init_hooks()
38
- {
39
  if ( ! is_admin() ) {
40
  return;
41
  }
@@ -44,6 +42,7 @@ final class FLBuilderAdminSettings {
44
 
45
  if ( isset( $_REQUEST['page'] ) && 'fl-builder-settings' == $_REQUEST['page'] ) {
46
  add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
 
47
  self::save();
48
  }
49
  }
@@ -54,8 +53,7 @@ final class FLBuilderAdminSettings {
54
  * @since 1.0
55
  * @return void
56
  */
57
- static public function styles_scripts()
58
- {
59
  // Styles
60
  wp_enqueue_style( 'fl-builder-admin-settings', FL_BUILDER_URL . 'css/fl-builder-admin-settings.css', array(), FL_BUILDER_VERSION );
61
  wp_enqueue_style( 'jquery-multiselect', FL_BUILDER_URL . 'css/jquery.multiselect.css', array(), FL_BUILDER_VERSION );
@@ -77,8 +75,7 @@ final class FLBuilderAdminSettings {
77
  * @since 1.0
78
  * @return void
79
  */
80
- static public function menu()
81
- {
82
  if ( current_user_can( 'delete_users' ) ) {
83
 
84
  $title = FLBuilderModel::get_branding();
@@ -96,8 +93,7 @@ final class FLBuilderAdminSettings {
96
  * @since 1.0
97
  * @return void
98
  */
99
- static public function render()
100
- {
101
  include FL_BUILDER_DIR . 'includes/admin-settings-js-config.php';
102
  include FL_BUILDER_DIR . 'includes/admin-settings.php';
103
  }
@@ -108,12 +104,10 @@ final class FLBuilderAdminSettings {
108
  * @since 1.0
109
  * @return void
110
  */
111
- static public function render_page_class()
112
- {
113
  if ( self::multisite_support() ) {
114
  echo 'fl-settings-network-admin';
115
- }
116
- else {
117
  echo 'fl-settings-single-install';
118
  }
119
  }
@@ -124,8 +118,7 @@ final class FLBuilderAdminSettings {
124
  * @since 1.0
125
  * @return void
126
  */
127
- static public function render_page_heading()
128
- {
129
  $icon = FLBuilderModel::get_branding_icon();
130
  $name = FLBuilderModel::get_branding();
131
 
@@ -142,14 +135,12 @@ final class FLBuilderAdminSettings {
142
  * @since 1.0
143
  * @return void
144
  */
145
- static public function render_update_message()
146
- {
147
  if ( ! empty( self::$errors ) ) {
148
  foreach ( self::$errors as $message ) {
149
  echo '<div class="error"><p>' . $message . '</p></div>';
150
  }
151
- }
152
- else if( ! empty( $_POST ) && ! isset( $_POST['email'] ) ) {
153
  echo '<div class="updated"><p>' . __( 'Settings updated!', 'fl-builder' ) . '</p></div>';
154
  }
155
  }
@@ -160,48 +151,47 @@ final class FLBuilderAdminSettings {
160
  * @since 1.0
161
  * @return void
162
  */
163
- static public function render_nav_items()
164
- {
165
  $item_data = apply_filters( 'fl_builder_admin_settings_nav_items', array(
166
  'welcome' => array(
167
  'title' => __( 'Welcome', 'fl-builder' ),
168
  'show' => FLBuilderModel::get_branding() == __( 'Page Builder', 'fl-builder' ) && ( is_network_admin() || ! self::multisite_support() ),
169
- 'priority' => 50
170
  ),
171
  'license' => array(
172
  'title' => __( 'License', 'fl-builder' ),
173
  'show' => FL_BUILDER_LITE !== true && ( is_network_admin() || ! self::multisite_support() ),
174
- 'priority' => 100
175
  ),
176
  'upgrade' => array(
177
  'title' => __( 'Upgrade', 'fl-builder' ),
178
  'show' => FL_BUILDER_LITE === true,
179
- 'priority' => 200
180
  ),
181
  'modules' => array(
182
  'title' => __( 'Modules', 'fl-builder' ),
183
  'show' => true,
184
- 'priority' => 300
185
  ),
186
  'post-types' => array(
187
  'title' => __( 'Post Types', 'fl-builder' ),
188
  'show' => true,
189
- 'priority' => 400
190
  ),
191
  'user-access' => array(
192
  'title' => __( 'User Access', 'fl-builder' ),
193
  'show' => true,
194
- 'priority' => 500
195
  ),
196
  'icons' => array(
197
  'title' => __( 'Icons', 'fl-builder' ),
198
  'show' => FL_BUILDER_LITE !== true,
199
- 'priority' => 600
200
  ),
201
  'tools' => array(
202
  'title' => __( 'Tools', 'fl-builder' ),
203
  'show' => true,
204
- 'priority' => 700
205
  ),
206
  ) );
207
 
@@ -227,20 +217,19 @@ final class FLBuilderAdminSettings {
227
  * @since 1.0
228
  * @return void
229
  */
230
- static public function render_forms()
231
- {
232
  // Welcome
233
  if ( FLBuilderModel::get_branding() == __( 'Page Builder', 'fl-builder' ) && ( is_network_admin() || ! self::multisite_support() ) ) {
234
  self::render_form( 'welcome' );
235
  }
236
 
237
  // License
238
- if ( is_network_admin() || ! self::multisite_support() ) {
239
  self::render_form( 'license' );
240
  }
241
 
242
  // Upgrade
243
- if ( FL_BUILDER_LITE === true ) {
244
  self::render_form( 'upgrade' );
245
  }
246
 
@@ -270,8 +259,7 @@ final class FLBuilderAdminSettings {
270
  * @param string $type The type of form to render.
271
  * @return void
272
  */
273
- static public function render_form( $type )
274
- {
275
  if ( self::has_support( $type ) ) {
276
  include FL_BUILDER_DIR . 'includes/admin-settings-' . $type . '.php';
277
  }
@@ -284,12 +272,10 @@ final class FLBuilderAdminSettings {
284
  * @param string $type The type of form being rendered.
285
  * @return void
286
  */
287
- static public function render_form_action( $type = '' )
288
- {
289
  if ( is_network_admin() ) {
290
  echo network_admin_url( '/settings.php?page=fl-builder-multisite-settings#' . $type );
291
- }
292
- else {
293
  echo admin_url( '/options-general.php?page=fl-builder-settings#' . $type );
294
  }
295
  }
@@ -301,12 +287,10 @@ final class FLBuilderAdminSettings {
301
  * @param string $type The type of form being rendered.
302
  * @return string The URL for the form action.
303
  */
304
- static public function get_form_action( $type = '' )
305
- {
306
  if ( is_network_admin() ) {
307
  return network_admin_url( '/settings.php?page=fl-builder-multisite-settings#' . $type );
308
- }
309
- else {
310
  return admin_url( '/options-general.php?page=fl-builder-settings#' . $type );
311
  }
312
  }
@@ -318,8 +302,7 @@ final class FLBuilderAdminSettings {
318
  * @param string $type The type of form to check.
319
  * @return bool
320
  */
321
- static public function has_support( $type )
322
- {
323
  return file_exists( FL_BUILDER_DIR . 'includes/admin-settings-' . $type . '.php' );
324
  }
325
 
@@ -329,8 +312,7 @@ final class FLBuilderAdminSettings {
329
  * @since 1.0
330
  * @return bool
331
  */
332
- static public function multisite_support()
333
- {
334
  return is_multisite() && class_exists( 'FLBuilderMultisiteSettings' );
335
  }
336
 
@@ -341,8 +323,7 @@ final class FLBuilderAdminSettings {
341
  * @param string $message The error message to add.
342
  * @return void
343
  */
344
- static public function add_error( $message )
345
- {
346
  self::$errors[] = $message;
347
  }
348
 
@@ -352,10 +333,9 @@ final class FLBuilderAdminSettings {
352
  * @since 1.0
353
  * @return void
354
  */
355
- static public function save()
356
- {
357
  // Only admins can save settings.
358
- if(!current_user_can('delete_users')) {
359
  return;
360
  }
361
 
@@ -377,8 +357,7 @@ final class FLBuilderAdminSettings {
377
  * @access private
378
  * @return void
379
  */
380
- static private function save_enabled_modules()
381
- {
382
  if ( isset( $_POST['fl-modules-nonce'] ) && wp_verify_nonce( $_POST['fl-modules-nonce'], 'modules' ) ) {
383
 
384
  $modules = array();
@@ -398,16 +377,14 @@ final class FLBuilderAdminSettings {
398
  * @access private
399
  * @return void
400
  */
401
- static private function save_enabled_post_types()
402
- {
403
  if ( isset( $_POST['fl-post-types-nonce'] ) && wp_verify_nonce( $_POST['fl-post-types-nonce'], 'post-types' ) ) {
404
 
405
  if ( is_network_admin() ) {
406
  $post_types = sanitize_text_field( $_POST['fl-post-types'] );
407
  $post_types = str_replace( ' ', '', $post_types );
408
  $post_types = explode( ',', $post_types );
409
- }
410
- else {
411
 
412
  $post_types = array();
413
 
@@ -427,13 +404,12 @@ final class FLBuilderAdminSettings {
427
  * @access private
428
  * @return void
429
  */
430
- static private function save_enabled_icons()
431
- {
432
  if ( isset( $_POST['fl-icons-nonce'] ) && wp_verify_nonce( $_POST['fl-icons-nonce'], 'icons' ) ) {
433
 
434
  // Make sure we have at least one enabled icon set.
435
  if ( ! isset( $_POST['fl-enabled-icons'] ) && empty( $_POST['fl-new-icon-set'] ) ) {
436
- self::add_error( __( "Error! You must have at least one icon set enabled.", 'fl-builder' ) );
437
  return;
438
  }
439
 
@@ -475,7 +451,7 @@ final class FLBuilderAdminSettings {
475
 
476
  // Unzip failed.
477
  if ( ! $unzipped ) {
478
- self::add_error( __( "Error! Could not unzip file.", 'fl-builder' ) );
479
  return;
480
  }
481
 
@@ -509,20 +485,30 @@ final class FLBuilderAdminSettings {
509
  // Show an error if we don't have a supported icon set.
510
  if ( ! $is_icomoon && ! $is_fontello ) {
511
  $filesystem->rmdir( $new_path, true );
512
- self::add_error( __( "Error! Please upload an icon set from either Icomoon or Fontello.", 'fl-builder' ) );
513
  return;
514
  }
515
 
 
 
 
 
 
 
 
 
 
 
516
  // Enable the new set.
517
  if ( is_array( $enabled_icons ) ) {
518
  $key = FLBuilderIcons::get_key_from_path( $new_path );
519
  $enabled_icons[] = $key;
520
  }
521
- }
522
 
523
  // Update the enabled sets again in case they have changed.
524
  self::update_enabled_icons( $enabled_icons );
525
- }
526
  }
527
 
528
  /**
@@ -532,8 +518,7 @@ final class FLBuilderAdminSettings {
532
  * @access private
533
  * @return void
534
  */
535
- static private function update_enabled_icons( $enabled_icons = array() )
536
- {
537
  FLBuilderModel::update_admin_settings_option( '_fl_builder_enabled_icons', $enabled_icons, true );
538
  }
539
 
@@ -544,8 +529,7 @@ final class FLBuilderAdminSettings {
544
  * @access private
545
  * @return void
546
  */
547
- static private function save_user_access()
548
- {
549
  if ( isset( $_POST['fl-user-access-nonce'] ) && wp_verify_nonce( $_POST['fl-user-access-nonce'], 'user-access' ) ) {
550
  FLBuilderUserAccess::save_settings( isset( $_POST['fl_user_access'] ) ? $_POST['fl_user_access'] : array() );
551
  }
@@ -558,16 +542,13 @@ final class FLBuilderAdminSettings {
558
  * @access private
559
  * @return void
560
  */
561
- static private function clear_cache()
562
- {
563
  if ( ! current_user_can( 'delete_users' ) ) {
564
  return;
565
- }
566
- else if ( isset( $_POST['fl-cache-nonce'] ) && wp_verify_nonce( $_POST['fl-cache-nonce'], 'cache' ) ) {
567
  if ( is_network_admin() ) {
568
  self::clear_cache_for_all_sites();
569
- }
570
- else {
571
 
572
  // Clear builder cache.
573
  FLBuilderModel::delete_asset_cache_for_all_posts();
@@ -587,8 +568,7 @@ final class FLBuilderAdminSettings {
587
  * @access private
588
  * @return void
589
  */
590
- static private function clear_cache_for_all_sites()
591
- {
592
  global $blog_id;
593
  global $wpdb;
594
 
@@ -624,12 +604,10 @@ final class FLBuilderAdminSettings {
624
  * @access private
625
  * @return void
626
  */
627
- static private function uninstall()
628
- {
629
  if ( ! current_user_can( 'delete_plugins' ) ) {
630
  return;
631
- }
632
- else if ( isset( $_POST['fl-uninstall'] ) && wp_verify_nonce( $_POST['fl-uninstall'], 'uninstall' ) ) {
633
 
634
  $uninstall = apply_filters( 'fl_builder_uninstall', true );
635
 
@@ -643,8 +621,7 @@ final class FLBuilderAdminSettings {
643
  * @since 1.0
644
  * @deprecated 1.8
645
  */
646
- static private function save_help_button()
647
- {
648
  _deprecated_function( __METHOD__, '1.8', 'FLBuilderWhiteLabel::save_help_button_settings()' );
649
  }
650
 
@@ -652,8 +629,7 @@ final class FLBuilderAdminSettings {
652
  * @since 1.0
653
  * @deprecated 1.8
654
  */
655
- static private function save_branding()
656
- {
657
  _deprecated_function( __METHOD__, '1.8', 'FLBuilderWhiteLabel::save_branding_settings()' );
658
  }
659
 
@@ -661,10 +637,21 @@ final class FLBuilderAdminSettings {
661
  * @since 1.0
662
  * @deprecated 1.8
663
  */
664
- static private function save_enabled_templates()
665
- {
666
  _deprecated_function( __METHOD__, '1.8', 'FLBuilderUserTemplatesAdmin::save_settings()' );
667
  }
 
 
 
 
 
 
 
 
 
 
 
 
668
  }
669
 
670
  FLBuilderAdminSettings::init();
22
  * @since 1.0
23
  * @return void
24
  */
25
+ static public function init() {
 
26
  add_action( 'after_setup_theme', __CLASS__ . '::init_hooks', 11 );
27
  }
28
 
33
  * @since 1.0
34
  * @return void
35
  */
36
+ static public function init_hooks() {
 
37
  if ( ! is_admin() ) {
38
  return;
39
  }
42
 
43
  if ( isset( $_REQUEST['page'] ) && 'fl-builder-settings' == $_REQUEST['page'] ) {
44
  add_action( 'admin_enqueue_scripts', __CLASS__ . '::styles_scripts' );
45
+ add_filter( 'admin_footer_text', array( __CLASS__, '_filter_admin_footer_text' ) );
46
  self::save();
47
  }
48
  }
53
  * @since 1.0
54
  * @return void
55
  */
56
+ static public function styles_scripts() {
 
57
  // Styles
58
  wp_enqueue_style( 'fl-builder-admin-settings', FL_BUILDER_URL . 'css/fl-builder-admin-settings.css', array(), FL_BUILDER_VERSION );
59
  wp_enqueue_style( 'jquery-multiselect', FL_BUILDER_URL . 'css/jquery.multiselect.css', array(), FL_BUILDER_VERSION );
75
  * @since 1.0
76
  * @return void
77
  */
78
+ static public function menu() {
 
79
  if ( current_user_can( 'delete_users' ) ) {
80
 
81
  $title = FLBuilderModel::get_branding();
93
  * @since 1.0
94
  * @return void
95
  */
96
+ static public function render() {
 
97
  include FL_BUILDER_DIR . 'includes/admin-settings-js-config.php';
98
  include FL_BUILDER_DIR . 'includes/admin-settings.php';
99
  }
104
  * @since 1.0
105
  * @return void
106
  */
107
+ static public function render_page_class() {
 
108
  if ( self::multisite_support() ) {
109
  echo 'fl-settings-network-admin';
110
+ } else {
 
111
  echo 'fl-settings-single-install';
112
  }
113
  }
118
  * @since 1.0
119
  * @return void
120
  */
121
+ static public function render_page_heading() {
 
122
  $icon = FLBuilderModel::get_branding_icon();
123
  $name = FLBuilderModel::get_branding();
124
 
135
  * @since 1.0
136
  * @return void
137
  */
138
+ static public function render_update_message() {
 
139
  if ( ! empty( self::$errors ) ) {
140
  foreach ( self::$errors as $message ) {
141
  echo '<div class="error"><p>' . $message . '</p></div>';
142
  }
143
+ } elseif ( ! empty( $_POST ) && ! isset( $_POST['email'] ) ) {
 
144
  echo '<div class="updated"><p>' . __( 'Settings updated!', 'fl-builder' ) . '</p></div>';
145
  }
146
  }
151
  * @since 1.0
152
  * @return void
153
  */
154
+ static public function render_nav_items() {
 
155
  $item_data = apply_filters( 'fl_builder_admin_settings_nav_items', array(
156
  'welcome' => array(
157
  'title' => __( 'Welcome', 'fl-builder' ),
158
  'show' => FLBuilderModel::get_branding() == __( 'Page Builder', 'fl-builder' ) && ( is_network_admin() || ! self::multisite_support() ),
159
+ 'priority' => 50,
160
  ),
161
  'license' => array(
162
  'title' => __( 'License', 'fl-builder' ),
163
  'show' => FL_BUILDER_LITE !== true && ( is_network_admin() || ! self::multisite_support() ),
164
+ 'priority' => 100,
165
  ),
166
  'upgrade' => array(
167
  'title' => __( 'Upgrade', 'fl-builder' ),
168
  'show' => FL_BUILDER_LITE === true,
169
+ 'priority' => 200,
170
  ),
171
  'modules' => array(
172
  'title' => __( 'Modules', 'fl-builder' ),
173
  'show' => true,
174
+ 'priority' => 300,
175
  ),
176
  'post-types' => array(
177
  'title' => __( 'Post Types', 'fl-builder' ),
178
  'show' => true,
179
+ 'priority' => 400,
180
  ),
181
  'user-access' => array(
182
  'title' => __( 'User Access', 'fl-builder' ),
183
  'show' => true,
184
+ 'priority' => 500,
185
  ),
186
  'icons' => array(
187
  'title' => __( 'Icons', 'fl-builder' ),
188
  'show' => FL_BUILDER_LITE !== true,
189
+ 'priority' => 600,
190
  ),
191
  'tools' => array(
192
  'title' => __( 'Tools', 'fl-builder' ),
193
  'show' => true,
194
+ 'priority' => 700,
195
  ),
196
  ) );
197
 
217
  * @since 1.0
218
  * @return void
219
  */
220
+ static public function render_forms() {
 
221
  // Welcome
222
  if ( FLBuilderModel::get_branding() == __( 'Page Builder', 'fl-builder' ) && ( is_network_admin() || ! self::multisite_support() ) ) {
223
  self::render_form( 'welcome' );
224
  }
225
 
226
  // License
227
+ if ( is_network_admin() || ! self::multisite_support() ) {
228
  self::render_form( 'license' );
229
  }
230
 
231
  // Upgrade
232
+ if ( FL_BUILDER_LITE === true ) {
233
  self::render_form( 'upgrade' );
234
  }
235
 
259
  * @param string $type The type of form to render.
260
  * @return void
261
  */
262
+ static public function render_form( $type ) {
 
263
  if ( self::has_support( $type ) ) {
264
  include FL_BUILDER_DIR . 'includes/admin-settings-' . $type . '.php';
265
  }
272
  * @param string $type The type of form being rendered.
273
  * @return void
274
  */
275
+ static public function render_form_action( $type = '' ) {
 
276
  if ( is_network_admin() ) {
277
  echo network_admin_url( '/settings.php?page=fl-builder-multisite-settings#' . $type );
278
+ } else {
 
279
  echo admin_url( '/options-general.php?page=fl-builder-settings#' . $type );
280
  }
281
  }
287
  * @param string $type The type of form being rendered.
288
  * @return string The URL for the form action.
289
  */
290
+ static public function get_form_action( $type = '' ) {
 
291
  if ( is_network_admin() ) {
292
  return network_admin_url( '/settings.php?page=fl-builder-multisite-settings#' . $type );
293
+ } else {
 
294
  return admin_url( '/options-general.php?page=fl-builder-settings#' . $type );
295
  }
296
  }
302
  * @param string $type The type of form to check.
303
  * @return bool
304
  */
305
+ static public function has_support( $type ) {
 
306
  return file_exists( FL_BUILDER_DIR . 'includes/admin-settings-' . $type . '.php' );
307
  }
308
 
312
  * @since 1.0
313
  * @return bool
314
  */
315
+ static public function multisite_support() {
 
316
  return is_multisite() && class_exists( 'FLBuilderMultisiteSettings' );
317
  }
318
 
323
  * @param string $message The error message to add.
324
  * @return void
325
  */
326
+ static public function add_error( $message ) {
 
327
  self::$errors[] = $message;
328
  }
329
 
333
  * @since 1.0
334
  * @return void
335
  */
336
+ static public function save() {
 
337
  // Only admins can save settings.
338
+ if ( ! current_user_can( 'delete_users' ) ) {
339
  return;
340
  }
341
 
357
  * @access private
358
  * @return void
359
  */
360
+ static private function save_enabled_modules() {
 
361
  if ( isset( $_POST['fl-modules-nonce'] ) && wp_verify_nonce( $_POST['fl-modules-nonce'], 'modules' ) ) {
362
 
363
  $modules = array();
377
  * @access private
378
  * @return void
379
  */
380
+ static private function save_enabled_post_types() {
 
381
  if ( isset( $_POST['fl-post-types-nonce'] ) && wp_verify_nonce( $_POST['fl-post-types-nonce'], 'post-types' ) ) {
382
 
383
  if ( is_network_admin() ) {
384
  $post_types = sanitize_text_field( $_POST['fl-post-types'] );
385
  $post_types = str_replace( ' ', '', $post_types );
386
  $post_types = explode( ',', $post_types );
387
+ } else {
 
388
 
389
  $post_types = array();
390
 
404
  * @access private
405
  * @return void
406
  */
407
+ static private function save_enabled_icons() {
 
408
  if ( isset( $_POST['fl-icons-nonce'] ) && wp_verify_nonce( $_POST['fl-icons-nonce'], 'icons' ) ) {
409
 
410
  // Make sure we have at least one enabled icon set.
411
  if ( ! isset( $_POST['fl-enabled-icons'] ) && empty( $_POST['fl-new-icon-set'] ) ) {
412
+ self::add_error( __( 'Error! You must have at least one icon set enabled.', 'fl-builder' ) );
413
  return;
414
  }
415
 
451
 
452
  // Unzip failed.
453
  if ( ! $unzipped ) {
454
+ self::add_error( __( 'Error! Could not unzip file.', 'fl-builder' ) );
455
  return;
456
  }
457
 
485
  // Show an error if we don't have a supported icon set.
486
  if ( ! $is_icomoon && ! $is_fontello ) {
487
  $filesystem->rmdir( $new_path, true );
488
+ self::add_error( __( 'Error! Please upload an icon set from either Icomoon or Fontello.', 'fl-builder' ) );
489
  return;
490
  }
491
 
492
+ // check for valid Icomoon
493
+ if ( $is_icomoon ) {
494
+ $data = json_decode( file_get_contents( $new_path . 'selection.json' ) );
495
+ if ( ! isset( $data->metadata ) ) {
496
+ $filesystem->rmdir( $new_path, true );
497
+ self::add_error( __( 'Error! When downloading from Icomoon, be sure to click the Download Font button and not Generate SVG.', 'fl-builder' ) );
498
+ return;
499
+ }
500
+ }
501
+
502
  // Enable the new set.
503
  if ( is_array( $enabled_icons ) ) {
504
  $key = FLBuilderIcons::get_key_from_path( $new_path );
505
  $enabled_icons[] = $key;
506
  }
507
+ }// End if().
508
 
509
  // Update the enabled sets again in case they have changed.
510
  self::update_enabled_icons( $enabled_icons );
511
+ }// End if().
512
  }
513
 
514
  /**
518
  * @access private
519
  * @return void
520
  */
521
+ static private function update_enabled_icons( $enabled_icons = array() ) {
 
522
  FLBuilderModel::update_admin_settings_option( '_fl_builder_enabled_icons', $enabled_icons, true );
523
  }
524
 
529
  * @access private
530
  * @return void
531
  */
532
+ static private function save_user_access() {
 
533
  if ( isset( $_POST['fl-user-access-nonce'] ) && wp_verify_nonce( $_POST['fl-user-access-nonce'], 'user-access' ) ) {
534
  FLBuilderUserAccess::save_settings( isset( $_POST['fl_user_access'] ) ? $_POST['fl_user_access'] : array() );
535
  }
542
  * @access private
543
  * @return void
544
  */
545
+ static private function clear_cache() {
 
546
  if ( ! current_user_can( 'delete_users' ) ) {
547
  return;
548
+ } elseif ( isset( $_POST['fl-cache-nonce'] ) && wp_verify_nonce( $_POST['fl-cache-nonce'], 'cache' ) ) {
 
549
  if ( is_network_admin() ) {
550
  self::clear_cache_for_all_sites();
551
+ } else {
 
552
 
553
  // Clear builder cache.
554
  FLBuilderModel::delete_asset_cache_for_all_posts();
568
  * @access private
569
  * @return void
570
  */
571
+ static private function clear_cache_for_all_sites() {
 
572
  global $blog_id;
573
  global $wpdb;
574
 
604
  * @access private
605
  * @return void
606
  */
607
+ static private function uninstall() {
 
608
  if ( ! current_user_can( 'delete_plugins' ) ) {
609
  return;
610
+ } elseif ( isset( $_POST['fl-uninstall'] ) && wp_verify_nonce( $_POST['fl-uninstall'], 'uninstall' ) ) {
 
611
 
612
  $uninstall = apply_filters( 'fl_builder_uninstall', true );
613
 
621
  * @since 1.0
622
  * @deprecated 1.8
623
  */
624
+ static private function save_help_button() {
 
625
  _deprecated_function( __METHOD__, '1.8', 'FLBuilderWhiteLabel::save_help_button_settings()' );
626
  }
627
 
629
  * @since 1.0
630
  * @deprecated 1.8
631
  */
632
+ static private function save_branding() {
 
633
  _deprecated_function( __METHOD__, '1.8', 'FLBuilderWhiteLabel::save_branding_settings()' );
634
  }
635
 
637
  * @since 1.0
638
  * @deprecated 1.8
639
  */
640
+ static private function save_enabled_templates() {
 
641
  _deprecated_function( __METHOD__, '1.8', 'FLBuilderUserTemplatesAdmin::save_settings()' );
642
  }
643
+
644
+ /**
645
+ * @since 1.10.6
646
+ */
647
+ static function _filter_admin_footer_text( $text ) {
648
+
649
+ $stars = '<a target="_blank" href="https://wordpress.org/support/plugin/beaver-builder-lite-version/reviews/#new-post" >&#9733;&#9733;&#9733;&#9733;&#9733;</a>';
650
+
651
+ $wporg = '<a target="_blank" href="https://wordpress.org/plugins/beaver-builder-lite-version/">wordpress.org</a>';
652
+
653
+ return sprintf( __( 'Add your %1$s on %2$s to spread the love.', 'fl-builder' ), $stars, $wporg );
654
+ }
655
  }
656
 
657
  FLBuilderAdminSettings::init();
classes/class-fl-builder-fonts.php CHANGED
@@ -14,13 +14,12 @@ final class FLBuilderFonts {
14
  */
15
  static private $fonts = array();
16
 
17
- /**
18
  * @since 1.9.5
19
  * @return void
20
- */
21
- static public function init()
22
- {
23
- add_action('wp_enqueue_scripts', __CLASS__ . '::combine_google_fonts', 99);
24
  }
25
 
26
  /**
@@ -29,13 +28,12 @@ final class FLBuilderFonts {
29
  * @since 1.6.3
30
  * @return void
31
  */
32
- static public function js()
33
- {
34
  $default = json_encode( apply_filters( 'fl_builder_font_families_default', FLBuilderFontFamilies::$default ) );
35
  $system = json_encode( apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system ) );
36
  $google = json_encode( apply_filters( 'fl_builder_font_families_google', FLBuilderFontFamilies::$google ) );
37
 
38
- echo 'var FLBuilderFontFamilies = { default: '. $default .', system: '. $system .', google: '. $google .' };';
39
  }
40
 
41
  /**
@@ -45,22 +43,21 @@ final class FLBuilderFonts {
45
  * @param string $font The current selected font.
46
  * @return void
47
  */
48
- static public function display_select_font($font)
49
- {
50
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
51
  $google_fonts = apply_filters( 'fl_builder_font_families_google', FLBuilderFontFamilies::$google );
52
 
53
- echo '<option value="Default" '. selected('Default', $font) .'>'. __( 'Default', 'fl-builder' ) .'</option>';
54
  echo '<optgroup label="System">';
55
 
56
- foreach( $system_fonts as $name => $variants ) {
57
- echo '<option value="'. $name .'" '. selected($name, $font) .'>'. $name .'</option>';
58
  }
59
 
60
  echo '<optgroup label="Google">';
61
 
62
- foreach( $google_fonts as $name => $variants ) {
63
- echo '<option value="'. $name .'" '. selected($name, $font) .'>'. $name .'</option>';
64
  }
65
  }
66
 
@@ -72,27 +69,23 @@ final class FLBuilderFonts {
72
  * @param string $weight The current selected weight.
73
  * @return void
74
  */
75
- static public function display_select_weight( $font, $weight )
76
- {
77
- if( $font == 'Default' ){
78
- echo '<option value="default">'. __( 'Default', 'fl-builder' ) .'</option>';
79
  } else {
80
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
81
  $google_fonts = apply_filters( 'fl_builder_font_families_google', FLBuilderFontFamilies::$google );
82
 
83
- if( array_key_exists( $font, $system_fonts ) ){
84
- foreach( $system_fonts[ $font ]['weights'] as $variant ) {
85
- echo '<option value="'. $variant .'" '. selected($variant, $weight) .'>'. FLBuilderFonts::get_weight_string( $variant ) .'</option>';
86
  }
87
-
88
  } else {
89
- foreach( $google_fonts[ $font ] as $variant) {
90
 
91
- echo '<option value="'. $variant .'" '. selected($variant, $weight) .'>'. FLBuilderFonts::get_weight_string( $variant ) .'</option>';
92
  }
93
-
94
  }
95
-
96
  }
97
 
98
  }
@@ -104,7 +97,7 @@ final class FLBuilderFonts {
104
  * @param string $weight The selected weight.
105
  * @return string The weight name.
106
  */
107
- static public function get_weight_string( $weight ){
108
 
109
  $weight_string = apply_filters( 'fl_builder_font_weight_strings', array(
110
  'default' => __( 'Default', 'fl-builder' ),
@@ -117,7 +110,7 @@ final class FLBuilderFonts {
117
  '600' => 'Semi-Bold 600',
118
  '700' => 'Bold 700',
119
  '800' => 'Extra-Bold 800',
120
- '900' => 'Ultra-Bold 900'
121
  ) );
122
 
123
  return $weight_string[ $weight ];
@@ -130,29 +123,29 @@ final class FLBuilderFonts {
130
  * @param array $font An array with font-family and weight.
131
  * @return void
132
  */
133
- static public function font_css( $font ){
134
 
135
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
136
 
137
  $css = '';
138
 
139
- if( array_key_exists( $font['family'], $system_fonts ) ){
140
 
141
- $css .= 'font-family: "'. $font['family'] .'",'. $system_fonts[ $font['family'] ]['fallback'] .';';
142
 
143
  } else {
144
- $css .= 'font-family: "'. $font['family'] .'";';
145
  }
146
 
147
  if ( 'regular' == $font['weight'] ) {
148
  $css .= 'font-weight: normal;';
149
  } else {
150
- if ( 'i' == substr( $font['weight'], -1 ) ) {
151
- $css .= 'font-weight: '. substr( $font['weight'], 0, -1 ) .';';
152
- $css .= 'font-style: italic;';
153
- } else {
154
- $css .= 'font-weight: '. $font['weight'] .';';
155
- }
156
  }
157
 
158
  echo $css;
@@ -165,15 +158,13 @@ final class FLBuilderFonts {
165
  * @param object $module The respective module.
166
  * @return void
167
  */
168
- static public function add_fonts_for_module( $module )
169
- {
170
  $fields = FLBuilderModel::get_settings_form_fields( $module->form );
171
 
172
  foreach ( $fields as $name => $field ) {
173
  if ( $field['type'] == 'font' && isset( $module->settings->$name ) ) {
174
  self::add_font( $module->settings->$name );
175
- }
176
- else if ( isset( $field['form'] ) ) {
177
  $form = FLBuilderModel::$settings_forms[ $field['form'] ];
178
  self::add_fonts_for_nested_module_form( $module, $form['tabs'], $name );
179
  }
@@ -190,18 +181,16 @@ final class FLBuilderFonts {
190
  * @param string $setting The nested form setting key.
191
  * @return void
192
  */
193
- static private function add_fonts_for_nested_module_form( $module, $form, $setting )
194
- {
195
  $fields = FLBuilderModel::get_settings_form_fields( $form );
196
 
197
  foreach ( $fields as $name => $field ) {
198
  if ( $field['type'] == 'font' && isset( $module->settings->$setting ) ) {
199
  foreach ( $module->settings->$setting as $key => $val ) {
200
  if ( isset( $val->$name ) ) {
201
- self::add_font( ( array )$val->$name );
202
- }
203
- else if( $name == $key && ! empty( $val ) ) {
204
- self::add_font( ( array )$val );
205
  }
206
  }
207
  }
@@ -214,13 +203,13 @@ final class FLBuilderFonts {
214
  * @since 1.6.3
215
  * @return void
216
  */
217
- static public function enqueue_styles(){
218
- $google_fonts_domain = apply_filters( 'fl_builder_google_fonts_domain', '//fonts.googleapis.com/');
219
  $google_url = $google_fonts_domain . 'css?family=';
220
 
221
- if( count( self::$fonts ) > 0 ){
222
 
223
- foreach( self::$fonts as $family => $weights ){
224
  $google_url .= $family . ':' . implode( ',', $weights ) . '|';
225
  }
226
 
@@ -239,20 +228,20 @@ final class FLBuilderFonts {
239
  * @param array $font an array with the font family and weight to add.
240
  * @return void
241
  */
242
- static public function add_font( $font ){
243
 
244
- if( $font['family'] != 'Default' ){
245
 
246
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
247
 
248
  // check if is a Google Font
249
- if( !array_key_exists( $font['family'], $system_fonts ) ){
250
 
251
  // check if font family is already added
252
- if( array_key_exists( $font['family'], self::$fonts ) ){
253
 
254
  // check if the weight is already added
255
- if( !in_array( $font['weight'], self::$fonts[ $font['family'] ] ) ){
256
  self::$fonts[ $font['family'] ][] = $font['weight'];
257
  }
258
  } else {
@@ -260,9 +249,7 @@ final class FLBuilderFonts {
260
  self::$fonts[ $font['family'] ] = array( $font['weight'] );
261
 
262
  }
263
-
264
  }
265
-
266
  }
267
  }
268
 
@@ -272,97 +259,95 @@ final class FLBuilderFonts {
272
  * @since 1.9.5
273
  * @return void
274
  */
275
- static public function combine_google_fonts(){
276
  global $wp_styles;
277
 
278
- // Check for any enqueued `fonts.googleapis.com` from themes or plugins
279
- if( isset( $wp_styles->queue ) ){
280
 
281
  $google_fonts_domain = '//fonts.googleapis.com/css';
282
  $enqueued_google_fonts = array();
283
- $families = array();
284
  $subsets = array();
285
- $font_args = array();
286
 
287
  // Collect all enqueued google fonts
288
- foreach( $wp_styles->queue as $key => $handle ){
289
 
290
- if ( ! isset( $wp_styles->registered[ $handle ] ) ) {
291
  continue;
292
  }
293
 
294
  $style_src = $wp_styles->registered[ $handle ]->src;
295
 
296
- if (strpos($style_src, 'fonts.googleapis.com/css') !== false) {
297
- $url = wp_parse_url( $style_src );
298
-
299
- if( is_string( $url['query'] ) ) {
300
- parse_str( $url['query'], $parsed_url );
301
-
302
- if( isset( $parsed_url['family'] ) ){
303
-
304
- // Collect all subsets
305
- if( isset( $parsed_url['subset'] ) ){
306
- $subsets[] = urlencode( trim( $parsed_url['subset'] ) );
307
- }
308
-
309
- $font_families = explode( '|', $parsed_url['family'] );
310
- foreach( $font_families as $parsed_font ){
311
-
312
- $get_font = explode( ':', $parsed_font );
313
-
314
- // Extract the font data
315
- if( isset( $get_font[0] ) && !empty( $get_font[0] ) ){
316
- $family = $get_font[0];
317
- $weights = isset( $get_font[1] ) && !empty( $get_font[1] ) ? explode( ',', $get_font[1] ) : array();
318
-
319
- // Combine weights if family has been enqueued
320
- if( isset( $enqueued_google_fonts[ $family ] ) && $weights != $enqueued_google_fonts[ $family ]['weights'] ){
321
- $combined_weights = array_merge($weights, $enqueued_google_fonts[ $family ]['weights']);
322
- $enqueued_google_fonts[ $family ]['weights'] = array_unique( $combined_weights );
323
- }
324
- else {
325
- $enqueued_google_fonts[ $family ] = array(
326
- 'handle' => $handle,
327
- 'family' => $family,
328
- 'weights' => $weights
329
- );
330
-
331
- // Remove enqueued google font style, so we would only have one HTTP request.
332
- wp_dequeue_style( $handle );
333
- }
334
- }
335
- }
336
- }
337
- }
338
- }
339
- }
340
 
341
  // Start combining all enqueued google fonts
342
- if( count($enqueued_google_fonts) > 0 ){
343
 
344
- foreach( $enqueued_google_fonts as $family => $data ){
345
  // Collect all family and weights
346
- if( !empty( $data['weights'] ) ) {
347
- $families[] = $family .':'. implode(',', $data['weights']);
348
- }
349
- else {
350
- $families[] = $family;
351
- }
352
  }
353
 
354
- if( !empty( $families ) ){
355
- $font_args['family'] = implode('|', $families);
356
 
357
- if( !empty( $subsets ) ){
358
- $font_args['subset'] = implode(',', $subsets);
359
  }
360
 
361
  $src = add_query_arg( $font_args, $google_fonts_domain );
362
 
363
  // Enqueue google fonts into one URL request
364
  wp_enqueue_style(
365
- 'fl-builder-google-fonts-'. md5( $src ),
366
  $src,
367
  array()
368
  );
@@ -371,7 +356,7 @@ final class FLBuilderFonts {
371
  $enqueued_google_fonts = array();
372
  }
373
  }
374
- }
375
  }
376
 
377
  }
@@ -387,9 +372,9 @@ FLBuilderFonts::init();
387
  final class FLBuilderFontFamilies {
388
 
389
  static public $default = array(
390
- "Default" => array(
391
  'default'
392
- )
393
  );
394
 
395
  /**
@@ -397,60 +382,61 @@ final class FLBuilderFontFamilies {
397
  * @var array
398
  */
399
  static public $system = array(
400
- "Helvetica" => array(
401
- "fallback" => "Verdana, Arial, sans-serif",
402
- "weights" => array(
403
- "300",
404
- "400",
405
- "700",
406
- )
407
- ),
408
- "Verdana" => array(
409
- "fallback" => "Helvetica, Arial, sans-serif",
410
- "weights" => array(
411
- "300",
412
- "400",
413
- "700",
414
- )
415
- ),
416
- "Arial" => array(
417
- "fallback" => "Helvetica, Verdana, sans-serif",
418
- "weights" => array(
419
- "300",
420
- "400",
421
- "700",
422
- )
423
- ),
424
- "Times" => array(
425
- "fallback" => "Georgia, serif",
426
- "weights" => array(
427
- "300",
428
- "400",
429
- "700",
430
- )
431
- ),
432
- "Georgia" => array(
433
- "fallback" => "Times, serif",
434
- "weights" => array(
435
- "300",
436
- "400",
437
- "700",
438
- )
439
- ),
440
- "Courier" => array(
441
- "fallback" => "monospace",
442
- "weights" => array(
443
- "300",
444
- "400",
445
- "700",
446
- )
447
  ),
448
  );
449
 
450
  /**
451
- * Array with Google Fonts.
452
- * @var array
453
- */
 
454
  static public $google = array(
455
  "ABeeZee" => array(
456
  "regular",
@@ -3603,4 +3589,5 @@ final class FLBuilderFontFamilies {
3603
  "regular",
3604
  ),
3605
  );
3606
- }
 
14
  */
15
  static private $fonts = array();
16
 
17
+ /**
18
  * @since 1.9.5
19
  * @return void
20
+ */
21
+ static public function init() {
22
+ add_action( 'wp_enqueue_scripts', __CLASS__ . '::combine_google_fonts', 99 );
 
23
  }
24
 
25
  /**
28
  * @since 1.6.3
29
  * @return void
30
  */
31
+ static public function js() {
 
32
  $default = json_encode( apply_filters( 'fl_builder_font_families_default', FLBuilderFontFamilies::$default ) );
33
  $system = json_encode( apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system ) );
34
  $google = json_encode( apply_filters( 'fl_builder_font_families_google', FLBuilderFontFamilies::$google ) );
35
 
36
+ echo 'var FLBuilderFontFamilies = { default: ' . $default . ', system: ' . $system . ', google: ' . $google . ' };';
37
  }
38
 
39
  /**
43
  * @param string $font The current selected font.
44
  * @return void
45
  */
46
+ static public function display_select_font( $font ) {
 
47
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
48
  $google_fonts = apply_filters( 'fl_builder_font_families_google', FLBuilderFontFamilies::$google );
49
 
50
+ echo '<option value="Default" ' . selected( 'Default', $font ) . '>' . __( 'Default', 'fl-builder' ) . '</option>';
51
  echo '<optgroup label="System">';
52
 
53
+ foreach ( $system_fonts as $name => $variants ) {
54
+ echo '<option value="' . $name . '" ' . selected( $name, $font ) . '>' . $name . '</option>';
55
  }
56
 
57
  echo '<optgroup label="Google">';
58
 
59
+ foreach ( $google_fonts as $name => $variants ) {
60
+ echo '<option value="' . $name . '" ' . selected( $name, $font ) . '>' . $name . '</option>';
61
  }
62
  }
63
 
69
  * @param string $weight The current selected weight.
70
  * @return void
71
  */
72
+ static public function display_select_weight( $font, $weight ) {
73
+ if ( $font == 'Default' ) {
74
+ echo '<option value="default">' . __( 'Default', 'fl-builder' ) . '</option>';
 
75
  } else {
76
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
77
  $google_fonts = apply_filters( 'fl_builder_font_families_google', FLBuilderFontFamilies::$google );
78
 
79
+ if ( array_key_exists( $font, $system_fonts ) ) {
80
+ foreach ( $system_fonts[ $font ]['weights'] as $variant ) {
81
+ echo '<option value="' . $variant . '" ' . selected( $variant, $weight ) . '>' . FLBuilderFonts::get_weight_string( $variant ) . '</option>';
82
  }
 
83
  } else {
84
+ foreach ( $google_fonts[ $font ] as $variant ) {
85
 
86
+ echo '<option value="' . $variant . '" ' . selected( $variant, $weight ) . '>' . FLBuilderFonts::get_weight_string( $variant ) . '</option>';
87
  }
 
88
  }
 
89
  }
90
 
91
  }
97
  * @param string $weight The selected weight.
98
  * @return string The weight name.
99
  */
100
+ static public function get_weight_string( $weight ) {
101
 
102
  $weight_string = apply_filters( 'fl_builder_font_weight_strings', array(
103
  'default' => __( 'Default', 'fl-builder' ),
110
  '600' => 'Semi-Bold 600',
111
  '700' => 'Bold 700',
112
  '800' => 'Extra-Bold 800',
113
+ '900' => 'Ultra-Bold 900',
114
  ) );
115
 
116
  return $weight_string[ $weight ];
123
  * @param array $font An array with font-family and weight.
124
  * @return void
125
  */
126
+ static public function font_css( $font ) {
127
 
128
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
129
 
130
  $css = '';
131
 
132
+ if ( array_key_exists( $font['family'], $system_fonts ) ) {
133
 
134
+ $css .= 'font-family: "' . $font['family'] . '",' . $system_fonts[ $font['family'] ]['fallback'] . ';';
135
 
136
  } else {
137
+ $css .= 'font-family: "' . $font['family'] . '", sans-serif;';
138
  }
139
 
140
  if ( 'regular' == $font['weight'] ) {
141
  $css .= 'font-weight: normal;';
142
  } else {
143
+ if ( 'i' == substr( $font['weight'], -1 ) ) {
144
+ $css .= 'font-weight: ' . substr( $font['weight'], 0, -1 ) . ';';
145
+ $css .= 'font-style: italic;';
146
+ } else {
147
+ $css .= 'font-weight: ' . $font['weight'] . ';';
148
+ }
149
  }
150
 
151
  echo $css;
158
  * @param object $module The respective module.
159
  * @return void
160
  */
161
+ static public function add_fonts_for_module( $module ) {
 
162
  $fields = FLBuilderModel::get_settings_form_fields( $module->form );
163
 
164
  foreach ( $fields as $name => $field ) {
165
  if ( $field['type'] == 'font' && isset( $module->settings->$name ) ) {
166
  self::add_font( $module->settings->$name );
167
+ } elseif ( isset( $field['form'] ) ) {
 
168
  $form = FLBuilderModel::$settings_forms[ $field['form'] ];
169
  self::add_fonts_for_nested_module_form( $module, $form['tabs'], $name );
170
  }
181
  * @param string $setting The nested form setting key.
182
  * @return void
183
  */
184
+ static private function add_fonts_for_nested_module_form( $module, $form, $setting ) {
 
185
  $fields = FLBuilderModel::get_settings_form_fields( $form );
186
 
187
  foreach ( $fields as $name => $field ) {
188
  if ( $field['type'] == 'font' && isset( $module->settings->$setting ) ) {
189
  foreach ( $module->settings->$setting as $key => $val ) {
190
  if ( isset( $val->$name ) ) {
191
+ self::add_font( (array) $val->$name );
192
+ } elseif ( $name == $key && ! empty( $val ) ) {
193
+ self::add_font( (array) $val );
 
194
  }
195
  }
196
  }
203
  * @since 1.6.3
204
  * @return void
205
  */
206
+ static public function enqueue_styles() {
207
+ $google_fonts_domain = apply_filters( 'fl_builder_google_fonts_domain', '//fonts.googleapis.com/' );
208
  $google_url = $google_fonts_domain . 'css?family=';
209
 
210
+ if ( count( self::$fonts ) > 0 ) {
211
 
212
+ foreach ( self::$fonts as $family => $weights ) {
213
  $google_url .= $family . ':' . implode( ',', $weights ) . '|';
214
  }
215
 
228
  * @param array $font an array with the font family and weight to add.
229
  * @return void
230
  */
231
+ static public function add_font( $font ) {
232
 
233
+ if ( $font['family'] != 'Default' ) {
234
 
235
  $system_fonts = apply_filters( 'fl_builder_font_families_system', FLBuilderFontFamilies::$system );
236
 
237
  // check if is a Google Font
238
+ if ( ! array_key_exists( $font['family'], $system_fonts ) ) {
239
 
240
  // check if font family is already added
241
+ if ( array_key_exists( $font['family'], self::$fonts ) ) {
242
 
243
  // check if the weight is already added
244
+ if ( ! in_array( $font['weight'], self::$fonts[ $font['family'] ] ) ) {
245
  self::$fonts[ $font['family'] ][] = $font['weight'];
246
  }
247
  } else {
249
  self::$fonts[ $font['family'] ] = array( $font['weight'] );
250
 
251
  }
 
252
  }
 
253
  }
254
  }
255
 
259
  * @since 1.9.5
260
  * @return void
261
  */
262
+ static public function combine_google_fonts() {
263
  global $wp_styles;
264
 
265
+ // Check for any enqueued `fonts.googleapis.com` from BB theme or plugin
266
+ if ( isset( $wp_styles->queue ) ) {
267
 
268
  $google_fonts_domain = '//fonts.googleapis.com/css';
269
  $enqueued_google_fonts = array();
270
+ $families = array();
271
  $subsets = array();
272
+ $font_args = array();
273
 
274
  // Collect all enqueued google fonts
275
+ foreach ( $wp_styles->queue as $key => $handle ) {
276
 
277
+ if ( ! isset( $wp_styles->registered[ $handle ] ) || strpos( $handle, 'fl-builder-google-fonts-' ) === false ) {
278
  continue;
279
  }
280
 
281
  $style_src = $wp_styles->registered[ $handle ]->src;
282
 
283
+ if ( strpos( $style_src, 'fonts.googleapis.com/css' ) !== false ) {
284
+ $url = wp_parse_url( $style_src );
285
+
286
+ if ( is_string( $url['query'] ) ) {
287
+ parse_str( $url['query'], $parsed_url );
288
+
289
+ if ( isset( $parsed_url['family'] ) ) {
290
+
291
+ // Collect all subsets
292
+ if ( isset( $parsed_url['subset'] ) ) {
293
+ $subsets[] = urlencode( trim( $parsed_url['subset'] ) );
294
+ }
295
+
296
+ $font_families = explode( '|', $parsed_url['family'] );
297
+ foreach ( $font_families as $parsed_font ) {
298
+
299
+ $get_font = explode( ':', $parsed_font );
300
+
301
+ // Extract the font data
302
+ if ( isset( $get_font[0] ) && ! empty( $get_font[0] ) ) {
303
+ $family = $get_font[0];
304
+ $weights = isset( $get_font[1] ) && ! empty( $get_font[1] ) ? explode( ',', $get_font[1] ) : array();
305
+
306
+ // Combine weights if family has been enqueued
307
+ if ( isset( $enqueued_google_fonts[ $family ] ) && $weights != $enqueued_google_fonts[ $family ]['weights'] ) {
308
+ $combined_weights = array_merge( $weights, $enqueued_google_fonts[ $family ]['weights'] );
309
+ $enqueued_google_fonts[ $family ]['weights'] = array_unique( $combined_weights );
310
+ } else {
311
+ $enqueued_google_fonts[ $family ] = array(
312
+ 'handle' => $handle,
313
+ 'family' => $family,
314
+ 'weights' => $weights,
315
+ );
316
+
317
+ // Remove enqueued google font style, so we would only have one HTTP request.
318
+ wp_dequeue_style( $handle );
319
+ }
320
+ }
321
+ }
322
+ }
323
+ }// End if().
324
+ }// End if().
325
+ }// End foreach().
 
326
 
327
  // Start combining all enqueued google fonts
328
+ if ( count( $enqueued_google_fonts ) > 0 ) {
329
 
330
+ foreach ( $enqueued_google_fonts as $family => $data ) {
331
  // Collect all family and weights
332
+ if ( ! empty( $data['weights'] ) ) {
333
+ $families[] = $family . ':' . implode( ',', $data['weights'] );
334
+ } else {
335
+ $families[] = $family;
336
+ }
 
337
  }
338
 
339
+ if ( ! empty( $families ) ) {
340
+ $font_args['family'] = implode( '|', $families );
341
 
342
+ if ( ! empty( $subsets ) ) {
343
+ $font_args['subset'] = implode( ',', $subsets );
344
  }
345
 
346
  $src = add_query_arg( $font_args, $google_fonts_domain );
347
 
348
  // Enqueue google fonts into one URL request
349
  wp_enqueue_style(
350
+ 'fl-builder-google-fonts-' . md5( $src ),
351
  $src,
352
  array()
353
  );
356
  $enqueued_google_fonts = array();
357
  }
358
  }
359
+ }// End if().
360
  }
361
 
362
  }
372
  final class FLBuilderFontFamilies {
373
 
374
  static public $default = array(
375
+ 'Default' => array(
376
  'default'
377
+ ),
378
  );
379
 
380
  /**
382
  * @var array
383
  */
384
  static public $system = array(
385
+ 'Helvetica' => array(
386
+ 'fallback' => 'Verdana, Arial, sans-serif',
387
+ 'weights' => array(
388
+ '300',
389
+ '400',
390
+ '700',
391
+ ),
392
+ ),
393
+ 'Verdana' => array(
394
+ 'fallback' => 'Helvetica, Arial, sans-serif',
395
+ 'weights' => array(
396
+ '300',
397
+ '400',
398
+ '700',
399
+ ),
400
+ ),
401
+ 'Arial' => array(
402
+ 'fallback' => 'Helvetica, Verdana, sans-serif',
403
+ 'weights' => array(
404
+ '300',
405
+ '400',
406
+ '700',
407
+ ),
408
+ ),
409
+ 'Times' => array(
410
+ 'fallback' => 'Georgia, serif',
411
+ 'weights' => array(
412
+ '300',
413
+ '400',
414
+ '700',
415
+ ),
416
+ ),
417
+ 'Georgia' => array(
418
+ 'fallback' => 'Times, serif',
419
+ 'weights' => array(
420
+ '300',
421
+ '400',
422
+ '700',
423
+ ),
424
+ ),
425
+ 'Courier' => array(
426
+ 'fallback' => 'monospace',
427
+ 'weights' => array(
428
+ '300',
429
+ '400',
430
+ '700',
431
+ ),
432
  ),
433
  );
434
 
435
  /**
436
+ * Array with Google Fonts.
437
+ * @var array
438
+ */
439
+ // @codingStandardsIgnoreStart
440
  static public $google = array(
441
  "ABeeZee" => array(
442
  "regular",
3589
  "regular",
3590
  ),
3591
  );
3592
+ // @codingStandardsIgnoreEnd
3593
+ }
classes/class-fl-builder-loader.php CHANGED
@@ -45,7 +45,7 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
45
  */
46
  static private function define_constants()
47
  {
48
- define('FL_BUILDER_VERSION', '1.10.5.1');
49
  define('FL_BUILDER_FILE', trailingslashit(dirname(dirname(__FILE__))) . 'fl-builder.php');
50
  define('FL_BUILDER_DIR', plugin_dir_path(FL_BUILDER_FILE));
51
  define('FL_BUILDER_URL', plugins_url('/', FL_BUILDER_FILE));
45
  */
46
  static private function define_constants()
47
  {
48
+ define('FL_BUILDER_VERSION', '1.10.6.3');
49
  define('FL_BUILDER_FILE', trailingslashit(dirname(dirname(__FILE__))) . 'fl-builder.php');
50
  define('FL_BUILDER_DIR', plugin_dir_path(FL_BUILDER_FILE));
51
  define('FL_BUILDER_URL', plugins_url('/', FL_BUILDER_FILE));
classes/class-fl-builder-loop.php CHANGED
@@ -24,36 +24,36 @@ final class FLBuilderLoop {
24
  static public function init()
25
  {
26
  // Actions
27
- add_action( 'fl_builder_before_control_suggest', __CLASS__ . '::render_match_select', 10, 4 );
28
  add_action( 'init', __CLASS__ . '::init_rewrite_rules' );
29
-
30
  // Filters
31
  add_filter( 'found_posts', __CLASS__ . '::found_posts', 1, 2 );
32
  add_filter( 'redirect_canonical', __CLASS__ . '::override_canonical', 1, 2 );
33
  }
34
 
35
  /**
36
- * Returns either a clone of the main query or a new instance of
37
- * WP_Query based on the provided module settings.
38
  *
39
  * @since 1.2.3
40
  * @param object $settings Module settings to use for the query.
41
  * @return object A WP_Query instance.
42
  */
43
- static public function query( $settings )
44
  {
45
  $settings = apply_filters( 'fl_builder_loop_before_query_settings', $settings );
46
  do_action( 'fl_builder_loop_before_query', $settings );
47
-
48
  if ( isset( $settings->data_source ) && 'main_query' == $settings->data_source ) {
49
  $query = self::main_query();
50
  }
51
  else {
52
  $query = self::custom_query( $settings );
53
  }
54
-
55
  do_action( 'fl_builder_loop_after_query', $settings );
56
-
57
  return apply_filters( 'fl_builder_loop_query', $query, $settings );
58
  }
59
 
@@ -63,33 +63,33 @@ final class FLBuilderLoop {
63
  * @since 1.10
64
  * @return object A WP_Query instance.
65
  */
66
- static public function main_query()
67
  {
68
  global $wp_query;
69
-
70
  $query = clone $wp_query;
71
  $query->rewind_posts();
72
  $query->reset_postdata();
73
-
74
  return $query;
75
  }
76
 
77
  /**
78
- * Returns a new instance of WP_Query based on
79
- * the provided module settings.
80
  *
81
  * @since 1.10
82
  * @param object $settings Module settings to use for the query.
83
  * @return object A WP_Query instance.
84
  */
85
- static public function custom_query($settings)
86
  {
87
  $posts_per_page = empty($settings->posts_per_page) ? 10 : $settings->posts_per_page;
88
  $post_type = empty($settings->post_type) ? 'post' : $settings->post_type;
89
  $order_by = empty($settings->order_by) ? 'date' : $settings->order_by;
90
  $order = empty($settings->order) ? 'DESC' : $settings->order;
91
  $users = empty($settings->users) ? '' : $settings->users;
92
- $fields = empty($settings->fields) ? '' : $settings->fields;
93
 
94
  // Count how many times this method has been called
95
  self::$loop_counter++;
@@ -103,14 +103,14 @@ final class FLBuilderLoop {
103
  $offset = $settings->offset;
104
  }
105
 
106
- // Get the paged offset.
107
  if ( $paged < 2 ) {
108
  $paged_offset = $offset;
109
  }
110
  else {
111
  $paged_offset = $offset + ( ( $paged - 1 ) * $posts_per_page );
112
  }
113
-
114
  // Build the query args.
115
  $args = apply_filters( 'fl_builder_loop_query_args', array(
116
  'paged' => $paged,
@@ -125,44 +125,44 @@ final class FLBuilderLoop {
125
  'fl_builder_loop' => true,
126
  'fields' => $fields
127
  ) );
128
-
129
  // Order by meta value arg.
130
  if ( strstr( $order_by, 'meta_value' ) ) {
131
  $args['meta_key'] = $settings->order_by_meta_key;
132
  }
133
-
134
  // Build the author query.
135
  if ( ! empty( $users ) ) {
136
 
137
  if ( is_string( $users ) ) {
138
  $users = explode( ',', $users );
139
  }
140
-
141
  $arg = 'author__in';
142
-
143
  // Set to NOT IN if matching is present and set to 0.
144
  if(isset($settings->users_matching) && !$settings->users_matching) {
145
- $arg = 'author__not_in';
146
  }
147
-
148
  $args[ $arg ] = $users;
149
  }
150
-
151
  // Build the taxonomy query.
152
  $taxonomies = self::taxonomies($post_type);
153
-
154
  foreach($taxonomies as $tax_slug => $tax) {
155
-
156
  $tax_value = '';
157
  $operator = 'IN';
158
-
159
  // Set to NOT IN if matching is present and set to 0.
160
  if(isset($settings->{'tax_' . $post_type . '_' . $tax_slug . '_matching'})) {
161
  if (!$settings->{'tax_' . $post_type . '_' . $tax_slug . '_matching'}) {
162
- $operator = 'NOT IN';
163
  }
164
  }
165
-
166
  // New settings slug.
167
  if(isset($settings->{'tax_' . $post_type . '_' . $tax_slug})) {
168
  $tax_value = $settings->{'tax_' . $post_type . '_' . $tax_slug};
@@ -171,9 +171,9 @@ final class FLBuilderLoop {
171
  else if(isset($settings->{'tax_' . $tax_slug})) {
172
  $tax_value = $settings->{'tax_' . $tax_slug};
173
  }
174
-
175
  if(!empty($tax_value)) {
176
-
177
  $args['tax_query'][] = array(
178
  'taxonomy' => $tax_slug,
179
  'field' => 'id',
@@ -182,29 +182,29 @@ final class FLBuilderLoop {
182
  );
183
  }
184
  }
185
-
186
  // Post in/not in query.
187
  if(isset($settings->{'posts_' . $post_type})) {
188
-
189
  $ids = $settings->{'posts_' . $post_type};
190
  $arg = 'post__in';
191
-
192
  // Set to NOT IN if matching is present and set to 0.
193
  if(isset($settings->{'posts_' . $post_type . '_matching'})) {
194
  if (!$settings->{'posts_' . $post_type . '_matching'}) {
195
- $arg = 'post__not_in';
196
  }
197
  }
198
-
199
  // Add the args if we have IDs.
200
  if(!empty($ids)) {
201
- $args[ $arg ] = explode(',', $settings->{'posts_' . $post_type});
202
  }
203
  }
204
-
205
  // Build the query.
206
  $query = new WP_Query($args);
207
-
208
  // Return the query.
209
  return $query;
210
  }
@@ -217,17 +217,17 @@ final class FLBuilderLoop {
217
  * @param int $found_posts The number of found posts.
218
  * @param object $query An instance of WP_Query.
219
  * @return int
220
- */
221
- static public function found_posts( $found_posts, $query )
222
  {
223
  if ( isset( $query->query ) && isset( $query->query['fl_builder_loop'] ) ) {
224
  return $found_posts - $query->query['fl_original_offset'];
225
  }
226
-
227
  return $found_posts;
228
  }
229
 
230
-
231
  /**
232
  * Add rewrite rules for custom pagination that allows post modules
233
  * on the same page to be paged independently.
@@ -242,13 +242,16 @@ final class FLBuilderLoop {
242
  add_rewrite_rule( 'paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?&flpaged'. $x .'=$matches[1]', 'top');
243
  add_rewrite_rule( '(.?.+?)/paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?pagename=$matches[1]&flpaged'. $x .'=$matches[2]', 'top');
244
  add_rewrite_rule( '([^/]+)/paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?name=$matches[1]&flpaged'. $x .'=$matches[2]', 'top');
 
245
  add_rewrite_tag( "%flpaged{$x}%", '([^&]+)');
246
  }
247
  }
248
 
249
  /**
250
  * Disable canonical redirection on the frontpage when query var 'flpaged' is found.
251
- *
 
 
252
  * @param string $redirect_url The redirect URL.
253
  * @param string $requested_url The requested URL.
254
  * @since 1.9.5
@@ -264,6 +267,18 @@ final class FLBuilderLoop {
264
  break;
265
  }
266
  }
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
268
 
269
  return $redirect_url;
@@ -275,8 +290,8 @@ final class FLBuilderLoop {
275
  * @since 1.2.3
276
  * @param object $query An instance of WP_Query.
277
  * @return void
278
- */
279
- static public function pagination($query)
280
  {
281
  $total_pages = $query->max_num_pages;
282
  $permalink_structure = get_option('permalink_structure');
@@ -284,8 +299,8 @@ final class FLBuilderLoop {
284
  $base = get_pagenum_link();
285
 
286
  if($total_pages > 1) {
287
-
288
- if(!$current_page = $paged) {
289
  $current_page = 1;
290
  }
291
 
@@ -295,7 +310,7 @@ final class FLBuilderLoop {
295
  else {
296
  $page_prefix = empty($permalink_structure) ? 'paged' : 'page';
297
  }
298
-
299
  if(empty($permalink_structure) || is_search()) {
300
  $format = '&'. $page_prefix .'=%#%';
301
  }
@@ -317,6 +332,11 @@ final class FLBuilderLoop {
317
  $base = substr_replace( $base, '', $pos, strlen( $base ) );
318
  }
319
 
 
 
 
 
 
320
  echo paginate_links(array(
321
  'base' => $base . '%_%',
322
  'format' => $format,
@@ -336,10 +356,10 @@ final class FLBuilderLoop {
336
  static public function get_paged()
337
  {
338
  global $wp_the_query, $paged;
339
-
340
  // Check first for custom pagination from post module
341
  $flpaged = $wp_the_query->get( 'flpaged'. self::$loop_counter );
342
-
343
  if ( is_numeric( $flpaged ) ) {
344
  return $flpaged;
345
  }
@@ -350,18 +370,18 @@ final class FLBuilderLoop {
350
 
351
  // Check the 'page' query var.
352
  $page_qv = $wp_the_query->get( 'page' );
353
-
354
  if ( is_numeric( $page_qv ) ) {
355
  return $page_qv;
356
  }
357
-
358
  // Check the 'paged' query var.
359
  $paged_qv = $wp_the_query->get( 'paged' );
360
-
361
  if ( is_numeric( $paged_qv ) ) {
362
  return $paged_qv;
363
  }
364
-
365
  // Check the $paged global?
366
  if ( is_numeric( $paged ) ) {
367
  return $paged;
@@ -376,42 +396,42 @@ final class FLBuilderLoop {
376
  *
377
  * @since 1.2.3
378
  * @return array
379
- */
380
- static public function post_types()
381
  {
382
  $post_types = get_post_types(array(
383
  'public' => true,
384
  'show_ui' => true
385
  ), 'objects');
386
-
387
  unset($post_types['attachment']);
388
  unset($post_types['fl-builder-template']);
389
  unset($post_types['fl-theme-layout']);
390
-
391
  return $post_types;
392
  }
393
-
394
  /**
395
  * Get an array of supported taxonomy data for a post type.
396
  *
397
  * @since 1.2.3
398
  * @param string $post_type The post type to get taxonomies for.
399
  * @return array
400
- */
401
- static public function taxonomies($post_type)
402
  {
403
  $taxonomies = get_object_taxonomies($post_type, 'objects');
404
  $data = array();
405
-
406
  foreach($taxonomies as $tax_slug => $tax) {
407
-
408
  if(!$tax->public || !$tax->show_ui) {
409
  continue;
410
  }
411
-
412
  $data[$tax_slug] = $tax;
413
  }
414
-
415
  return apply_filters( 'fl_builder_loop_taxonomies', $data, $taxonomies, $post_type );
416
  }
417
 
@@ -427,12 +447,12 @@ final class FLBuilderLoop {
427
  if ( 'default' == $format ) {
428
  $format = get_option( 'date_format' );
429
  }
430
-
431
  the_time( $format );
432
  }
433
 
434
  /**
435
- * Renders the select for matching or not matching filters in
436
  * a module's loop builder settings.
437
  *
438
  * @since 1.10
@@ -447,13 +467,13 @@ final class FLBuilderLoop {
447
  if ( ! isset( $field['matching'] ) || ! $field['matching'] ) {
448
  return;
449
  }
450
-
451
  if ( ! isset( $settings->{ $name . '_matching' } ) ) {
452
  $settings->{ $name . '_matching' } = '1';
453
  }
454
-
455
  include FL_BUILDER_DIR . 'includes/loop-settings-matching.php';
456
  }
457
  }
458
 
459
- FLBuilderLoop::init();
24
  static public function init()
25
  {
26
  // Actions
27
+ add_action( 'fl_builder_before_control_suggest', __CLASS__ . '::render_match_select', 10, 4 );
28
  add_action( 'init', __CLASS__ . '::init_rewrite_rules' );
29
+
30
  // Filters
31
  add_filter( 'found_posts', __CLASS__ . '::found_posts', 1, 2 );
32
  add_filter( 'redirect_canonical', __CLASS__ . '::override_canonical', 1, 2 );
33
  }
34
 
35
  /**
36
+ * Returns either a clone of the main query or a new instance of
37
+ * WP_Query based on the provided module settings.
38
  *
39
  * @since 1.2.3
40
  * @param object $settings Module settings to use for the query.
41
  * @return object A WP_Query instance.
42
  */
43
+ static public function query( $settings )
44
  {
45
  $settings = apply_filters( 'fl_builder_loop_before_query_settings', $settings );
46
  do_action( 'fl_builder_loop_before_query', $settings );
47
+
48
  if ( isset( $settings->data_source ) && 'main_query' == $settings->data_source ) {
49
  $query = self::main_query();
50
  }
51
  else {
52
  $query = self::custom_query( $settings );
53
  }
54
+
55
  do_action( 'fl_builder_loop_after_query', $settings );
56
+
57
  return apply_filters( 'fl_builder_loop_query', $query, $settings );
58
  }
59
 
63
  * @since 1.10
64
  * @return object A WP_Query instance.
65
  */
66
+ static public function main_query()
67
  {
68
  global $wp_query;
69
+
70
  $query = clone $wp_query;
71
  $query->rewind_posts();
72
  $query->reset_postdata();
73
+
74
  return $query;
75
  }
76
 
77
  /**
78
+ * Returns a new instance of WP_Query based on
79
+ * the provided module settings.
80
  *
81
  * @since 1.10
82
  * @param object $settings Module settings to use for the query.
83
  * @return object A WP_Query instance.
84
  */
85
+ static public function custom_query($settings)
86
  {
87
  $posts_per_page = empty($settings->posts_per_page) ? 10 : $settings->posts_per_page;
88
  $post_type = empty($settings->post_type) ? 'post' : $settings->post_type;
89
  $order_by = empty($settings->order_by) ? 'date' : $settings->order_by;
90
  $order = empty($settings->order) ? 'DESC' : $settings->order;
91
  $users = empty($settings->users) ? '' : $settings->users;
92
+ $fields = empty($settings->fields) ? '' : $settings->fields;
93
 
94
  // Count how many times this method has been called
95
  self::$loop_counter++;
103
  $offset = $settings->offset;
104
  }
105
 
106
+ // Get the paged offset.
107
  if ( $paged < 2 ) {
108
  $paged_offset = $offset;
109
  }
110
  else {
111
  $paged_offset = $offset + ( ( $paged - 1 ) * $posts_per_page );
112
  }
113
+
114
  // Build the query args.
115
  $args = apply_filters( 'fl_builder_loop_query_args', array(
116
  'paged' => $paged,
125
  'fl_builder_loop' => true,
126
  'fields' => $fields
127
  ) );
128
+
129
  // Order by meta value arg.
130
  if ( strstr( $order_by, 'meta_value' ) ) {
131
  $args['meta_key'] = $settings->order_by_meta_key;
132
  }
133
+
134
  // Build the author query.
135
  if ( ! empty( $users ) ) {
136
 
137
  if ( is_string( $users ) ) {
138
  $users = explode( ',', $users );
139
  }
140
+
141
  $arg = 'author__in';
142
+
143
  // Set to NOT IN if matching is present and set to 0.
144
  if(isset($settings->users_matching) && !$settings->users_matching) {
145
+ $arg = 'author__not_in';
146
  }
147
+
148
  $args[ $arg ] = $users;
149
  }
150
+
151
  // Build the taxonomy query.
152
  $taxonomies = self::taxonomies($post_type);
153
+
154
  foreach($taxonomies as $tax_slug => $tax) {
155
+
156
  $tax_value = '';
157
  $operator = 'IN';
158
+
159
  // Set to NOT IN if matching is present and set to 0.
160
  if(isset($settings->{'tax_' . $post_type . '_' . $tax_slug . '_matching'})) {
161
  if (!$settings->{'tax_' . $post_type . '_' . $tax_slug . '_matching'}) {
162
+ $operator = 'NOT IN';
163
  }
164
  }
165
+
166
  // New settings slug.
167
  if(isset($settings->{'tax_' . $post_type . '_' . $tax_slug})) {
168
  $tax_value = $settings->{'tax_' . $post_type . '_' . $tax_slug};
171
  else if(isset($settings->{'tax_' . $tax_slug})) {
172
  $tax_value = $settings->{'tax_' . $tax_slug};
173
  }
174
+
175
  if(!empty($tax_value)) {
176
+
177
  $args['tax_query'][] = array(
178
  'taxonomy' => $tax_slug,
179
  'field' => 'id',
182
  );
183
  }
184
  }
185
+
186
  // Post in/not in query.
187
  if(isset($settings->{'posts_' . $post_type})) {
188
+
189
  $ids = $settings->{'posts_' . $post_type};
190
  $arg = 'post__in';
191
+
192
  // Set to NOT IN if matching is present and set to 0.
193
  if(isset($settings->{'posts_' . $post_type . '_matching'})) {
194
  if (!$settings->{'posts_' . $post_type . '_matching'}) {
195
+ $arg = 'post__not_in';
196
  }
197
  }
198
+
199
  // Add the args if we have IDs.
200
  if(!empty($ids)) {
201
+ $args[ $arg ] = explode(',', $settings->{'posts_' . $post_type});
202
  }
203
  }
204
+
205
  // Build the query.
206
  $query = new WP_Query($args);
207
+
208
  // Return the query.
209
  return $query;
210
  }
217
  * @param int $found_posts The number of found posts.
218
  * @param object $query An instance of WP_Query.
219
  * @return int
220
+ */
221
+ static public function found_posts( $found_posts, $query )
222
  {
223
  if ( isset( $query->query ) && isset( $query->query['fl_builder_loop'] ) ) {
224
  return $found_posts - $query->query['fl_original_offset'];
225
  }
226
+
227
  return $found_posts;
228
  }
229
 
230
+
231
  /**
232
  * Add rewrite rules for custom pagination that allows post modules
233
  * on the same page to be paged independently.
242
  add_rewrite_rule( 'paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?&flpaged'. $x .'=$matches[1]', 'top');
243
  add_rewrite_rule( '(.?.+?)/paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?pagename=$matches[1]&flpaged'. $x .'=$matches[2]', 'top');
244
  add_rewrite_rule( '([^/]+)/paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?name=$matches[1]&flpaged'. $x .'=$matches[2]', 'top');
245
+ add_rewrite_rule( '(.?.+?)/([^/]+)/paged-'. $x .'/?([0-9]{1,})/?$', 'index.php?post_type=$matches[1]&name=$matches[2]&flpaged'. $x .'=$matches[3]', 'top');
246
  add_rewrite_tag( "%flpaged{$x}%", '([^&]+)');
247
  }
248
  }
249
 
250
  /**
251
  * Disable canonical redirection on the frontpage when query var 'flpaged' is found.
252
+ *
253
+ * Disable canonical on supported CPT single.
254
+ *
255
  * @param string $redirect_url The redirect URL.
256
  * @param string $requested_url The requested URL.
257
  * @since 1.9.5
267
  break;
268
  }
269
  }
270
+
271
+ $supported_post_types = self::post_types();
272
+
273
+ // Disable canonical on CPT single
274
+ if ( isset( $wp_the_query->query_vars['post_type'] )
275
+ && isset( $supported_post_types[ $wp_the_query->query_vars['post_type'] ] )
276
+ && true === $wp_the_query->is_singular
277
+ && - 1 == $wp_the_query->current_post
278
+ && true === $wp_the_query->is_paged
279
+ ) {
280
+ $redirect_url = false;
281
+ }
282
  }
283
 
284
  return $redirect_url;
290
  * @since 1.2.3
291
  * @param object $query An instance of WP_Query.
292
  * @return void
293
+ */
294
+ static public function pagination($query)
295
  {
296
  $total_pages = $query->max_num_pages;
297
  $permalink_structure = get_option('permalink_structure');
299
  $base = get_pagenum_link();
300
 
301
  if($total_pages > 1) {
302
+
303
+ if(!$current_page = $paged) {
304
  $current_page = 1;
305
  }
306
 
310
  else {
311
  $page_prefix = empty($permalink_structure) ? 'paged' : 'page';
312
  }
313
+
314
  if(empty($permalink_structure) || is_search()) {
315
  $format = '&'. $page_prefix .'=%#%';
316
  }
332
  $base = substr_replace( $base, '', $pos, strlen( $base ) );
333
  }
334
 
335
+ // Remove query string from base URL since paginate_links() adds it automatically.
336
+ if ( ! empty( $permalink_structure ) && count( $_GET ) > 0 ) {
337
+ $base = untrailingslashit( strtok( $base, '?' ) );
338
+ }
339
+
340
  echo paginate_links(array(
341
  'base' => $base . '%_%',
342
  'format' => $format,
356
  static public function get_paged()
357
  {
358
  global $wp_the_query, $paged;
359
+
360
  // Check first for custom pagination from post module
361
  $flpaged = $wp_the_query->get( 'flpaged'. self::$loop_counter );
362
+
363
  if ( is_numeric( $flpaged ) ) {
364
  return $flpaged;
365
  }
370
 
371
  // Check the 'page' query var.
372
  $page_qv = $wp_the_query->get( 'page' );
373
+
374
  if ( is_numeric( $page_qv ) ) {
375
  return $page_qv;
376
  }
377
+
378
  // Check the 'paged' query var.
379
  $paged_qv = $wp_the_query->get( 'paged' );
380
+
381
  if ( is_numeric( $paged_qv ) ) {
382
  return $paged_qv;
383
  }
384
+
385
  // Check the $paged global?
386
  if ( is_numeric( $paged ) ) {
387
  return $paged;
396
  *
397
  * @since 1.2.3
398
  * @return array
399
+ */
400
+ static public function post_types()
401
  {
402
  $post_types = get_post_types(array(
403
  'public' => true,
404
  'show_ui' => true
405
  ), 'objects');
406
+
407
  unset($post_types['attachment']);
408
  unset($post_types['fl-builder-template']);
409
  unset($post_types['fl-theme-layout']);
410
+
411
  return $post_types;
412
  }
413
+
414
  /**
415
  * Get an array of supported taxonomy data for a post type.
416
  *
417
  * @since 1.2.3
418
  * @param string $post_type The post type to get taxonomies for.
419
  * @return array
420
+ */
421
+ static public function taxonomies($post_type)
422
  {
423
  $taxonomies = get_object_taxonomies($post_type, 'objects');
424
  $data = array();
425
+
426
  foreach($taxonomies as $tax_slug => $tax) {
427
+
428
  if(!$tax->public || !$tax->show_ui) {
429
  continue;
430
  }
431
+
432
  $data[$tax_slug] = $tax;
433
  }
434
+
435
  return apply_filters( 'fl_builder_loop_taxonomies', $data, $taxonomies, $post_type );
436
  }
437
 
447
  if ( 'default' == $format ) {
448
  $format = get_option( 'date_format' );
449
  }
450
+
451
  the_time( $format );
452
  }
453
 
454
  /**
455
+ * Renders the select for matching or not matching filters in
456
  * a module's loop builder settings.
457
  *
458
  * @since 1.10
467
  if ( ! isset( $field['matching'] ) || ! $field['matching'] ) {
468
  return;
469
  }
470
+
471
  if ( ! isset( $settings->{ $name . '_matching' } ) ) {
472
  $settings->{ $name . '_matching' } = '1';
473
  }
474
+
475
  include FL_BUILDER_DIR . 'includes/loop-settings-matching.php';
476
  }
477
  }
478
 
479
+ FLBuilderLoop::init();
classes/class-fl-builder-model.php CHANGED
@@ -513,10 +513,13 @@ final class FLBuilderModel {
513
  global $wp_the_query;
514
  global $post;
515
 
 
 
 
516
  if ( null !== self::$active ) {
517
  return self::$active;
518
  }
519
- else if ( ! is_admin() && is_singular() && $wp_the_query->post->ID != $post->ID ) {
520
  self::$active = false;
521
  }
522
  else if ( self::is_post_editable() && ! is_admin() && ! post_password_required() ) {
@@ -3097,12 +3100,23 @@ final class FLBuilderModel {
3097
 
3098
  $widgets = array();
3099
 
3100
- foreach($wp_widget_factory->widgets as $class => $widget) {
3101
- $widget->class = get_class($widget);
3102
- $widgets[$widget->name] = $widget;
 
 
 
 
 
 
 
 
 
 
 
3103
  }
3104
 
3105
- ksort($widgets);
3106
 
3107
  return $widgets;
3108
  }
@@ -4158,6 +4172,9 @@ final class FLBuilderModel {
4158
  unset( $categorized['uncategorized'] );
4159
  }
4160
 
 
 
 
4161
  return array(
4162
  'templates' => $templates,
4163
  'categorized' => $categorized
@@ -5030,7 +5047,8 @@ final class FLBuilderModel {
5030
  {
5031
  $templates = glob( FL_BUILDER_DIR . 'data/*' );
5032
 
5033
- foreach ( $templates as $template ) {
 
5034
 
5035
  if ( 'templates.dat' == basename( $template ) ) {
5036
  continue;
@@ -5174,7 +5192,7 @@ final class FLBuilderModel {
5174
  $unserialized = unserialize( ob_get_clean() );
5175
  }
5176
  else {
5177
- $unserialized = unserialize( file_get_contents( $path ) );
5178
  }
5179
 
5180
  // Make sure we have an unserialized array.
513
  global $wp_the_query;
514
  global $post;
515
 
516
+ $query_id = ( isset( $wp_the_query->post->ID ) ) ? $wp_the_query->post->ID : false;
517
+ $post_id = ( isset( $post->ID ) ) ? $post->ID : false;
518
+
519
  if ( null !== self::$active ) {
520
  return self::$active;
521
  }
522
+ else if ( ! is_admin() && is_singular() && $query_id != $post_id ) {
523
  self::$active = false;
524
  }
525
  else if ( self::is_post_editable() && ! is_admin() && ! post_password_required() ) {
3100
 
3101
  $widgets = array();
3102
 
3103
+ // These are known widgets that won't work in the builder.
3104
+ $exclude = array(
3105
+ 'WP_Widget_Media_Audio',
3106
+ 'WP_Widget_Media_Image',
3107
+ 'WP_Widget_Media_Video',
3108
+ 'WP_Widget_Text',
3109
+ );
3110
+
3111
+ foreach ( $wp_widget_factory->widgets as $class => $widget ) {
3112
+ if ( in_array( $class, $exclude ) ) {
3113
+ continue;
3114
+ }
3115
+ $widget->class = get_class( $widget );
3116
+ $widgets[ $widget->name ] = $widget;
3117
  }
3118
 
3119
+ ksort( $widgets );
3120
 
3121
  return $widgets;
3122
  }
4172
  unset( $categorized['uncategorized'] );
4173
  }
4174
 
4175
+ // sort the categories.
4176
+ asort( $categorized );
4177
+
4178
  return array(
4179
  'templates' => $templates,
4180
  'categorized' => $categorized
5047
  {
5048
  $templates = glob( FL_BUILDER_DIR . 'data/*' );
5049
 
5050
+ // glob() will return false on error so cast as an array() just in case.
5051
+ foreach ( (array) $templates as $template ) {
5052
 
5053
  if ( 'templates.dat' == basename( $template ) ) {
5054
  continue;
5192
  $unserialized = unserialize( ob_get_clean() );
5193
  }
5194
  else {
5195
+ $unserialized = fl_maybe_fix_unserialize( file_get_contents( $path ) );
5196
  }
5197
 
5198
  // Make sure we have an unserialized array.
classes/class-fl-builder-service-godaddy-email-marketing.php ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Helper class for the GoDaddy Email Marketing.
5
+ *
6
+ * @since 1.10.5
7
+ */
8
+ final class FLBuilderServiceGoDaddyEmailMarketing extends FLBuilderService {
9
+
10
+ /**
11
+ * The ID for this service.
12
+ *
13
+ * @since 1.10.5
14
+ * @var string $id
15
+ */
16
+ public $id = 'godaddy-email-marketing';
17
+
18
+ /**
19
+ * @since 1.10.5
20
+ * @var object $api_instance
21
+ * @access private
22
+ */
23
+ private $api_instance = null;
24
+
25
+ /**
26
+ * Get an instance of the API.
27
+ *
28
+ * @since 1.10.5
29
+ * @param string $api_username The email address associated with the API key.
30
+ * @param string $api_key A valid API key.
31
+ * @return object The API instance.
32
+ */
33
+ public function get_api( $api_username, $api_key )
34
+ {
35
+ if ( $this->api_instance ) {
36
+ return $this->api_instance;
37
+ }
38
+ if ( ! class_exists( 'GoDaddyEM' ) ) {
39
+ require_once FL_BUILDER_DIR . 'includes/vendor/godaddy-email-marketing/class-godaddy-em.php';
40
+ }
41
+
42
+ $this->api_instance = new GoDaddyEM( $api_username, $api_key );
43
+
44
+ return $this->api_instance;
45
+ }
46
+
47
+ /**
48
+ * Test the API connection.
49
+ *
50
+ * @since 1.10.5
51
+ * @param array $fields {
52
+ * @type string $api_username A valid API username
53
+ * @type string $api_key A valid API key.
54
+ * }
55
+ * @return array{
56
+ * @type bool|string $error The error message or false if no error.
57
+ * @type array $data An array of data used to make the connection.
58
+ * }
59
+ */
60
+ public function connect( $fields = array() )
61
+ {
62
+ $response = array(
63
+ 'error' => false,
64
+ 'data' => array()
65
+ );
66
+
67
+ // Make sure we have an email address.
68
+ if ( ! isset( $fields['api_username'] ) || empty( $fields['api_username'] ) ) {
69
+ $response['error'] = __( 'Error: You must provide an API username.', 'fl-builder' );
70
+ }
71
+ // Make sure we have an API key.
72
+ else if ( ! isset( $fields['api_key'] ) || empty( $fields['api_key'] ) ) {
73
+ $response['error'] = __( 'Error: You must provide an API key.', 'fl-builder' );
74
+ }
75
+ // Try to connect and store the connection data.
76
+ else {
77
+
78
+ $api = $this->get_api( $fields['api_username'], $fields['api_key'] );
79
+
80
+ if ( ! $api::is_account_ok() ) {
81
+ $response['error'] = __( 'Unable to connect to GoDaddy Email Marketing. Please check your credentials.', 'fl-builder' );
82
+ }
83
+ else {
84
+ $response['data'] = array(
85
+ 'api_username' => $fields['api_username'],
86
+ 'api_key' => $fields['api_key']
87
+ );
88
+ }
89
+ }
90
+
91
+ return $response;
92
+ }
93
+
94
+ /**
95
+ * Renders the markup for the connection settings.
96
+ *
97
+ * @since 1.10.5
98
+ * @return string The connection settings markup.
99
+ */
100
+ public function render_connect_settings()
101
+ {
102
+ ob_start();
103
+
104
+ FLBuilder::render_settings_field( 'api_username', array(
105
+ 'row_class' => 'fl-builder-service-connect-row',
106
+ 'class' => 'fl-builder-service-connect-input',
107
+ 'type' => 'text',
108
+ 'label' => __( 'API Username', 'fl-builder' ),
109
+ 'help' => __( 'The username associated with your GoDaddy Email Marketing account.', 'fl-builder' ),
110
+ 'preview' => array(
111
+ 'type' => 'none'
112
+ )
113
+ ));
114
+
115
+ FLBuilder::render_settings_field( 'api_key', array(
116
+ 'row_class' => 'fl-builder-service-connect-row',
117
+ 'class' => 'fl-builder-service-connect-input',
118
+ 'type' => 'text',
119
+ 'label' => __( 'API Key', 'fl-builder' ),
120
+ 'help' => __( 'Your API key from your GoDaddy Email Marketing account.', 'fl-builder' ),
121
+ 'description' => sprintf( __( '<a%1$s>Sign in</a> to get your username and API key. <a%2$s>Signup</a> if you don\'t have a GoDaddy Email Marketing account.', 'fl-builder' ), ' href="https://gem.godaddy.com/mwp/accounts" target="_blank"', ' href="https://sso.godaddy.com/account/create?path=/wordpress_plugin&app=gem&realm=idp&ssoreturnpath=/%3Fpath%3D%2Fwordpress_plugin%26app%3Dgem%26realm%3Didp" target="_blank"' ),
122
+ 'preview' => array(
123
+ 'type' => 'none'
124
+ )
125
+ ));
126
+
127
+ return ob_get_clean();
128
+ }
129
+
130
+ /**
131
+ * Render the markup for service specific fields.
132
+ *
133
+ * @since 1.10.5
134
+ * @param string $account The name of the saved account.
135
+ * @param object $settings Saved module settings.
136
+ * @return array {
137
+ * @type bool|string $error The error message or false if no error.
138
+ * @type string $html The field markup.
139
+ * }
140
+ */
141
+ public function render_fields( $account, $settings )
142
+ {
143
+ $account_data = $this->get_account_data( $account );
144
+ $api = $this->get_api( $account_data['api_username'], $account_data['api_key'] );
145
+ $response = array(
146
+ 'error' => false,
147
+ 'html' => ''
148
+ );
149
+
150
+ $result = $api::get_forms();
151
+
152
+ if ( ! $result ) {
153
+ $response['error'] = __( 'There was a problem retrieving your lists. Please check your API credentials.', 'fl-builder' );
154
+ }
155
+ else {
156
+ $response['html'] = $this->render_list_field( $result, $settings );
157
+ }
158
+
159
+ return $response;
160
+ }
161
+
162
+ /**
163
+ * Render markup for the list field.
164
+ *
165
+ * @since 1.10.5
166
+ * @param array $forms GoDaddy Signup Forms data from the API.
167
+ * @param object $settings Saved module settings.
168
+ * @return string The markup for the list field.
169
+ * @access private
170
+ */
171
+ private function render_list_field( $forms, $settings )
172
+ {
173
+ ob_start();
174
+
175
+ $options = array( '' => __( 'Choose...', 'fl-builder' ) );
176
+
177
+ if ( ! empty( $forms->signups ) ) {
178
+ foreach ( $forms->signups as $form ) {
179
+ $options[ $form->id ] = $form->name;
180
+ }
181
+ }
182
+
183
+ FLBuilder::render_settings_field( 'form_id', array(
184
+ 'row_class' => 'fl-builder-service-field-row',
185
+ 'class' => 'fl-builder-service-list-select',
186
+ 'type' => 'select',
187
+ 'label' => _x( 'Form', 'A signup form from your GoDaddy Email Marketing account.', 'fl-builder' ),
188
+ 'options' => $options,
189
+ 'preview' => array(
190
+ 'type' => 'none'
191
+ )
192
+ ), $settings);
193
+
194
+ return ob_get_clean();
195
+ }
196
+
197
+ /**
198
+ * Subscribe an email address to GoDaddy Email Marketing.
199
+ *
200
+ * @since 1.10.5
201
+ * @param object $settings A module settings object.
202
+ * @param string $email The email to subscribe.
203
+ * @param string $name Optional. The full name of the person subscribing.
204
+ * @return array {
205
+ * @type bool|string $error The error message or false if no error.
206
+ * }
207
+ */
208
+ public function subscribe( $settings, $email, $name = false )
209
+ {
210
+ $account_data = $this->get_account_data( $settings->service_account );
211
+ $response = array( 'error' => false );
212
+
213
+ if ( ! $account_data ) {
214
+ $response['error'] = __( 'There was an error subscribing to GoDaddy Email Marketing. The account is no longer connected.', 'fl-builder' );
215
+ }
216
+ else {
217
+
218
+ $api = $this->get_api( $account_data['api_username'], $account_data['api_key'] );
219
+ $data = array(
220
+ 'email' => $email,
221
+ 'form_id' => $settings->form_id
222
+ );
223
+
224
+ if ( $name ) {
225
+
226
+ $names = explode( ' ', $name );
227
+
228
+ if ( isset( $names[0] ) ) {
229
+ $data['first_name'] = $names[0];
230
+ }
231
+ if ( isset( $names[1] ) ) {
232
+ $data['last_name'] = $names[1];
233
+ }
234
+ }
235
+
236
+ $result = $api->add_subscriber( $data );
237
+
238
+ if ( ! $result ) {
239
+ $response['error'] = __( 'There was an error subscribing to GoDaddy Email Marketing. The account is no longer connected.', 'fl-builder' );
240
+ }
241
+ }
242
+
243
+ return $response;
244
+ }
245
+ }
classes/class-fl-builder-service-icontact-pro.php ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Helper class for the iContact PRO API.
5
+ *
6
+ * @since 1.10.6
7
+ */
8
+ final class FLBuilderServiceIContactPro extends FLBuilderService {
9
+
10
+ /**
11
+ * The ID for this service.
12
+ *
13
+ * @since 1.10.6
14
+ * @var string $id
15
+ */
16
+ public $id = 'icontact-pro';
17
+
18
+ /**
19
+ * @since 1.10.6
20
+ * @var object $api_instance
21
+ * @access private
22
+ */
23
+ private $api_instance = null;
24
+
25
+ /**
26
+ * Get an instance of the API.
27
+ *
28
+ * @since 1.10.6
29
+ * @param array $data {
30
+ * @type string $username A valid username.
31
+ * @type string $app_id A valid app ID.
32
+ * @type string $app_password A valid app password.
33
+ * @type string $company_id A valid iContact Pro Company ID.
34
+ * @type string $profile_id A valid iContact Pro Profile ID.
35
+ * }
36
+ * @return object The API instance.
37
+ */
38
+ public function get_api( $data )
39
+ {
40
+ if ( $this->api_instance ) {
41
+ return $this->api_instance;
42
+ }
43
+ if ( ! class_exists( 'iContactProApi' ) ) {
44
+ require_once FL_BUILDER_DIR . 'includes/vendor/icontact/iContactProApi.php';
45
+ }
46
+
47
+ iContactProApi::getInstance()->setConfig( $data );
48
+
49
+ $this->api_instance = iContactProApi::getInstance();
50
+
51
+ return $this->api_instance;
52
+ }
53
+
54
+ /**
55
+ * Test the API connection.
56
+ *
57
+ * @since 1.10.6
58
+ * @param array $fields {
59
+ * @type string $username A valid username.
60
+ * @type string $app_id A valid app ID.
61
+ * @type string $app_password A valid app password.
62
+ * @type string $company_id A valid iContact Pro Company ID.
63
+ * @type string $profile_id A valid iContact Pro Profile ID.
64
+ * }
65
+ * @return array{
66
+ * @type bool|string $error The error message or false if no error.
67
+ * @type array $data An array of data used to make the connection.
68
+ * }
69
+ */
70
+ public function connect( $fields = array() )
71
+ {
72
+ $response = array(
73
+ 'error' => false,
74
+ 'data' => array()
75
+ );
76
+
77
+ // Make sure we have a username.
78
+ if ( ! isset( $fields['username'] ) || empty( $fields['username'] ) ) {
79
+ $response['error'] = __( 'Error: You must provide a username.', 'fl-builder' );
80
+ }
81
+ // Make sure we have an app ID.
82
+ else if ( ! isset( $fields['app_id'] ) || empty( $fields['app_id'] ) ) {
83
+ $response['error'] = __( 'Error: You must provide an app ID.', 'fl-builder' );
84
+ }
85
+ // Make sure we have an app password.
86
+ else if ( ! isset( $fields['app_password'] ) || empty( $fields['app_password'] ) ) {
87
+ $response['error'] = __( 'Error: You must provide an app password.', 'fl-builder' );
88
+ }
89
+ // Make sure we have a company ID
90
+ else if ( ! isset( $fields['company_id'] ) || empty( $fields['company_id'] ) ) {
91
+ $response['error'] = __( 'Error: You must provide a company ID.', 'fl-builder' );
92
+ }
93
+ // Make sure we have a profile ID
94
+ else if ( ! isset( $fields['profile_id'] ) || empty( $fields['profile_id'] ) ) {
95
+ $response['error'] = __( 'Error: You must provide a profile ID.', 'fl-builder' );
96
+ }
97
+ // Try to connect and store the connection data.
98
+ else {
99
+
100
+ $api = $this->get_api( array(
101
+ 'apiUsername' => $fields['username'],
102
+ 'appId' => $fields['app_id'],
103
+ 'apiPassword' => $fields['app_password'],
104
+ 'companyId' => $fields['company_id'],
105
+ 'profileId' => $fields['profile_id']
106
+ ));
107
+
108
+ try {
109
+ $api->getLists();
110
+ $response['data'] = array(
111
+ 'username' => $fields['username'],
112
+ 'app_id' => $fields['app_id'],
113
+ 'app_password' => $fields['app_password'],
114
+ 'company_id' => $fields['company_id'],
115
+ 'profile_id' => $fields['profile_id']
116
+ );
117
+ }
118
+ catch ( Exception $e ) {
119
+ $errors = $api->getErrors();
120
+ $response['error'] = sprintf( __( 'Error: Could not connect to iContact Pro. %s', 'fl-builder' ), $errors[0] );
121
+ }
122
+ }
123
+
124
+ return $response;
125
+ }
126
+
127
+ /**
128
+ * Renders the markup for the connection settings.
129
+ *
130
+ * @since 1.10.6
131
+ * @return string The connection settings markup.
132
+ */
133
+ public function render_connect_settings()
134
+ {
135
+ ob_start();
136
+
137
+ FLBuilder::render_settings_field( 'username', array(
138
+ 'row_class' => 'fl-builder-service-connect-row',
139
+ 'class' => 'fl-builder-service-connect-input',
140
+ 'type' => 'text',
141
+ 'label' => __( 'Username', 'fl-builder' ),
142
+ 'help' => __( 'Your iContact Pro username.', 'fl-builder' ),
143
+ 'preview' => array(
144
+ 'type' => 'none'
145
+ )
146
+ ));
147
+
148
+ FLBuilder::render_settings_field( 'app_id', array(
149
+ 'row_class' => 'fl-builder-service-connect-row',
150
+ 'class' => 'fl-builder-service-connect-input',
151
+ 'type' => 'text',
152
+ 'label' => __( 'App ID', 'fl-builder' ),
153
+ 'help' => __( 'Your iContact Pro app ID.', 'fl-builder' ),
154
+ 'preview' => array(
155
+ 'type' => 'none'
156
+ )
157
+ ));
158
+
159
+ FLBuilder::render_settings_field( 'app_password', array(
160
+ 'row_class' => 'fl-builder-service-connect-row',
161
+ 'class' => 'fl-builder-service-connect-input',
162
+ 'type' => 'text',
163
+ 'label' => __( 'App Password', 'fl-builder' ),
164
+ 'help' => __( 'Your iContact Pro app password.', 'fl-builder' ),
165
+ 'description' => sprintf( __( 'You must <a%1$s>create an app</a> in iContact Pro to obtain an app ID and password. Please see <a%2$s>the iContact docs</a> for complete instructions.', 'fl-builder' ), ' href="https://app.icontactpro.com/MKT/Settings/Api?returnUrl=/MKT/Settings" target="_blank"', ' href="http://www.icontact.com/developerportal/api-documentation/vocus-register-your-app/" target="_blank"' ),
166
+ 'preview' => array(
167
+ 'type' => 'none'
168
+ )
169
+ ));
170
+
171
+ FLBuilder::render_settings_field( 'company_id', array(
172
+ 'row_class' => 'fl-builder-service-connect-row',
173
+ 'class' => 'fl-builder-service-connect-input',
174
+ 'type' => 'text',
175
+ 'label' => __( 'Company ID', 'fl-builder' ),
176
+ 'help' => __( 'Your iContact Pro Company ID.', 'fl-builder' ),
177
+ 'preview' => array(
178
+ 'type' => 'none'
179
+ )
180
+ ));
181
+
182
+ FLBuilder::render_settings_field( 'profile_id', array(
183
+ 'row_class' => 'fl-builder-service-connect-row',
184
+ 'class' => 'fl-builder-service-connect-input',
185
+ 'type' => 'text',
186
+ 'label' => __( 'Profile ID', 'fl-builder' ),
187
+ 'help' => __( 'Your iContact Pro Profile ID.', 'fl-builder' ),
188
+ 'description' => sprintf( __( 'Your Company and Profile ID can also be found in the <a%1$s>iContact Pro API settings</a> under Account Information.', 'fl-builder' ), ' href="https://app.icontactpro.com/MKT/Settings/Api?returnUrl=/MKT/Settings" target="_blank"' ),
189
+ 'preview' => array(
190
+ 'type' => 'none'
191
+ )
192
+ ));
193
+
194
+ return ob_get_clean();
195
+ }
196
+
197
+ /**
198
+ * Render the markup for service specific fields.
199
+ *
200
+ * @since 1.10.6
201
+ * @param string $account The name of the saved account.
202
+ * @param object $settings Saved module settings.
203
+ * @return array {
204
+ * @type bool|string $error The error message or false if no error.
205
+ * @type string $html The field markup.
206
+ * }
207
+ */
208
+ public function render_fields( $account, $settings )
209
+ {
210
+ $account_data = $this->get_account_data( $account );
211
+ $api = $this->get_api( array(
212
+ 'apiUsername' => $account_data['username'],
213
+ 'appId' => $account_data['app_id'],
214
+ 'apiPassword' => $account_data['app_password'],
215
+ 'companyId' => $account_data['company_id'],
216
+ 'profileId' => $account_data['profile_id']
217
+ ));
218
+ $response = array(
219
+ 'error' => false,
220
+ 'html' => ''
221
+ );
222
+
223
+ try {
224
+ $lists = $api->getLists();
225
+ $response['html'] = $this->render_list_field( $lists, $settings );
226
+ }
227
+ catch ( Exception $e ) {
228
+ $errors = $api->getErrors();
229
+ $response['error'] = sprintf( __( 'Error: Could not connect to iContact Pro. %s', 'fl-builder' ), $errors[0] );
230
+ }
231
+
232
+ return $response;
233
+ }
234
+
235
+ /**
236
+ * Render markup for the list field.
237
+ *
238
+ * @since 1.10.6
239
+ * @param array $lists List data from the API.
240
+ * @param object $settings Saved module settings.
241
+ * @return string The markup for the list field.
242
+ * @access private
243
+ */
244
+ private function render_list_field( $lists, $settings )
245
+ {
246
+ ob_start();
247
+
248
+ $options = array( '' => __( 'Choose...', 'fl-builder' ) );
249
+
250
+ foreach ( $lists as $id => $list ) {
251
+ $options[ $list->listId ] = $list->name;
252
+ }
253
+
254
+ FLBuilder::render_settings_field( 'list_id', array(
255
+ 'row_class' => 'fl-builder-service-field-row',
256
+ 'class' => 'fl-builder-service-list-select',
257
+ 'type' => 'select',
258
+ 'label' => _x( 'List', 'An email list from a third party provider.', 'fl-builder' ),
259
+ 'options' => $options,
260
+ 'preview' => array(
261
+ 'type' => 'none'
262
+ )
263
+ ), $settings);
264
+
265
+ return ob_get_clean();
266
+ }
267
+
268
+ /**
269
+ * Subscribe an email address to iContact.
270
+ *
271
+ * @since 1.10.6
272
+ * @param object $settings A module settings object.
273
+ * @param string $email The email to subscribe.
274
+ * @param string $name Optional. The full name of the person subscribing.
275
+ * @return array {
276
+ * @type bool|string $error The error message or false if no error.
277
+ * }
278
+ */
279
+ public function subscribe( $settings, $email, $name = false )
280
+ {
281
+ $account_data = $this->get_account_data( $settings->service_account );
282
+ $response = array( 'error' => false );
283
+
284
+ if ( ! $account_data ) {
285
+ $response['error'] = __( 'There was an error subscribing to iContact. The account is no longer connected.', 'fl-builder' );
286
+ }
287
+ else {
288
+
289
+ $data = array( 'email' => $email );
290
+ $api = $this->get_api( array(
291
+ 'apiUsername' => $account_data['username'],
292
+ 'appId' => $account_data['app_id'],
293
+ 'apiPassword' => $account_data['app_password'],
294
+ 'companyId' => $account_data['company_id'],
295
+ 'profileId' => $account_data['profile_id']
296
+ ));
297
+
298
+ try {
299
+
300
+ if ( $name ) {
301
+
302
+ $names = explode( ' ', $name );
303
+ $data['first_name'] = null;
304
+ $data['last_name'] = null;
305
+
306
+ if ( isset( $names[0] ) ) {
307
+ $data['first_name'] = $names[0];
308
+ }
309
+ if ( isset( $names[1] ) ) {
310
+ $data['last_name'] = $names[1];
311
+ }
312
+
313
+ $result = $api->addContact( $data['email'], 'normal', null, $data['first_name'], $data['last_name'] );
314
+ }
315
+ else {
316
+ $result = $api->addContact( $data['email'] );
317
+ }
318
+
319
+ $api->subscribeContactToList( $result->contactId, $settings->list_id );
320
+ }
321
+ catch ( Exception $e ) {
322
+ $errors = $api->getErrors();
323
+ $response['error'] = sprintf( __( 'There was an error subscribing to iContact Pro. %s', 'fl-builder' ), $errors[0] );
324
+ }
325
+ }
326
+
327
+ return $response;
328
+ }
329
+ }
classes/class-fl-builder-services.php CHANGED
@@ -65,6 +65,11 @@ final class FLBuilderServices {
65
  'name' => 'GetResponse',
66
  'class' => 'FLBuilderServiceGetResponse'
67
  ),
 
 
 
 
 
68
  'hatchbuck' => array(
69
  'type' => 'autoresponder',
70
  'name' => 'Hatchbuck',
@@ -75,6 +80,11 @@ final class FLBuilderServices {
75
  'name' => 'iContact',
76
  'class' => 'FLBuilderServiceIContact'
77
  ),
 
 
 
 
 
78
  'infusionsoft' => array(
79
  'type' => 'autoresponder',
80
  'name' => 'Infusionsoft',
65
  'name' => 'GetResponse',
66
  'class' => 'FLBuilderServiceGetResponse'
67
  ),
68
+ 'godaddy-email-marketing' => array(
69
+ 'type' => 'autoresponder',
70
+ 'name' => 'GoDaddy Email Marketing',
71
+ 'class' => 'FLBuilderServiceGoDaddyEmailMarketing'
72
+ ),
73
  'hatchbuck' => array(
74
  'type' => 'autoresponder',
75
  'name' => 'Hatchbuck',
80
  'name' => 'iContact',
81
  'class' => 'FLBuilderServiceIContact'
82
  ),
83
+ 'icontact-pro' => array(
84
+ 'type' => 'autoresponder',
85
+ 'name' => 'iContact Pro',
86
+ 'class' => 'FLBuilderServiceIContactPro'
87
+ ),
88
  'infusionsoft' => array(
89
  'type' => 'autoresponder',
90
  'name' => 'Infusionsoft',
classes/class-fl-builder-wpcli-command.php CHANGED
@@ -9,10 +9,13 @@ class FLbuilder_WPCLI_Command extends WP_CLI_Command {
9
  * Deletes preview, draft and live CSS/JS asset cache for all posts.
10
  *
11
  * ## OPTIONS
12
- *
13
  * [--network]
14
  * Clears the page builder cache for all sites on a network.
15
  *
 
 
 
16
  * ## EXAMPLES
17
  *
18
  * 1. wp beaver clearcache
@@ -20,15 +23,25 @@ class FLbuilder_WPCLI_Command extends WP_CLI_Command {
20
  * 2. wp beaver clearcache --network
21
  * - Clears the page builder cache for all the posts on a network.
22
  */
23
- public function clearcache( $args, $assoc_args )
24
- {
25
 
26
  $network = false;
 
27
 
28
  if ( isset( $assoc_args['network'] ) && $assoc_args['network'] == true && is_multisite() ) {
29
  $network = true;
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
32
  if ( class_exists( 'FLBuilderModel' ) ) {
33
 
34
  if ( $network == true ) {
@@ -49,19 +62,23 @@ class FLbuilder_WPCLI_Command extends WP_CLI_Command {
49
  $blog_id = $blog['blog_id'];
50
  switch_to_blog( $blog_id );
51
  FLBuilderModel::delete_asset_cache_for_all_posts();
52
- WP_CLI::success( "Cleared the page builder cache for blog " . get_option( 'home' ) );
 
 
 
 
53
  restore_current_blog();
54
  }
55
-
56
  } else {
57
  FLBuilderModel::delete_asset_cache_for_all_posts();
58
- WP_CLI::success( "Cleared the page builder cache" );
 
 
 
 
59
  }
60
-
61
- }
62
-
63
  }
64
-
65
  }
66
 
67
  WP_CLI::add_command( 'beaver', 'FLbuilder_WPCLI_Command' );
9
  * Deletes preview, draft and live CSS/JS asset cache for all posts.
10
  *
11
  * ## OPTIONS
12
+ *
13
  * [--network]
14
  * Clears the page builder cache for all sites on a network.
15
  *
16
+ * [--all]
17
+ * Clears plugin and bb-theme cache.
18
+ *
19
  * ## EXAMPLES
20
  *
21
  * 1. wp beaver clearcache
23
  * 2. wp beaver clearcache --network
24
  * - Clears the page builder cache for all the posts on a network.
25
  */
26
+ public function clearcache( $args, $assoc_args ) {
 
27
 
28
  $network = false;
29
+ $all = false;
30
 
31
  if ( isset( $assoc_args['network'] ) && $assoc_args['network'] == true && is_multisite() ) {
32
  $network = true;
33
  }
34
 
35
+ if ( isset( $assoc_args['all'] ) ) {
36
+
37
+ // make sure theme functions are loaded.
38
+ if ( class_exists( 'FLCustomizer' ) ) {
39
+ $all = true;
40
+ } else {
41
+ WP_CLI::error( __( '--all switch used but bb-theme is not active. If using multisite bb-theme must be active on the root site.', 'fl-builder' ) );
42
+ }
43
+ }
44
+
45
  if ( class_exists( 'FLBuilderModel' ) ) {
46
 
47
  if ( $network == true ) {
62
  $blog_id = $blog['blog_id'];
63
  switch_to_blog( $blog_id );
64
  FLBuilderModel::delete_asset_cache_for_all_posts();
65
+ WP_CLI::success( sprintf( _x( 'Cleared the page builder cache for blog %s', 'current blog name', 'fl-builder' ), get_option( 'home' ) ) );
66
+ if ( $all ) {
67
+ FLCustomizer::refresh_css();
68
+ WP_CLI::success( sprintf( _x( 'Rebuilt the theme cache for blog %s', 'current blog name', 'fl-builder' ), get_option( 'home' ) ) );
69
+ }
70
  restore_current_blog();
71
  }
 
72
  } else {
73
  FLBuilderModel::delete_asset_cache_for_all_posts();
74
+ WP_CLI::success( __( 'Cleared the page builder cache', 'fl-builder' ) );
75
+ if ( $all ) {
76
+ FLCustomizer::refresh_css();
77
+ WP_CLI::success( __( 'Rebuilt the theme cache', 'fl-builder' ) );
78
+ }
79
  }
80
+ }// End if().
 
 
81
  }
 
82
  }
83
 
84
  WP_CLI::add_command( 'beaver', 'FLbuilder_WPCLI_Command' );
classes/class-fl-builder.php CHANGED
@@ -1949,6 +1949,9 @@ final class FLBuilder {
1949
  $assets .= '<script class="fl-builder-settings-js" src="'. $module->url .'js/settings.js"></script>';
1950
  }
1951
 
 
 
 
1952
  // Render the form.
1953
  $rendered_settings = self::render_settings(array(
1954
  'class' => 'fl-builder-module-settings fl-builder-'. $type .'-settings',
@@ -2011,7 +2014,6 @@ final class FLBuilder {
2011
  'fl-node-' . $module->node
2012
  ),
2013
  'data-node' => $module->node,
2014
- 'data-animation-delay' => $module->settings->animation_delay
2015
  );
2016
 
2017
  // Classes
@@ -2020,6 +2022,7 @@ final class FLBuilder {
2020
  }
2021
  if ( ! empty( $module->settings->animation ) ) {
2022
  $attrs['class'][] = 'fl-animation fl-' . $module->settings->animation;
 
2023
  }
2024
  if ( ! empty( $custom_class ) ) {
2025
  $attrs['class'][] = trim( esc_attr( $custom_class ) );
1949
  $assets .= '<script class="fl-builder-settings-js" src="'. $module->url .'js/settings.js"></script>';
1950
  }
1951
 
1952
+ // Allow developers to hook in from a plugin and add further assets
1953
+ $assets = apply_filters( 'fl_builder_render_module_settings_assets', $assets, $module );
1954
+
1955
  // Render the form.
1956
  $rendered_settings = self::render_settings(array(
1957
  'class' => 'fl-builder-module-settings fl-builder-'. $type .'-settings',
2014
  'fl-node-' . $module->node
2015
  ),
2016
  'data-node' => $module->node,
 
2017
  );
2018
 
2019
  // Classes
2022
  }
2023
  if ( ! empty( $module->settings->animation ) ) {
2024
  $attrs['class'][] = 'fl-animation fl-' . $module->settings->animation;
2025
+ $attrs['data-animation-delay'][] = $module->settings->animation_delay;
2026
  }
2027
  if ( ! empty( $custom_class ) ) {
2028
  $attrs['class'][] = trim( esc_attr( $custom_class ) );
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 1.10.5.1
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
9
  * Copyright: (c) 2014 Beaver Builder
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 1.10.6.3
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
9
  * Copyright: (c) 2014 Beaver Builder
includes/compatibility.php CHANGED
@@ -176,3 +176,30 @@ function fl_before_sortable_enqueue_callback() {
176
  }
177
  }
178
  add_action( 'fl_before_sortable_enqueue', 'fl_before_sortable_enqueue_callback' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  }
177
  }
178
  add_action( 'fl_before_sortable_enqueue', 'fl_before_sortable_enqueue_callback' );
179
+
180
+ /**
181
+ * Try to unserialize data normally.
182
+ * Uses a preg_callback to fix broken data caused by serialized data that has broken offsets.
183
+ *
184
+ * @since 1.10.6
185
+ * @param string $data unserialized string
186
+ * @return array
187
+ */
188
+ function fl_maybe_fix_unserialize( $data ) {
189
+ // @codingStandardsIgnoreStart
190
+ $unserialized = @unserialize( $data );
191
+ // @codingStandardsIgnoreEnd
192
+ if( ! $unserialized ) {
193
+ $unserialized = unserialize( preg_replace_callback( '!s:(\d+):"(.*?)";!', 'fl_maybe_fix_unserialize_callback', $data ) );
194
+ }
195
+ return $unserialized;
196
+ }
197
+
198
+ /**
199
+ * Callback function for fl_maybe_fix_unserialize()
200
+ *
201
+ * @since 1.10.6
202
+ */
203
+ function fl_maybe_fix_unserialize_callback( $match ) {
204
+ return ($match[1] == strlen($match[2])) ? $match[0] : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
205
+ }
includes/updater-config.php CHANGED
@@ -3,7 +3,7 @@
3
  if(class_exists('FLUpdater')) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
- 'version' => '1.10.5.1',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
3
  if(class_exists('FLUpdater')) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
+ 'version' => '1.10.6.3',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
includes/vendor/godaddy-email-marketing/class-godaddy-em.php ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * GoDaddy Email Marketing Dispatcher.
5
+ *
6
+ * A modified version from GoDaddy Email Marketing plugin
7
+ * (https://wordpress.org/plugins/godaddy-email-marketing-sign-up-forms/)
8
+ *
9
+ * @since 1.0
10
+ */
11
+ class GoDaddyEM {
12
+
13
+ /**
14
+ * API Credentials
15
+ * @var string
16
+ */
17
+ private static $api_username;
18
+ private static $api_key;
19
+
20
+ /**
21
+ * Base API URI
22
+ */
23
+ private static $api_base_url = 'https://gem.godaddy.com/';
24
+
25
+ /**
26
+ * HTTP response codes
27
+ *
28
+ * @var array
29
+ */
30
+ private static $ok_codes = array( 200, 304 );
31
+
32
+ /**
33
+ * Constructor
34
+ *
35
+ * @param string $email The username.
36
+ * @param string $api_key The API key.
37
+ */
38
+ public function __construct($username, $api_key) {
39
+
40
+ self::$api_username = $username;
41
+ self::$api_key = $api_key;
42
+ }
43
+
44
+ /**
45
+ * Gets and sets the forms.
46
+ *
47
+ * @param string $username The username.
48
+ * @param string $api_key
49
+ *
50
+ * @return string $api_key The API key.
51
+ */
52
+ public static function fetch_forms( $username = '', $api_key = '' ) {
53
+ if ( ! $username && ! $api_key ) {
54
+ $username = self::$api_username;
55
+ $api_key = self::$api_key;
56
+ }
57
+
58
+ if ( ! $username || ! $api_key ) {
59
+ return false;
60
+ }
61
+
62
+ $auth = array(
63
+ 'username' => $username,
64
+ 'api_key' => $api_key,
65
+ );
66
+
67
+ // Prepare the URL that includes our credentials.
68
+ $response = wp_remote_get( self::get_method_url( 'forms', false, $auth ), array(
69
+ 'timeout' => 10,
70
+ ) );
71
+
72
+ // Credentials are incorrect.
73
+ if ( ! in_array( wp_remote_retrieve_response_code( $response ), self::$ok_codes, true ) ) {
74
+ return false;
75
+ }
76
+
77
+ $data = json_decode( wp_remote_retrieve_body( $response ) );
78
+
79
+ return $data;
80
+ }
81
+
82
+ /**
83
+ * Gets the forms.
84
+ *
85
+ * @return array|false The form fields array or false.
86
+ */
87
+ public static function get_forms() {
88
+
89
+ if ( ! self::$api_username ) {
90
+ return false;
91
+ }
92
+
93
+ $data = self::fetch_forms();
94
+
95
+ return $data;
96
+ }
97
+
98
+ /**
99
+ * Gets and sets the form fields.
100
+ *
101
+ * @param string $form_id Form ID.
102
+ * @return false|object The form fields JSON object or false.
103
+ */
104
+ public static function get_fields( $form_id ) {
105
+
106
+ // Fields are not cached. fetch and cache.
107
+ $response = wp_remote_get( self::get_method_url( 'fields', array(
108
+ 'id' => $form_id,
109
+ ) ) );
110
+
111
+ // Was there an error, connection is down? bail and try again later.
112
+ if ( ! self::is_response_ok( $response ) ) {
113
+ return false;
114
+ }
115
+
116
+ $data = json_decode( wp_remote_retrieve_body( $response ) );
117
+
118
+ return $data;
119
+ }
120
+
121
+ /**
122
+ * Return the API base URL.
123
+ *
124
+ * @param string $path (optional)
125
+ *
126
+ * @return string
127
+ */
128
+ public static function get_api_base_url( $path = '' ) {
129
+
130
+ return self::$api_base_url . $path;
131
+ }
132
+
133
+ /**
134
+ * Utility function for getting a URL for various API methods
135
+ *
136
+ * @param string $method The short of the API method.
137
+ * @param array $params Extra parameters to pass on with the request.
138
+ * @param bool $auth Autentication array including API key and username.
139
+ *
140
+ * @return string The final URL to use for the request
141
+ */
142
+ public static function get_method_url( $method, $params = array(), $auth = false ) {
143
+ $auth = $auth ? $auth : array(
144
+ 'username' => self::$api_username,
145
+ 'api_key' => self::$api_key
146
+ );
147
+
148
+ $path = '';
149
+
150
+ switch ( $method ) {
151
+
152
+ case 'forms' :
153
+ $path = add_query_arg( $auth, 'signups.json' );
154
+ break;
155
+ case 'fields' :
156
+ $path = add_query_arg( $auth, 'signups/' . $params['id'] . '.json' );
157
+ break;
158
+ case 'account' :
159
+ $path = add_query_arg( $auth, 'user/account_status' );
160
+ break;
161
+ }
162
+
163
+ return self::get_api_base_url( $path );
164
+ }
165
+
166
+ /**
167
+ * Check for an OK response.
168
+ *
169
+ * @param array $request HTTP response by reference.
170
+ * @return bool
171
+ */
172
+ public static function is_response_ok( $request ) {
173
+ return ( ! is_wp_error( $request ) && in_array( wp_remote_retrieve_response_code( $request ), self::$ok_codes, true ) );
174
+ }
175
+
176
+ /**
177
+ * Check if an account exists from GoDaddy
178
+ *
179
+ * @return bool
180
+ */
181
+ public static function is_account_ok() {
182
+ // Request account details
183
+ $response = wp_remote_get( self::get_method_url( 'account' ) );
184
+
185
+ // Was there an error, connection is down? bail and try again later.
186
+ if ( ! self::is_response_ok( $response ) ) {
187
+ return false;
188
+ }
189
+
190
+ return true;
191
+ }
192
+
193
+ /**
194
+ * Add new subscriber
195
+ *
196
+ * @param array $data An array of subscriber data
197
+ */
198
+ public static function add_subscriber( $data ) {
199
+ if ( empty( $data ) ) {
200
+ return false;
201
+ }
202
+
203
+ if ( ! self::$api_username || ! self::$api_key ) {
204
+ return false;
205
+ }
206
+
207
+ if ( isset( $data[ 'form_id' ] ) && isset( $data[ 'email' ] ) ) {
208
+ $form = self::get_fields( $data[ 'form_id' ] );
209
+
210
+ $submit_data = array(
211
+ 'username' => self::$api_username,
212
+ 'api_key' => self::$api_key,
213
+ 'integration' => 'WordPress',
214
+ 'signup[email]' => $data['email']
215
+ );
216
+
217
+ if ( $data[ 'first_name' ] ) {
218
+ $submit_data[ 'signup[first_name]' ] = $data['first_name'];
219
+ }
220
+
221
+ if ( $data[ 'last_name' ] ) {
222
+ $submit_data[ 'signup[last_name]' ] = $data['last_name'];
223
+ }
224
+
225
+ // Prepare the URL that includes our credentials.
226
+ $response = wp_remote_post( $form->submit, array(
227
+ 'method' => 'POST',
228
+ 'timeout' => 10,
229
+ 'body' => $submit_data
230
+ ) );
231
+
232
+ // Credentials are correct.
233
+ if ( self::is_response_ok( $response ) ) {
234
+ return true;
235
+ }
236
+ }
237
+
238
+ return false;
239
+ }
240
+ }
includes/vendor/icontact/iContactProApi.php ADDED
@@ -0,0 +1,1034 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @name iContactProApi
4
+ * @package iContactPro
5
+ * @author iContact <www.icontact.com>
6
+ * @description This class is a wrapper for the iContactPro API.
7
+ * It makes integrating iContactPro into your app as simple as
8
+ * calling a method.
9
+ * @version 2.0
10
+ **/
11
+ class iContactProApi {
12
+
13
+ //////////////////////////////////////////////////////////////////////////////
14
+ /// Properties //////////////////////////////////////////////////////////////
15
+ ////////////////////////////////////////////////////////////////////////////
16
+
17
+ protected static $oInstance = null; // This holds the instance of this class
18
+ protected $iCompanyId = null; // This holds the company ID
19
+ protected $iProfileId = null; // This holds the profile ID
20
+ protected $aConfig = array(); // This is our array for pragmatically overriding configuration constants
21
+ protected $aErrors = array(); // This holds the errors encountered with the iContactPro API
22
+ protected $sLastRequest = null; // This holds the last request JSON
23
+ protected $sLastResponse = null; // This holds the last response JSON
24
+ protected $sRequestUri = null; // This stores the last used URL
25
+ protected $aSearchParameters = array(); // This is our container for search params
26
+ protected $iTotal = 0; // If the results return a total, it will be stored here
27
+ protected $aWarnings = array(); // This holds the warnings encountered with the iContactPro API
28
+
29
+ //////////////////////////////////////////////////////////////////////////////
30
+ /// Singleton ///////////////////////////////////////////////////////////////
31
+ ////////////////////////////////////////////////////////////////////////////
32
+
33
+ /**
34
+ * This sets the singleton pattern instance
35
+ * @static
36
+ * @access public
37
+ * @param iContactProApi $oInstance Instance to set to
38
+ * @return iContactProApi $this
39
+ **/
40
+ public static function setInstance($oInstance) {
41
+
42
+ self::$oInstance = $oInstance;
43
+ // Return instance of class
44
+ return self::$oInstance;
45
+ }
46
+
47
+ /**
48
+ * This gets the singleton instance
49
+ * @static
50
+ * @access public
51
+ * @return iContactProApi $this
52
+ **/
53
+ public static function getInstance() {
54
+ // Check to see if an instance has already
55
+ // been created
56
+ if (is_null(self::$oInstance)) {
57
+ // If not, return a new instance
58
+ self::$oInstance = new self();
59
+ return self::$oInstance;
60
+ } else {
61
+ // If so, return the previously created
62
+ // instance
63
+ return self::$oInstance;
64
+ }
65
+ }
66
+
67
+ /**
68
+ * This resets the singleton instance to null
69
+ * @static
70
+ * @access public
71
+ * @return void
72
+ **/
73
+ public static function resetInstance() {
74
+ // Reset the instance
75
+ self::$oInstance = null;
76
+ }
77
+
78
+ //////////////////////////////////////////////////////////////////////////////
79
+ /// Constructor /////////////////////////////////////////////////////////////
80
+ ////////////////////////////////////////////////////////////////////////////
81
+
82
+ /**
83
+ * This is our constuctor and simply checks for
84
+ * defined constants and configuration values and
85
+ * then builds the configuration from that
86
+ * @access protected
87
+ * @return iContactProApi $this
88
+ **/
89
+ protected function __construct() {
90
+ // Check for constants
91
+ $aConstantMap = array(
92
+ // 'ICP_APIVERSION',
93
+ 'ICP_APPID' => 'appId',
94
+ // 'ICP_APIURL',
95
+ 'ICP_APIUSERNAME' => 'apiUsername',
96
+ 'ICP_APIPASSWORD' => 'apiPassword',
97
+ 'ICP_COMPANYID' => 'companyId',
98
+ 'ICP_PROFILEID' => 'profileId'
99
+ );
100
+ // Loop through the map
101
+ foreach ($aConstantMap as $sConstant => $sConfigKey) {
102
+ // Check for the defined constant
103
+ if (defined($sConstant)) {
104
+ // Set the configuration key to the contant's value
105
+ $this->aConfig[$sConfigKey] = constant($sConstant);
106
+ }
107
+ }
108
+ // Return instance
109
+ return $this;
110
+ }
111
+
112
+ //////////////////////////////////////////////////////////////////////////////
113
+ /// Public //////////////////////////////////////////////////////////////////
114
+ ////////////////////////////////////////////////////////////////////////////
115
+
116
+ /**
117
+ * This method adds a contact to your iContactPro account
118
+ * @access public
119
+ * @param string $sEmail
120
+ * @param string [$sStatus]
121
+ * @param string [$sPrefix]
122
+ * @param string [$sFirstName]
123
+ * @param string [$sLastName]
124
+ * @param string [$sSuffix]
125
+ * @param string [$sStreet]
126
+ * @param string [$sStreet2]
127
+ * @param string [$sCity]
128
+ * @param string [$sState]
129
+ * @param string [$sPostalCode]
130
+ * @param string [$sPhone]
131
+ * @param string [$sFax]
132
+ * @param string [$sBusiness]
133
+ *
134
+ * @return object
135
+ **/
136
+ public function addContact($sEmail, $sStatus = 'normal', $sPrefix = null, $sFirstName = null, $sLastName = null, $sSuffix = null, $sStreet = null, $sStreet2 = null, $sCity = null, $sState = null, $sPostalCode = null, $sPhone = null, $sFax = null, $sBusiness = null) {
137
+ // Valid statuses
138
+ $aValidStatuses = array('normal', 'bounced', 'donotcontact', 'pending', 'invitable', 'deleted');
139
+ // Contact placeholder
140
+ $aContact = array(
141
+ 'email' => $sEmail
142
+ );
143
+ // Check for a prefix
144
+ if (!empty($sPrefix)) {
145
+ // Add the new prefix
146
+ $aContact['prefix'] = (string) $sPrefix;
147
+ }
148
+ // Check for a first name
149
+ if (!empty($sFirstName)) {
150
+ // Add the new first name
151
+ $aContact['firstName'] = (string) $sFirstName;
152
+ }
153
+ // Check for a last name
154
+ if (!empty($sLastName)) {
155
+ // Add the new last name
156
+ $aContact['lastName'] = (string) $sLastName;
157
+ }
158
+ // Check for a suffix
159
+ if (!empty($sSuffix)) {
160
+ // Add the new suffix
161
+ $aContact['suffix'] = (string) $sSuffix;
162
+ }
163
+ // Check for a street
164
+ if (!empty($sStreet)) {
165
+ // Add the new street
166
+ $aContact['street'] = (string) $sStreet;
167
+ }
168
+ // Check for a street2
169
+ if (!empty($sStreet2)) {
170
+ // Add the new street 2
171
+ $aContact['street2'] = (string) $sStreet2;
172
+ }
173
+ // Check for a city
174
+ if (!empty($sCity)) {
175
+ // Add the new city
176
+ $aContact['city'] = (string) $sCity;
177
+ }
178
+ // Check for a state
179
+ if (!empty($sState)) {
180
+ // Add the new state
181
+ $aContact['state'] = (string) $sState;
182
+ }
183
+ // Check for a postal code
184
+ if (!empty($sPostalCode)) {
185
+ // Add the new postal code
186
+ $aContact['postalCode'] = (string) $sPostalCode;
187
+ }
188
+ // Check for a phone number
189
+ if (!empty($sPhone)) {
190
+ // Add the new phone number
191
+ $aContact['phone'] = (string) $sPhone;
192
+ }
193
+ // Check for a fax number
194
+ if (!empty($sFax)) {
195
+ // Add the new fax number
196
+ $aContact['fax'] = (string) $sFax;
197
+ }
198
+ // Check for a business name
199
+ if (!empty($sBusiness)) {
200
+ // Add the new business
201
+ $aContact['business'] = (string) $sBusiness;
202
+ }
203
+ // Check for a valid status
204
+ if (!empty($sStatus) && in_array($sStatus, $aValidStatuses)) {
205
+ // Add the new status
206
+ $aContact['status'] = $sStatus;
207
+ } else {
208
+ $aContact['status'] = 'normal';
209
+ }
210
+
211
+ // Make the call
212
+ //echo("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/contacts");
213
+ $aContacts = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/contacts", 'POST', array($aContact), 'contacts');
214
+ // Return the contact
215
+ return $aContacts[0];
216
+ }
217
+
218
+ /**
219
+ * This method adds a custom field or "term"
220
+ * to the array of search parameters
221
+ * @access public
222
+ * @param string $sName
223
+ * @param string $sValue
224
+ * @return iContactProApi $this
225
+ **/
226
+ public function addCustomQueryField($sName, $sValue) {
227
+ // Add the field
228
+ $this->aSearchParameters[$sName] = (string) $sValue;
229
+ // Return instance
230
+ return $this;
231
+ }
232
+
233
+ /**
234
+ * This message adds a list to your iContactPro account
235
+ * @access public
236
+ * @param string $sName
237
+ * @param integer $iWelcomeMessageId
238
+ * @param bool [$bEmailOwnerOnChange]
239
+ * @param bool [$bWelcomeOnManualAdd]
240
+ * @param bool [$bWelcomeOnSignupAdd]
241
+ * @param string [$sDescription]
242
+ * @param string [$sPublicName]
243
+ * @return object
244
+ **/
245
+ public function addList($sName, $iWelcomeMessageId, $bEmailOwnerOnChange = true, $bWelcomeOnManualAdd = false, $bWelcomeOnSignupAdd = false, $sDescription = null, $sPublicName = null) {
246
+ // Setup the list
247
+ $aList = array(
248
+ 'name' => $sName,
249
+ 'welcomeMessageId' => $iWelcomeMessageId,
250
+ 'emailOwnerOnChange' => intval($bEmailOwnerOnChange),
251
+ 'welcomeOnManualAdd' => intval($bWelcomeOnManualAdd),
252
+ 'welcomeOnSignupAdd' => intval($bWelcomeOnSignupAdd),
253
+ 'description' => $sDescription,
254
+ 'publicname' => $sPublicName
255
+ );
256
+ // Make the call
257
+ $aLists = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/lists", 'POST', array($aList), 'lists');
258
+ // Return the list
259
+ return $aLists[0];
260
+ }
261
+
262
+ /**
263
+ * This method adds a message to
264
+ * your iContactPro API account
265
+ * @access public
266
+ * @param string $sSubject
267
+ * @param integer $iCampaignId
268
+ * @param string [$sHtmlBody]
269
+ * @param string [$sTextBody]
270
+ * @param string [$sMessageName]
271
+ * @param integer [$iListId]
272
+ * @param string [$sMessageType]
273
+ * @return object
274
+ **/
275
+ public function addMessage($sSubject, $iCampaignId, $sHtmlBody = null, $sTextBody = null, $sMessageName = null, $iListId = null, $sMessageType = 'normal') {
276
+ // Valid message types
277
+ $aValidMessageTypes = array('normal', 'autoresponder', 'welcome', 'confirmation');
278
+ // Setup the message data
279
+ $aMessage = array(
280
+ 'campaignId' => $iCampaignId,
281
+ 'htmlBody' => $sHtmlBody,
282
+ 'messageName' => $sMessageName,
283
+ 'messageType' => (in_array($sMessageType, $aValidMessageTypes) ? $sMessageType : 'normal'),
284
+ 'subject' => $sSubject,
285
+ 'textBody' => $sTextBody
286
+ );
287
+ // Add the message
288
+ $aNewMessage = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/messages", 'POST', array($aMessage), 'messages');
289
+ // Return the message data
290
+ return $aNewMessage[0];
291
+ }
292
+
293
+ /**
294
+ * This method adds a field to the order by
295
+ * key in the search parameters array
296
+ * @access public
297
+ * @param string $sField
298
+ * @param string [$sDirection]
299
+ * @return iContactProApi $this
300
+ **/
301
+ public function addOrderBy($sField, $sDirection = null) {
302
+ // Check for existing order by parameters
303
+ if (empty($this->aSearchParameters['orderby'])) {
304
+ // Check for a direction
305
+ if (empty($sDirection)) {
306
+ // Add just the field
307
+ $this->aSearchParameters['orderby'] = (string) $sField;
308
+ } else {
309
+ // Add the field and direction
310
+ $this->aSearchParameters['orderby'] = (string) "{$sField}:{$sDirection}";
311
+ }
312
+ } else {
313
+ // Check for a direction
314
+ if (empty($sDirection)) {
315
+ // Append just the field
316
+ $this->aSearchParameters['orderby'] .= (string) ",{$sField}";
317
+ } else {
318
+ // Append the field and direction
319
+ $this->aSearchParameters['orderby'] .= (string) ",{$sField}:{$sDirection}";
320
+ }
321
+ }
322
+ // Return failure
323
+ return false;
324
+ }
325
+
326
+ /**
327
+ * This method handles the deleting of a single list
328
+ * @access public
329
+ * @param integer $iListId
330
+ * @return bool
331
+ **/
332
+ public function deleteList($iListId) {
333
+ // Delete the list
334
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/lists/{$iListId}", 'delete');
335
+ }
336
+
337
+ /**
338
+ * This method handles the handshaking between this app and the iContactPro API
339
+ * @access public
340
+ * @param string $sResource
341
+ * @param string $sMethod
342
+ * @param string $sReturnKey
343
+ * @param mixed $mPostData Array, object, or string
344
+ * @return array|object
345
+ **/
346
+ public function makeCall($sResource, $sMethod = 'GET', $mPostData = null, $sReturnKey = null) {
347
+ // List of needed constants
348
+ $aRequiredConfigs = array('apiPassword', 'apiUsername', 'appId', 'companyId', 'profileId');
349
+
350
+ foreach ($aRequiredConfigs as $sKey) {
351
+ if (empty($this->aConfig[$sKey])) {
352
+ $this->addError("{$sKey} is undefined.");
353
+ }
354
+ }
355
+
356
+ $sApiUrl = (string) "{$this->getUrl()}{$sResource}";
357
+ $rHandle = curl_init();
358
+ curl_setopt($rHandle, CURLOPT_HTTPHEADER, $this->getHeaders());
359
+ curl_setopt($rHandle, CURLOPT_RETURNTRANSFER, true);
360
+ if (defined('ICP_NOVERIFY') && constant('ICP_NOVERIFY')) {
361
+ // conditionally disable SSL certificate verification
362
+ curl_setopt($rHandle, CURLOPT_SSL_VERIFYPEER, false);
363
+ }
364
+ // Determine the request
365
+ // method we are using
366
+ switch (strtoupper($sMethod)) {
367
+ // Deleting data
368
+ case 'DELETE' :
369
+ curl_setopt($rHandle, CURLOPT_CUSTOMREQUEST, 'DELETE');
370
+ break;
371
+ // Recieving data
372
+ case 'GET' :
373
+ if (!empty($this->aSearchParameters)) {
374
+ $sApiUrl .= (string) '?'.http_build_query($this->aSearchParameters);
375
+ }
376
+ break;
377
+ // Sending data
378
+ case 'POST' :
379
+ if (empty($mPostData)) {
380
+ $this->addError('No POST data was provided.');
381
+ } else {
382
+ curl_setopt($rHandle, CURLOPT_POST, true);
383
+ curl_setopt($rHandle, CURLOPT_POSTFIELDS, json_encode($mPostData));
384
+ $this->sLastRequest = (string) json_encode($mPostData);
385
+ }
386
+ break;
387
+ // Uploading data
388
+ case 'PUT' :
389
+ if (empty($mPostData)) {
390
+ $this->addError('No file or data specified for PUT request');
391
+ } elseif (!is_string($mPostData) || !file_exists($mPostData)) {
392
+ // Not a file, so we assume this is just data
393
+ curl_setopt($rHandle, CURLOPT_CUSTOMREQUEST, "PUT");
394
+ curl_setopt($rHandle, CURLOPT_POSTFIELDS, $mPostData);
395
+ } else {
396
+ $rFileContentHandle = fopen($mPostData, 'r');
397
+ if ($rFileContentHandle === false) {
398
+ $this->addError('A non-existant file was specified for POST data, or the file could not be opened.');
399
+ } else {
400
+ // Found a file, so upload its contents
401
+ curl_setopt($rHandle, CURLOPT_PUT, true);
402
+ curl_setopt($rHandle, CURLOPT_INFILE, $rFileContentHandle);
403
+ }
404
+ }
405
+ break;
406
+ }
407
+ // Store the URL into the instance
408
+ $this->sRequestUri = (string) $sApiUrl;
409
+ // Give our handle a URL
410
+ curl_setopt($rHandle, CURLOPT_URL, $sApiUrl);
411
+ // Try to execute the handle
412
+ if (!$sResponse = curl_exec($rHandle)) {
413
+ // Add an error, for we could
414
+ // not even execute the handle
415
+ $this->addError('We were unable to execute the cURL handle.');
416
+ }
417
+ // Set the response JSON
418
+ $this->sLastResponse = (string) $sResponse;
419
+ // Try to decode the response
420
+ if ((!$aResponse = json_decode($sResponse)) && (strtoupper($sMethod) != 'DELETE')) {
421
+ // Add an error, for the API
422
+ // did not return valid JSON
423
+ $this->addError('The iContactPro API did not return valid JSON.');
424
+ }
425
+ curl_close($rHandle);
426
+ // Check for errors from the API
427
+ if (!empty($aResponse->errors)) {
428
+ // Loop through the errors
429
+ foreach ($aResponse->errors as $sError) {
430
+ // Add the error
431
+ $this->addError($sError, 1);
432
+ }
433
+ }
434
+ // Check for warnings from the API
435
+ if (!empty($aResponse->warnings)) {
436
+ // Loop through the warnings
437
+ foreach ($aResponse->warnings as $sWarning) {
438
+ // Add the warning
439
+ $this->addWarning($sWarning);
440
+ }
441
+ }
442
+ // Check for set errors
443
+ if (!empty($this->aErrors)) {
444
+ throw new Exception('Errors have occurred and the system cannot continue. Use getErrors() for details.');
445
+ }
446
+ // Check for a total
447
+ if (!empty($aResponse->total)) {
448
+ $this->iTotal = (integer) $aResponse->total;
449
+ }
450
+ // Return the response
451
+ if (strtoupper($sMethod) == 'DELETE') {
452
+ return true;
453
+ } elseif (empty($sReturnKey)) {
454
+ return $aResponse;
455
+ } else {
456
+ // Return the narrowed resposne
457
+ return $aResponse->$sReturnKey;
458
+ }
459
+ }
460
+
461
+ /**
462
+ * This method sends a message
463
+ * @access public
464
+ * @param string $sIncludeListId
465
+ * @param integer $iMessageId
466
+ * @param string [$sExcludeListIds]
467
+ * @param string [$sExcludeSegmentIds]
468
+ * @param string [$sIncludeSegmentIds]
469
+ * @param string [$sScheduledTime]
470
+ * @return object
471
+ **/
472
+ public function sendMessage($sIncludeListIds, $iMessageId, $sExcludeListIds = null, $sExcludeSegmentIds = null, $sIncludeSegmentIds = null, $sScheduledTime = null) {
473
+ // Send the message
474
+ $aSends = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/sends", 'POST', array(
475
+ array(
476
+ 'excludeListIds' => $sExcludeListIds,
477
+ 'excludeSegmentIds' => $sExcludeSegmentIds,
478
+ 'includeListIds' => $sIncludeListIds,
479
+ 'includeSegmentIds' => $sIncludeSegmentIds,
480
+ 'scheduledTime' => (empty($sScheduledTime) ? null : date('c', strtotime($sScheduledTime)))
481
+ )
482
+ ), 'sends');
483
+ return $aSends;
484
+ }
485
+
486
+ /**
487
+ * This method subscribes a contact to a list
488
+ * @access public
489
+ * @param integer $iContactId
490
+ * @param integer $iListId
491
+ * @param string $sStatus
492
+ * @return object
493
+ **/
494
+ public function subscribeContactToList($iContactId, $iListId, $sStatus = 'normal') {
495
+ // Valid statuses
496
+ $aValidStatuses = array('normal', 'pending', 'unsubscribed');
497
+ // Setup the subscription and make the call
498
+ $aSubscriptions = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/subscriptions", 'POST', array(
499
+ array(
500
+ 'contactId' => $iContactId,
501
+ 'listId' => $iListId,
502
+ 'status' => $sStatus
503
+ )
504
+ ), 'subscriptions');
505
+ return $aSubscriptions;
506
+ }
507
+
508
+ /**
509
+ * This method updates a contact in your iContactPro account
510
+ * @access public
511
+ * @param integer $iContactId
512
+ * @param string $sEmail
513
+ * @param string $sPrefix
514
+ * @param string $sFirstName
515
+ * @param string $sLastName
516
+ * @param string $sSuffix
517
+ * @param string $sStreet
518
+ * @param string $sStreet2
519
+ * @param string $sCity
520
+ * @param string $sState
521
+ * @param string $sPostalCode
522
+ * @param string $sPhone
523
+ * @param string $sFax
524
+ * @param string $sBusiness
525
+ * @param string $sStatus
526
+ * @return bool|object
527
+ **/
528
+ public function updateContact($iContactId, $sEmail = null, $sPrefix = null, $sFirstName = null, $sLastName = null, $sSuffix = null, $sStreet = null, $sStreet2 = null, $sCity = null, $sState = null, $sPostalCode = null, $sPhone = null, $sFax = null, $sBusiness = null, $sStatus = null) {
529
+ // Valid statuses
530
+ $aValidStatuses = array('normal', 'bounced', 'donotcontact', 'pending', 'invitable', 'deleted');
531
+ // Contact placeholder
532
+ $aContact = array();
533
+ // Check for an email address
534
+ if (!empty($sEmail)) {
535
+ // Add the new email
536
+ $aContact['email'] = (string) $sEmail;
537
+ }
538
+ // Check for a prefix
539
+ if (!empty($sPrefix)) {
540
+ // Add the new prefix
541
+ $aContact['prefix'] = (string) $sPrefix;
542
+ }
543
+ // Check for a first name
544
+ if (!empty($sFirstName)) {
545
+ // Add the new first name
546
+ $aContact['firstName'] = (string) $sFirstName;
547
+ }
548
+ // Check for a last name
549
+ if (!empty($sLastName)) {
550
+ // Add the new last name
551
+ $aContact['lastName'] = (string) $sLastName;
552
+ }
553
+ // Check for a suffix
554
+ if (!empty($sSuffix)) {
555
+ // Add the new suffix
556
+ $aContact['suffix'] = (string) $sSuffix;
557
+ }
558
+ // Check for a street
559
+ if (!empty($sStreet)) {
560
+ // Add the new street
561
+ $aContact['street'] = (string) $sStreet;
562
+ }
563
+ // Check for a street2
564
+ if (!empty($sStreet2)) {
565
+ // Add the new street 2
566
+ $aContact['street2'] = (string) $sStreet2;
567
+ }
568
+ // Check for a city
569
+ if (!empty($sCity)) {
570
+ // Add the new city
571
+ $aContact['city'] = (string) $sCity;
572
+ }
573
+ // Check for a state
574
+ if (!empty($sState)) {
575
+ // Add the new state
576
+ $aContact['state'] = (string) $sState;
577
+ }
578
+ // Check for a postal code
579
+ if (!empty($sPostalCode)) {
580
+ // Add the new postal code
581
+ $aContact['postalCode'] = (string) $sPostalCode;
582
+ }
583
+ // Check for a phone number
584
+ if (!empty($sPhone)) {
585
+ // Add the new phone number
586
+ $aContact['phone'] = (string) $sPhone;
587
+ }
588
+ // Check for a fax number
589
+ if (!empty($sFax)) {
590
+ // Add the new fax number
591
+ $aContact['fax'] = (string) $sFax;
592
+ }
593
+ // Check for a business name
594
+ if (!empty($sBusiness)) {
595
+ // Add the new business
596
+ $aContact['business'] = (string) $sBusiness;
597
+ }
598
+ // Check for a valid status
599
+ if (!empty($sStatus) && in_array($sStatus, $aValidStatuses)) {
600
+ // Add the new status
601
+ $aContact['status'] = $sStatus;
602
+ }
603
+ // Make sure the contact isn't empty
604
+ if (!empty($aContact)) {
605
+ // Make the call
606
+ $oContact = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/contacts/{$iContactId}", 'POST', array($aContact), 'contact');
607
+ // Return the contact
608
+ return $oContact;
609
+ }
610
+ // Inevitably return failure
611
+ return false;
612
+ }
613
+
614
+ /**
615
+ * This method uploads a CSV file to the iContactPro API
616
+ * @access public
617
+ * @param string $sFile
618
+ * @param integer [$iListId]
619
+ * @param integer [$iUploadId]
620
+ * @return string|bool
621
+ **/
622
+ public function uploadData($sFile, $iListId = null, $iUploadId = null) {
623
+ // Check for an upload ID
624
+ if (empty($iUploadId)) {
625
+ // Make the call
626
+ $aUploads = $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/uploads", 'POST', array(
627
+ array(
628
+ 'action' => 'add',
629
+ 'listIds' => $iListId
630
+ )
631
+ ), 'uploads');
632
+ // Store the uploadID
633
+ $iUploadId = $aUploads[0]->uploadId;
634
+ }
635
+ // Upload the data
636
+ if ($this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/uploads/{$iUploadId}/data", 'PUT', $sFile, 'uploadId')) {
637
+ // Loop until the upload is complete
638
+ while (true) {
639
+ // Grab the upload
640
+ $aUpload = $this->getUpload($iUploadId);
641
+ // Check to see if the upload
642
+ // has finished uploading
643
+ if ($aUpload->status != 'receiving') {
644
+ // Return the upload
645
+ return $this->makeCall("/a/{$this->getCompanyId()}/c{$this->getProfileId()}/uploads/{$iUploadId}/data", 'GET');
646
+ }
647
+ }
648
+ }
649
+ // Return failure
650
+ return false;
651
+ }
652
+
653
+ /**
654
+ * This message updates a list on your iContactPro account
655
+ * @access public
656
+ * @param string $sName
657
+ * @param integer $iListId
658
+ * @param string $sName
659
+ * @param integer $iWelcomeMessageId
660
+ * @param bool [$bEmailOwnerOnChange]
661
+ * @param bool [$bWelcomeOnManualAdd]
662
+ * @param bool [$bWelcomeOnSignupAdd]
663
+ * @param string [$sDescription]
664
+ * @param string [$sPublicName]
665
+ * @return object
666
+ **/
667
+ public function updateList($iListId, $sName, $iWelcomeMessageId, $bEmailOwnerOnChange = true, $bWelcomeOnManualAdd = false, $bWelcomeOnSignupAdd = false, $sDescription = null, $sPublicName = null) {
668
+ // Setup the list
669
+ $aList = array(
670
+ 'name' => $sName,
671
+ 'welcomeMessageId' => $iWelcomeMessageId,
672
+ 'emailOwnerOnChange' => intval($bEmailOwnerOnChange),
673
+ 'welcomeOnManualAdd' => intval($bWelcomeOnManualAdd),
674
+ 'welcomeOnSignupAdd' => intval($bWelcomeOnSignupAdd),
675
+ 'description' => $sDescription,
676
+ 'publicname' => $sPublicName
677
+ );
678
+ // Return the list
679
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/lists/{$iListId}", 'POST', $aList, 'list');;
680
+ }
681
+
682
+
683
+ //////////////////////////////////////////////////////////////////////////////
684
+ /// PROTECTED ///////////////////////////////////////////////////////////////
685
+ ////////////////////////////////////////////////////////////////////////////
686
+
687
+ /**
688
+ * This method appends an error to the list
689
+ * of errors encountered with the iContactPro API
690
+ * @access protected
691
+ * @param string $sText
692
+ * @param integer [$iCode]
693
+ * @return iContactProApi $this
694
+ **/
695
+ protected function addError($sText) {
696
+ // Append the error
697
+ array_push($this->aErrors, $sText);
698
+ // Return instance
699
+ return $this;
700
+ }
701
+
702
+ /**
703
+ * This method appends a warning to the list
704
+ * of warnings encountered with the iContactPro API
705
+ * @access protected
706
+ * @param string $sText
707
+ * @return iContactProApi $this
708
+ **/
709
+ public function addWarning($sText) {
710
+ // Append the warning
711
+ array_push($this->aWarnings, $sText);
712
+ // Return instance
713
+ return $this;
714
+ }
715
+
716
+ //////////////////////////////////////////////////////////////////////////////
717
+ /// Getters /////////////////////////////////////////////////////////////////
718
+ ////////////////////////////////////////////////////////////////////////////
719
+
720
+ /**
721
+ * This method grabs the campaigns associated
722
+ * your iContactPro account
723
+ * @access public
724
+ * @return object
725
+ **/
726
+ public function getCampaigns() {
727
+ // Make the call and return the data
728
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/campaigns", 'GET');
729
+ }
730
+
731
+ /**
732
+ * This method returns the companyId. If the ID has
733
+ * not been set, it sets it from the configs.
734
+ *
735
+ * @access public
736
+ * @return integer
737
+ */
738
+ public function getCompanyId() {
739
+ if (empty($this->iCompanyId)) {
740
+ $this->setCompanyId();
741
+ }
742
+
743
+ return $this->iCompanyId;
744
+ }
745
+
746
+ /**
747
+ * This method grabs a single contact
748
+ * from your iContactPro account
749
+ * @access public
750
+ * @param integer $iContactId
751
+ * @return object
752
+ **/
753
+ public function getContact($iContactId) {
754
+ // Make the call and return the data
755
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/contacts/{$iContactId}", 'GET', null, 'contact');
756
+ }
757
+
758
+ /**
759
+ * This method grabs the contacts associated
760
+ * with you iContactPro API account
761
+ * @access public
762
+ * @return array
763
+ **/
764
+ public function getContacts() {
765
+ // Make the call and return the data
766
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/contacts", 'GET');
767
+ }
768
+
769
+ /**
770
+ * This method returns any set
771
+ * errors in the current instance
772
+ * @access public
773
+ * @return array|bool
774
+ **/
775
+ public function getErrors() {
776
+ // Check for errors
777
+ if (empty($this->aErrors)) {
778
+ return false;
779
+ } else {
780
+ return $this->aErrors;
781
+ }
782
+ }
783
+
784
+ /**
785
+ * This method builds the header array
786
+ * for making calls to the API
787
+ * @access public
788
+ * @return array
789
+ **/
790
+ public function getHeaders() {
791
+ // Return the headers
792
+ return array(
793
+ 'Except:',
794
+ 'Accept: application/json',
795
+ 'Content-type: application/json',
796
+ 'Api-Version: ' . (defined('ICP_APIVERSION') ? constant('ICP_APIVERSION') : '2.2'),
797
+ 'Api-AppId: ' . (!empty($this->aConfig['appId']) ? $this->aConfig['appId'] : (defined('ICP_APPID') ? constant('ICP_APPID') : '')),
798
+ 'Api-Username: '. (!empty($this->aConfig['apiUsername']) ? $this->aConfig['apiUsername'] : (defined('ICP_APIUSERNAME') ? constant('ICP_APIUSERNAME') : '')),
799
+ 'Api-Password: '. (!empty($this->aConfig['apiPassword']) ? $this->aConfig['apiPassword'] : (defined('ICP_APIPASSWORD') ? constant('ICP_APIPASSWORD') : ''))
800
+ );
801
+ }
802
+
803
+ /**
804
+ * This method returns the last
805
+ * API POST request JSON
806
+ * @access public
807
+ * @param bool [$bDecode]
808
+ * @return string|object
809
+ **/
810
+ public function getLastRequest($bDecode = false) {
811
+ if ($bDecode === true) {
812
+ return json_decode($this->sLastRequest);
813
+ }
814
+ return $this->sLastRequest;
815
+ }
816
+
817
+ /**
818
+ * This method returns the last
819
+ * API response JSON
820
+ * @access public
821
+ * @param bool [$bDecode]
822
+ * @return string|object
823
+ **/
824
+ public function getLastResponse($bDecode = false) {
825
+ if ($bDecode === true) {
826
+ return json_decode($this->sLastResponse);
827
+ }
828
+ return $this->sLastResponse;
829
+ }
830
+
831
+ /**
832
+ * This method grabs a list of lists
833
+ * that are associated with you iContactPro
834
+ * API account
835
+ * @access public
836
+ * @return array
837
+ **/
838
+ public function getLists() {
839
+ // Make the call and return the lists
840
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/lists", 'GET', null, 'lists');
841
+ }
842
+
843
+ /**
844
+ * This method lists the opens of a
845
+ * single message based on the messageID
846
+ * @access public
847
+ * @param integer iMessageId
848
+ * @return integer
849
+ **/
850
+ public function getMessageOpens($iMessageId) {
851
+ // Make the call and return the data
852
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/messages/{$iMessageId}/opens", 'GET', null, 'total');
853
+ }
854
+
855
+ public function getMessages($sType = null) {
856
+ // Check for a message type
857
+ if (!empty($sType)) {
858
+ $this->addCustomQueryField('messageType', $sType);
859
+ }
860
+ // Return the messages
861
+ return $this->makeCall("/a/{$this->getCompanyId()}/c/{$this->getProfileId()}/messages", 'GET', null, 'messages');
862
+ }
863
+
864
+ /**
865
+ * This method returns the profileId. If the ID has
866
+ * not been set, it sets it from the configs.
867
+ *
868
+ * @access public
869
+ * @return integer
870
+ */
871
+ public function getProfileId() {
872
+ if (empty($this->iProfileId)) {
873
+ $this->setProfileId();
874
+ }
875
+
876
+ return $this->iProfileId;
877
+ }
878
+
879
+ /**
880
+ * This method returns the URL
881
+ * that the last API request
882
+ * called
883
+ * @access public
884
+ * @return string
885
+ **/
886
+ public function getRequestUri() {
887
+ // Return the URL
888
+ return $this->sRequestUri;
889
+ }
890
+
891
+ /**
892
+ * This method returns the count of the
893
+ * total number of records from the most
894
+ * recent API call, if there is one
895
+ * @access public
896
+ * @return integer
897
+ **/
898
+ public function getTotal() {
899
+ // Return the total records
900
+ return $this->iTotal;
901
+ }
902
+
903
+ /**
904
+ * This method simply returns the base URL for
905
+ * your API
906
+ * @access public
907
+ * @param bool [$bFull]
908
+ * @return string
909
+ **/
910
+ public function getUrl($bFull = false) {
911
+ // Set the production URL
912
+ $sBaseUrl = defined('ICP_APIURL') ? constant('ICP_APIURL') : 'https://api.icpro.co/icp';
913
+ // Do we need to return the entire url or just
914
+ // the base url of the API service
915
+ if ($bFull === false) {
916
+ // Return the base url
917
+ return $sBaseUrl;
918
+ } else {
919
+ // Return the base url and account details
920
+ return $sBaseUrl . "/a/{$this->getCompanyId()}/c/{$this->getProfileId()}";
921
+ }
922
+ }
923
+
924
+ /**
925
+ * This method grabs a specific upload
926
+ * @access public
927
+ * @param integer $iUploadId
928
+ * @return object
929
+ **/
930
+ public function getUpload($iUploadId) {
931
+ // Return the upload data
932
+ return $this->makeCall("/a/{$this->getCompanyId()}/c{$this->getProfileId()}/uploads/{$iUploadId}/data");
933
+ }
934
+
935
+ /**
936
+ * This method grabs the uploads associated
937
+ * with your iContactPro account
938
+ * @access public
939
+ * @return array
940
+ **/
941
+ public function getUploads() {
942
+ // Return the uploads
943
+ return $this->makeCall("/a/{$this->getCompanyId()}/c{$this->getProfileId()}/uploads");
944
+ }
945
+
946
+ /**
947
+ * This method returns the warnings encountered
948
+ * while communicating with the iContactPro API
949
+ * @access public
950
+ * @return array
951
+ **/
952
+ public function getWarnings() {
953
+ // Return the current system warnings
954
+ return $this->aWarnings;
955
+ }
956
+
957
+ //////////////////////////////////////////////////////////////////////////////
958
+ /// Setters /////////////////////////////////////////////////////////////////
959
+ ////////////////////////////////////////////////////////////////////////////
960
+
961
+ /**
962
+ * This method allows the companyId specified in the configs
963
+ * to be overridden
964
+ *
965
+ * @access public
966
+ * @param integer [$iCompanyId]
967
+ */
968
+ public function setCompanyId($iCompanyId = null) {
969
+ if (!empty ($iCompanyId)) {
970
+ $this->iCompanyId = (integer) $iCompanyId;
971
+ } else {
972
+ $this->iCompanyId = (integer) (!empty($this->aConfig['companyId']) ? $this->aConfig['companyId'] : constant('ICP_COMPANYID'));
973
+ }
974
+ }
975
+
976
+ /**
977
+ * This method sets configuration into the
978
+ * plugin to pragmatically override constants
979
+ * @access public
980
+ * @param array $aConfig
981
+ * @return iContactProApi $this
982
+ **/
983
+ public function setConfig($aConfig) {
984
+ // Combine the arrays
985
+ $this->aConfig = (array) array_merge($this->aConfig, $aConfig);
986
+ // Return instance
987
+ return $this;
988
+ }
989
+
990
+ /**
991
+ * This method sets the result limit
992
+ * for GET requests to the iContactPro API
993
+ * @access public
994
+ * @param integer $iLimit
995
+ * @return iContactProApi $this
996
+ **/
997
+ public function setLimit($iLimit) {
998
+ // Set the limit in the search parameters
999
+ $this->aSearchParameters['limit'] = (integer) $iLimit;
1000
+ // Return instance
1001
+ return $this;
1002
+ }
1003
+
1004
+ /**
1005
+ * This method sets the result index
1006
+ * offset for paginating results from
1007
+ * GET requests to the iContactPro API
1008
+ * @access public
1009
+ * @param integer $iOffset
1010
+ * @return iContactProApi $this
1011
+ **/
1012
+ public function setOffset($iOffset) {
1013
+ // Set the offset in the search parameters
1014
+ $this->aSearchParameters['offset'] = (integer) $iOffset;
1015
+ // Return instance
1016
+ return $this;
1017
+ }
1018
+
1019
+ /**
1020
+ * This method allows the profileId specified in the configs
1021
+ * to be overridden
1022
+ *
1023
+ * @access public
1024
+ * @param integer [$iProfileId]
1025
+ */
1026
+ public function setProfileId($iProfileId = null)
1027
+ {
1028
+ if (!empty ($iProfileId)) {
1029
+ $this->iProfileId = (integer) $iProfileId;
1030
+ } else {
1031
+ $this->iProfileId = (integer) (!empty($this->aConfig['profileId']) ? $this->aConfig['profileId'] : constant('ICP_PROFILEID'));
1032
+ }
1033
+ }
1034
+ }
js/fl-builder-layout.js CHANGED
@@ -3,7 +3,7 @@
3
  if(typeof FLBuilderLayout != 'undefined') {
4
  return;
5
  }
6
-
7
  /**
8
  * Helper class with generic logic for a builder layout.
9
  *
@@ -11,59 +11,59 @@
11
  * @since 1.0
12
  */
13
  FLBuilderLayout = {
14
-
15
  /**
16
  * Initializes a builder layout.
17
  *
18
  * @since 1.0
19
  * @method init
20
- */
21
  init: function()
22
  {
23
  // Destroy existing layout events.
24
  FLBuilderLayout._destroy();
25
-
26
  // Init CSS classes.
27
  FLBuilderLayout._initClasses();
28
-
29
  // Init backgrounds.
30
  FLBuilderLayout._initBackgrounds();
31
-
32
- // Only init if the builder isn't active.
33
  if ( 0 === $('.fl-builder-edit').length ) {
34
-
35
  // Init anchor links.
36
  FLBuilderLayout._initAnchorLinks();
37
-
38
  // Init the browser hash.
39
  FLBuilderLayout._initHash();
40
-
41
  // Init module animations.
42
  FLBuilderLayout._initModuleAnimations();
43
-
44
  // Init forms.
45
  FLBuilderLayout._initForms();
46
  }
47
  },
48
-
49
  /**
50
  * Public method for refreshing Wookmark or MosaicFlow galleries
51
  * within an element.
52
  *
53
  * @since 1.7.4
54
  * @method refreshGalleries
55
- */
56
  refreshGalleries: function( element )
57
  {
58
  var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
59
  mfContent = $element.find( '.fl-mosaicflow-content' ),
60
  wmContent = $element.find( '.fl-gallery' ),
61
  mfObject = null;
62
-
63
  if ( mfContent ) {
64
-
65
  mfObject = mfContent.data( 'mosaicflow' );
66
-
67
  if ( mfObject ) {
68
  mfObject.columns = $( [] );
69
  mfObject.columnsHeights = [];
@@ -103,15 +103,15 @@
103
  var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
104
  bxContent = $element.find('.bx-viewport .fl-post-carousel-wrapper'),
105
  bxObject = null;
106
-
107
  if ( bxContent.length ) {
108
  bxContent.each(function(){
109
  bxObject = $(this).data( 'bxSlider');
110
  if ( bxObject ) {
111
  bxObject.reloadSlider();
112
- }
113
  })
114
-
115
  }
116
  },
117
 
@@ -129,7 +129,7 @@
129
  mejsPlayer = null,
130
  rail = null,
131
  railWidth = 400;
132
-
133
  if ( audioPlayers.length && typeof mejs !== 'undefined' ) {
134
  audioPlayers.each(function(){
135
  player = $(this);
@@ -137,7 +137,7 @@
137
  rail = player.find('.mejs-controls .mejs-time-rail');
138
  var innerMejs = player.find('.mejs-inner'),
139
  total = player.find('.mejs-controls .mejs-time-total');
140
-
141
  if ( typeof mejsPlayer !== 'undefined' ) {
142
  railWidth = Math.ceil(player.width() * 0.8);
143
 
@@ -145,7 +145,7 @@
145
 
146
  rail.css('width', railWidth +'px!important');
147
  //total.width(rail.width() - 10);
148
-
149
  mejsPlayer.options.autosizeProgress = true;
150
 
151
  // webkit has trouble doing this without a delay
@@ -157,7 +157,7 @@
157
  visibility: 'visible',
158
  height: 'inherit'
159
  });
160
- }
161
  }
162
  });
163
  }
@@ -174,13 +174,27 @@
174
  var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
175
  contentWrap = $element.closest('.fl-accordion-item'),
176
  audioPlayers = $element.find('.wp-audio-shortcode.mejs-audio');
177
-
178
  if ( ! contentWrap.hasClass('fl-accordion-item-active') && audioPlayers.find('.mejs-inner').length ) {
179
  audioPlayers.find('.mejs-inner').css({
180
  visibility : 'hidden',
181
  height: 0
182
- });
183
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  },
185
 
186
  /**
@@ -189,15 +203,15 @@
189
  * @since 1.0
190
  * @access private
191
  * @method _destroy
192
- */
193
  _destroy: function()
194
  {
195
  var win = $(window);
196
-
197
  win.off('scroll.fl-bg-parallax');
198
  win.off('resize.fl-bg-video');
199
  },
200
-
201
  /**
202
  * Checks to see if the current device has touch enabled.
203
  *
@@ -205,16 +219,16 @@
205
  * @access private
206
  * @method _isTouch
207
  * @return {Boolean}
208
- */
209
  _isTouch: function()
210
  {
211
  if(('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch)) {
212
  return true;
213
  }
214
-
215
  return false;
216
  },
217
-
218
  /**
219
  * Checks to see if the current device is mobile.
220
  *
@@ -222,45 +236,45 @@
222
  * @access private
223
  * @method _isMobile
224
  * @return {Boolean}
225
- */
226
  _isMobile: function()
227
  {
228
  return /Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test( navigator.userAgent );
229
  },
230
-
231
  /**
232
  * Initializes builder body classes.
233
  *
234
  * @since 1.0
235
  * @access private
236
  * @method _initClasses
237
- */
238
  _initClasses: function()
239
  {
240
  var body = $( 'body' ),
241
  ua = navigator.userAgent;
242
-
243
  // Add the builder body class.
244
  if ( ! body.hasClass( 'archive' ) && $( '.fl-builder-content-primary' ).length > 0 ) {
245
  body.addClass('fl-builder');
246
  }
247
-
248
  // Add the builder touch body class.
249
  if(FLBuilderLayout._isTouch()) {
250
  body.addClass('fl-builder-touch');
251
  }
252
-
253
  // Add the builder mobile body class.
254
  if(FLBuilderLayout._isMobile()) {
255
  body.addClass('fl-builder-mobile');
256
  }
257
-
258
  // IE11 body class.
259
  if ( ua.indexOf( 'Trident/7.0' ) > -1 && ua.indexOf( 'rv:11.0' ) > -1 ) {
260
  body.addClass( 'fl-builder-ie-11' );
261
  }
262
  },
263
-
264
  /**
265
  * Initializes builder node backgrounds that require
266
  * additional JavaScript logic such as parallax.
@@ -268,18 +282,18 @@
268
  * @since 1.1.4
269
  * @access private
270
  * @method _initBackgrounds
271
- */
272
  _initBackgrounds: function()
273
  {
274
  var win = $(window);
275
-
276
  // Init parallax backgrounds.
277
  if($('.fl-row-bg-parallax').length > 0 && !FLBuilderLayout._isMobile()) {
278
  FLBuilderLayout._scrollParallaxBackgrounds();
279
  FLBuilderLayout._initParallaxBackgrounds();
280
  win.on('scroll.fl-bg-parallax', FLBuilderLayout._scrollParallaxBackgrounds);
281
  }
282
-
283
  // Init video backgrounds.
284
  if($('.fl-bg-video').length > 0) {
285
  FLBuilderLayout._initBgVideos();
@@ -287,26 +301,26 @@
287
  win.on('resize.fl-bg-video', FLBuilderLayout._resizeBgVideos);
288
  }
289
  },
290
-
291
  /**
292
  * Initializes all parallax backgrounds in a layout.
293
  *
294
  * @since 1.1.4
295
  * @access private
296
  * @method _initParallaxBackgrounds
297
- */
298
  _initParallaxBackgrounds: function()
299
  {
300
  $('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground);
301
  },
302
-
303
  /**
304
  * Initializes a single parallax background.
305
  *
306
  * @since 1.1.4
307
  * @access private
308
  * @method _initParallaxBackgrounds
309
- */
310
  _initParallaxBackground: function()
311
  {
312
  var row = $(this),
@@ -314,21 +328,21 @@
314
  src = row.data('parallax-image'),
315
  loaded = row.data('parallax-loaded'),
316
  img = new Image();
317
-
318
  if(loaded) {
319
  return;
320
  }
321
  else if(typeof src != 'undefined') {
322
-
323
  $(img).on('load', function() {
324
  content.css('background-image', 'url(' + src + ')');
325
  row.data('parallax-loaded', true);
326
  });
327
-
328
  img.src = src;
329
  }
330
  },
331
-
332
  /**
333
  * Fires when the window is scrolled to adjust
334
  * parallax backgrounds.
@@ -336,12 +350,12 @@
336
  * @since 1.1.4
337
  * @access private
338
  * @method _scrollParallaxBackgrounds
339
- */
340
  _scrollParallaxBackgrounds: function()
341
  {
342
  $('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground);
343
  },
344
-
345
  /**
346
  * Fires when the window is scrolled to adjust
347
  * a single parallax background.
@@ -349,7 +363,7 @@
349
  * @since 1.1.4
350
  * @access private
351
  * @method _scrollParallaxBackground
352
- */
353
  _scrollParallaxBackground: function()
354
  {
355
  var win = $(window),
@@ -358,36 +372,36 @@
358
  speed = row.data('parallax-speed'),
359
  offset = content.offset(),
360
  yPos = -((win.scrollTop() - offset.top) / speed);
361
-
362
  content.css('background-position', 'center ' + yPos + 'px');
363
  },
364
-
365
  /**
366
  * Initializes all video backgrounds.
367
  *
368
  * @since 1.6.3.3
369
  * @access private
370
  * @method _initBgVideos
371
- */
372
  _initBgVideos: function()
373
  {
374
  $('.fl-bg-video').each(FLBuilderLayout._initBgVideo);
375
  },
376
-
377
  /**
378
  * Initializes a video background.
379
  *
380
  * @since 1.6.3.3
381
  * @access private
382
  * @method _initBgVideo
383
- */
384
  _initBgVideo: function()
385
  {
386
  var wrap = $( this ),
387
  width = wrap.data( 'width' ),
388
  height = wrap.data( 'height' ),
389
  mp4 = wrap.data( 'mp4' ),
390
- youtube = wrap.data( 'youtube'),
391
  vimeo = wrap.data( 'vimeo'),
392
  mp4Type = wrap.data( 'mp4-type' ),
393
  webm = wrap.data( 'webm' ),
@@ -397,49 +411,49 @@
397
  fallbackTag = '',
398
  videoTag = null,
399
  mp4Tag = null,
400
- webmTag = null;
401
-
402
  // Return if the video has been loaded for this row.
403
  if ( loaded ) {
404
  return;
405
  }
406
  // Append the video tag for non-mobile.
407
  else if ( ! FLBuilderLayout._isMobile() ) {
408
-
409
  videoTag = $( '<video autoplay loop muted preload></video>' );
410
-
411
  // MP4 Source Tag
412
  if ( 'undefined' != typeof mp4 ) {
413
-
414
  mp4Tag = $( '<source />' );
415
  mp4Tag.attr( 'src', mp4 );
416
  mp4Tag.attr( 'type', mp4Type );
417
-
418
  if ( 'undefined' == typeof webm ) {
419
  mp4Tag.on( 'error', FLBuilderLayout._videoBgSourceError );
420
  }
421
-
422
  videoTag.append( mp4Tag );
423
  }
424
-
425
  // WebM Source Tag
426
  if ( 'undefined' != typeof webm ) {
427
-
428
  webmTag = $( '<source />' );
429
  webmTag.attr( 'src', webm );
430
  webmTag.attr( 'type', webmType );
431
-
432
  if ( 'undefined' != typeof mp4 ) {
433
  webmTag.on( 'error', FLBuilderLayout._videoBgSourceError );
434
  }
435
-
436
  videoTag.append( webmTag );
437
  }
438
-
439
  // Check what video player we are going to load in a row
440
  if ( 'undefined' != typeof youtube ) {
441
- FLBuilderLayout._initYoutubeBgVideo.apply( this );
442
- }
443
  else if ( 'undefined' != typeof vimeo ) {
444
  FLBuilderLayout._initVimeoBgVideo.apply( this );
445
  }
@@ -454,7 +468,7 @@
454
  fallbackTag.css( 'background-image', 'url(' + fallback + ')' );
455
  wrap.append( fallbackTag );
456
  }
457
-
458
  // Mark this video as loaded.
459
  wrap.data('loaded', true);
460
  },
@@ -487,14 +501,14 @@
487
  event.target.mute();
488
  }
489
  else if ("yes" === enableAudio && event.target.isMuted ) {
490
- event.target.unMute();
491
  }
492
-
493
  // Store an instance to a parent
494
  playerWrap.data('YTPlayer', player);
495
  FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);
496
 
497
- event.target.playVideo();
498
  },
499
  onStateChange: function( event ) {
500
  if ( event.data === YT.PlayerState.ENDED ) {
@@ -562,20 +576,20 @@
562
  else if ("yes" === enableAudio ) {
563
  player.setVolume(1);
564
  }
565
-
566
  player.play();
567
  }
568
  },
569
-
570
  /**
571
- * Fires when there is an error loading a video
572
  * background source and shows the fallback.
573
  *
574
  * @since 1.6.3.3
575
  * @access private
576
  * @method _videoBgSourceError
577
  * @param {Object} e An event object.
578
- */
579
  _videoBgSourceError: function( e )
580
  {
581
  var source = $( e.target ),
@@ -583,7 +597,7 @@
583
  vid = wrap.find( 'video' ),
584
  fallback = wrap.data( 'fallback' ),
585
  fallbackTag = '';
586
-
587
  if ( '' !== fallback ) {
588
  fallbackTag = $( '<div></div>' );
589
  fallbackTag.addClass( 'fl-bg-video-fallback' );
@@ -592,7 +606,7 @@
592
  vid.remove();
593
  }
594
  },
595
-
596
  /**
597
  * Fires when the window is resized to resize
598
  * all video backgrounds.
@@ -600,19 +614,19 @@
600
  * @since 1.1.4
601
  * @access private
602
  * @method _resizeBgVideos
603
- */
604
  _resizeBgVideos: function()
605
  {
606
  $('.fl-bg-video').each( function() {
607
-
608
  FLBuilderLayout._resizeBgVideo.apply( this );
609
-
610
  if ( $( this ).parent().find( 'img' ).length > 0 ) {
611
  $( this ).parent().imagesLoaded( $.proxy( FLBuilderLayout._resizeBgVideo, this ) );
612
  }
613
  } );
614
  },
615
-
616
  /**
617
  * Fires when the window is resized to resize
618
  * a single video background.
@@ -620,13 +634,13 @@
620
  * @since 1.1.4
621
  * @access private
622
  * @method _resizeBgVideo
623
- */
624
  _resizeBgVideo: function()
625
  {
626
  if ( 0 === $( this ).find( 'video' ).length && 0 === $( this ).find( 'iframe' ).length ) {
627
  return;
628
  }
629
-
630
  var wrap = $(this),
631
  wrapHeight = wrap.outerHeight(),
632
  wrapWidth = wrap.outerWidth(),
@@ -638,7 +652,7 @@
638
  newLeft = 0,
639
  newTop = 0,
640
  iframe = wrap.find('iframe');
641
-
642
  if ( vid.length ) {
643
  if(vidHeight === '' || typeof vidHeight === 'undefined' || vidWidth === '' || typeof vidWidth === 'undefined') {
644
  vid.css({
@@ -652,16 +666,16 @@
652
 
653
  }
654
  else {
655
-
656
  if(newHeight < wrapHeight) {
657
  newHeight = wrapHeight;
658
- newWidth = Math.round(vidWidth * wrapHeight/vidHeight);
659
  newLeft = -((newWidth - wrapWidth)/2);
660
  }
661
  else {
662
  newTop = -((newHeight - wrapHeight)/2);
663
  }
664
-
665
  vid.css({
666
  'left' : newLeft + 'px',
667
  'top' : newTop + 'px',
@@ -674,13 +688,13 @@
674
 
675
  // Resize Youtube video player within iframe tag
676
  if ( typeof wrap.data('youtube') !== 'undefined' ) {
677
- FLBuilderLayout._resizeYoutubeBgVideo.apply(this);
678
- }
679
  }
680
  },
681
 
682
  /**
683
- * Fires when video meta has been loaded.
684
  * This will be Triggered when width/height attributes were not specified during video background resizing.
685
  *
686
  * @since 1.8.5
@@ -698,7 +712,7 @@
698
 
699
  if(newHeight < wrapHeight) {
700
  newHeight = wrapHeight;
701
- newWidth = Math.round(vidWidth * wrapHeight/vidHeight);
702
  newLeft = -((newWidth - wrapWidth)/2);
703
  }
704
  else {
@@ -751,7 +765,7 @@
751
  * @since 1.1.9
752
  * @access private
753
  * @method _initModuleAnimations
754
- */
755
  _initModuleAnimations: function()
756
  {
757
  if(typeof jQuery.fn.waypoint !== 'undefined' && !FLBuilderLayout._isMobile()) {
@@ -761,11 +775,11 @@
761
  winHeight = $( window ).height(),
762
  bodyHeight = $( 'body' ).height(),
763
  offset = '80%';
764
-
765
  if ( bodyHeight - nodeTop < winHeight * 0.2 ) {
766
  offset = '100%';
767
  }
768
-
769
  node.waypoint({
770
  offset: offset,
771
  handler: FLBuilderLayout._doModuleAnimation
@@ -773,19 +787,19 @@
773
  } );
774
  }
775
  },
776
-
777
  /**
778
  * Runs a module animation.
779
  *
780
  * @since 1.1.9
781
  * @access private
782
  * @method _doModuleAnimation
783
- */
784
  _doModuleAnimation: function()
785
  {
786
  var module = 'undefined' == typeof this.element ? $(this) : $(this.element),
787
  delay = parseFloat(module.data('animation-delay'));
788
-
789
  if(!isNaN(delay) && delay > 0) {
790
  setTimeout(function(){
791
  module.addClass('fl-animated');
@@ -795,7 +809,7 @@
795
  module.addClass('fl-animated');
796
  }
797
  },
798
-
799
  /**
800
  * Opens a tab or accordion item if the browser hash is set
801
  * to the ID of one on the page.
@@ -803,7 +817,7 @@
803
  * @since 1.6.0
804
  * @access private
805
  * @method _initHash
806
- */
807
  _initHash: function()
808
  {
809
  var hash = window.location.hash.replace( '#', '' ).split( '/' ).shift(),
@@ -812,37 +826,37 @@
812
  responsiveLabel = null,
813
  tabIndex = null,
814
  label = null;
815
-
816
  if ( '' !== hash ) {
817
-
818
  try {
819
-
820
  element = $( '#' + hash );
821
-
822
  if ( element.length > 0 ) {
823
-
824
  if ( element.hasClass( 'fl-accordion-item' ) ) {
825
  setTimeout( function() {
826
  element.find( '.fl-accordion-button' ).trigger( 'click' );
827
  }, 100 );
828
  }
829
  if ( element.hasClass( 'fl-tabs-panel' ) ) {
830
-
831
  setTimeout( function() {
832
-
833
  tabs = element.closest( '.fl-tabs' );
834
  responsiveLabel = element.find( '.fl-tabs-panel-label' );
835
  tabIndex = responsiveLabel.data( 'index' );
836
  label = tabs.find( '.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']' );
837
-
838
  if ( responsiveLabel.is( ':visible' ) ) {
839
- responsiveLabel.trigger( 'click' );
840
  }
841
- else {
842
  label[0].click();
843
  FLBuilderLayout._scrollToElement( element );
844
  }
845
-
846
  }, 100 );
847
  }
848
  }
@@ -850,26 +864,26 @@
850
  catch( e ) {}
851
  }
852
  },
853
-
854
  /**
855
  * Initializes all anchor links on the page for smooth scrolling.
856
  *
857
  * @since 1.4.9
858
  * @access private
859
- * @method _doModuleAnimation
860
- */
861
  _initAnchorLinks: function()
862
  {
863
  $( 'a' ).each( FLBuilderLayout._initAnchorLink );
864
  },
865
-
866
  /**
867
  * Initializes a single anchor link for smooth scrolling.
868
  *
869
  * @since 1.4.9
870
  * @access private
871
- * @method _doModuleAnimation
872
- */
873
  _initAnchorLink: function()
874
  {
875
  var link = $( this ),
@@ -908,7 +922,7 @@
908
  }
909
  }
910
  },
911
-
912
  /**
913
  * Scrolls to an element when an anchor link is clicked.
914
  *
@@ -917,16 +931,16 @@
917
  * @method _scrollToElementOnLinkClick
918
  * @param {Object} e An event object.
919
  * @param {Function} callback A function to call when the scroll is complete.
920
- */
921
  _scrollToElementOnLinkClick: function( e, callback )
922
  {
923
  var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() );
924
-
925
  FLBuilderLayout._scrollToElement( element, callback );
926
-
927
  e.preventDefault();
928
  },
929
-
930
  /**
931
  * Scrolls to an element.
932
  *
@@ -935,31 +949,31 @@
935
  * @method _scrollToElement
936
  * @param {Object} element The element to scroll to.
937
  * @param {Function} callback A function to call when the scroll is complete.
938
- */
939
  _scrollToElement: function( element, callback )
940
  {
941
  var config = FLBuilderLayoutConfig.anchorLinkAnimations,
942
  dest = 0,
943
  win = $( window ),
944
  doc = $( document );
945
-
946
  if ( element.length > 0 ) {
947
-
948
  if ( element.offset().top > doc.height() - win.height() ) {
949
  dest = doc.height() - win.height();
950
- }
951
  else {
952
  dest = element.offset().top - config.offset;
953
  }
954
-
955
  $( 'html, body' ).animate( { scrollTop: dest }, config.duration, config.easing, function() {
956
-
957
  if ( 'undefined' != typeof callback ) {
958
  callback();
959
  }
960
-
961
  if ( undefined != element.attr( 'id' ) ) {
962
-
963
  if ( history.pushState ) {
964
  history.pushState( null, null, '#' + element.attr( 'id' ) );
965
  }
@@ -970,7 +984,7 @@
970
  } );
971
  }
972
  },
973
-
974
  /**
975
  * Scrolls to an accordion item when a link is clicked.
976
  *
@@ -978,24 +992,24 @@
978
  * @access private
979
  * @method _scrollToAccordionOnLinkClick
980
  * @param {Object} e An event object.
981
- */
982
  _scrollToAccordionOnLinkClick: function( e )
983
  {
984
  var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() );
985
-
986
  if ( element.length > 0 ) {
987
-
988
  var callback = function() {
989
  if ( element ) {
990
- element.find( '.fl-accordion-button' ).trigger( 'click' );
991
  element = false;
992
  }
993
  };
994
-
995
  FLBuilderLayout._scrollToElementOnLinkClick.call( this, e, callback );
996
  }
997
  },
998
-
999
  /**
1000
  * Scrolls to a tab panel when a link is clicked.
1001
  *
@@ -1003,57 +1017,57 @@
1003
  * @access private
1004
  * @method _scrollToTabOnLinkClick
1005
  * @param {Object} e An event object.
1006
- */
1007
  _scrollToTabOnLinkClick: function( e )
1008
  {
1009
  var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() ),
1010
  tabs = null,
1011
  label = null,
1012
  responsiveLabel = null;
1013
-
1014
  if ( element.length > 0 ) {
1015
-
1016
  tabs = element.closest( '.fl-tabs' );
1017
  responsiveLabel = element.find( '.fl-tabs-panel-label' );
1018
  tabIndex = responsiveLabel.data( 'index' );
1019
  label = tabs.find( '.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']' );
1020
-
1021
  if ( responsiveLabel.is( ':visible' ) ) {
1022
-
1023
  var callback = function() {
1024
  if ( element ) {
1025
- responsiveLabel.trigger( 'click' );
1026
  element = false;
1027
  }
1028
  };
1029
-
1030
  FLBuilderLayout._scrollToElementOnLinkClick.call( this, e, callback );
1031
  }
1032
  else {
1033
  label[0].click();
1034
  FLBuilderLayout._scrollToElement( element );
1035
  }
1036
-
1037
  e.preventDefault();
1038
  }
1039
  },
1040
-
1041
  /**
1042
  * Initializes all builder forms on a page.
1043
  *
1044
  * @since 1.5.4
1045
  * @access private
1046
  * @method _initForms
1047
- */
1048
  _initForms: function()
1049
  {
1050
  if ( ! FLBuilderLayout._hasPlaceholderSupport ) {
1051
  $( '.fl-form-field input' ).each( FLBuilderLayout._initFormFieldPlaceholderFallback );
1052
  }
1053
-
1054
  $( '.fl-form-field input' ).on( 'focus', FLBuilderLayout._clearFormFieldError );
1055
  },
1056
-
1057
  /**
1058
  * Checks to see if the current device has HTML5
1059
  * placeholder support.
@@ -1062,81 +1076,81 @@
1062
  * @access private
1063
  * @method _hasPlaceholderSupport
1064
  * @return {Boolean}
1065
- */
1066
  _hasPlaceholderSupport: function()
1067
  {
1068
  var input = document.createElement( 'input' );
1069
-
1070
  return 'undefined' != input.placeholder;
1071
  },
1072
-
1073
  /**
1074
  * Initializes the fallback for when placeholders aren't supported.
1075
  *
1076
  * @since 1.5.4
1077
  * @access private
1078
  * @method _initFormFieldPlaceholderFallback
1079
- */
1080
  _initFormFieldPlaceholderFallback: function()
1081
  {
1082
  var field = $( this ),
1083
  val = field.val(),
1084
  placeholder = field.attr( 'placeholder' );
1085
-
1086
  if ( 'undefined' != placeholder && '' === val ) {
1087
  field.val( placeholder );
1088
  field.on( 'focus', FLBuilderLayout._hideFormFieldPlaceholderFallback );
1089
  field.on( 'blur', FLBuilderLayout._showFormFieldPlaceholderFallback );
1090
  }
1091
  },
1092
-
1093
  /**
1094
  * Hides a fallback placeholder on focus.
1095
  *
1096
  * @since 1.5.4
1097
  * @access private
1098
  * @method _hideFormFieldPlaceholderFallback
1099
- */
1100
  _hideFormFieldPlaceholderFallback: function()
1101
  {
1102
  var field = $( this ),
1103
  val = field.val(),
1104
  placeholder = field.attr( 'placeholder' );
1105
-
1106
  if ( val == placeholder ) {
1107
  field.val( '' );
1108
  }
1109
  },
1110
-
1111
  /**
1112
  * Shows a fallback placeholder on blur.
1113
  *
1114
  * @since 1.5.4
1115
  * @access private
1116
  * @method _showFormFieldPlaceholderFallback
1117
- */
1118
  _showFormFieldPlaceholderFallback: function()
1119
  {
1120
  var field = $( this ),
1121
  val = field.val(),
1122
  placeholder = field.attr( 'placeholder' );
1123
-
1124
  if ( '' === val ) {
1125
  field.val( placeholder );
1126
  }
1127
  },
1128
-
1129
  /**
1130
  * Clears a form field error message.
1131
  *
1132
  * @since 1.5.4
1133
  * @access private
1134
  * @method _clearFormFieldError
1135
- */
1136
  _clearFormFieldError: function()
1137
  {
1138
  var field = $( this );
1139
-
1140
  field.removeClass( 'fl-form-error' );
1141
  field.siblings( '.fl-form-error-message' ).hide();
1142
  }
@@ -1147,4 +1161,4 @@
1147
  FLBuilderLayout.init();
1148
  });
1149
 
1150
- })(jQuery);
3
  if(typeof FLBuilderLayout != 'undefined') {
4
  return;
5
  }
6
+
7
  /**
8
  * Helper class with generic logic for a builder layout.
9
  *
11
  * @since 1.0
12
  */
13
  FLBuilderLayout = {
14
+
15
  /**
16
  * Initializes a builder layout.
17
  *
18
  * @since 1.0
19
  * @method init
20
+ */
21
  init: function()
22
  {
23
  // Destroy existing layout events.
24
  FLBuilderLayout._destroy();
25
+
26
  // Init CSS classes.
27
  FLBuilderLayout._initClasses();
28
+
29
  // Init backgrounds.
30
  FLBuilderLayout._initBackgrounds();
31
+
32
+ // Only init if the builder isn't active.
33
  if ( 0 === $('.fl-builder-edit').length ) {
34
+
35
  // Init anchor links.
36
  FLBuilderLayout._initAnchorLinks();
37
+
38
  // Init the browser hash.
39
  FLBuilderLayout._initHash();
40
+
41
  // Init module animations.
42
  FLBuilderLayout._initModuleAnimations();
43
+
44
  // Init forms.
45
  FLBuilderLayout._initForms();
46
  }
47
  },
48
+
49
  /**
50
  * Public method for refreshing Wookmark or MosaicFlow galleries
51
  * within an element.
52
  *
53
  * @since 1.7.4
54
  * @method refreshGalleries
55
+ */
56
  refreshGalleries: function( element )
57
  {
58
  var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
59
  mfContent = $element.find( '.fl-mosaicflow-content' ),
60
  wmContent = $element.find( '.fl-gallery' ),
61
  mfObject = null;
62
+
63
  if ( mfContent ) {
64
+
65
  mfObject = mfContent.data( 'mosaicflow' );
66
+
67
  if ( mfObject ) {
68
  mfObject.columns = $( [] );
69
  mfObject.columnsHeights = [];
103
  var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
104
  bxContent = $element.find('.bx-viewport .fl-post-carousel-wrapper'),
105
  bxObject = null;
106
+
107
  if ( bxContent.length ) {
108
  bxContent.each(function(){
109
  bxObject = $(this).data( 'bxSlider');
110
  if ( bxObject ) {
111
  bxObject.reloadSlider();
112
+ }
113
  })
114
+
115
  }
116
  },
117
 
129
  mejsPlayer = null,
130
  rail = null,
131
  railWidth = 400;
132
+
133
  if ( audioPlayers.length && typeof mejs !== 'undefined' ) {
134
  audioPlayers.each(function(){
135
  player = $(this);
137
  rail = player.find('.mejs-controls .mejs-time-rail');
138
  var innerMejs = player.find('.mejs-inner'),
139
  total = player.find('.mejs-controls .mejs-time-total');
140
+
141
  if ( typeof mejsPlayer !== 'undefined' ) {
142
  railWidth = Math.ceil(player.width() * 0.8);
143
 
145
 
146
  rail.css('width', railWidth +'px!important');
147
  //total.width(rail.width() - 10);
148
+
149
  mejsPlayer.options.autosizeProgress = true;
150
 
151
  // webkit has trouble doing this without a delay
157
  visibility: 'visible',
158
  height: 'inherit'
159
  });
160
+ }
161
  }
162
  });
163
  }
174
  var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
175
  contentWrap = $element.closest('.fl-accordion-item'),
176
  audioPlayers = $element.find('.wp-audio-shortcode.mejs-audio');
177
+
178
  if ( ! contentWrap.hasClass('fl-accordion-item-active') && audioPlayers.find('.mejs-inner').length ) {
179
  audioPlayers.find('.mejs-inner').css({
180
  visibility : 'hidden',
181
  height: 0
182
+ });
183
+ }
184
+ },
185
+
186
+ /**
187
+ * Public method for resizing slideshow momdule within the tab
188
+ *
189
+ * @since 1.10.5
190
+ * @method resizeSlideshow
191
+ */
192
+ resizeSlideshow: function(){
193
+ if(typeof YUI !== 'undefined') {
194
+ YUI().use('node-event-simulate', function(Y) {
195
+ Y.one(window).simulate("resize");
196
+ });
197
+ }
198
  },
199
 
200
  /**
203
  * @since 1.0
204
  * @access private
205
  * @method _destroy
206
+ */
207
  _destroy: function()
208
  {
209
  var win = $(window);
210
+
211
  win.off('scroll.fl-bg-parallax');
212
  win.off('resize.fl-bg-video');
213
  },
214
+
215
  /**
216
  * Checks to see if the current device has touch enabled.
217
  *
219
  * @access private
220
  * @method _isTouch
221
  * @return {Boolean}
222
+ */
223
  _isTouch: function()
224
  {
225
  if(('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch)) {
226
  return true;
227
  }
228
+
229
  return false;
230
  },
231
+
232
  /**
233
  * Checks to see if the current device is mobile.
234
  *
236
  * @access private
237
  * @method _isMobile
238
  * @return {Boolean}
239
+ */
240
  _isMobile: function()
241
  {
242
  return /Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test( navigator.userAgent );
243
  },
244
+
245
  /**
246
  * Initializes builder body classes.
247
  *
248
  * @since 1.0
249
  * @access private
250
  * @method _initClasses
251
+ */
252
  _initClasses: function()
253
  {
254
  var body = $( 'body' ),
255
  ua = navigator.userAgent;
256
+
257
  // Add the builder body class.
258
  if ( ! body.hasClass( 'archive' ) && $( '.fl-builder-content-primary' ).length > 0 ) {
259
  body.addClass('fl-builder');
260
  }
261
+
262
  // Add the builder touch body class.
263
  if(FLBuilderLayout._isTouch()) {
264
  body.addClass('fl-builder-touch');
265
  }
266
+
267
  // Add the builder mobile body class.
268
  if(FLBuilderLayout._isMobile()) {
269
  body.addClass('fl-builder-mobile');
270
  }
271
+
272
  // IE11 body class.
273
  if ( ua.indexOf( 'Trident/7.0' ) > -1 && ua.indexOf( 'rv:11.0' ) > -1 ) {
274
  body.addClass( 'fl-builder-ie-11' );
275
  }
276
  },
277
+
278
  /**
279
  * Initializes builder node backgrounds that require
280
  * additional JavaScript logic such as parallax.
282
  * @since 1.1.4
283
  * @access private
284
  * @method _initBackgrounds
285
+ */
286
  _initBackgrounds: function()
287
  {
288
  var win = $(window);
289
+
290
  // Init parallax backgrounds.
291
  if($('.fl-row-bg-parallax').length > 0 && !FLBuilderLayout._isMobile()) {
292
  FLBuilderLayout._scrollParallaxBackgrounds();
293
  FLBuilderLayout._initParallaxBackgrounds();
294
  win.on('scroll.fl-bg-parallax', FLBuilderLayout._scrollParallaxBackgrounds);
295
  }
296
+
297
  // Init video backgrounds.
298
  if($('.fl-bg-video').length > 0) {
299
  FLBuilderLayout._initBgVideos();
301
  win.on('resize.fl-bg-video', FLBuilderLayout._resizeBgVideos);
302
  }
303
  },
304
+
305
  /**
306
  * Initializes all parallax backgrounds in a layout.
307
  *
308
  * @since 1.1.4
309
  * @access private
310
  * @method _initParallaxBackgrounds
311
+ */
312
  _initParallaxBackgrounds: function()
313
  {
314
  $('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground);
315
  },
316
+
317
  /**
318
  * Initializes a single parallax background.
319
  *
320
  * @since 1.1.4
321
  * @access private
322
  * @method _initParallaxBackgrounds
323
+ */
324
  _initParallaxBackground: function()
325
  {
326
  var row = $(this),
328
  src = row.data('parallax-image'),
329
  loaded = row.data('parallax-loaded'),
330
  img = new Image();
331
+
332
  if(loaded) {
333
  return;
334
  }
335
  else if(typeof src != 'undefined') {
336
+
337
  $(img).on('load', function() {
338
  content.css('background-image', 'url(' + src + ')');
339
  row.data('parallax-loaded', true);
340
  });
341
+
342
  img.src = src;
343
  }
344
  },
345
+
346
  /**
347
  * Fires when the window is scrolled to adjust
348
  * parallax backgrounds.
350
  * @since 1.1.4
351
  * @access private
352
  * @method _scrollParallaxBackgrounds
353
+ */
354
  _scrollParallaxBackgrounds: function()
355
  {
356
  $('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground);
357
  },
358
+
359
  /**
360
  * Fires when the window is scrolled to adjust
361
  * a single parallax background.
363
  * @since 1.1.4
364
  * @access private
365
  * @method _scrollParallaxBackground
366
+ */
367
  _scrollParallaxBackground: function()
368
  {
369
  var win = $(window),
372
  speed = row.data('parallax-speed'),
373
  offset = content.offset(),
374
  yPos = -((win.scrollTop() - offset.top) / speed);
375
+
376
  content.css('background-position', 'center ' + yPos + 'px');
377
  },
378
+
379
  /**
380
  * Initializes all video backgrounds.
381
  *
382
  * @since 1.6.3.3
383
  * @access private
384
  * @method _initBgVideos
385
+ */
386
  _initBgVideos: function()
387
  {
388
  $('.fl-bg-video').each(FLBuilderLayout._initBgVideo);
389
  },
390
+
391
  /**
392
  * Initializes a video background.
393
  *
394
  * @since 1.6.3.3
395
  * @access private
396
  * @method _initBgVideo
397
+ */
398
  _initBgVideo: function()
399
  {
400
  var wrap = $( this ),
401
  width = wrap.data( 'width' ),
402
  height = wrap.data( 'height' ),
403
  mp4 = wrap.data( 'mp4' ),
404
+ youtube = wrap.data( 'youtube'),
405
  vimeo = wrap.data( 'vimeo'),
406
  mp4Type = wrap.data( 'mp4-type' ),
407
  webm = wrap.data( 'webm' ),
411
  fallbackTag = '',
412
  videoTag = null,
413
  mp4Tag = null,
414
+ webmTag = null;
415
+
416
  // Return if the video has been loaded for this row.
417
  if ( loaded ) {
418
  return;
419
  }
420
  // Append the video tag for non-mobile.
421
  else if ( ! FLBuilderLayout._isMobile() ) {
422
+
423
  videoTag = $( '<video autoplay loop muted preload></video>' );
424
+
425
  // MP4 Source Tag
426
  if ( 'undefined' != typeof mp4 ) {
427
+
428
  mp4Tag = $( '<source />' );
429
  mp4Tag.attr( 'src', mp4 );
430
  mp4Tag.attr( 'type', mp4Type );
431
+
432
  if ( 'undefined' == typeof webm ) {
433
  mp4Tag.on( 'error', FLBuilderLayout._videoBgSourceError );
434
  }
435
+
436
  videoTag.append( mp4Tag );
437
  }
438
+
439
  // WebM Source Tag
440
  if ( 'undefined' != typeof webm ) {
441
+
442
  webmTag = $( '<source />' );
443
  webmTag.attr( 'src', webm );
444
  webmTag.attr( 'type', webmType );
445
+
446
  if ( 'undefined' != typeof mp4 ) {
447
  webmTag.on( 'error', FLBuilderLayout._videoBgSourceError );
448
  }
449
+
450
  videoTag.append( webmTag );
451
  }
452
+
453
  // Check what video player we are going to load in a row
454
  if ( 'undefined' != typeof youtube ) {
455
+ FLBuilderLayout._initYoutubeBgVideo.apply( this );
456
+ }
457
  else if ( 'undefined' != typeof vimeo ) {
458
  FLBuilderLayout._initVimeoBgVideo.apply( this );
459
  }
468
  fallbackTag.css( 'background-image', 'url(' + fallback + ')' );
469
  wrap.append( fallbackTag );
470
  }
471
+
472
  // Mark this video as loaded.
473
  wrap.data('loaded', true);
474
  },
501
  event.target.mute();
502
  }
503
  else if ("yes" === enableAudio && event.target.isMuted ) {
504
+ event.target.unMute();
505
  }
506
+
507
  // Store an instance to a parent
508
  playerWrap.data('YTPlayer', player);
509
  FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);
510
 
511
+ event.target.playVideo();
512
  },
513
  onStateChange: function( event ) {
514
  if ( event.data === YT.PlayerState.ENDED ) {
576
  else if ("yes" === enableAudio ) {
577
  player.setVolume(1);
578
  }
579
+
580
  player.play();
581
  }
582
  },
583
+
584
  /**
585
+ * Fires when there is an error loading a video
586
  * background source and shows the fallback.
587
  *
588
  * @since 1.6.3.3
589
  * @access private
590
  * @method _videoBgSourceError
591
  * @param {Object} e An event object.
592
+ */
593
  _videoBgSourceError: function( e )
594
  {
595
  var source = $( e.target ),
597
  vid = wrap.find( 'video' ),
598
  fallback = wrap.data( 'fallback' ),
599
  fallbackTag = '';
600
+
601
  if ( '' !== fallback ) {
602
  fallbackTag = $( '<div></div>' );
603
  fallbackTag.addClass( 'fl-bg-video-fallback' );
606
  vid.remove();
607
  }
608
  },
609
+
610
  /**
611
  * Fires when the window is resized to resize
612
  * all video backgrounds.
614
  * @since 1.1.4
615
  * @access private
616
  * @method _resizeBgVideos
617
+ */
618
  _resizeBgVideos: function()
619
  {
620
  $('.fl-bg-video').each( function() {
621
+
622
  FLBuilderLayout._resizeBgVideo.apply( this );
623
+
624
  if ( $( this ).parent().find( 'img' ).length > 0 ) {
625
  $( this ).parent().imagesLoaded( $.proxy( FLBuilderLayout._resizeBgVideo, this ) );
626
  }
627
  } );
628
  },
629
+
630
  /**
631
  * Fires when the window is resized to resize
632
  * a single video background.
634
  * @since 1.1.4
635
  * @access private
636
  * @method _resizeBgVideo
637
+ */
638
  _resizeBgVideo: function()
639
  {
640
  if ( 0 === $( this ).find( 'video' ).length && 0 === $( this ).find( 'iframe' ).length ) {
641
  return;
642
  }
643
+
644
  var wrap = $(this),
645
  wrapHeight = wrap.outerHeight(),
646
  wrapWidth = wrap.outerWidth(),
652
  newLeft = 0,
653
  newTop = 0,
654
  iframe = wrap.find('iframe');
655
+
656
  if ( vid.length ) {
657
  if(vidHeight === '' || typeof vidHeight === 'undefined' || vidWidth === '' || typeof vidWidth === 'undefined') {
658
  vid.css({
666
 
667
  }
668
  else {
669
+
670
  if(newHeight < wrapHeight) {
671
  newHeight = wrapHeight;
672
+ newWidth = Math.round(vidWidth * wrapHeight/vidHeight);
673
  newLeft = -((newWidth - wrapWidth)/2);
674
  }
675
  else {
676
  newTop = -((newHeight - wrapHeight)/2);
677
  }
678
+
679
  vid.css({
680
  'left' : newLeft + 'px',
681
  'top' : newTop + 'px',
688
 
689
  // Resize Youtube video player within iframe tag
690
  if ( typeof wrap.data('youtube') !== 'undefined' ) {
691
+ FLBuilderLayout._resizeYoutubeBgVideo.apply(this);
692
+ }
693
  }
694
  },
695
 
696
  /**
697
+ * Fires when video meta has been loaded.
698
  * This will be Triggered when width/height attributes were not specified during video background resizing.
699
  *
700
  * @since 1.8.5
712
 
713
  if(newHeight < wrapHeight) {
714
  newHeight = wrapHeight;
715
+ newWidth = Math.round(vidWidth * wrapHeight/vidHeight);
716
  newLeft = -((newWidth - wrapWidth)/2);
717
  }
718
  else {
765
  * @since 1.1.9
766
  * @access private
767
  * @method _initModuleAnimations
768
+ */
769
  _initModuleAnimations: function()
770
  {
771
  if(typeof jQuery.fn.waypoint !== 'undefined' && !FLBuilderLayout._isMobile()) {
775
  winHeight = $( window ).height(),
776
  bodyHeight = $( 'body' ).height(),
777
  offset = '80%';
778
+
779
  if ( bodyHeight - nodeTop < winHeight * 0.2 ) {
780
  offset = '100%';
781
  }
782
+
783
  node.waypoint({
784
  offset: offset,
785
  handler: FLBuilderLayout._doModuleAnimation
787
  } );
788
  }
789
  },
790
+
791
  /**
792
  * Runs a module animation.
793
  *
794
  * @since 1.1.9
795
  * @access private
796
  * @method _doModuleAnimation
797
+ */
798
  _doModuleAnimation: function()
799
  {
800
  var module = 'undefined' == typeof this.element ? $(this) : $(this.element),
801
  delay = parseFloat(module.data('animation-delay'));
802
+
803
  if(!isNaN(delay) && delay > 0) {
804
  setTimeout(function(){
805
  module.addClass('fl-animated');
809
  module.addClass('fl-animated');
810
  }
811
  },
812
+
813
  /**
814
  * Opens a tab or accordion item if the browser hash is set
815
  * to the ID of one on the page.
817
  * @since 1.6.0
818
  * @access private
819
  * @method _initHash
820
+ */
821
  _initHash: function()
822
  {
823
  var hash = window.location.hash.replace( '#', '' ).split( '/' ).shift(),
826
  responsiveLabel = null,
827
  tabIndex = null,
828
  label = null;
829
+
830
  if ( '' !== hash ) {
831
+
832
  try {
833
+
834
  element = $( '#' + hash );
835
+
836
  if ( element.length > 0 ) {
837
+
838
  if ( element.hasClass( 'fl-accordion-item' ) ) {
839
  setTimeout( function() {
840
  element.find( '.fl-accordion-button' ).trigger( 'click' );
841
  }, 100 );
842
  }
843
  if ( element.hasClass( 'fl-tabs-panel' ) ) {
844
+
845
  setTimeout( function() {
846
+
847
  tabs = element.closest( '.fl-tabs' );
848
  responsiveLabel = element.find( '.fl-tabs-panel-label' );
849
  tabIndex = responsiveLabel.data( 'index' );
850
  label = tabs.find( '.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']' );
851
+
852
  if ( responsiveLabel.is( ':visible' ) ) {
853
+ responsiveLabel.trigger( 'click' );
854
  }
855
+ else {
856
  label[0].click();
857
  FLBuilderLayout._scrollToElement( element );
858
  }
859
+
860
  }, 100 );
861
  }
862
  }
864
  catch( e ) {}
865
  }
866
  },
867
+
868
  /**
869
  * Initializes all anchor links on the page for smooth scrolling.
870
  *
871
  * @since 1.4.9
872
  * @access private
873
+ * @method _initAnchorLinks
874
+ */
875
  _initAnchorLinks: function()
876
  {
877
  $( 'a' ).each( FLBuilderLayout._initAnchorLink );
878
  },
879
+
880
  /**
881
  * Initializes a single anchor link for smooth scrolling.
882
  *
883
  * @since 1.4.9
884
  * @access private
885
+ * @method _initAnchorLink
886
+ */
887
  _initAnchorLink: function()
888
  {
889
  var link = $( this ),
922
  }
923
  }
924
  },
925
+
926
  /**
927
  * Scrolls to an element when an anchor link is clicked.
928
  *
931
  * @method _scrollToElementOnLinkClick
932
  * @param {Object} e An event object.
933
  * @param {Function} callback A function to call when the scroll is complete.
934
+ */
935
  _scrollToElementOnLinkClick: function( e, callback )
936
  {
937
  var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() );
938
+
939
  FLBuilderLayout._scrollToElement( element, callback );
940
+
941
  e.preventDefault();
942
  },
943
+
944
  /**
945
  * Scrolls to an element.
946
  *
949
  * @method _scrollToElement
950
  * @param {Object} element The element to scroll to.
951
  * @param {Function} callback A function to call when the scroll is complete.
952
+ */
953
  _scrollToElement: function( element, callback )
954
  {
955
  var config = FLBuilderLayoutConfig.anchorLinkAnimations,
956
  dest = 0,
957
  win = $( window ),
958
  doc = $( document );
959
+
960
  if ( element.length > 0 ) {
961
+
962
  if ( element.offset().top > doc.height() - win.height() ) {
963
  dest = doc.height() - win.height();
964
+ }
965
  else {
966
  dest = element.offset().top - config.offset;
967
  }
968
+
969
  $( 'html, body' ).animate( { scrollTop: dest }, config.duration, config.easing, function() {
970
+
971
  if ( 'undefined' != typeof callback ) {
972
  callback();
973
  }
974
+
975
  if ( undefined != element.attr( 'id' ) ) {
976
+
977
  if ( history.pushState ) {
978
  history.pushState( null, null, '#' + element.attr( 'id' ) );
979
  }
984
  } );
985
  }
986
  },
987
+
988
  /**
989
  * Scrolls to an accordion item when a link is clicked.
990
  *
992
  * @access private
993
  * @method _scrollToAccordionOnLinkClick
994
  * @param {Object} e An event object.
995
+ */
996
  _scrollToAccordionOnLinkClick: function( e )
997
  {
998
  var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() );
999
+
1000
  if ( element.length > 0 ) {
1001
+
1002
  var callback = function() {
1003
  if ( element ) {
1004
+ element.find( '.fl-accordion-button' ).trigger( 'click' );
1005
  element = false;
1006
  }
1007
  };
1008
+
1009
  FLBuilderLayout._scrollToElementOnLinkClick.call( this, e, callback );
1010
  }
1011
  },
1012
+
1013
  /**
1014
  * Scrolls to a tab panel when a link is clicked.
1015
  *
1017
  * @access private
1018
  * @method _scrollToTabOnLinkClick
1019
  * @param {Object} e An event object.
1020
+ */
1021
  _scrollToTabOnLinkClick: function( e )
1022
  {
1023
  var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() ),
1024
  tabs = null,
1025
  label = null,
1026
  responsiveLabel = null;
1027
+
1028
  if ( element.length > 0 ) {
1029
+
1030
  tabs = element.closest( '.fl-tabs' );
1031
  responsiveLabel = element.find( '.fl-tabs-panel-label' );
1032
  tabIndex = responsiveLabel.data( 'index' );
1033
  label = tabs.find( '.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']' );
1034
+
1035
  if ( responsiveLabel.is( ':visible' ) ) {
1036
+
1037
  var callback = function() {
1038
  if ( element ) {
1039
+ responsiveLabel.trigger( 'click' );
1040
  element = false;
1041
  }
1042
  };
1043
+
1044
  FLBuilderLayout._scrollToElementOnLinkClick.call( this, e, callback );
1045
  }
1046
  else {
1047
  label[0].click();
1048
  FLBuilderLayout._scrollToElement( element );
1049
  }
1050
+
1051
  e.preventDefault();
1052
  }
1053
  },
1054
+
1055
  /**
1056
  * Initializes all builder forms on a page.
1057
  *
1058
  * @since 1.5.4
1059
  * @access private
1060
  * @method _initForms
1061
+ */
1062
  _initForms: function()
1063
  {
1064
  if ( ! FLBuilderLayout._hasPlaceholderSupport ) {
1065
  $( '.fl-form-field input' ).each( FLBuilderLayout._initFormFieldPlaceholderFallback );
1066
  }
1067
+
1068
  $( '.fl-form-field input' ).on( 'focus', FLBuilderLayout._clearFormFieldError );
1069
  },
1070
+
1071
  /**
1072
  * Checks to see if the current device has HTML5
1073
  * placeholder support.
1076
  * @access private
1077
  * @method _hasPlaceholderSupport
1078
  * @return {Boolean}
1079
+ */
1080
  _hasPlaceholderSupport: function()
1081
  {
1082
  var input = document.createElement( 'input' );
1083
+
1084
  return 'undefined' != input.placeholder;
1085
  },
1086
+
1087
  /**
1088
  * Initializes the fallback for when placeholders aren't supported.
1089
  *
1090
  * @since 1.5.4
1091
  * @access private
1092
  * @method _initFormFieldPlaceholderFallback
1093
+ */
1094
  _initFormFieldPlaceholderFallback: function()
1095
  {
1096
  var field = $( this ),
1097
  val = field.val(),
1098
  placeholder = field.attr( 'placeholder' );
1099
+
1100
  if ( 'undefined' != placeholder && '' === val ) {
1101
  field.val( placeholder );
1102
  field.on( 'focus', FLBuilderLayout._hideFormFieldPlaceholderFallback );
1103
  field.on( 'blur', FLBuilderLayout._showFormFieldPlaceholderFallback );
1104
  }
1105
  },
1106
+
1107
  /**
1108
  * Hides a fallback placeholder on focus.
1109
  *
1110
  * @since 1.5.4
1111
  * @access private
1112
  * @method _hideFormFieldPlaceholderFallback
1113
+ */
1114
  _hideFormFieldPlaceholderFallback: function()
1115
  {
1116
  var field = $( this ),
1117
  val = field.val(),
1118
  placeholder = field.attr( 'placeholder' );
1119
+
1120
  if ( val == placeholder ) {
1121
  field.val( '' );
1122
  }
1123
  },
1124
+
1125
  /**
1126
  * Shows a fallback placeholder on blur.
1127
  *
1128
  * @since 1.5.4
1129
  * @access private
1130
  * @method _showFormFieldPlaceholderFallback
1131
+ */
1132
  _showFormFieldPlaceholderFallback: function()
1133
  {
1134
  var field = $( this ),
1135
  val = field.val(),
1136
  placeholder = field.attr( 'placeholder' );
1137
+
1138
  if ( '' === val ) {
1139
  field.val( placeholder );
1140
  }
1141
  },
1142
+
1143
  /**
1144
  * Clears a form field error message.
1145
  *
1146
  * @since 1.5.4
1147
  * @access private
1148
  * @method _clearFormFieldError
1149
+ */
1150
  _clearFormFieldError: function()
1151
  {
1152
  var field = $( this );
1153
+
1154
  field.removeClass( 'fl-form-error' );
1155
  field.siblings( '.fl-form-error-message' ).hide();
1156
  }
1161
  FLBuilderLayout.init();
1162
  });
1163
 
1164
+ })(jQuery);
js/fl-slideshow.js CHANGED
@@ -788,11 +788,14 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
788
  _gesturesEndComplete: function()
789
  {
790
  var root = this.get('root'),
791
- index = this._nextImage._imageInfo.index;
792
-
793
- this._swapImageRefs();
794
- this._imageInfo = root.albumInfo.images[index];
795
- root.loadImage(index);
 
 
 
796
  },
797
 
798
  /**
788
  _gesturesEndComplete: function()
789
  {
790
  var root = this.get('root'),
791
+ index = 0;
792
+
793
+ if(this._nextImage._imageInfo){
794
+ index = this._nextImage._imageInfo.index;
795
+ this._swapImageRefs();
796
+ this._imageInfo = root.albumInfo.images[index];
797
+ root.loadImage(index);
798
+ }
799
  },
800
 
801
  /**
js/fl-slideshow.min.js CHANGED
@@ -1,4 +1,4 @@
1
- YUI.add("fl-event-move",function(t){var e={_isEndEvent:!1,on:function(t,e,i){this.type.indexOf("end")>-1&&(this._isEndEvent=!0),e._direction=this.type.replace("gesturemove","").replace("end",""),window.navigator.msPointerEnabled?(e._startHandle=t.on("MSPointerDown",this._onStart,this,t,e,i),e._moveHandle=t.on("MSPointerMove",this._onMove,this,t,e,i),e._endHandle=t.on("MSPointerUp",this._onEnd,this,t,e,i)):(e._startHandle=t.on("gesturemovestart",this._onStart,null,this,t,e,i),e._moveHandle=t.on("gesturemove",this._onMove,null,this,t,e,i),e._endHandle=t.on("gesturemoveend",this._onEnd,{standAlone:!0},this,t,e,i))},detach:function(t,e,i){e._startHandle.detach(),e._startHandle=null,e._moveHandle.detach(),e._moveHandle=null,e._endHandle.detach(),e._endHandle=null},_onStart:function(t,e,i,s){i._doMove=null,i._startX=t.pageX,i._startY=t.pageY},_onMove:function(t,e,i,s){this._checkDirection(t,i)?i._doMove=!0:i._doMove=!1,i._doMove&&!this._isEndEvent&&s.fire(t)},_onEnd:function(t,e,i,s){i._doMove&&this._isEndEvent&&(t.startPageX=i._startX,t.startPageY=i._startY,s.fire(t)),i._doMove=null},_checkDirection:function(t,e){var i=Math.abs(e._startX-t.pageX),s=Math.abs(e._startY-t.pageY);return s>i&&e._startY>t.pageY&&"vertical"==e._direction||(s>i&&e._startY<t.pageY&&"vertical"==e._direction||(s<i&&e._startX>t.pageX&&"horizontal"==e._direction||s<i&&e._startX<t.pageX&&"horizontal"==e._direction))}};t.Event.define("gesturemovevertical",e),t.Event.define("gesturemoveverticalend",e),t.Event.define("gesturemovehorizontal",e),t.Event.define("gesturemovehorizontalend",e)},"2.0.0",{requires:["event-move"]}),YUI.add("fl-slideshow",function(t){t.namespace("FL").SlideshowCaption=t.Base.create("fl-slideshow-caption",t.Widget,[t.WidgetChild],{_textToggled:!1,_textToggleLink:null,renderUI:function(){var e=this.get("root"),i=this.get("boundingBox");this._textToggleLink=t.Node.create('<a href="javascript:void(0);"></a>'),this._textToggleLink.addClass("fl-slideshow-caption-toggle"),this._textToggleLink.set("innerHTML",e.get("captionMoreLinkText")),i.appendChild(this._textToggleLink)},bindUI:function(){this.get("root").on("imageLoadComplete",t.bind(this._setText,this)),this._textToggleLink.on("click",t.bind(this._toggleText,this))},_setText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=t.get("captionTextLength"),s=this.get("contentBox");return t.imageInfo.caption&&""!==t.imageInfo.caption?(i>-1?!this._textToggled&&i<e.length?(e=this._shortenText(e),this._textToggleLink.setStyle("display","inline-block")):this._textToggled&&i<e.length?(e=this._stripTags(e),this._textToggleLink.setStyle("display","inline-block")):(e=this._stripTags(e),this._textToggleLink.setStyle("display","none")):e=this._stripTags(e),void s.set("innerHTML",e)):(s.set("innerHTML",""),void this._textToggleLink.setStyle("display","none"))},_toggleText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=this.get("contentBox");this._textToggled?(e=this._shortenText(e),this._textToggleLink.set("innerHTML",t.get("captionMoreLinkText")),this._textToggled=!1):(e=this._stripTags(e),this._textToggleLink.set("innerHTML",t.get("captionLessLinkText")),this._textToggled=!0),i.set("innerHTML",e)},_stripTags:function(t,e){var i,s=this.get("root");return(e||s.get("captionStripTags"))&&(i=document.createElement("div"),i.innerHTML=t,t=i.textContent||i.innerText),t},_shortenText:function(e){var i=this.get("root");return e=this._stripTags(e,!0).substring(0,i.get("captionTextLength")),t.Lang.trim(e.substring(0,e.lastIndexOf(" ")))+" ..."}},{CSS_PREFIX:"fl-slideshow-caption",ATTRS:{}}),t.namespace("FL").SlideshowFrame=t.Base.create("fl-slideshow-frame",t.Widget,[t.WidgetParent,t.WidgetChild],{_imageInfo:null,_activeImage:null,_nextImage:null,_loadQueue:null,_transition:null,_transitioning:!1,_resizeAfterTransition:!1,_gestures:null,initializer:function(){var e=this.get("imageConfig");this._activeImage=new t.FL.SlideshowImage(e),this._nextImage=new t.FL.SlideshowImage(e)},renderUI:function(){this.add(this._activeImage),this.add(this._nextImage)},bindUI:function(){var e=this._activeImage.get("boundingBox"),i=this._nextImage.get("boundingBox"),s=this.get("transition");("ontouchstart"in window||window.navigator.msPointerEnabled)&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:e,nextItem:i}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){var t=this._activeImage.get("boundingBox"),e=this._nextImage.get("boundingBox"),i=this.get("contentBox");t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("left","-9999px"),e.setStyle("position","absolute"),e.setStyle("top","0px"),e.setStyle("left","-9999px"),i.setStyle("position","relative"),i.setStyle("overflow","hidden")},load:function(t){var e=this._activeImage._imageInfo;return this._transitioning?void(this._loadQueue=t):void(e&&e.largeURL==t.largeURL||(this._imageInfo=t,this._transitionInit(t)))},preload:function(t,e,i){this._imageInfo=t,this._nextImage.preload(t,e,i)},unload:function(){this._imageInfo=null,this._loadQueue=null,this._transitioning=!1,this._transition=null,this._activeImage.detachAll(),this._activeImage.unload(),this._activeImage.get("boundingBox").setStyle("left","-9999px"),this._nextImage.detachAll(),this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")},resize:function(t,e){if(t&&e){var i=this.get("boundingBox"),s=[parseInt(i.getComputedStyle("paddingTop"),10),parseInt(i.getComputedStyle("paddingRight"),10),parseInt(i.getComputedStyle("paddingBottom"),10),parseInt(i.getComputedStyle("paddingLeft"),10)];t=t-s[1]-s[3],e=e-s[0]-s[2],this.set("width",t),this.set("height",e),this._transitioning?this._resizeAfterTransition=!0:(this._activeImage.resize(t,e),this._nextImage.resize(t,e))}},_getTransition:function(){var t=this.get("root"),e=t.albumInfo.images.length-1,i="next",s=t.get("transition");return null===t.lastImageIndex?i="":t.imageIndex==e&&0===t.lastImageIndex?i="prev":0===t.imageIndex&&t.lastImageIndex==e?i="next":t.lastImageIndex>t.imageIndex?i="prev":t.lastImageIndex<t.imageIndex&&(i="next"),"next"==i?(s=s.replace("slideHorizontal","slideLeft"),s=s.replace("slideVertical","slideUp")):"prev"==i&&(s=s.replace("slideHorizontal","slideRight"),s=s.replace("slideVertical","slideDown")),s},_transitionInit:function(t){this._transitioning=!0,this._gestures&&this._gestures.disable(),this.fire("transitionInit"),t?(this._nextImage.once("loadComplete",this._transitionStart,this),this._nextImage.load(t)):this._transitionStart()},_transitionStart:function(){var e=this.get("root");this.fire("transitionStart"),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextImage._imageInfo?this._nextImage.get("boundingBox"):null,itemOut:this._activeImage._imageInfo?this._activeImage.get("boundingBox"):null,type:this._getTransition(),duration:e.get("transitionDuration"),easing:e.get("transitionEasing"),kenBurnsDuration:e.get("speed")/1e3,kenBurnsZoom:e.get("kenBurnsZoom")}),this._nextImage._imageInfo&&this._nextImage.get("boundingBox").setStyle("left","0px"),this._transition.once("complete",this._transitionComplete,this),this._transition.run()},_transitionComplete:function(){var t=this.get("root");this._swapImageRefs(),this.fire("transitionComplete"),this._transition=null,this._transitioning=!1,this._gestures&&(t&&t.albumInfo.images.length<=1?this._gestures.disable():this._gestures.enable()),this._loadQueue?(this.load(this._loadQueue),this._loadQueue=null):this._resizeAfterTransition&&(this._resizeAfterTransition=!1,this._activeImage.resize(this.get("width"),this.get("height")),this._nextImage.resize(this.get("width"),this.get("height")))},_gesturesMoveStart:function(e){var i=0,s=this.get("root");i="next"==e.direction?s.imageIndex+1:s.imageIndex-1,i=i<0?s.albumInfo.images.length-1:i,i=i>=s.albumInfo.images.length?0:i,s.pause(),s._hideLoadingImage(),s._showLoadingImageWithDelay(),t.FL.SlideshowImageLoader.removeGroup(this._nextImage.get("loadGroup")),this._nextImage.once("loadComplete",s._hideLoadingImage,s),this._nextImage.load(s.albumInfo.images[i])},_gesturesEndComplete:function(){var t=this.get("root"),e=this._nextImage._imageInfo.index;this._swapImageRefs(),this._imageInfo=t.albumInfo.images[e],t.loadImage(e)},_swapImageRefs:function(){var t=this._activeImage;this._activeImage=this._nextImage,this._nextImage=t,this._nextImage._imageInfo&&(this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")),this._gestures&&(this._gestures.set("activeItem",this._activeImage.get("boundingBox")),this._gestures.set("nextItem",this._nextImage.get("boundingBox")))}},{CSS_PREFIX:"fl-slideshow-frame",ATTRS:{imageConfig:{value:null},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowFullscreen=t.Base.create("fl-slideshow-fullscreen",t.Plugin.Base,[],{active:!1,_closeMessage:null,_closeMessageTimer:null,_initialStyles:{position:"static",top:"0px",left:"0px"},initializer:function(){var e=this.get("host"),i=e.get("boundingBox"),s=this;i.addClass("fl-fullscreen-enabled"),t.FL.SlideshowFullscreen.OS_SUPPORT?(document.addEventListener("fullscreenchange",function(){s._osChange()},!1),document.addEventListener("mozfullscreenchange",function(){s._osChange()},!1),document.addEventListener("webkitfullscreenchange",function(){s._osChange()},!1)):this._renderCloseMessage()},toggle:function(){this.active?this.exit():this.enter()},enter:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osEnter():this._browserEnter()},exit:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osExit():this._browserExit()},_osEnter:function(){var t=this.get("host").get("boundingBox")._node;t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.requestFullScreen&&t.requestFullScreen()},_osExit:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},_osChange:function(){var t=this.get("host");t.frame&&t.frame._transitioning&&t.frame._transitionComplete(),this.active?this._exit():this._enter()},_browserEnter:function(){var e=this.get("host").get("boundingBox");this._initialStyles={position:e.getStyle("position"),top:e.getStyle("top"),left:e.getStyle("left"),zIndex:e.getStyle("zIndex")},e.setStyles({position:"fixed",top:"0px",left:"0px",zIndex:1e4}),t.Node.one("body").on("fl-fullscreen|keydown",t.bind(this._onKey,this)),this._showCloseMessage(),this._enter()},_browserExit:function(){var e=this.get("host").get("boundingBox");e.setStyles({position:this._initialStyles.position,top:this._initialStyles.top,left:this._initialStyles.left,zIndex:this._initialStyles.zIndex}),t.Node.one("body").detach("fl-fullscreen|keydown"),this._hideCloseMessage(),this._exit()},_enter:function(){var t=this.get("host"),e=t.get("boundingBox");e.addClass("fl-fullscreen-active"),this.active=!0,t.resize()},_exit:function(){var t=this.get("host"),e=t.get("boundingBox");e.removeClass("fl-fullscreen-active"),this.active=!1,t.resize()},_onKey:function(t){if(27==t.keyCode)return this.exit(),!1},_renderCloseMessage:function(){this._closeMessage=t.Node.create('<div class="fl-fullscreen-close-message"></div>'),this._closeMessage.set("innerHTML",'<span>Press the "esc" button to exit fullscreen mode.</span>'),this._closeMessage.setStyle("display","none"),this.get("host").get("boundingBox").insert(this._closeMessage)},_showCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.show(!0),this._closeMessageTimer=t.later(4e3,this,this._hideCloseMessage)},_hideCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.hide(!0)}},{NS:"fullscreen",OS_SUPPORT:function(){var t=document.documentElement;return t.webkitRequestFullScreen||t.mozRequestFullScreen||t.requestFullScreen}()}),t.namespace("FL").SlideshowGestures=t.Base.create("fl-slideshow-gestures",t.Base,[],{_startX:null,_startY:null,_touchMoving:!1,_moving:!1,_movingDirection:null,_transitioning:!1,initializer:function(){this.enable()},enable:function(){var e=this.get("id"),i=this.get("direction"),s=this.get("activeItem"),n=this.get("nextItem");s.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|transitionend",t.bind(this._onEndComplete,this)),n.on(e+"|oTransitionEnd",t.bind(this._onEndComplete,this)),n.on(e+"|webkitTransitionEnd",t.bind(this._onEndComplete,this)),"horizontal"==i?(s.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),s.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this)),n.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),n.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this))):(s.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),s.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)),n.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),n.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)))},disable:function(){var t=this.get("id"),e=this.get("activeItem"),i=this.get("nextItem");e.detach(t+"|*"),i.detach(t+"|*")},_onStart:function(t){var e=this.get("direction");this._transitioning&&this._onEndComplete(),"horizontal"==e?this._startX=t.pageX:this._startY=t.pageY,this.fire("start")},_onMoveHorizontal:function(t){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("width"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("left",0),s.setStyles({opacity:1,left:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),i.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),this.fire("move")},_onMoveVertical:function(t){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("height"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("top",0),s.setStyles({opacity:1,left:"auto",top:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),i.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),this.fire("move")},_onEndHorizontal:function(t){if(this._moving){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("width"),10),a=e<0?n:-n;i.transition({transform:"translate("+a+"px, 0px)"}),s.transition({transform:"translate("+a+"px, 0px)"}),this._transitioning=!0,this.fire("end")}},_onEndVertical:function(t){if(this._moving){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("height"),10),a=e<0?n:-n;i.transition({transform:"translate(0px, "+a+"px)"}),s.transition({transform:"translate(0px, "+a+"px)"}),this._transitioning=!0,this.fire("end")}},_onEndComplete:function(){var t=this.get("direction"),e=this.get("activeItem"),i=this.get("nextItem");e.setStyles({opacity:0,"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),i.setStyles({"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),"horizontal"==t?(e.setStyle("left","-9999px"),i.setStyle("left","0px")):(e.setStyle("top","-9999px"),i.setStyle("top","0px")),this.set("activeItem",i),this.set("nextItem",e),this._moving=!1,this._movingDirection=null,this._transitioning=!1,this.fire("endComplete")}},{ATTRS:{direction:{value:"horizontal"},activeItem:{value:null},nextItem:{value:null}}}),t.namespace("FL").SlideshowImageLoader={_loading:!1,_currentImage:null,_currentImageData:null,_queue:[],add:function(t,e,i,s){var n={group:t,src:e,callback:i};s?this._queue.unshift(n):this._queue.push(n),this._loading||this._load()},removeGroup:function(t){for(var e=this._queue.length-1;e>-1;e--)this._queue[e].group==t&&this._queue.splice(e,1);this._currentImageData&&this._currentImageData.group==t&&(this._currentImage.detachAll(),this._currentImage=null,this._currentImageData=null,this._queue.length>0?this._load():this._loading=!1)},_load:function(){this._loading=!0,this._currentImageData=this._queue.shift(),this._currentImage=t.Node.create("<img />"),this._currentImage.on("error",t.bind(this._loadComplete,this)),this._currentImage.on("load",t.bind(this._loadComplete,this)),this._currentImage.set("src",this._currentImageData.src)},_loadComplete:function(){this._currentImageData.callback&&this._currentImageData.callback(this._currentImage),this._queue.length>0?this._load():(this._loading=!1,this._currentImage=null,this._currentImageData=null)}},t.namespace("FL").SlideshowImage=t.Base.create("fl-slideshow-image",t.Widget,[t.WidgetChild],{_imageInfo:null,_image:null,_loading:!1,_loadingURL:null,_videoButton:null,_videoBox:null,_video:null,CONTENT_TEMPLATE:null,syncUI:function(){var t=this.get("boundingBox");this.get("crop")&&(t.setStyle("overflow","hidden"),t.addClass("fl-slideshow-image-cropped"))},load:function(t){this._imageInfo=t,this._loading=!0,this._load()},preload:function(e,i,s){var n=this._isVideo(),a=this.get("loadVideos"),o=this.get("showVideoButton");this.unload(),this.set("width",i),this.set("height",s),this._imageInfo=e,(!n||!a||n&&a&&o)&&t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._getImageURL(),t.bind(this._imagePreloaded,this),this.get("loadPriority"))},_imagePreloaded:function(t){this._image=t},unload:function(){this._image&&(this._image.remove(),this._image.detachAll(),this._image.set("src",""),this._image=null),this._video&&(this._video.remove(),this._video=null),this._videoButton&&(this._videoButton.remove(),this._videoButton=null),this._videoBox&&this._removeVideoBox(),this._imageInfo=null,this._loading=!1,this._loadingURL=null},resize:function(t,e){var i=2*parseInt(this.get("boundingBox").getComputedStyle("borderTopWidth"),10),s=this.get("boundingBox");this.set("width",t-i),this.set("height",e-i),s.setStyle("width",t-i+"px"),s.setStyle("height",e-i+"px"),this._videoButton&&this._positionVideoButton(),this._videoBox&&this._loadVideo(),this._loading||(this._imageInfo&&this._load(),this._image&&this._positionImage())},_load:function(){var t=this.get("loadVideos"),e=this.get("showVideoButton");!this._isVideo()||!t||e||"ontouchstart"in window?this._loadImage():this._loadVideo()},_loadImage:function(){var e=this._getImageURL(),i=this.get("loadVideos");e!=this._loadingURL&&(this._loadingURL=e,t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._loadingURL,t.bind(this._loadImageComplete,this),this.get("loadPriority")),this._loading&&(this._isVideo()&&i&&this._insertVideoButton(),this.fire("loadStart")))},_loadImageComplete:function(t){var e=this.get("boundingBox"),i=this.get("showVideoButton");this._image=t,this._image.setStyle("visibility","hidden"),this._image.addClass("fl-slideshow-image-img"),this._image.detachAll(),this._video&&!i&&(this._video.remove(),this._video=null),e.all("img").remove(),e.append(this._image),this._setupImage(),this._resizeImage(),this._positionImage(),this._image.setStyle("visibility","visible"),this._loadingURL=null,this._loading&&(this._loading=!1,this.fire("loadComplete"))},_setupImage:function(){var t=this.get("boundingBox");"undefined"!=typeof this._image._node.style.msInterpolationMode&&(this._image._node.style.msInterpolationMode="bicubic"),this.get("protect")&&(t.delegate("contextmenu",this._protectImage,"img"),t.delegate("mousedown",this._protectImage,"img"))},_protectImage:function(t){return t.preventDefault(),!1},_resizeImage:function(){var t=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),e=this._image.get("width"),i=this._image.get("height"),s=parseInt(this.get("boundingBox").getComputedStyle("width"),10),n=parseInt(this.get("boundingBox").getComputedStyle("height"),10),a=0,o=0,l=0,h=0,r=this.get("cropHorizontalsOnly"),g=i>e,u=!1;this._imageInfo&&this.get("checkFilenamesForNoCrop")&&(u=this._imageInfo.filename.indexOf("nocrop")>-1),!this.get("crop")||r&&g||u?(l=e/s,h=i/n,h>l?(a=Math.round(e*(1/h)),o=Math.round(i*(1/h))):(a=Math.round(e*(1/l)),o=Math.round(i*(1/l)))):(a=s,o=Math.round(i*s/e),o<n&&(o=n,a=Math.round(e*n/i))),this.get("crop")||this.get("upsize")||!(a>e||o>i)||(a=e,o=i),a-=t,o-=t,this._image.setStyle("width",a+"px"),this._image.setStyle("height",o+"px"),!this.get("crop")&&this.get("constrainWidth")&&this.set("width",a+"px"),!this.get("crop")&&this.get("constrainHeight")&&this.set("height",o+"px")},_positionImage:function(){var t=this.get("position").split(" "),e=""===t[0]?"center":t[0],i=""===t[1]?"center":t[1],s=0,n=0,a=parseInt(this.get("boundingBox").getComputedStyle("width"),10),o=parseInt(this.get("boundingBox").getComputedStyle("height"),10),l=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),h=parseInt(this._image.getComputedStyle("width"),10)+l,r=parseInt(this._image.getComputedStyle("height"),10)+l;isNaN(h)&&isNaN(r)||("left"==e&&(s=0),"center"==e&&(s=(a-h)/2),"right"==e&&(s=a-h),"top"==i&&(n=0),"center"==i&&(n=(o-r)/2),"bottom"==i&&(n=o-r),this._image.setStyles({left:s,top:n}))},_getImageURL:function(){var t=0,e=0,i=0,s=this.get("width"),n=this.get("height"),a=this.get("useThumbSizes"),o=this._imageInfo,l=[o.tinyURL||o.thumbURL||o.largeURL,o.thumbURL||o.largeURL,o.smallURL||o.largeURL,o.mediumURL||o.largeURL||o.smallURL,o.largeURL||o.mediumURL||o.smallURL,o.xlargeURL||o.largeURL||o.mediumURL||o.smallURL,o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL,o.x3largeURL||o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL];return t=a&&s<=100?0:a&&s<=150?1:s<=400?2:s>=400&&s<=600?3:s>=600&&s<=800?4:s>=800&&s<=1024?5:s>=1024&&s<=1280?6:7,e=a&&n<=100?0:a&&n<=150?1:n<=300?2:n>=300&&n<=450?3:n>=450&&n<=600?4:n>=600&&n<=768?5:n>=768&&n<=960?6:7,i=Math.max(t,e),l[i]},_isVideo:function(){return!!this._imageInfo&&("mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType||""!==this._imageInfo.iframe)},_loadVideo:function(){var t=this.get("boundingBox"),e=this.get("showVideoButton"),i=!!e;this._video&&(this._video.remove(),this._video=null),"mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType?this._video=this._getSmugMugVideoEmbed(this._imageInfo,i):""!==this._imageInfo.iframe&&(this._video=this._getIframeVideoEmbed(this._imageInfo,i)),this._videoBox?this._videoBox.one(".fl-slideshow-video-wrap").insert(this._video):(t.all("img").remove(),t.append(this._video)),this._loading&&(this._loading=!1,this.fire("loadComplete"))},_insertVideoButton:function(){var e=this.get("boundingBox"),i="ontouchstart"in window?"touchstart":"click";this._videoButton=t.Node.create('<a class="fl-slideshow-video-button" href="javascript:void(0);"></a>'),this._videoButton.on(i,t.bind(this._showVideoBox,this)),e.insert(this._videoButton),this._positionVideoButton()},_positionVideoButton:function(){var t=this.get("width"),e=this.get("height"),i=parseInt(this._videoButton.getStyle("width"),10),s=parseInt(this._videoButton.getStyle("height"),10);this._videoButton.setStyles({left:(t-i)/2,top:(e-s)/2})},_showVideoBox:function(){var e=this.get("root"),i=t.Node.create('<div class="fl-slideshow-video-wrap"></div>'),s=t.Node.create('<a class="fl-slideshow-video-close" href="javascript:void(0);"></a>'),n="ontouchstart"in window?"touchstart":"click";this._videoBox=t.Node.create('<div class="fl-slideshow-video"></div>'),this._videoBox.setStyle("padding",e.get("boundingBox").getStyle("padding")),this._videoBox.insert(i),this._videoBox.insert(s),this._videoBox.on(n,t.bind(this._removeVideoBox,this)),s.on(n,t.bind(this._removeVideoBox,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&s.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),t.one("body").insert(this._videoBox),this._loadVideo(),t.one("body").on("fl-slideshow-image|keydown",this._onKey,this)},_getSmugMugVideoEmbed:function(e,i){var s=document.createElement("video"),n=0,a="",o="",l="";return null!==t.UA.mobile&&s.canPlayType&&s.canPlayType("video/mp4")?(n=this.get("width"),a="http://www.smugmug.com/photos/"+e.id+"_"+e.key+"-"+n+".mp4",l+='<video width="100%" height="100%" poster="'+this._getImageURL()+'" controls preload="none"',i&&(l+=" autoplay"),l+=">",l+='<source src="'+a+'" type="video/mp4" />',l+="</video>"):(o="imageId="+e.id,o+="&amp;imageKey="+e.key,o+="&amp;albumId="+e.albumId,o+="&amp;albumKey="+e.albumKey,o+="&amp;apiURL=http://api.smugmug.com/&amp;hostLevel=live&amp;isPro=true",o+=i?"&amp;autoPlay=true":"&amp;autoPlay=false",l+='<object type="application/x-shockwave-flash" width="100%" height="100%" data="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="movie" value="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="allowFullScreen" value="true">',l+='<param name="wmode" value="transparent">',l+='<param name="flashVars" value="'+o+'">',l+='<embed src="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf" flashvars="'+o+'" width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent">',l+="</object>"),t.Node.create(l)},_getIframeVideoEmbed:function(e,i){var s='<iframe width="100%" height="100%" frameborder="0" allowfullscreen ',n=e.iframe;return i&&(n+=n.indexOf("?")>-1?"&autoplay=1":"?autoplay=1"),s+='src="'+n+'"></iframe>',t.Node.create(s)},_removeVideoBox:function(e){"undefined"!=typeof e&&e.target&&e.target.get("className").indexOf("fl-slideshow-video")<0||(null!==this._videoBox&&(this._videoBox.remove(),this._videoBox=null,this._video=null),t.one("body").detach("fl-slideshow-image|keydown",this._onKey))},_onKey:function(t){if(27==t.keyCode)return this._removeVideoBox(),!1}},{CSS_PREFIX:"fl-slideshow-image",ATTRS:{loadGroup:{value:"none"},loadPriority:{value:!1},crop:{value:!1},checkFilenamesForNoCrop:{value:!0},cropHorizontalsOnly:{value:!1},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},useThumbSizes:{value:!1},constrainWidth:{value:!1},constrainHeight:{value:!1},loadVideos:{value:!0},showVideoButton:{value:!0}}}),t.namespace("FL").SlideshowMouseNav=t.Base.create("fl-slideshow-mouse-nav",t.Plugin.Base,[],{initializer:function(){var t=this.get("trigger");t.on("click",this._triggerClick,this),t.on("mousemove",this._showArrow,this),t.on("mouseleave",this._hideArrow,this)},_triggerClick:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;a>=s/2?e.nextImage():e.prevImage()},_showArrow:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;null!==e.albumInfo&&e.albumInfo.images.length>1&&(a>=s/2?(i.removeClass("fl-slideshow-mouse-nav-prev"),i.addClass("fl-slideshow-mouse-nav-next")):(i.removeClass("fl-slideshow-mouse-nav-next"),i.addClass("fl-slideshow-mouse-nav-prev")))},_hideArrow:function(){var t=this.get("trigger");t.removeClass("fl-slideshow-mouse-nav-next"),t.removeClass("fl-slideshow-mouse-nav-prev")}},{NS:"mouseNav",ATTRS:{trigger:{value:null}}}),t.namespace("FL").SlideshowKenBurns=t.Base.create("fl-slideshow-ken-burns",t.Base,[],{run:function(){var e=null,i=null;t.FL.Utils.cssSupport("transform")&&(e=this.get("image").one("img"),i=this._getTransform(),e.setStyles({"-webkit-transform-origin":i.origin,"-moz-transform-origin":i.origin,"-ms-transform-origin":i.origin,"transform-origin":i.origin,transform:i.start}),e.transition({easing:"ease-out",duration:this.get("duration"),transform:i.end}))},_getTransform:function(){var e=this.get("zoom"),i=this.get("image"),s=0,n=null,a=null;return s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length),n=t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[s],s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.TRANSFORMS.length),a=t.FL.SlideshowKenBurns.TRANSFORMS[s],i.hasClass("fl-slideshow-image-cropped")||"in"!=n?"out"==n?(a.start="scale("+e+") "+a.translate,a.end="scale(1) translate(0, 0)"):(a.start="scale(1) translate(0, 0)",a.end="scale("+e+") "+a.translate):(s=Math.floor(2*Math.random()),a.start=0===s?"scale(1) translate(100px, 0)":"scale(1) translate(-100px, 0)",a.end="scale("+e+") translate(0, 0)",a.origin="center center"),a}},{ATTRS:{image:{value:null},zoom:{value:1.2},duration:{value:2}},ZOOM_DIRECTIONS:["in","out"],TRANSFORMS:[{origin:"left top",translate:"translate(-30px, -15px)"},{origin:"left center",translate:"translate(-30px, 0)"},{origin:"left bottom",translate:"translate(-30px, 15px)"},{origin:"right top",translate:"translate(30px, -15px)"},{origin:"right center",translate:"translate(30px, 0)"},{origin:"right bottom",translate:"translate(30px, 15px)"}]}),t.namespace("FL").SlideshowNav=t.Base.create("fl-slideshow-nav",t.Widget,[t.WidgetChild],{_buttons:null,_buttonsContainer:null,_buttonsLeftContainer:null,_buttonsRightContainer:null,_fontIcons:{buy:"Cart",caption:"InfoEncircled",close:"XCrossEncircled",fullscreen:"ScreenExpand",next:"ArrowRight",nextPage:"ArrowRight",pause:"PlayerPause",play:"PlayerPlay",prev:"ArrowLeft",prevPage:"ArrowLeft",social:"Heart",thumbs:"ViewThumbGrid"},CONTENT_TEMPLATE:null,renderUI:function(){this._renderContainers(),this._renderButtons(),this._renderFontIcons()},bindUI:function(){var t=this.get("root"),e=this.get("id");this._buttons.prev&&this._buttons.prev.on("click",t.prevImage,t),this._buttons.next&&this._buttons.next.on("click",t.nextImage,t),this._buttons.play&&(this._buttons.play.on("click",this._playClicked,this),t.on(e+"|played",this._showPauseButton,this),t.on(e+"|paused",this._showPlayButton,this),t._playing?this._showPauseButton():this._showPlayButton()),this._buttons.buy&&(t.on(e+"|albumLoadComplete",this._updateBuy,this),null!==t.albumInfo&&this._updateBuy()),this._buttons.count&&t.on(e+"|imageLoadComplete",this._updateCount,this),this._buttons.thumbs&&this._buttons.thumbs.on("click",t._toggleThumbs,t),this._buttons.caption&&(t.on(e+"|imageLoadComplete",this._updateCaption,this),this._updateCaption()),this._buttons.social&&this._buttons.social.on("click",t._toggleSocial,t),this._buttons.fullscreen&&t.fullscreen&&this._buttons.fullscreen.on("click",t.fullscreen.toggle,t.fullscreen),this._buttons.close&&this._buttons.close.on("click",t.hide,t)},destructor:function(){var t=this.get("root"),e=this.get("id");t.detach(e+"|*")},_renderContainers:function(){var e=this.get("contentBox"),i=this.get("buttonsLeft"),s=this.get("buttonsRight");this._buttonsContainer=t.Node.create("<div></div>"),this._buttonsContainer.addClass("fl-slideshow-nav-buttons"),e.appendChild(this._buttonsContainer),i.length>0&&(this._buttonsLeftContainer=t.Node.create("<div></div>"),this._buttonsLeftContainer.addClass("fl-slideshow-nav-buttons-left"),e.appendChild(this._buttonsLeftContainer)),s.length>0&&(this._buttonsRightContainer=t.Node.create("<div></div>"),this._buttonsRightContainer.addClass("fl-slideshow-nav-buttons-right"),e.appendChild(this._buttonsRightContainer))},_renderButtons:function(){var e="",i=0,s=0,n=[{names:this.get("buttons"),container:this._buttonsContainer},{names:this.get("buttonsLeft"),container:this._buttonsLeftContainer},{names:this.get("buttonsRight"),container:this._buttonsRightContainer}];for(this._buttons={};i<n.length;i++)for(s=0;s<n[i].names.length;s++)e=n[i].names[s],e.indexOf("count")>-1?(this._buttons[e]=t.Node.create("<span></span>"),this._updateCount()):this._buttons[e]=t.Node.create('<a href="javascript:void(0);"></a>'),
2
- e.indexOf("buy")>-1&&this._buttons[e].setStyle("display","none"),this._buttons[e].set("name",e),this._buttons[e].addClass("fl-slideshow-nav-"+e),n[i].container.appendChild(this._buttons[e])},_renderFontIcons:function(){var t=null;if(this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"])for(t in this._buttons)"undefined"!=typeof this._buttons[t]&&"undefined"!=typeof this._fontIcons[t]?(this._buttons[t].addClass("sm-fonticon-"+this._fontIcons[t]),this._buttons[t].addClass("sm-fonticon sm-button-skin-default sm-button-nochrome")):t.indexOf("count")>-1&&this._buttons[t].addClass("fonticons-enabled")},_updateCount:function(){var e="",i=t.FL.SlideshowNav.COUNT_TEXT,s=1,n=1;this.get("root").albumInfo&&(s=this.get("root").imageInfo.index+1,n=this.get("root").albumInfo.images.length),e=i.replace("{current}",s).replace("{total}",n),this._buttons.count.set("innerHTML",e)},_updateCaption:function(){var t=this.get("root"),e=t.imageInfo;e&&""===e.caption?(t.caption.slideshowOverlay.enable(),t.caption.slideshowOverlay.hide(),this._buttons.caption.detach("click"),this._buttons.caption.addClass("fl-slideshow-nav-caption-disabled")):(this._buttons.caption.on("click",t._toggleCaption,t),this._buttons.caption.removeClass("fl-slideshow-nav-caption-disabled"))},_updateBuy:function(){var e=null,i=this.get("root"),s=i.get("source")[i.albumIndex],n=i.albumIndex,a=i.get("source")[n];s&&"smugmug"==s.type&&("undefined"!=typeof i.albumInfo.printable?this._updateBuyComplete():(e=new t.FL.SmugMugAPI,e.addParam("method","smugmug.albums.getInfo"),e.addParam("AlbumID",a.id),e.addParam("AlbumKey",a.key),e.on("complete",this._updateBuyComplete,this),e.request()))},_updateBuyComplete:function(t){var e=this.get("root"),i="undefined"==typeof t?e.albumInfo.printable:t.Album.Printable,s=e.albumInfo.link;i?(e.albumInfo.printable=!0,this._buttons.buy.set("href","https://secure.smugmug.com/cart/batchadd/?url="+encodeURIComponent(s)),this._buttons.buy.setStyle("display","inline-block")):(e.albumInfo.printable=!1,this._buttons.buy.setStyle("display","none")),this.fire("resize")},_playClicked:function(){var t=this.get("root");t._playing?t.pause():t.play()},_showPlayButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-pause"),this._buttons.play.addClass("fl-slideshow-nav-play"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPause"),this._buttons.play.addClass("sm-fonticon-PlayerPlay"))},_showPauseButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-play"),this._buttons.play.addClass("fl-slideshow-nav-pause"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPlay"),this._buttons.play.addClass("sm-fonticon-PlayerPause"))}},{CSS_PREFIX:"fl-slideshow-nav",COUNT_TEXT:"{current} of {total}",ATTRS:{buttons:{value:[],writeOnce:!0},buttonsLeft:{value:[],writeOnce:!0},buttonsRight:{value:[],writeOnce:!0},useFontIcons:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowOverlay=t.Base.create("fl-slideshow-overlay",t.Plugin.Base,[],{_focus:!1,_visible:!0,_disabled:!1,_showProps:{duration:.5,easing:"ease-out",opacity:1},_hideProps:{duration:.5,easing:"ease-out",opacity:0},_hideTimer:null,initializer:function(){var t=this.get("host").get("boundingBox");this.afterHostEvent("render",this._initFocus),this.afterHostEvent("render",this._initVisibility),this.get("closeButton")&&this._initCloseButton(),t.addClass("fl-slideshow-overlay")},destructor:function(){this._hideTimerCancel()},_initFocus:function(){var e=this.get("host").get("boundingBox");e.on("mouseenter",t.bind(this._setFocusOnMouseenter,this)),e.on("mouseleave",t.bind(this._setFocusOnMouseleave,this))},_initVisibility:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");this.get("visible")||("display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),t.setStyle("opacity","0"),this._visible=!1)},_initCloseButton:function(){var e=this.get("host").get("boundingBox"),i=null;i=t.Node.create('<a class="fl-slideshow-overlay-close" href="javascript:void(0);"></a>'),i.on("click",t.bind(this._closeButtonClick,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&i.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),e.insert(i)},_closeButtonClick:function(){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this))},_setFocusOnMouseenter:function(){this._focus=!0},_setFocusOnMouseleave:function(){this._focus=!1},disable:function(){this._disabled=!0},enable:function(){this._disabled=!1},show:function(){var e=this.get("host").get("boundingBox"),i=this.get("hideStyle");this._disabled||("display"==i?e.setStyle("display","block"):"left"==i&&e.setStyle("left","auto"),e.transition(this._showProps,t.bind(this._showComplete,this)),this.fire("showStart"))},_showComplete:function(){this._visible=!0,this.hideWithTimer(),this.fire("showComplete")},hide:function(){if(!this._focus&&!this._disabled){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this)),this.fire("hideStart")}},hideWithTimer:function(){this._hideTimerCancel(),this._hideTimer=t.later(this.get("hideDelay"),this,this.hide)},_hideTimerCancel:function(){this._hideTimer&&(this._hideTimer.cancel(),this._hideTimer=null)},_hideComplete:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");"display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),this._visible=!1,this.fire("hideComplete")}},{NS:"slideshowOverlay",ATTRS:{closeButton:{value:!1,writeOnce:!0},hideDelay:{value:3e3,writeOnce:!0},hideStyle:{value:"display",writeOnce:!0},visible:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowSocial=t.Base.create("fl-slideshow-social",t.Widget,[t.WidgetChild],{_buttons:null,renderUI:function(){this._buttons={},this.get("root").get("googlePlusButtonEnabled")&&this._renderGooglePlusButton()},bindUI:function(){var e=this.get("root");e.get("likeButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateLikeButton,this)),e.get("tweetButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateTweetButton,this)),e.get("googlePlusButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateGooglePlusButton,this)),e.get("pinterestButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updatePinterestButton,this))},_updateLikeButton:function(){var e=null,i=this.get("contentBox"),s=this.get("root"),n=s.albumIndex,a=s.get("source")[n],o=s.imageInfo;this._buttons.like&&(this._buttons.like.remove(),this._buttons.like=null),"smugmug"==a.type?(e="https://www.facebook.com/plugins/like.php?",e+="href=http://www.smugmug.com/services/graph/gallery/",e+=a.id+"_"+a.key+"/"+o.id+"_"+o.key):(e="https://www.facebook.com/plugins/like.php?",e+="href="+encodeURIComponent(o.largeURL)),e+="&send=false",e+="&layout=button_count",e+="&width=90",e+="&show_faces=false",e+="&action=like",e+="&colorscheme=light",e+="&height=21",this._buttons.like=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.like.setStyles({overflow:"hidden",width:"90px",height:"21px"}),i.appendChild(this._buttons.like)},_updateTweetButton:function(){var e=null,i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.tweet&&(this._buttons.tweet.remove(),this._buttons.tweet=null),e="https://platform.twitter.com/widgets/tweet_button.html?",e+="url="+encodeURIComponent(i.largeURL),e+="&count=none",this._buttons.tweet=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.tweet.setStyles({overflow:"hidden",width:"90px",height:"21px"}),s.appendChild(this._buttons.tweet)},_renderGooglePlusButton:function(){var t,e;t=document.createElement("script"),t.type="text/javascript",t.src="https://apis.google.com/js/plusone.js",e=document.getElementsByTagName("head")[0],e.parentNode.appendChild(t)},_updateGooglePlusButton:function(){"undefined"==typeof gapi?setTimeout(t.bind(this._updateGooglePlusButtonCallback,this),500):this._updateGooglePlusButtonCallback()},_updateGooglePlusButtonCallback:function(){var e=this.get("root").imageInfo,i=this.get("contentBox");this._buttons.plus&&(this._buttons.plus.remove(),this._buttons.plus=null),"undefined"!=typeof gapi&&(this._buttons.plus=t.Node.create("<div></div>"),i.appendChild(this._buttons.plus),gapi.plusone.render(this._buttons.plus._node,{href:encodeURIComponent(e.largeURL),annotation:"bubble",size:"medium"}))},_updatePinterestButton:function(){var e="https://pinterest.com/pin/create/button/",i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.pin&&(this._buttons.pin.remove(),this._buttons.pin=null),e+="?url="+encodeURIComponent(window.location.href),e+="&media="+encodeURIComponent(i.mediumURL),e+="&description="+encodeURIComponent(i.caption),this._buttons.pin=t.Node.create("<a></a>"),this._buttons.pin.setAttribute("data-pin-config","none"),this._buttons.pin.setAttribute("data-pin-do","buttonPin"),this._buttons.pin.setAttribute("href",e),this._buttons.pin.setAttribute("target","_blank"),this._buttons.pin.set("innerHTML",'<img src="https://assets.pinterest.com/images/pidgets/pin_it_button.png" border="0" />'),s.appendChild(this._buttons.pin)}},{CSS_PREFIX:"fl-slideshow-social",ATTRS:{}}),t.namespace("FL").SlideshowThumbs=t.Base.create("fl-slideshow-thumbs",t.Widget,[t.WidgetParent,t.WidgetChild],{_clipBox:null,_pagesBox:null,_activePageBox:null,_activePageIndex:0,_nextPageBox:null,_activeImages:null,_nextImages:null,_prevImages:null,_leftNav:null,_rightNav:null,_topNav:null,_bottomNav:null,_bbHeight:0,_bbWidth:0,_cbWidth:0,_clipBoxMarginLeft:0,_clipBoxTop:0,_colsPerPage:0,_rowsPerPage:0,_imagesPerPage:0,_numPages:0,_pageHeight:0,_pageWidth:0,_horizontalSpacing:0,_verticalSpacing:0,_leftNavWidth:0,_rightNavWidth:0,_transition:null,_transitioning:!1,_transitionDirection:"next",_gestures:null,initializer:function(){this._activeImages=[],this._nextImages=[],this._prevImages=[]},renderUI:function(){this._renderBoxes(),this._renderNavs()},bindUI:function(){var e=this.get("root"),i=this.get("id"),s=this.get("transition");e.on(i+"|albumLoadComplete",this._albumLoadComplete,this),"ontouchstart"in window&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:this._activePageBox,nextItem:this._nextPageBox}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){this._syncBoxes(),this._syncNavs()},destructor:function(){var e=this.get("root"),i=this.get("id");e.detach(i+"|*"),t.FL.SlideshowImageLoader.removeGroup("thumbs")},unload:function(){var e=this.get("root"),i=this.get("id"),s=0;for(e.detach(i+"|imageLoadComplete"),t.FL.SlideshowImageLoader.removeGroup("thumbs");s<this._activeImages.length;s++)this._activeImages[s].unload()},resize:function(){this._setSizeInfo(),this._togglePageButtons(),this._resizeBoxes(),this._resizeNavs(),this.get("root").albumInfo&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._renderActivePage(),this._preloadNextPage(),this._preloadPrevPage()),this._gestures&&this._numPages<2?this._gestures.disable():this._gestures&&this._gestures.enable()},prevPage:function(){this._transitioning||this._transitionStart("prev")},nextPage:function(){this._transitioning||this._transitionStart("next")},_albumLoadComplete:function(){var t=this.get("root"),e=this.get("id");t.once(e+"|imageLoadComplete",this.resize,this),t.on(e+"|imageLoadComplete",this._imageLoadComplete,this)},_imageLoadComplete:function(){var e=this.get("root").albumInfo,i=t.one(".fl-slideshow-image-active"),s=i?i._imageInfo:null,n=null,a=this.get("root").imageInfo;this._setActiveImage(this._activeImages),n=t.one(".fl-slideshow-image-active"),i&&!n&&(0===a.index&&s.index===e.images.length-1?this.nextPage():0===s.index&&a.index===e.images.length-1?this.prevPage():s.index<a.index?this.nextPage():s.index>a.index&&this.prevPage())},_renderBoxes:function(){this._clipBox=t.Node.create("<div></div>"),this._clipBox.addClass("fl-slideshow-thumbs-clip"),this.get("contentBox").insert(this._clipBox),this._pagesBox=t.Node.create("<div></div>"),this._pagesBox.addClass("fl-slideshow-thumbs-pages"),this._clipBox.insert(this._pagesBox),this._activePageBox=t.Node.create("<div></div>"),this._activePageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._activePageBox),this._nextPageBox=t.Node.create("<div></div>"),this._nextPageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._nextPageBox)},_syncBoxes:function(){this._activePageBox.setStyle("left","0"),this._nextPageBox.setStyle("left","-9999px")},_resizeBoxes:function(){this.set("width",this._bbWidth),this.set("height",this._bbHeight),this.get("contentBox").setStyle("width",this._cbWidth+"px"),this._clipBox.setStyle("width",this._pageWidth+"px"),this._clipBox.setStyle("height",this._pageHeight+"px"),this._clipBox.setStyle("padding",this._verticalSpacing+"px 0 0 "+this._horizontalSpacing+"px "),this._clipBox.setStyle("margin","0 0 0 "+this._clipBoxMarginLeft+"px"),this._clipBox.setStyle("top",this._clipBoxTop),this._pagesBox.setStyle("width",this._pageWidth+"px"),this._pagesBox.setStyle("height",this._pageHeight+"px"),this._activePageBox.setStyle("width",this._pageWidth+"px"),this._activePageBox.setStyle("height",this._pageHeight+"px"),this._nextPageBox.setStyle("width",this._pageWidth+"px"),this._nextPageBox.setStyle("height",this._pageHeight+"px")},_renderActivePage:function(){var t=0,e=this.get("root"),i=this._imagesPerPage*this._activePageIndex,s=i+this._imagesPerPage,n=e.albumInfo.images;for(this._clearActiveImage();t<this._activeImages.length;t++)this._activeImages[t].remove(),this._activeImages[t].unload(),this._activeImages[t].get("boundingBox")._imageInfo=null,this._activeImages[t].get("boundingBox").remove();for(t=0;i<s&&n[i];i++)this._renderImage(this._activeImages,t,this._activePageBox,n[i]),t++;this._setActiveImage(this._activeImages)},_renderNextPage:function(){var t=0,e="next"==this._transitionDirection?this._nextImages:this._prevImages;for(this._nextPageBox.get("children").remove();t<e.length&&e[t]._imageInfo;t++)this._renderImage(e,t,this._nextPageBox,e[t]._imageInfo);this._setActiveImage(e)},_preloadNextPage:function(){var t=this._activePageIndex+1>=this._numPages?0:this._activePageIndex+1;this._preloadPage(t,this._nextImages)},_preloadPrevPage:function(){var t=this._activePageIndex-1<0?this._numPages-1:this._activePageIndex-1;this._preloadPage(t,this._prevImages)},_preloadPage:function(t,e){var i=0,s=this.get("root"),n=s.albumInfo.images,a=t*this._imagesPerPage,o=a+this._imagesPerPage,l=this.get("imageConfig"),h=l.width,r=l.height;if(this._numPages>1){for(;i<e.length;i++)e[i].remove(),e[i].unload();for(i=0;a<o;a++)n[a]&&(this._renderImage(e,i),e[i].preload(n[a],h,r),i++)}},_renderImage:function(e,i,s,n){var a=null,o=this.get("imageConfig");"undefined"==typeof e[i]&&(o.loadGroup="thumbs",o.useThumbSizes=!0,o.loadVideos=!1,e[i]=new t.FL.SlideshowImage(o),a=e[i].get("boundingBox"),a.on("click",this._imageClick,this),a.on("mouseover",this._imageMouseover,this),a.on("mouseout",this._imageMouseout,this)),a=e[i].get("boundingBox"),a.setStyle("margin","0 "+this._horizontalSpacing+"px "+this._verticalSpacing+"px 0"),s&&(this._childrenContainer=s,this.add(e[i]),e[i].resize(o.width,o.height)),n&&(e[i].load(n),a._imageInfo=n)},_uiAddChild:function(t,e){t.render(e),e.appendChild(t.get("boundingBox"))},_imageClick:function(t){var e=this.get("root");this.get("pauseOnClick")&&e.pause(),e.loadImage(t.currentTarget._imageInfo.index),this.fire("imageClick")},_setActiveImage:function(t){var e=0;for(this._clearActiveImage();e<t.length;e++)if(t[e]._imageInfo&&t[e]._imageInfo.index==this.get("root").imageInfo.index){t[e].get("boundingBox").addClass("fl-slideshow-image-active");break}},_clearActiveImage:function(){var e=t.one(".fl-slideshow-image-active");e&&e.removeClass("fl-slideshow-image-active")},_getTransition:function(){var t=this.get("transition");return"slideHorizontal"==t&&"next"==this._transitionDirection?"slideLeft":"slideHorizontal"==t&&"prev"==this._transitionDirection?"slideRight":"slideVertical"==t&&"next"==this._transitionDirection?"slideUp":"slideVertical"==t&&"prev"==this._transitionDirection?"slideDown":t},_transitionStart:function(e){this._numPages>1&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e,this._transitioning=!0,this._nextPageBox.setStyle("left","0px"),this._renderNextPage(),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextPageBox,itemOut:this._activePageBox,type:this._getTransition(),duration:this.get("transitionDuration"),easing:this.get("transitionEasing")}),this._transition.once("complete",this._transitionComplete,this),this._transition.run(),this._gestures&&this._gestures.disable())},_transitionComplete:function(){this._swapPageRefs(),this._transitioning=!1,this._transitionDirection="",this._transition=null,this._gestures&&this._gestures.enable(),this.fire("transitionComplete")},_gesturesMoveStart:function(e){t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e.direction,this._renderNextPage()},_gesturesEndComplete:function(){this._swapPageRefs(),this._transitionDirection="",this.fire("transitionComplete")},_swapPageRefs:function(){var t=this._activePageBox,e=this._activeImages;this._activePageBox=this._nextPageBox,this._nextPageBox=t,this._nextPageBox.setStyle("left","-9999px"),"next"==this._transitionDirection?(this._activeImages=this._nextImages,this._nextImages=e):(this._activeImages=this._prevImages,this._prevImages=e),"next"==this._transitionDirection&&this._activePageIndex+1<this._numPages?this._activePageIndex++:"next"==this._transitionDirection?this._activePageIndex=0:"prev"==this._transitionDirection&&this._activePageIndex-1>-1?this._activePageIndex--:"prev"==this._transitionDirection&&(this._activePageIndex=this._numPages-1),this._gestures&&(this._gestures.set("activeItem",this._activePageBox),this._gestures.set("nextItem",this._nextPageBox)),this._preloadNextPage(),this._preloadPrevPage()},_renderNavs:function(){var e=this.get("topNavButtons"),i=this.get("rightNavButtons"),s=this.get("bottomNavButtons"),n=this.get("leftNavButtons");this.get("topNavEnabled")&&e.length>0&&(this._topNav=new t.FL.SlideshowNav({buttons:e}),this._topNav.get("boundingBox").addClass("fl-slideshow-thumbs-top-nav"),this.add(this._topNav),this._topNav.render(this.get("contentBox")),this._clipBox.insert(this._topNav.get("boundingBox"),"before"),this._bindNavEvents(this._topNav)),this.get("rightNavEnabled")&&i.length>0&&(this._rightNav=new t.FL.SlideshowNav({buttons:i}),this._rightNav.get("boundingBox").addClass("fl-slideshow-thumbs-right-nav"),this.add(this._rightNav),this._rightNav.render(this.get("contentBox")),this._bindNavEvents(this._rightNav)),this.get("bottomNavEnabled")&&s.length>0&&(this._bottomNav=new t.FL.SlideshowNav({buttons:s}),this._bottomNav.get("boundingBox").addClass("fl-slideshow-thumbs-bottom-nav"),this.add(this._bottomNav),this._bottomNav.render(this.get("contentBox")),this._bindNavEvents(this._bottomNav)),this.get("leftNavEnabled")&&n.length>0&&(this._leftNav=new t.FL.SlideshowNav({buttons:n}),this._leftNav.get("boundingBox").addClass("fl-slideshow-thumbs-left-nav"),this.add(this._leftNav),this._leftNav.render(this.get("contentBox")),this._bindNavEvents(this._leftNav))},_syncNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("right","0px")),this._bottomNav&&(e=this._bottomNav.get("boundingBox"),e.setStyle("position","absolute"),e.setStyle("bottom","0px"),e.setStyle("width","100%")),this._leftNav&&(i=this._leftNav.get("boundingBox"),i.setStyle("position","absolute"),i.setStyle("top","0px"),i.setStyle("left","0px"))},_resizeNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),i=this._bbHeight/2-parseInt(t.getComputedStyle("height"),10)/2,t.setStyle("marginTop",i+"px")),this._leftNav&&(e=this._leftNav.get("boundingBox"),i=this._bbHeight/2-parseInt(e.getComputedStyle("height"),10)/2,e.setStyle("marginTop",i+"px"))},_bindNavEvents:function(t){t._buttons.prevPage&&t._buttons.prevPage.on("click",this.prevPage,this),t._buttons.nextPage&&t._buttons.nextPage.on("click",this.nextPage,this),t.on("resize",this.resize,this)},_togglePageButtons:function(){var t=this.get("boundingBox").all(".fl-slideshow-nav-prevPage, .fl-slideshow-nav-nextPage"),e=t.getStyle("display")[0];1==this._numPages&&"inline-block"==e?(t.setStyle("display","none"),this._setSizeInfo()):this._numPages>1&&"none"==e&&(t.setStyle("display","inline-block"),this._setSizeInfo())},_setSizeInfo:function(){var t=this.get("root"),e=this.get("boundingBox"),i=e.getStyle("position"),s=parseInt(e.getStyle("marginLeft"),10),n=parseInt(e.getStyle("marginRight"),10),a=parseInt(e.getStyle("marginTop"),10),o=parseInt(e.getStyle("marginBottom"),10),l=parseInt(e.getStyle("paddingLeft"),10),h=parseInt(e.getStyle("paddingRight"),10),r=parseInt(e.getStyle("paddingTop"),10),g=parseInt(e.getStyle("paddingBottom"),10),u=e.get("parentNode"),d=parseInt(u.getComputedStyle("width"),10),m=parseInt(u.getComputedStyle("height"),10),c=d-l-h-s-n,_=m-r-g-a-o,p=c,v=c,f=_,b=this.get("columns"),y=this.get("rows"),x=this.get("imageConfig"),I=this.get("horizontalSpacing"),S=this.get("verticalSpacing"),w=this.get("spaceEvenly"),B=this.get("centerSinglePage"),T=0,C=0,L=0,N=0,P=b,O=y,R=0,E=1,k=0,F=0,U=0,z=0;e.setStyle("position","relative"),isNaN(b)||(c=v=b*(x.width+I)+I),isNaN(y)||(_=f=y*(x.height+S)+S),this._leftNav&&(T=parseInt(this._leftNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=T:c+=T),this._rightNav&&(C=parseInt(this._rightNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=C:c+=C),this._topNav&&(L=parseInt(this._topNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=L:_+=L),this._bottomNav&&(N=parseInt(this._bottomNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=N:_+=N),isNaN(b)&&(P=Math.floor(v/(x.width+I)),P=P<1?1:P),isNaN(y)&&(O=Math.floor(f/(x.height+S)),O=O<1?1:O),R=P*O,t.albumInfo&&(E=Math.ceil(t.albumInfo.images.length/R)),isNaN(b)&&w&&(I=Math.floor((v-x.width*P)/(P+1))),isNaN(y)&&w&&(S=Math.floor((f-x.height*O)/(O+1))),t.albumInfo&&B&&1==E&&1==O?(p=t.albumInfo.images.length*x.width,p+=I*(t.albumInfo.images.length+1),this._leftNav&&(p+=T),this._rightNav&&(p+=C)):p=c,t.albumInfo&&B&&1==E&&1==O?(v=t.albumInfo.images.length*x.width,v+=I*t.albumInfo.images.length):v=P*(x.width+I),f=O*(x.height+S),E<2?k=T:(U=c,this._rightNav&&(U-=C),this._leftNav?(U-=T,k=T+(U-v-I)/2):k=(U-v-I)/2),E>1&&!w&&(z=_,this._topNav&&(z-=L),this._bottomNav&&(z-=N),F=(z-(S+f))/2),this._bbHeight=_,this._bbWidth=c,this._cbWidth=p,this._clipBoxMarginLeft=k,this._clipBoxTop=F,this._colsPerPage=P,this._rowsPerPage=O,this._imagesPerPage=R,this._numPages=E,this._pageHeight=f,this._pageWidth=v,this._leftNavWidth=T,this._rightNavWidth=C,this._horizontalSpacing=I,this._verticalSpacing=S,this._activePageIndex=Math.floor(t.imageIndex/this._imagesPerPage),e.setStyle("position",i)}},{CSS_PREFIX:"fl-slideshow-thumbs",ATTRS:{columns:{value:"auto"},rows:{value:"auto"},horizontalSpacing:{value:15},verticalSpacing:{value:15},spaceEvenly:{value:!0},centerSinglePage:{value:!0},pauseOnClick:{value:!1},transition:{value:"slideHorizontal"},transitionDuration:{value:.8},transitionEasing:{value:"ease-out"},imageConfig:{value:{crop:!0,width:50,height:50}},topNavEnabled:{value:!1},topNavButtons:{value:["prevPage","nextPage"]},rightNavEnabled:{value:!0},rightNavButtons:{value:["nextPage"]},bottomNavEnabled:{value:!1},bottomNavButtons:{value:["prevPage","nextPage"]},leftNavEnabled:{value:!0},leftNavButtons:{value:["prevPage"]},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowTransition=t.Base.create("fl-slideshow-transition",t.Base,[],{_transitionFunction:"_transitionFade",_type:"fade",initializer:function(){var e=this.get("type"),i=[],s=t.FL.SlideshowTransition.TYPES,n=t.FL.SlideshowTransition.SLIDESHOW_IMAGE_TYPES,a=t.Array.indexOf(n,e)>-1,o=this._isSlideshowImage(),l=this.get("itemIn"),h=this.get("itemOut");e.indexOf(",")>-1&&(i=e.split(","),i.sort(function(){return.5-Math.random()}),e=i[0]),!o&&a?e="fade":o&&(l&&null===l.one("img")||h&&null===h.one("img")?e="none":a&&(t.UA.gecko&&t.UA.gecko<5||t.UA.opera>0||t.UA.ie>0&&t.UA.ie<9)&&(e="fade")),t.FL.SlideshowTransition.TYPES[e]&&(this._transitionFunction=s[e],this._type=e),this._setupItems()},run:function(){this.fire("start"),this[this._transitionFunction].call(this)},_setupItems:function(){var e=this.get("itemIn"),i=this.get("itemOut");e&&(e.setStyle("zIndex",2),e.setStyle("opacity",1),t.FL.Utils.cssSupport("transform")?e.setStyle("transform","translate(0, 0)"):(e.setStyle("top","0"),e.setStyle("left","0"))),i&&i.setStyle("zIndex",1)},_isSlideshowImage:function(){var t=this.get("itemIn"),e=this.get("itemOut");return!(!t||!t.hasClass("fl-slideshow-image"))||!(!e||!e.hasClass("fl-slideshow-image"))},_transitionStart:function(e,i){var s=this.get("itemIn"),n=this.get("itemOut"),a=t.bind(this._transitionComplete,this),o=s?null:a,l=this.get("duration"),h=this.get("easing");s&&(e.duration=e.duration||l,e.easing=e.easing||h,s.transition(e)),n&&(i.duration=i.duration||l,i.easing=i.easing||h,n.transition(i)),a?t.later(1e3*e.duration+100,null,a):o&&t.later(1e3*i.duration+100,null,o)},_transitionComplete:function(){this._set("itemIn",null),this._set("itemOut",null),this.fire("complete")},_transitionNone:function(){var t=this.get("itemIn"),e=this.get("itemOut");t&&t.setStyle("opacity",1),e&&e.setStyle("opacity",0),this._transitionComplete()},_transitionFade:function(){var t=this.get("itemIn");t&&t.setStyle("opacity",0),this._transitionStart({opacity:1},{opacity:0})},_transitionSlideLeft:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(-100%, 0)"}):this._jsTransitionSlide("left")},_transitionSlideRight:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(-100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(100%, 0)"}):this._jsTransitionSlide("right")},_transitionSlideUp:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, 100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, -100%)"}):this._jsTransitionSlide("up")},_transitionSlideDown:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, -100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, 100%)"}):this._jsTransitionSlide("down")},_jsTransitionSlide:function(t){var e=this.get("itemIn"),i=this.get("itemOut"),s=0;i&&"left"==t&&(s=-parseInt(i.getStyle("width"),10)),i&&"right"==t&&(s=parseInt(i.getStyle("width"),10)),i&&"up"==t&&(s=-parseInt(i.getStyle("height"),10)),i&&"down"==t&&(s=parseInt(i.getStyle("height"),10)),e&&e.setStyle("opacity",1),e&&"left"==t&&e.setStyle("left",e.getStyle("width")),e&&"right"==t&&e.setStyle("left","-"+e.getStyle("width")),e&&"up"==t&&e.setStyle("top",e.getStyle("height")),e&&"down"==t&&e.setStyle("top","-"+e.getStyle("height")),"left"==t||"right"==t?this._transitionStart({left:0},{left:s}):this._transitionStart({top:0},{top:s})},_cssTransitionSlide:function(e){var i=this.get("itemIn"),s=this.get("itemOut"),n=t.UA.chrome<36?"transform":"-webkit-transform",a={},o={};a[n]=e.inEnd,o[n]=e.outEnd,i&&(i.setStyle("transition",""),i.setStyle("opacity",1),i.setStyle(n,e.inStart)),s&&(s.setStyle("transition",""),s.setStyle(n,e.outStart)),this._transitionStart(a,o)},_transitionBars:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("bars"),i=this._renderSlices(1,e),s=this.get("duration"),n=0,a=100,o=!1,l=0,h=null,r={duration:s,opacity:1};for("barsRandom"==this._type&&(i=this._randomizeSlices(i));l<i.length;l++)h=t.clone(r),"blinds"==this._type&&(h.width=parseFloat(i[l].getComputedStyle("width"),10)+"px",i[l].setStyle("width","0px"),a=50),o=l==i.length-1,t.later(n,this,this._transitionSlice,[i[l],h,o]),n+=a;this._transitionSlicesFadeLast(n)},_transitionBoxes:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("boxCols"),i=this.get("boxRows"),s=e*i,n="boxesRandom"!=this._type,a=this._renderSlices(i,e,n),o=this.get("duration"),l=0,h=150,r=!1,g=0,u=0,d=0,m=-1,c=null,_={duration:o,opacity:1};if(n)for(;g<s;){for(u=0;u<i;u++)0===u&&(m++,d=m),d>-1&&d<e&&(g++,c=t.clone(_),"boxesGrow"==this._type&&(c.height=parseFloat(a[u][d].getComputedStyle("height"),10)+"px",c.width=parseFloat(a[u][d].getComputedStyle("width"),10)+"px",a[u][d].setStyle("height","0px"),a[u][d].setStyle("width","0px"),h=50),r=g==s-1,t.later(l,this,this._transitionSlice,[a[u][d],c,r])),d--;l+=h}else for(a=this._randomizeSlices(a),h=30;g<a.length;g++)c=t.clone(_),r=g==a.length-1,t.later(l,this,this._transitionSlice,[a[g],c,r]),l+=h;this._transitionSlicesFadeLast(l)},_renderSlices:function(e,i,s){for(var n=this.get("itemIn"),a=parseFloat(n.getComputedStyle("height"),10),o=parseFloat(n.getComputedStyle("width"),10),l=n.one("img"),h=l.get("src"),r=parseFloat(l.getComputedStyle("height"),10),g=parseFloat(l.getComputedStyle("width"),10),u=parseFloat(l.getComputedStyle("left"),10),d=parseFloat(l.getComputedStyle("top"),10),m=0,c=0,_=Math.round(a/e),p=Math.round(o/i),v=null,f=null,b=[];c<e;c++)for("undefined"!=typeof s&&s&&(b[c]=[]),m=0;m<i;m++)v=t.Node.create('<div class="fl-slideshow-transition-slice"></div>'),f=t.Node.create('<img src="'+h+'" />'),v.setStyles({left:p*m+"px",top:_*c+"px",width:m==i-1?o-p*m+"px":p+"px",height:c==e-1?a-_*c+"px":_+"px",opacity:0}),f.setStyles({height:r+"px",width:g+"px",top:d-(_+c*_-_)+"px",left:u-(p+m*p-p)+"px"}),v.append(f),n.append(v),"undefined"!=typeof s&&s?b[c].push(v):b.push(v);return b},_transitionSlicesFadeLast:function(t){var e=this.get("itemOut");e&&!e.hasClass("fl-slideshow-image-cropped")&&e.transition({duration:t/1e3+this.get("duration"),opacity:0})},_transitionSlice:function(e,i,s){var n=s?t.bind(this._transitionSlicesComplete,this):null;e.transition(i,n)},_transitionSlicesComplete:function(){var t=this.get("itemIn");t.all(".fl-slideshow-transition-slice").remove(),t.one(".fl-slideshow-image-img").setStyle("opacity",1),this._transitionComplete()},_randomizeSlices:function(t){var e,i,s=t.length;if(0!==s){for(;--s;)e=Math.floor(Math.random()*(s+1)),i=t[s],t[s]=t[e],t[e]=i;return t}},_transitionKenBurns:function(){var e=this.get("kenBurnsDuration"),i=this.get("duration"),s=this.get("itemIn"),n=this.get("kenBurnsZoom");this._transitionFade(),new t.FL.SlideshowKenBurns({duration:e+i+4,image:s,zoom:n}).run()}},{ATTRS:{itemIn:{value:null},itemOut:{value:null},duration:{value:.5},easing:{value:"ease-out"},type:{value:"fade"},bars:{value:15},boxCols:{value:8},boxRows:{value:4},kenBurnsDuration:{value:4},kenBurnsZoom:{value:1.2}},TYPES:{fade:"_transitionFade",none:"_transitionNone",slideLeft:"_transitionSlideLeft",slideRight:"_transitionSlideRight",slideUp:"_transitionSlideUp",slideDown:"_transitionSlideDown",blinds:"_transitionBars",bars:"_transitionBars",barsRandom:"_transitionBars",boxes:"_transitionBoxes",boxesRandom:"_transitionBoxes",boxesGrow:"_transitionBoxes",kenBurns:"_transitionKenBurns"},SLIDESHOW_IMAGE_TYPES:["blinds","bars","barsRandom","boxes","boxesRandom","boxesGrow","kenBurns"]}),t.namespace("FL").Slideshow=t.Base.create("fl-slideshow",t.FL.SlideshowBase,[],{frame:null,nav:null,imageNavLeft:null,imageNavRight:null,thumbs:null,verticalThumbs:null,caption:null,social:null,_nextImagePreloader:null,_initialNavSettings:null,initializer:function(){
3
- var e={loadGroup:"main-preload",crop:this.get("crop"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize")};this._nextImagePreloader=new t.FL.SlideshowImage(e),this._isMobile()&&(this._removeNavButton("prev"),this._removeNavButton("prevPage"),this._removeNavButton("next"),this._removeNavButton("nextPage"),this._removeNavButton("fullscreen")),this._hasNavButton("fullscreen")&&(t.FL.SlideshowFullscreen.OS_SUPPORT?this.plug(t.FL.SlideshowFullscreen):this._removeNavButton("fullscreen"))},renderUI:function(){t.FL.Slideshow.superclass.renderUI.apply(this,arguments),this._renderFrame(),this._renderVerticalThumbs(),this._renderNavAndThumbs(),this._renderImageNav(),this._renderMouseNav(),this._renderCaption(),this._renderSocial()},bindUI:function(){var e=this.get("boundingBox"),i=this.frame.get("boundingBox"),s=this.get("navOverlay"),n=this.get("navType"),a=this._getNav(),o=this.get("clickAction");t.FL.Slideshow.superclass.bindUI.apply(this,arguments),t.Do.after(this._resizeChildWidgets,this,"resize"),this.on("albumLoadStart",this._albumLoadStart,this),this.on("albumLoadComplete",this._albumLoadComplete,this),this.on("imageLoadComplete",this._loadFrame,this),this.get("loadingImageAlwaysEnabled")&&(this.frame.on("transitionInit",t.bind(this._showLoadingImageWithDelay,this)),this.frame.on("transitionStart",t.bind(this._hideLoadingImage,this))),this.get("overlayHideOnMousemove")&&(a&&s&&(this.frame.once("transitionComplete",a.slideshowOverlay.hideWithTimer,a.slideshowOverlay),e.on("mousemove",t.bind(this._toggleNav,this))),"buttons"!=n&&"thumbs"!=n&&"custom"!=n||(e.on("mouseenter",t.bind(this._checkOverlaysOnMouseenter,this)),e.on("mouseleave",t.bind(this._hideAllOverlays,this)))),e.delegate("click",t.bind(this._overlayCloseClick,this),".fl-slideshow-overlay-close"),"gallery"!=o&&"url"!=o||i.delegate("click",t.bind(this._frameClick,this),".fl-slideshow-image-img")},syncUI:function(){var e=this.get("boundingBox");t.FL.Slideshow.superclass.syncUI.apply(this,arguments),e._node.onselectstart=function(){return!1},e._node.unselectable="on",e._node.style.MozUserSelect="none","none"!=this.get("clickAction")&&this.frame.get("boundingBox").addClass("fl-click-action-enabled")},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},unload:function(){this.pause(),this.frame.unload(),null!==this.thumbs&&this.thumbs.unload()},_albumLoadStart:function(){this._showLoadingImage()},_albumLoadComplete:function(){this.frame.once("transitionStart",t.bind(this._hideLoadingImage,this))},_resizeChildWidgets:function(){var t=this.get("boundingBox"),e=this.get("contentBox"),i=this.get("imageNavEnabled");this._renderNavAndThumbs(),this.get("verticalThumbsOverlay")?(this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight")),this._resizeVerticalThumbs()):(this._resizeVerticalThumbs(),this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight"))),i&&this._positionImageNav(),this._positionLoadingImage()},_renderVerticalThumbs:function(){var e,i=this.get("responsiveThreshold"),s=this.get("boundingBox"),n=s.get("offsetWidth");this.get("verticalThumbsEnabled")&&n>i&&(this.verticalThumbs=new t.FL.SlideshowThumbs(this._getVerticalThumbsConfig()),this.add(this.verticalThumbs),this.verticalThumbs.render(s),e=this.verticalThumbs.get("boundingBox"),e.addClass("fl-slideshow-vertical-thumbs"),e.setStyle(this.get("verticalThumbsPosition"),0),s.append(e),this.get("verticalThumbsOverlay")?(this.verticalThumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.frame.get("boundingBox").append(e),this.verticalThumbs.resize()):(this.verticalThumbs.resize(),this._adjustContentForVerticalThumbs()),this._bindVerticalThumbs())},_getVerticalThumbsConfig:function(){var t=this.getAttrs(),e={columns:t.verticalThumbsColumns,rows:"auto",centerSinglePage:!1,horizontalSpacing:t.verticalThumbsHorizontalSpacing,verticalSpacing:t.verticalThumbsVerticalSpacing,spaceEvenly:t.verticalThumbsSpaceEvenly,rightNavEnabled:!1,leftNavEnabled:!1,topNavEnabled:t.verticalThumbsTopNavEnabled,topNavButtons:t.verticalThumbsTopNavButtons,bottomNavEnabled:t.verticalThumbsBottomNavEnabled,bottomNavButtons:t.verticalThumbsBottomNavButtons,pauseOnClick:t.verticalThumbsPauseOnClick,transition:t.verticalThumbsTransition,transitionDirection:t.verticalThumbsTransitionDirection,transitionEasing:t.verticalThumbsTransitionEasing,touchSupport:!0,imageConfig:{crop:t.verticalThumbsImageCrop,width:t.verticalThumbsImageWidth,height:t.verticalThumbsImageHeight}};return e},_bindVerticalThumbs:function(){var e=this.get("boundingBox"),i=this.get("overlayHideOnMousemove"),s=this.get("verticalThumbsOverlay"),n=this.verticalThumbs;n&&i&&s&&(this.frame.once("transitionComplete",n.slideshowOverlay.hideWithTimer,n.slideshowOverlay),e.on("mousemove",t.bind(this._toggleVerticalThumbs,this)),e.on("mouseenter",t.bind(this._toggleVerticalThumbs,this)))},_resizeVerticalThumbs:function(){var t,e,i,s,n,a,o,l,h=this.get("verticalThumbsEnabled");h&&(t=this.get("verticalThumbsOverlay"),e=this.get("responsiveThreshold"),i=this.get("boundingBox"),s=i.get("offsetWidth"),n=this.get("navOverlay"),a=this.get("navType"),o=this._getNav(),this.verticalThumbs&&s>e?(this.verticalThumbs.get("boundingBox").setStyle("display","block"),this.verticalThumbs.resize(),t?o&&n&&(l=o.get("boundingBox"),"thumbs"==a?(this._adjustOverlayForVerticalThumbs(l,!0),this.thumbs.resize()):this._adjustOverlayForVerticalThumbs(l)):this._adjustContentForVerticalThumbs()):!this.verticalThumbs&&s>e?this._renderVerticalThumbs():this.verticalThumbs&&s<=e&&(this.verticalThumbs.get("boundingBox").setStyle("display","none"),t||this.get("contentBox").setStyles({left:"auto",position:"relative",right:"auto",width:"auto"})))},_toggleVerticalThumbs:function(){this.verticalThumbs&&(this.verticalThumbs.slideshowOverlay._visible?this.verticalThumbs.slideshowOverlay.hideWithTimer():this.verticalThumbs.slideshowOverlay.show())},_adjustContentForVerticalThumbs:function(){var t=this.get("boundingBox"),e=this.verticalThumbs.get("boundingBox"),i=this.get("verticalThumbsPosition"),s=this.get("contentBox"),n="left"==i?"right":"left",a=t.get("offsetWidth")-e.get("offsetWidth");s.setStyle("position","absolute"),s.setStyle(n,0),s.setStyle("width",a)},_adjustOverlayForVerticalThumbs:function(t,e){var i=this.get("verticalThumbsEnabled"),s=this.get("verticalThumbsOverlay"),n=null,a=null,o="undefined"==typeof e?"":"margin-",l=0;this.verticalThumbs&&i&&s&&(n=this.verticalThumbs.get("boundingBox"),l=n.get("offsetWidth"),a=this.get("verticalThumbsPosition"),"left"==a?t.setStyle(o+"left",l+"px"):t.setStyle(o+"right",l+"px"))},_renderFrame:function(){this.frame=new t.FL.SlideshowFrame({imageConfig:{loadGroup:"main",loadPriority:!0,crop:this.get("crop"),cropHorizontalsOnly:this.get("cropHorizontalsOnly"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize"),showVideoButton:this.get("navOverlay")},touchSupport:!0}),this.add(this.frame),this.frame.render(this.get("contentBox")),this.frame.get("boundingBox").addClass("fl-slideshow-main-image"),this._setPlayingTimerEvent(this.frame,"transitionComplete"),this._loadingImageContainer=this.frame.get("contentBox")},_resizeFrame:function(t,e){var i=this.get("navOverlay"),s=this._getNav();s&&!i&&(e-=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),this.frame.resize(t,e)},_loadFrame:function(e){var i=this.imageInfo.index,s=this.albumInfo.images,n=i+1>=s.length?0:i+1,a=this.frame.get("width"),o=this.frame.get("height");this.frame.load(e.imageInfo),t.FL.SlideshowImageLoader.removeGroup("main-preload"),this._nextImagePreloader.preload(s[n],a,o)},_frameClick:function(){var t=this.get("clickAction"),e=this.get("clickActionUrl");"url"==t?window.location.href=e:"gallery"==t&&(window.location.href=this.imageInfo.link)},_initMiniNav:function(){var t=[];"ontouchstart"in window||t.push("prev"),(this._hasNavButton("thumbs")||"thumbs"==this.get("navType"))&&t.push("thumbs"),this._hasNavButton("caption")&&t.push("caption"),this._hasNavButton("social")&&t.push("social"),this._hasNavButton("buy")&&t.push("buy"),this._hasNavButton("play")&&t.push("play"),!this._hasNavButton("fullscreen")||"ontouchstart"in window||t.push("fullscreen"),"ontouchstart"in window||t.push("next"),this._initialNavSettings={buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight"),type:this.get("navType")},this._set("navButtons",t),this._set("navButtonsLeft",[]),this._set("navButtonsRight",[]),this._set("navType","buttons")},_renderNavAndThumbs:function(){var t,e,i=this.get("navType"),s=!1;"buttons"!=i&&"thumbs"!=i||(t=this.get("boundingBox").get("offsetWidth"),e=this.get("responsiveThreshold"),t<=e&&null===this._initialNavSettings?(this._initMiniNav(),s=!0):t>e&&null!==this._initialNavSettings&&(this._set("navButtons",this._initialNavSettings.buttons),this._set("navButtonsLeft",this._initialNavSettings.buttonsLeft),this._set("navButtonsRight",this._initialNavSettings.buttonsRight),this._set("navType",this._initialNavSettings.type),this._initialNavSettings=null,s=!0),(s||null===this.nav)&&this._renderNav(),s||null===this.thumbs?this._renderThumbs():this._thumbsEnabled()&&this._resizeThumbs(),s&&null!==this.caption&&this._syncCaption(),s&&null!==this.social&&this._syncSocial())},_renderNav:function(){var e=this.frame.get("boundingBox"),i=null,s=this.get("navOverlay"),n=this.get("navPosition");this._destroyNav(),"buttons"==this.get("navType")&&(this.nav=new t.FL.SlideshowNav({buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight")}),this.add(this.nav),this.nav.render(this.get("contentBox")),i=this.nav.get("boundingBox"),s&&(this.nav.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),i.setStyle("position","absolute"),i.setStyle(n,"0px")),"top"==n?e.insert(i,"before"):e.insert(i,"after"),i.addClass("fl-slideshow-main-nav"))},_destroyNav:function(){if(null!==this.nav){this.nav.slideshowOverlay&&this.nav.slideshowOverlay.destroy(),this.nav.get("boundingBox").remove(),this.remove(this.nav);try{this.nav.destroy(!0)}catch(t){}this.nav=null}},_getNav:function(){var t=this.get("navType");return"buttons"==t?this.nav:"thumbs"==t?this.thumbs:null},_toggleNav:function(){var t=this._getNav();t.slideshowOverlay&&(t.slideshowOverlay._visible?t.slideshowOverlay.hideWithTimer():t.slideshowOverlay.show())},_renderImageNav:function(){var e;this.get("imageNavEnabled")&&(this._isMobile()?this._set("imageNavEnabled",!1):(e=this.get("boundingBox"),this.imageNavLeft=new t.FL.SlideshowNav({buttons:["prev"],useFontIcons:!1}),this.imageNavRight=new t.FL.SlideshowNav({buttons:["next"],useFontIcons:!1}),this.add(this.imageNavLeft),this.add(this.imageNavRight),this.imageNavLeft.render(this.frame.get("boundingBox")),this.imageNavRight.render(this.frame.get("boundingBox")),this.imageNavLeft.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.imageNavRight.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.get("overlayHideOnMousemove")&&(this.frame.once("transitionComplete",this.imageNavLeft.slideshowOverlay.hideWithTimer,this.imageNavLeft.slideshowOverlay),this.frame.once("transitionComplete",this.imageNavRight.slideshowOverlay.hideWithTimer,this.imageNavRight.slideshowOverlay),e.on("mousemove",t.bind(this._toggleImageNav,this)),e.on("mouseenter",t.bind(this._toggleImageNav,this))),this.imageNavLeft.get("boundingBox").addClass("fl-slideshow-image-nav-left"),this.imageNavRight.get("boundingBox").addClass("fl-slideshow-image-nav-right")))},_positionImageNav:function(){var t=this.imageNavLeft.get("boundingBox"),e=this.imageNavRight.get("boundingBox"),i=t.get("offsetHeight"),s=this.frame.get("boundingBox").get("offsetHeight"),n=s/2-i/2,a={top:n+"px",display:"block"};t.setStyles(a),e.setStyles(a),this._adjustOverlayForVerticalThumbs(t),this._adjustOverlayForVerticalThumbs(e)},_toggleImageNav:function(){this.imageNavLeft.slideshowOverlay._visible?this.imageNavLeft.slideshowOverlay.hideWithTimer():this.imageNavLeft.slideshowOverlay.show(),this.imageNavRight.slideshowOverlay._visible?this.imageNavRight.slideshowOverlay.hideWithTimer():this.imageNavRight.slideshowOverlay.show()},_renderMouseNav:function(){!this.get("mouseNavEnabled")||"ontouchstart"in window||window.navigator.msPointerEnabled||this.plug(t.FL.SlideshowMouseNav,{trigger:this.frame.get("boundingBox")})},_thumbsEnabled:function(){var t=this.get("navType");return"thumbs"==t||!("buttons"!=t&&"custom"!=t||!this._hasNavButton("thumbs"))},_renderThumbs:function(){var e,i,s,n;if(this._destroyThumbs(),this._thumbsEnabled()){e=this.frame.get("boundingBox"),i=this.get("navOverlay"),s=this.get("navPosition"),n=this.get("navType"),this.thumbs=new t.FL.SlideshowThumbs(this._getThumbsConfig());try{this.add(this.thumbs)}catch(a){}"buttons"==n||"custom"==n?this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left",visible:!1}):"thumbs"==n&&i&&this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.thumbs.render(this.get("contentBox")),"top"==s?e.insert(this.thumbs.get("boundingBox"),"before"):e.insert(this.thumbs.get("boundingBox"),"after"),this.get("thumbsHideOnClick")&&"thumbs"!=n&&this.thumbs.on("imageClick",t.bind(this._hideThumbsOnImageClick,this)),this._syncThumbs()}},_destroyThumbs:function(){if(null!==this.thumbs){this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.destroy(),this.thumbs.get("boundingBox").remove(),this.remove(this.thumbs);try{this.thumbs.destroy(!0)}catch(t){}this.thumbs=null}},_syncThumbs:function(){var t=this.thumbs.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this.get("navType"),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;"buttons"==s&&(a=parseInt(this.nav.get("boundingBox").getComputedStyle("height"),10),t.setStyle("position","absolute"),e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")),("custom"==s||"thumbs"==s&&e)&&(t.setStyle("position","absolute"),t.setStyle(i,"0px")),this.thumbs.resize()},_getThumbsConfig:function(){var t=this.getAttrs(),e=this.get("navType"),i={crop:t.thumbsImageCrop,width:t.thumbsImageWidth,height:t.thumbsImageHeight},s={columns:"auto",rows:1,horizontalSpacing:t.thumbsHorizontalSpacing,verticalSpacing:t.thumbsVerticalSpacing,spaceEvenly:t.thumbsSpaceEvenly,centerSinglePage:t.thumbsCenterSinglePage,pauseOnClick:t.thumbsPauseOnClick,transition:t.thumbsTransition,transitionDirection:t.thumbsTransitionDirection,transitionEasing:t.thumbsTransitionEasing,leftNavButtons:t.navButtonsLeft,rightNavButtons:t.navButtonsRight,imageConfig:i,touchSupport:!0};return"buttons"!=e&&"custom"!=e||("ontouchstart"in window?(s.leftNavEnabled=!1,s.rightNavEnabled=!1):(s.centerSinglePage=!1,s.leftNavButtons=["prevPage"],s.rightNavButtons=["nextPage"])),s},_resizeThumbs:function(){this.thumbs&&this.thumbs.resize()},_toggleThumbs:function(){this._toggleOverlay(this.thumbs.slideshowOverlay)},_hideThumbsOnImageClick:function(){this.thumbs.slideshowOverlay&&(this.thumbs.slideshowOverlay._focus=!1,this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide(),this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable())},_renderCaption:function(){this._hasNavButton("caption")&&(this.caption=new t.FL.SlideshowCaption({lessLinkText:this.get("captionLessLinkText"),moreLinkText:this.get("captionMoreLinkText"),textLength:this.get("captionTextLength"),stripTags:this.get("captionStripTags")}),this.add(this.caption),this.caption.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncCaption())},_syncCaption:function(){var t=this.caption.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleCaption:function(){this._toggleOverlay(this.caption.slideshowOverlay)},_renderSocial:function(){this._hasNavButton("social")&&(this.social=new t.FL.SlideshowSocial,this.add(this.social),this.social.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncSocial())},_syncSocial:function(){var t=this.social.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleSocial:function(){this._toggleOverlay(this.social.slideshowOverlay)},_toggleOverlay:function(t){var e=this.get("navType"),i=this._getNav();t._visible?(i&&i.slideshowOverlay&&i.slideshowOverlay.enable(),t.enable(),t.hide()):(i&&i.slideshowOverlay&&i.slideshowOverlay.disable(),t.show(),t.disable()),this.thumbs&&"thumbs"!=e&&this.thumbs.slideshowOverlay!==t&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide()),this.caption&&this.caption.slideshowOverlay!==t&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hide()),this.social&&this.social.slideshowOverlay!==t&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hide())},_overlayCloseClick:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable(),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.enable(),this.caption&&this.caption.slideshowOverlay.enable(),this.social&&this.social.slideshowOverlay.enable(),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.enable())},_hideAllOverlays:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay._visible&&(this.nav.slideshowOverlay.enable(),this.nav.slideshowOverlay.hideWithTimer()),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay._visible&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hideWithTimer()),this.caption&&this.caption.slideshowOverlay._visible&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hideWithTimer()),this.social&&this.social.slideshowOverlay._visible&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hideWithTimer()),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavLeft.slideshowOverlay.hideWithTimer(),this.imageNavRight.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.hideWithTimer())},_checkOverlaysOnMouseenter:function(){var t=this.get("navType"),e=this.get("navOverlay"),i=this._getNav(),s=!1;this.thumbs&&"thumbs"!=t&&this.thumbs.slideshowOverlay._visible?(s=!0,this.thumbs.slideshowOverlay.disable()):this.caption&&this.caption.slideshowOverlay._visible?(s=!0,this.caption.slideshowOverlay.disable()):this.social&&this.social.slideshowOverlay._visible&&(s=!0,this.social.slideshowOverlay.disable()),i&&s&&e&&i.slideshowOverlay.disable()},_hasNavButton:function(e){var i=this.get("navType");return("buttons"==i||"thumbs"==i||"custom"==i)&&(t.Array.indexOf(this.get("navButtons"),e)>-1||(t.Array.indexOf(this.get("navButtonsLeft"),e)>-1||t.Array.indexOf(this.get("navButtonsRight"),e)>-1))},_removeNavButton:function(e){var i=this.get("navButtons"),s=this.get("navButtonsLeft"),n=this.get("navButtonsRight"),a=this.get("verticalThumbsTopNavButtons"),o=this.get("verticalThumbsBottomNavButtons");t.Array.indexOf(i,e)>-1&&i.splice(t.Array.indexOf(i,e),1),t.Array.indexOf(s,e)>-1&&s.splice(t.Array.indexOf(s,e),1),t.Array.indexOf(n,e)>-1&&n.splice(t.Array.indexOf(n,e),1),t.Array.indexOf(a,e)>-1&&a.splice(t.Array.indexOf(a,e),1),t.Array.indexOf(o,e)>-1&&o.splice(t.Array.indexOf(o,e),1),this._set("navButtons",i),this._set("navButtonsLeft",s),this._set("navButtonsRight",n),this._set("verticalThumbsTopNavButtons",a),this._set("verticalThumbsBottomNavButtons",o)}},{CSS_PREFIX:"fl-slideshow",ATTRS:{clickAction:{value:"none"},clickActionUrl:{value:""},crop:{value:!1},cropHorizontalsOnly:{value:!1},loadingImageAlwaysEnabled:{value:!0},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},transition:{value:"fade"},transitionDuration:{value:1},transitionEasing:{value:"ease-out"},kenBurnsZoom:{value:1.2},navType:{value:"none"},navPosition:{value:"bottom"},navOverlay:{value:!1},navButtons:{value:[]},navButtonsLeft:{value:[]},navButtonsRight:{value:[]},overlayHideOnMousemove:{value:!0},overlayHideDelay:{value:3e3},imageNavEnabled:{value:!1},mouseNavEnabled:{value:!1},thumbsHideOnClick:{value:!0},thumbsHorizontalSpacing:{value:15},thumbsVerticalSpacing:{value:15},thumbsSpaceEvenly:{value:!0},thumbsCenterSinglePage:{value:!0},thumbsPauseOnClick:{value:!1},thumbsTransition:{value:"slideHorizontal"},thumbsTransitionDuration:{value:.8},thumbsTransitionEasing:{value:"ease-out"},thumbsImageCrop:{value:!0},thumbsImageWidth:{value:50},thumbsImageHeight:{value:50},captionLessLinkText:{value:"Read Less"},captionMoreLinkText:{value:"Read More"},captionTextLength:{value:200},captionStripTags:{value:!1},verticalThumbsEnabled:{value:!1},verticalThumbsPosition:{value:"left"},verticalThumbsOverlay:{value:!1},verticalThumbsColumns:{value:1},verticalThumbsTopNavEnabled:{value:!1},verticalThumbsTopNavButtons:{value:["prevPage","nextPage"]},verticalThumbsBottomNavEnabled:{value:!0},verticalThumbsBottomNavButtons:{value:["prevPage","nextPage"]},verticalThumbsHorizontalSpacing:{value:15},verticalThumbsVerticalSpacing:{value:15},verticalThumbsSpaceEvenly:{value:!1},verticalThumbsPauseOnClick:{value:!1},verticalThumbsImageCrop:{value:!0},verticalThumbsImageWidth:{value:75},verticalThumbsImageHeight:{value:75},verticalThumbsTransition:{value:"slideVertical"},verticalThumbsTransitionDuration:{value:.8},verticalThumbsTransitionEasing:{value:"ease-out"},googlePlusButtonEnabled:{value:!0},likeButtonEnabled:{value:!0},pinterestButtonEnabled:{value:!0},tweetButtonEnabled:{value:!0}}})},"2.0.0",{requires:["anim","event-mouseenter","plugin","transition","fl-event-move","fl-slideshow-css","fl-slideshow-base","fl-utils","sm-fonticon"]}),YUI.add("fl-slideshow-album-loader",function(t){t.namespace("FL").SlideshowAlbumLoader=t.Base.create("fl-slideshow-album-loader",t.Base,[],{_source:null,load:function(e){this._source=e,this.fire("start"),this[t.FL.SlideshowAlbumLoader.TYPES[e.type]].call(this)},_loadComplete:function(t){t=this._randomize(t),this.fire("complete",t)},_randomize:function(t){var e;if(this.get("randomize"))for(t.albumInfo.images.sort(function(){return.5-Math.random()}),e=0;e<t.albumInfo.images.length;e++)t.albumInfo.images[e].index=e;return t},_loadSmugMug:function(){var e=new t.FL.SmugMugAPI;e.on("complete",this._loadSmugMugSuccess,this),e.addParam("method","smugmug.images.get"),e.addParam("AlbumID",this._source.id),e.addParam("AlbumKey",this._source.key),e.addParam("Extras","Caption,Format,FileName"),this._source.password&&e.addParam("Password",this._source.password),this._source.sp&&e.addParam("SitePassword",this._source.sp),e.request()},_loadSmugMugSuccess:function(e){var i=e.Album.Images,s={},n="undefined"!=typeof this._source.proxy?this._source.proxy:"",a="",o="",l="",h="",r=0,g=null,u=null;for(s.index=this._source.index,s.id=e.Album.id,s.key=e.Album.Key,s.link=e.Album.URL,s.title=this._source.title?this._source.title:"",s.images=[],a=s.link.replace("http://","").split("/").shift(),a="http://"+a+"/buy/"+e.Album.id+"_"+e.Album.Key+"/",r=0;r<i.length;r++)o=n+e.Album.URL+"/"+i[r].id+"_"+i[r].Key,h=i[r].Format.toLowerCase(),l="mp4"==h?".jpg":"."+h,s.images[r]={},s.images[r].index=r,s.images[r].sourceType="smugmug",s.images[r].albumId=e.Album.id,s.images[r].albumKey=e.Album.Key,s.images[r].id=i[r].id,s.images[r].key=i[r].Key,s.images[r].filename=i[r].FileName,s.images[r].format=h,s.images[r].caption=i[r].Caption||"",s.images[r].link=e.Album.URL+"#"+i[r].id+"_"+i[r].Key,s.images[r].tinyURL=o+"-Ti"+l,s.images[r].thumbURL=o+"-Th"+l,s.images[r].smallURL=o+"-S"+l,s.images[r].mediumURL=o+"-M"+l,s.images[r].largeURL=o+"-L"+l,s.images[r].xlargeURL=o+"-XL"+l,s.images[r].x2largeURL=o+"-X2"+l,s.images[r].x3largeURL=o+"-X3"+l,s.images[r].buyURL=a+i[r].id+"_"+i[r].Key,s.images[r].iframe="",s.images[r].caption.indexOf("iframe")&&(g=t.Node.create("<div>"+s.images[r].caption+"</div>"),u=g.one("iframe"),u&&(s.images[r].iframe=u.getAttribute("src"),s.images[r].caption=s.images[r].caption.replace(/<iframe.*>.*<\/iframe>/gi,"")));this._loadComplete({albumInfo:s})},_loadUrls:function(){var t={},e=0;for(t.index=this._source.index,t.title=this._source.title?this._source.title:"",t.images=[];e<this._source.urls.length;e++)t.images[e]={},t.images[e].index=e,t.images[e].sourceType="urls",t.images[e].filename=this._source.urls[e].largeURL.split("/").pop(),t.images[e].format="",t.images[e].caption=this._source.urls[e].caption||"",t.images[e].link=this._source.urls[e].largeURL,t.images[e].thumbURL=this._source.urls[e].thumbURL||this._source.urls[e].largeURL,t.images[e].smallURL=this._source.urls[e].smallURL||this._source.urls[e].largeURL,t.images[e].mediumURL=this._source.urls[e].mediumURL||this._source.urls[e].largeURL,t.images[e].largeURL=this._source.urls[e].largeURL,t.images[e].xlargeURL=this._source.urls[e].xlargeURL||this._source.urls[e].largeURL,t.images[e].x2largeURL=this._source.urls[e].x2largeURL||this._source.urls[e].largeURL,t.images[e].x3largeURL=this._source.urls[e].x3largeURL||this._source.urls[e].largeURL,t.images[e].buyURL=this._source.urls[e].buyURL||"",t.images[e].iframe=this._source.urls[e].iframe||"";this._loadComplete({albumInfo:t})}},{ATTRS:{randomize:{value:!1}},TYPES:{smugmug:"_loadSmugMug",flickr:"_loadFlickr",picasa:"_loadPicasa",urls:"_loadUrls",html:"_loadHtml"}})},"2.0.0",{requires:["base","fl-smugmug-api"]}),YUI.add("fl-slideshow-base",function(t){t.namespace("FL").SlideshowBase=t.Base.create("fl-slideshow-base",t.Widget,[t.WidgetParent],{_albumLoader:null,albums:[],albumInfo:null,albumIndex:null,imageInfo:null,imageIndex:null,lastImageIndex:null,_resizeTimer:null,_playing:!1,_playingTimer:null,_playingTimerEvent:null,_loadingImage:null,_loadingImageWrap:null,_loadingImageVisible:!1,_loadingImageTimer:null,_loadingImageContainer:null,_initialHeight:null,_initialWidth:null,initializer:function(){this._albumLoader=new t.FL.SlideshowAlbumLoader({randomize:this.get("randomize")})},renderUI:function(){this._renderLoadingImage()},bindUI:function(){this._albumLoader.on("complete",this._loadAlbumComplete,this),t.one(window).on("fl-slideshow-base|resize",this._delayResize,this),t.one(window).on("fl-slideshow-base|orientationchange",this._delayResize,this),t.Node.one("body").on("keydown",t.bind(this._onKey,this))},syncUI:function(){this.get("boundingBox").addClass("fl-slideshow-"+this.get("color")),this.resize(),this.get("loadOnRender")&&this.loadAlbum(this.get("defaultAlbum"),this.get("defaultImage"))},addAlbum:function(t){var e=this.get("source"),i=e.length;e[i]=t,e[i].index=i,this.set("source",e)},loadAlbum:function(e,i){var s=this.get("source"),n="undefined"==typeof i?0:i;this.imageIndex=null,this.lastImageIndex=null,this.fire("albumLoadStart"),this.once("albumLoadComplete",t.bind(this.loadImage,this,n)),s[e]&&"album-data"==s[e].type?(this.albums[e]=s[e].data,this._loadAlbumComplete({albumInfo:this.albums[e]})):s[e]&&this.albums[e]?this._loadAlbumComplete({albumInfo:this.albums[e]}):this._albumLoader.load(s[e]||s[0])},_loadAlbumComplete:function(t){this.albums[t.albumInfo.index]=t.albumInfo,this.albumInfo=t.albumInfo,this.albumIndex=t.albumInfo.index,this.fire("albumLoadComplete"),this.get("autoPlay")&&(this._playingTimerStart(),this.fire("played"),this._playing=!0)},loadImage:function(t){this._playing&&this._playingTimerStart(),t=t<0?this.albumInfo.images.length-1:t,t=t>=this.albumInfo.images.length?0:t,this.lastImageIndex=this.imageIndex,this.imageIndex=t,this.imageInfo=this.albumInfo.images[t],this.fire("imageLoadComplete",{imageInfo:this.imageInfo})},prevImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex-1),this.fire("prevImage")},nextImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex+1),this.fire("nextImage")},_onKey:function(t){switch(t.keyCode){case 37:this.prevImage();break;case 39:this.nextImage()}},resize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=parseInt(t.one("body").get("winWidth"),10),n=this.get("responsiveThreshold");s>n&&e&&"window"==i?this._stretchyWindowResize():s<=n||e&&"ratio"==i?this._stretchyRatioResize():this._standardResize(),this.fire("resize")},_standardResize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=this.get("boundingBox"),n=s.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=this.get("height"),h=this.get("width");if(s.hasClass("fl-fullscreen-active"))return void this._stretchyWindowResize();if(e&&"contain"==i)s.setStyle("height",a+"px"),s.setStyle("width",o+"px");else{if(!t.Lang.isNumber(l))return void this._stretchyRatioResize();s.setStyle("height",l+"px"),h?s.setStyle("width",h+"px"):s.setStyle("width",o+"px")}},_stretchyWindowResize:function(){var e=this.get("boundingBox"),i=this.get("stretchyVerticalSpace"),s=parseInt(e.getStyle("paddingTop"),10),n=parseInt(e.getStyle("paddingBottom"),10),a=parseInt(t.one("body").get("winHeight"),10),o="";e.hasClass("fl-fullscreen-active")&&(i=0,o=parseInt(t.one("body").get("winWidth"),10)+"px"),a=a-s-n-i+"px",e.setStyle("height",a),e.setStyle("width",o)},_stretchyRatioResize:function(){var e=this.get("boundingBox"),i=e.get("parentNode"),s=0,n=this.get("stretchyRatio"),a=parseInt(e.getStyle("paddingTop"),10),o=parseInt(e.getStyle("paddingBottom"),10),l=parseInt(i.getComputedStyle("width"),10),h=parseInt(t.one("body").get("winHeight"),10),r=parseInt(t.one("body").get("winWidth"),10),g=l*n,u="";e.hasClass("fl-fullscreen-active")&&(g=h,u=r),g=g-a-o-s+"px",e.setStyle("height",g),e.setStyle("width",u)},_delayResize:function(){this._resizeTimer&&this._resizeTimer.cancel(),this._resizeTimer=t.later(300,this,this.resize)},play:function(){this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete),this.fire("played"),this._playing=!0},pause:function(){this._playingTimerCancel(),this.fire("paused"),this._playing=!1},_setPlayingTimerEvent:function(t,e){this._playingTimerEvent={obj:t,e:e}},_playingTimerStart:function(e){this._playingTimerCancel(),e||null===this._playingTimerEvent?this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete):this._playingTimerEvent.obj.once("fl-slideshow-base|"+this._playingTimerEvent.e,t.bind(this._playingTimerStart,this))},_playingTimerComplete:function(){this.loadImage(this.imageIndex+1),this.fire("playingTimerComplete")},_playingTimerCancel:function(){this._playingTimer&&this._playingTimer.cancel(),this._playingTimerEvent&&this._playingTimerEvent.obj.detach("fl-slideshow-base|"+this._playingTimerEvent.e)},_renderLoadingImage:function(){var e={lines:11,length:6,width:2,radius:7,color:"",speed:1,trail:60,shadow:!1},i=t.merge(e,this.get("loadingImageSettings"));this.get("loadingImageEnabled")&&(""===i.color&&(i.color=this._colorToHex(t.one("body").getStyle("color"))),this._loadingImage=new t.FL.Spinner(i),this._loadingImageWrap=t.Node.create('<div class="fl-loading-image"></div>'),this._loadingImageWrap.setStyles({position:"absolute","z-index":"1000"}))},_showLoadingImage:function(){this._loadingImage&&!this._loadingImageVisible&&(this._loadingImageVisible=!0,this._loadingImage.spin(),this._loadingImageWrap.insert(this._loadingImage.el),null!==this._loadingImageContainer?this._loadingImageContainer.insert(this._loadingImageWrap):this.get("contentBox").insert(this._loadingImageWrap),this._positionLoadingImage())},_showLoadingImageWithDelay:function(){
4
- this._loadingImage&&(this._loadingImageTimer=t.later(1e3,this,this._showLoadingImage))},_hideLoadingImage:function(){this._loadingImageTimer&&(this._loadingImageTimer.cancel(),this._loadingImageTimer=null),this._loadingImage&&this._loadingImageVisible&&(this._loadingImageVisible=!1,this._loadingImage.stop(),this._loadingImageWrap.remove())},_positionLoadingImage:function(){if(this._loadingImage&&this._loadingImageVisible){var e=this._loadingImageWrap,i=parseInt(e.getComputedStyle("height"),10),s=parseInt(e.getComputedStyle("width"),10),n=e.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=(o-s)/2,h=(a-i)/2;e.setStyles({left:l+"px",top:h+"px"}),t.one(this._loadingImage.el).setStyles({left:"50%",top:"50%"})}},_colorToHex:function(t){var e,i,s,n,a;return"#"===t.substr(0,1)?t:(e=/(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t),null===e?"#000":(i=parseInt(e[2],10),s=parseInt(e[3],10),n=parseInt(e[4],10),a=n|s<<8|i<<16,a=a.toString(16),"0"===a&&(a="000"),e[1]+"#"+a))}},{CSS_PREFIX:"fl-slideshow-base",ATTRS:{color:{value:"dark",writeOnce:!0},source:{value:[],setter:function(t){t.constructor==Object&&(t=[t]);for(var e=0;e<t.length;e++)t[e].index=e;return t}},defaultAlbum:{value:0},defaultImage:{value:0},loadOnRender:{value:!0},autoPlay:{value:!0},pauseOnNextOrPrev:{value:!0},randomize:{value:!1},speed:{value:4e3},responsiveThreshold:{value:600},stretchy:{value:!1},stretchyType:{value:"ratio"},stretchyVerticalSpace:{value:0},stretchyRatio:{value:.7},loadingImageEnabled:{value:!0},loadingImageSettings:{value:{}}}})},"2.0.0",{requires:["node","base","widget","widget-parent","widget-child","fl-slideshow-album-loader","fl-spinner"]}),YUI.add("fl-smugmug-api",function(t){t.namespace("FL").SmugMugAPI=t.Base.create("fl-smugmug-api",t.Base,[],{_sessionID:null,_requestURL:null,initializer:function(){this._resetRequestURL()},addParam:function(t,e){this._requestURL=this._requestURL+"&"+t+"="+e},loginAnon:function(){this.addParam("method","smugmug.login.anonymously"),this.once("complete",this._loginAnonComplete),this.request()},_loginAnonComplete:function(t){t.Login&&(this._sessionID=t.Login.Session.id)},request:function(){this.addParam("Callback","{callback}"),t.jsonp(this._requestURL,{on:{success:this._requestComplete,timeout:function(){}},context:this,timeout:6e4,args:[]})},_requestComplete:function(t){this._resetRequestURL(),this.fire("complete",t)},_resetRequestURL:function(){this._requestURL=this.get("apiURL")+"?APIKey="+this.get("apiKey"),this._sessionID&&this.addParam("SessionID",this._sessionID)}},{ATTRS:{apiURL:{value:"https://api.smugmug.com/services/api/json/1.3.0/"},apiKey:{value:"7w6kuU5Ee6KSgRRExf2KLgppdkez9JD2"}}})},"2.0.0",{requires:["base","jsonp"]}),YUI.add("fl-spinner",function(t){!function(e,i,s){function n(t,e){for(var i=~~((t[m]-1)/2),s=1;s<=i;s++)e(t[2*s-1],t[2*s])}function a(t){var e=i.createElement(t||"div");return n(arguments,function(t,i){e[t]=i}),e}function o(t,e,i){return i&&!i[L]&&o(t,i),t.insertBefore(e,i||null),t}function l(t,e){var i,s=[f,e,~~(100*t)].join("-"),n="{"+f+":"+t+"}";if(!D[s]){for(i=0;i<A[m];i++)try{H.insertRule("@"+(A[i]&&"-"+A[i].toLowerCase()+"-"||"")+"keyframes "+s+"{0%{"+f+":1}"+e+"%"+n+"to"+n+"}",H.cssRules[m])}catch(a){}D[s]=1}return s}function h(t,e){var i,n,a=t[x];if(a[e]!==s)return e;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<A[m];n++)if(i=A[n]+e,a[i]!==s)return i}function r(t){return n(arguments,function(e,i){t[x][h(t,e)||e]=i}),t}function g(t){return n(arguments,function(e,i){t[e]===s&&(t[e]=i)}),t}var u,d="width",m="length",c="radius",_="lines",p="trail",v="color",f="opacity",b="speed",y="shadow",x="style",I="height",S="left",w="top",B="px",T="childNodes",C="firstChild",L="parentNode",N="position",P="relative",O="absolute",R="animation",E="transform",k="Origin",F="Timeout",U="coord",z="#000",M=x+"Sheets",A="webkit0Moz0ms0O".split(0),D={};o(i.getElementsByTagName("head")[0],a(x));var H=i[M][i[M][m]-1],W=function(t){this.opts=g(t||{},_,12,p,100,m,7,d,5,c,10,v,z,f,.25,b,1)},V=W.prototype={spin:function(t){var i=this,s=i.el=i[_](i.opts);if(t&&o(t,r(s,S,~~(t.offsetWidth/2)+B,w,~~(t.offsetHeight/2)+B),t[C]),!u){var n=i.opts,a=0,l=20/n[b],h=(1-n[f])/(l*n[p]/100),g=l/n[_];!function d(){a++;for(var t=n[_];t;t--){var o=Math.max(1-(a+t*g)%l*h,n[f]);i[f](s,n[_]-t,o,n)}i[F]=i.el&&e["set"+F](d,50)}()}return i},stop:function(){var t=this,i=t.el;return e["clear"+F](t[F]),i&&i[L]&&i[L].removeChild(i),t.el=s,t}};V[_]=function(t){function e(e,i){return r(a(),N,O,d,t[m]+t[d]+B,I,t[d]+B,"background",e,"boxShadow",i,E+k,S,E,"rotate("+~~(360/t[_]*h)+"deg) translate("+t[c]+B+",0)","borderRadius","100em")}for(var i,s=r(a(),N,P),n=l(t[f],t[p]),h=0;h<t[_];h++)i=r(a(),N,O,w,1+~(t[d]/2)+B,E,"translate3d(0,0,0)",R,n+" "+1/t[b]+"s linear infinite "+(1/t[_]/t[b]*h-1/t[b])+"s"),t[y]&&o(i,r(e(z,"0 0 4px "+z),w,2+B)),o(s,o(i,e(t[v],"0 0 1px rgba(0,0,0,.1)")));return s},V[f]=function(t,e,i){t[T][e][x][f]=i};var q="behavior",X="url(#default#VML)",Y="group0roundrect0fill0stroke".split(0);!function(){var t,e=r(a(Y[0]),q,X);if(!h(e,E)&&e.adj){for(t=0;t<Y[m];t++)H.addRule(Y[t],q+":"+X);V[_]=function(){function t(){return r(a(Y[0],U+"size",l+" "+l,U+k,-n+" "+-n),d,l,I,l)}function e(e,i,l){o(h,o(r(t(),"rotation",360/s[_]*e+"deg",S,~~i),o(r(a(Y[1],"arcsize",1),d,n,I,s[d],S,s[c],w,-s[d]/2,"filter",l),a(Y[2],v,s[v],f,s[f]),a(Y[3],f,0))))}var i,s=this.opts,n=s[m]+s[d],l=2*n,h=t(),g=~(s[m]+s[c]+s[d])+B;if(s[y])for(i=1;i<=s[_];i++)e(i,-2,"progid:DXImage"+E+".Microsoft.Blur(pixel"+c+"=2,make"+y+"=1,"+y+f+"=.3)");for(i=1;i<=s[_];i++)e(i);return o(r(a(),"margin",g+" 0 0 "+g,N,P),h)},V[f]=function(t,e,i,s){s=s[y]&&s[_]||0,t[C][T][e+s][C][C][f]=i}}else u=h(e,R)}(),t.namespace("FL").Spinner=W}(window,document)},"2.0.0"),YUI.add("fl-utils",function(t){t.namespace("FL").Utils={cssSupport:function(e){var i=document.body||document.documentElement,s=i.style,n=["Moz","Webkit","Khtml","O","ms","Icab"],a=0;if("transform"==e&&t.UA.gecko&&t.UA.gecko<4)return!1;if("transform"==e&&t.UA.opera>0)return!1;if("transform"==e&&t.UA.ie>0&&t.UA.ie<10)return!1;if("transform"==e&&navigator.userAgent.match(/Trident/))return!1;if("undefined"==typeof s)return!1;if("string"==typeof s[e])return!0;for(e=e.charAt(0).toUpperCase()+e.substr(1);a<n.length;a++)if("string"==typeof s[n[a]+e])return!0}}},"2.0.0");
1
+ YUI.add("fl-event-move",function(t){var e={_isEndEvent:!1,on:function(t,e,i){this.type.indexOf("end")>-1&&(this._isEndEvent=!0),e._direction=this.type.replace("gesturemove","").replace("end",""),window.navigator.msPointerEnabled?(e._startHandle=t.on("MSPointerDown",this._onStart,this,t,e,i),e._moveHandle=t.on("MSPointerMove",this._onMove,this,t,e,i),e._endHandle=t.on("MSPointerUp",this._onEnd,this,t,e,i)):(e._startHandle=t.on("gesturemovestart",this._onStart,null,this,t,e,i),e._moveHandle=t.on("gesturemove",this._onMove,null,this,t,e,i),e._endHandle=t.on("gesturemoveend",this._onEnd,{standAlone:!0},this,t,e,i))},detach:function(t,e,i){e._startHandle.detach(),e._startHandle=null,e._moveHandle.detach(),e._moveHandle=null,e._endHandle.detach(),e._endHandle=null},_onStart:function(t,e,i,s){i._doMove=null,i._startX=t.pageX,i._startY=t.pageY},_onMove:function(t,e,i,s){this._checkDirection(t,i)?i._doMove=!0:i._doMove=!1,i._doMove&&!this._isEndEvent&&s.fire(t)},_onEnd:function(t,e,i,s){i._doMove&&this._isEndEvent&&(t.startPageX=i._startX,t.startPageY=i._startY,s.fire(t)),i._doMove=null},_checkDirection:function(t,e){var i=Math.abs(e._startX-t.pageX),s=Math.abs(e._startY-t.pageY);return s>i&&e._startY>t.pageY&&"vertical"==e._direction||(s>i&&e._startY<t.pageY&&"vertical"==e._direction||(s<i&&e._startX>t.pageX&&"horizontal"==e._direction||s<i&&e._startX<t.pageX&&"horizontal"==e._direction))}};t.Event.define("gesturemovevertical",e),t.Event.define("gesturemoveverticalend",e),t.Event.define("gesturemovehorizontal",e),t.Event.define("gesturemovehorizontalend",e)},"2.0.0",{requires:["event-move"]}),YUI.add("fl-slideshow",function(t){t.namespace("FL").SlideshowCaption=t.Base.create("fl-slideshow-caption",t.Widget,[t.WidgetChild],{_textToggled:!1,_textToggleLink:null,renderUI:function(){var e=this.get("root"),i=this.get("boundingBox");this._textToggleLink=t.Node.create('<a href="javascript:void(0);"></a>'),this._textToggleLink.addClass("fl-slideshow-caption-toggle"),this._textToggleLink.set("innerHTML",e.get("captionMoreLinkText")),i.appendChild(this._textToggleLink)},bindUI:function(){this.get("root").on("imageLoadComplete",t.bind(this._setText,this)),this._textToggleLink.on("click",t.bind(this._toggleText,this))},_setText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=t.get("captionTextLength"),s=this.get("contentBox");return t.imageInfo.caption&&""!==t.imageInfo.caption?(i>-1?!this._textToggled&&i<e.length?(e=this._shortenText(e),this._textToggleLink.setStyle("display","inline-block")):this._textToggled&&i<e.length?(e=this._stripTags(e),this._textToggleLink.setStyle("display","inline-block")):(e=this._stripTags(e),this._textToggleLink.setStyle("display","none")):e=this._stripTags(e),void s.set("innerHTML",e)):(s.set("innerHTML",""),void this._textToggleLink.setStyle("display","none"))},_toggleText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=this.get("contentBox");this._textToggled?(e=this._shortenText(e),this._textToggleLink.set("innerHTML",t.get("captionMoreLinkText")),this._textToggled=!1):(e=this._stripTags(e),this._textToggleLink.set("innerHTML",t.get("captionLessLinkText")),this._textToggled=!0),i.set("innerHTML",e)},_stripTags:function(t,e){var i,s=this.get("root");return(e||s.get("captionStripTags"))&&(i=document.createElement("div"),i.innerHTML=t,t=i.textContent||i.innerText),t},_shortenText:function(e){var i=this.get("root");return e=this._stripTags(e,!0).substring(0,i.get("captionTextLength")),t.Lang.trim(e.substring(0,e.lastIndexOf(" ")))+" ..."}},{CSS_PREFIX:"fl-slideshow-caption",ATTRS:{}}),t.namespace("FL").SlideshowFrame=t.Base.create("fl-slideshow-frame",t.Widget,[t.WidgetParent,t.WidgetChild],{_imageInfo:null,_activeImage:null,_nextImage:null,_loadQueue:null,_transition:null,_transitioning:!1,_resizeAfterTransition:!1,_gestures:null,initializer:function(){var e=this.get("imageConfig");this._activeImage=new t.FL.SlideshowImage(e),this._nextImage=new t.FL.SlideshowImage(e)},renderUI:function(){this.add(this._activeImage),this.add(this._nextImage)},bindUI:function(){var e=this._activeImage.get("boundingBox"),i=this._nextImage.get("boundingBox"),s=this.get("transition");("ontouchstart"in window||window.navigator.msPointerEnabled)&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:e,nextItem:i}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){var t=this._activeImage.get("boundingBox"),e=this._nextImage.get("boundingBox"),i=this.get("contentBox");t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("left","-9999px"),e.setStyle("position","absolute"),e.setStyle("top","0px"),e.setStyle("left","-9999px"),i.setStyle("position","relative"),i.setStyle("overflow","hidden")},load:function(t){var e=this._activeImage._imageInfo;return this._transitioning?void(this._loadQueue=t):void(e&&e.largeURL==t.largeURL||(this._imageInfo=t,this._transitionInit(t)))},preload:function(t,e,i){this._imageInfo=t,this._nextImage.preload(t,e,i)},unload:function(){this._imageInfo=null,this._loadQueue=null,this._transitioning=!1,this._transition=null,this._activeImage.detachAll(),this._activeImage.unload(),this._activeImage.get("boundingBox").setStyle("left","-9999px"),this._nextImage.detachAll(),this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")},resize:function(t,e){if(t&&e){var i=this.get("boundingBox"),s=[parseInt(i.getComputedStyle("paddingTop"),10),parseInt(i.getComputedStyle("paddingRight"),10),parseInt(i.getComputedStyle("paddingBottom"),10),parseInt(i.getComputedStyle("paddingLeft"),10)];t=t-s[1]-s[3],e=e-s[0]-s[2],this.set("width",t),this.set("height",e),this._transitioning?this._resizeAfterTransition=!0:(this._activeImage.resize(t,e),this._nextImage.resize(t,e))}},_getTransition:function(){var t=this.get("root"),e=t.albumInfo.images.length-1,i="next",s=t.get("transition");return null===t.lastImageIndex?i="":t.imageIndex==e&&0===t.lastImageIndex?i="prev":0===t.imageIndex&&t.lastImageIndex==e?i="next":t.lastImageIndex>t.imageIndex?i="prev":t.lastImageIndex<t.imageIndex&&(i="next"),"next"==i?(s=s.replace("slideHorizontal","slideLeft"),s=s.replace("slideVertical","slideUp")):"prev"==i&&(s=s.replace("slideHorizontal","slideRight"),s=s.replace("slideVertical","slideDown")),s},_transitionInit:function(t){this._transitioning=!0,this._gestures&&this._gestures.disable(),this.fire("transitionInit"),t?(this._nextImage.once("loadComplete",this._transitionStart,this),this._nextImage.load(t)):this._transitionStart()},_transitionStart:function(){var e=this.get("root");this.fire("transitionStart"),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextImage._imageInfo?this._nextImage.get("boundingBox"):null,itemOut:this._activeImage._imageInfo?this._activeImage.get("boundingBox"):null,type:this._getTransition(),duration:e.get("transitionDuration"),easing:e.get("transitionEasing"),kenBurnsDuration:e.get("speed")/1e3,kenBurnsZoom:e.get("kenBurnsZoom")}),this._nextImage._imageInfo&&this._nextImage.get("boundingBox").setStyle("left","0px"),this._transition.once("complete",this._transitionComplete,this),this._transition.run()},_transitionComplete:function(){var t=this.get("root");this._swapImageRefs(),this.fire("transitionComplete"),this._transition=null,this._transitioning=!1,this._gestures&&(t&&t.albumInfo.images.length<=1?this._gestures.disable():this._gestures.enable()),this._loadQueue?(this.load(this._loadQueue),this._loadQueue=null):this._resizeAfterTransition&&(this._resizeAfterTransition=!1,this._activeImage.resize(this.get("width"),this.get("height")),this._nextImage.resize(this.get("width"),this.get("height")))},_gesturesMoveStart:function(e){var i=0,s=this.get("root");i="next"==e.direction?s.imageIndex+1:s.imageIndex-1,i=i<0?s.albumInfo.images.length-1:i,i=i>=s.albumInfo.images.length?0:i,s.pause(),s._hideLoadingImage(),s._showLoadingImageWithDelay(),t.FL.SlideshowImageLoader.removeGroup(this._nextImage.get("loadGroup")),this._nextImage.once("loadComplete",s._hideLoadingImage,s),this._nextImage.load(s.albumInfo.images[i])},_gesturesEndComplete:function(){var t=this.get("root"),e=0;this._nextImage._imageInfo&&(e=this._nextImage._imageInfo.index,this._swapImageRefs(),this._imageInfo=t.albumInfo.images[e],t.loadImage(e))},_swapImageRefs:function(){var t=this._activeImage;this._activeImage=this._nextImage,this._nextImage=t,this._nextImage._imageInfo&&(this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")),this._gestures&&(this._gestures.set("activeItem",this._activeImage.get("boundingBox")),this._gestures.set("nextItem",this._nextImage.get("boundingBox")))}},{CSS_PREFIX:"fl-slideshow-frame",ATTRS:{imageConfig:{value:null},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowFullscreen=t.Base.create("fl-slideshow-fullscreen",t.Plugin.Base,[],{active:!1,_closeMessage:null,_closeMessageTimer:null,_initialStyles:{position:"static",top:"0px",left:"0px"},initializer:function(){var e=this.get("host"),i=e.get("boundingBox"),s=this;i.addClass("fl-fullscreen-enabled"),t.FL.SlideshowFullscreen.OS_SUPPORT?(document.addEventListener("fullscreenchange",function(){s._osChange()},!1),document.addEventListener("mozfullscreenchange",function(){s._osChange()},!1),document.addEventListener("webkitfullscreenchange",function(){s._osChange()},!1)):this._renderCloseMessage()},toggle:function(){this.active?this.exit():this.enter()},enter:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osEnter():this._browserEnter()},exit:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osExit():this._browserExit()},_osEnter:function(){var t=this.get("host").get("boundingBox")._node;t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.requestFullScreen&&t.requestFullScreen()},_osExit:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},_osChange:function(){var t=this.get("host");t.frame&&t.frame._transitioning&&t.frame._transitionComplete(),this.active?this._exit():this._enter()},_browserEnter:function(){var e=this.get("host").get("boundingBox");this._initialStyles={position:e.getStyle("position"),top:e.getStyle("top"),left:e.getStyle("left"),zIndex:e.getStyle("zIndex")},e.setStyles({position:"fixed",top:"0px",left:"0px",zIndex:1e4}),t.Node.one("body").on("fl-fullscreen|keydown",t.bind(this._onKey,this)),this._showCloseMessage(),this._enter()},_browserExit:function(){var e=this.get("host").get("boundingBox");e.setStyles({position:this._initialStyles.position,top:this._initialStyles.top,left:this._initialStyles.left,zIndex:this._initialStyles.zIndex}),t.Node.one("body").detach("fl-fullscreen|keydown"),this._hideCloseMessage(),this._exit()},_enter:function(){var t=this.get("host"),e=t.get("boundingBox");e.addClass("fl-fullscreen-active"),this.active=!0,t.resize()},_exit:function(){var t=this.get("host"),e=t.get("boundingBox");e.removeClass("fl-fullscreen-active"),this.active=!1,t.resize()},_onKey:function(t){if(27==t.keyCode)return this.exit(),!1},_renderCloseMessage:function(){this._closeMessage=t.Node.create('<div class="fl-fullscreen-close-message"></div>'),this._closeMessage.set("innerHTML",'<span>Press the "esc" button to exit fullscreen mode.</span>'),this._closeMessage.setStyle("display","none"),this.get("host").get("boundingBox").insert(this._closeMessage)},_showCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.show(!0),this._closeMessageTimer=t.later(4e3,this,this._hideCloseMessage)},_hideCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.hide(!0)}},{NS:"fullscreen",OS_SUPPORT:function(){var t=document.documentElement;return t.webkitRequestFullScreen||t.mozRequestFullScreen||t.requestFullScreen}()}),t.namespace("FL").SlideshowGestures=t.Base.create("fl-slideshow-gestures",t.Base,[],{_startX:null,_startY:null,_touchMoving:!1,_moving:!1,_movingDirection:null,_transitioning:!1,initializer:function(){this.enable()},enable:function(){var e=this.get("id"),i=this.get("direction"),s=this.get("activeItem"),n=this.get("nextItem");s.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|transitionend",t.bind(this._onEndComplete,this)),n.on(e+"|oTransitionEnd",t.bind(this._onEndComplete,this)),n.on(e+"|webkitTransitionEnd",t.bind(this._onEndComplete,this)),"horizontal"==i?(s.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),s.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this)),n.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),n.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this))):(s.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),s.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)),n.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),n.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)))},disable:function(){var t=this.get("id"),e=this.get("activeItem"),i=this.get("nextItem");e.detach(t+"|*"),i.detach(t+"|*")},_onStart:function(t){var e=this.get("direction");this._transitioning&&this._onEndComplete(),"horizontal"==e?this._startX=t.pageX:this._startY=t.pageY,this.fire("start")},_onMoveHorizontal:function(t){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("width"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("left",0),s.setStyles({opacity:1,left:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),i.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),this.fire("move")},_onMoveVertical:function(t){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("height"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("top",0),s.setStyles({opacity:1,left:"auto",top:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),i.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),this.fire("move")},_onEndHorizontal:function(t){if(this._moving){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("width"),10),a=e<0?n:-n;i.transition({transform:"translate("+a+"px, 0px)"}),s.transition({transform:"translate("+a+"px, 0px)"}),this._transitioning=!0,this.fire("end")}},_onEndVertical:function(t){if(this._moving){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("height"),10),a=e<0?n:-n;i.transition({transform:"translate(0px, "+a+"px)"}),s.transition({transform:"translate(0px, "+a+"px)"}),this._transitioning=!0,this.fire("end")}},_onEndComplete:function(){var t=this.get("direction"),e=this.get("activeItem"),i=this.get("nextItem");e.setStyles({opacity:0,"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),i.setStyles({"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),"horizontal"==t?(e.setStyle("left","-9999px"),i.setStyle("left","0px")):(e.setStyle("top","-9999px"),i.setStyle("top","0px")),this.set("activeItem",i),this.set("nextItem",e),this._moving=!1,this._movingDirection=null,this._transitioning=!1,this.fire("endComplete")}},{ATTRS:{direction:{value:"horizontal"},activeItem:{value:null},nextItem:{value:null}}}),t.namespace("FL").SlideshowImageLoader={_loading:!1,_currentImage:null,_currentImageData:null,_queue:[],add:function(t,e,i,s){var n={group:t,src:e,callback:i};s?this._queue.unshift(n):this._queue.push(n),this._loading||this._load()},removeGroup:function(t){for(var e=this._queue.length-1;e>-1;e--)this._queue[e].group==t&&this._queue.splice(e,1);this._currentImageData&&this._currentImageData.group==t&&(this._currentImage.detachAll(),this._currentImage=null,this._currentImageData=null,this._queue.length>0?this._load():this._loading=!1)},_load:function(){this._loading=!0,this._currentImageData=this._queue.shift(),this._currentImage=t.Node.create("<img />"),this._currentImage.on("error",t.bind(this._loadComplete,this)),this._currentImage.on("load",t.bind(this._loadComplete,this)),this._currentImage.set("src",this._currentImageData.src)},_loadComplete:function(){this._currentImageData.callback&&this._currentImageData.callback(this._currentImage),this._queue.length>0?this._load():(this._loading=!1,this._currentImage=null,this._currentImageData=null)}},t.namespace("FL").SlideshowImage=t.Base.create("fl-slideshow-image",t.Widget,[t.WidgetChild],{_imageInfo:null,_image:null,_loading:!1,_loadingURL:null,_videoButton:null,_videoBox:null,_video:null,CONTENT_TEMPLATE:null,syncUI:function(){var t=this.get("boundingBox");this.get("crop")&&(t.setStyle("overflow","hidden"),t.addClass("fl-slideshow-image-cropped"))},load:function(t){this._imageInfo=t,this._loading=!0,this._load()},preload:function(e,i,s){var n=this._isVideo(),a=this.get("loadVideos"),o=this.get("showVideoButton");this.unload(),this.set("width",i),this.set("height",s),this._imageInfo=e,(!n||!a||n&&a&&o)&&t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._getImageURL(),t.bind(this._imagePreloaded,this),this.get("loadPriority"))},_imagePreloaded:function(t){this._image=t},unload:function(){this._image&&(this._image.remove(),this._image.detachAll(),this._image.set("src",""),this._image=null),this._video&&(this._video.remove(),this._video=null),this._videoButton&&(this._videoButton.remove(),this._videoButton=null),this._videoBox&&this._removeVideoBox(),this._imageInfo=null,this._loading=!1,this._loadingURL=null},resize:function(t,e){var i=2*parseInt(this.get("boundingBox").getComputedStyle("borderTopWidth"),10),s=this.get("boundingBox");this.set("width",t-i),this.set("height",e-i),s.setStyle("width",t-i+"px"),s.setStyle("height",e-i+"px"),this._videoButton&&this._positionVideoButton(),this._videoBox&&this._loadVideo(),this._loading||(this._imageInfo&&this._load(),this._image&&this._positionImage())},_load:function(){var t=this.get("loadVideos"),e=this.get("showVideoButton");!this._isVideo()||!t||e||"ontouchstart"in window?this._loadImage():this._loadVideo()},_loadImage:function(){var e=this._getImageURL(),i=this.get("loadVideos");e!=this._loadingURL&&(this._loadingURL=e,t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._loadingURL,t.bind(this._loadImageComplete,this),this.get("loadPriority")),this._loading&&(this._isVideo()&&i&&this._insertVideoButton(),this.fire("loadStart")))},_loadImageComplete:function(t){var e=this.get("boundingBox"),i=this.get("showVideoButton");this._image=t,this._image.setStyle("visibility","hidden"),this._image.addClass("fl-slideshow-image-img"),this._image.detachAll(),this._video&&!i&&(this._video.remove(),this._video=null),e.all("img").remove(),e.append(this._image),this._setupImage(),this._resizeImage(),this._positionImage(),this._image.setStyle("visibility","visible"),this._loadingURL=null,this._loading&&(this._loading=!1,this.fire("loadComplete"))},_setupImage:function(){var t=this.get("boundingBox");"undefined"!=typeof this._image._node.style.msInterpolationMode&&(this._image._node.style.msInterpolationMode="bicubic"),this.get("protect")&&(t.delegate("contextmenu",this._protectImage,"img"),t.delegate("mousedown",this._protectImage,"img"))},_protectImage:function(t){return t.preventDefault(),!1},_resizeImage:function(){var t=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),e=this._image.get("width"),i=this._image.get("height"),s=parseInt(this.get("boundingBox").getComputedStyle("width"),10),n=parseInt(this.get("boundingBox").getComputedStyle("height"),10),a=0,o=0,l=0,h=0,r=this.get("cropHorizontalsOnly"),g=i>e,u=!1;this._imageInfo&&this.get("checkFilenamesForNoCrop")&&(u=this._imageInfo.filename.indexOf("nocrop")>-1),!this.get("crop")||r&&g||u?(l=e/s,h=i/n,h>l?(a=Math.round(e*(1/h)),o=Math.round(i*(1/h))):(a=Math.round(e*(1/l)),o=Math.round(i*(1/l)))):(a=s,o=Math.round(i*s/e),o<n&&(o=n,a=Math.round(e*n/i))),this.get("crop")||this.get("upsize")||!(a>e||o>i)||(a=e,o=i),a-=t,o-=t,this._image.setStyle("width",a+"px"),this._image.setStyle("height",o+"px"),!this.get("crop")&&this.get("constrainWidth")&&this.set("width",a+"px"),!this.get("crop")&&this.get("constrainHeight")&&this.set("height",o+"px")},_positionImage:function(){var t=this.get("position").split(" "),e=""===t[0]?"center":t[0],i=""===t[1]?"center":t[1],s=0,n=0,a=parseInt(this.get("boundingBox").getComputedStyle("width"),10),o=parseInt(this.get("boundingBox").getComputedStyle("height"),10),l=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),h=parseInt(this._image.getComputedStyle("width"),10)+l,r=parseInt(this._image.getComputedStyle("height"),10)+l;isNaN(h)&&isNaN(r)||("left"==e&&(s=0),"center"==e&&(s=(a-h)/2),"right"==e&&(s=a-h),"top"==i&&(n=0),"center"==i&&(n=(o-r)/2),"bottom"==i&&(n=o-r),this._image.setStyles({left:s,top:n}))},_getImageURL:function(){var t=0,e=0,i=0,s=this.get("width"),n=this.get("height"),a=this.get("useThumbSizes"),o=this._imageInfo,l=[o.tinyURL||o.thumbURL||o.largeURL,o.thumbURL||o.largeURL,o.smallURL||o.largeURL,o.mediumURL||o.largeURL||o.smallURL,o.largeURL||o.mediumURL||o.smallURL,o.xlargeURL||o.largeURL||o.mediumURL||o.smallURL,o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL,o.x3largeURL||o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL];return t=a&&s<=100?0:a&&s<=150?1:s<=400?2:s>=400&&s<=600?3:s>=600&&s<=800?4:s>=800&&s<=1024?5:s>=1024&&s<=1280?6:7,e=a&&n<=100?0:a&&n<=150?1:n<=300?2:n>=300&&n<=450?3:n>=450&&n<=600?4:n>=600&&n<=768?5:n>=768&&n<=960?6:7,i=Math.max(t,e),l[i]},_isVideo:function(){return!!this._imageInfo&&("mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType||""!==this._imageInfo.iframe)},_loadVideo:function(){var t=this.get("boundingBox"),e=this.get("showVideoButton"),i=!!e;this._video&&(this._video.remove(),this._video=null),"mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType?this._video=this._getSmugMugVideoEmbed(this._imageInfo,i):""!==this._imageInfo.iframe&&(this._video=this._getIframeVideoEmbed(this._imageInfo,i)),this._videoBox?this._videoBox.one(".fl-slideshow-video-wrap").insert(this._video):(t.all("img").remove(),t.append(this._video)),this._loading&&(this._loading=!1,this.fire("loadComplete"))},_insertVideoButton:function(){var e=this.get("boundingBox"),i="ontouchstart"in window?"touchstart":"click";this._videoButton=t.Node.create('<a class="fl-slideshow-video-button" href="javascript:void(0);"></a>'),this._videoButton.on(i,t.bind(this._showVideoBox,this)),e.insert(this._videoButton),this._positionVideoButton()},_positionVideoButton:function(){var t=this.get("width"),e=this.get("height"),i=parseInt(this._videoButton.getStyle("width"),10),s=parseInt(this._videoButton.getStyle("height"),10);this._videoButton.setStyles({left:(t-i)/2,top:(e-s)/2})},_showVideoBox:function(){var e=this.get("root"),i=t.Node.create('<div class="fl-slideshow-video-wrap"></div>'),s=t.Node.create('<a class="fl-slideshow-video-close" href="javascript:void(0);"></a>'),n="ontouchstart"in window?"touchstart":"click";this._videoBox=t.Node.create('<div class="fl-slideshow-video"></div>'),this._videoBox.setStyle("padding",e.get("boundingBox").getStyle("padding")),this._videoBox.insert(i),this._videoBox.insert(s),this._videoBox.on(n,t.bind(this._removeVideoBox,this)),s.on(n,t.bind(this._removeVideoBox,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&s.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),t.one("body").insert(this._videoBox),this._loadVideo(),t.one("body").on("fl-slideshow-image|keydown",this._onKey,this)},_getSmugMugVideoEmbed:function(e,i){var s=document.createElement("video"),n=0,a="",o="",l="";return null!==t.UA.mobile&&s.canPlayType&&s.canPlayType("video/mp4")?(n=this.get("width"),a="http://www.smugmug.com/photos/"+e.id+"_"+e.key+"-"+n+".mp4",l+='<video width="100%" height="100%" poster="'+this._getImageURL()+'" controls preload="none"',i&&(l+=" autoplay"),l+=">",l+='<source src="'+a+'" type="video/mp4" />',l+="</video>"):(o="imageId="+e.id,o+="&amp;imageKey="+e.key,o+="&amp;albumId="+e.albumId,o+="&amp;albumKey="+e.albumKey,o+="&amp;apiURL=http://api.smugmug.com/&amp;hostLevel=live&amp;isPro=true",o+=i?"&amp;autoPlay=true":"&amp;autoPlay=false",l+='<object type="application/x-shockwave-flash" width="100%" height="100%" data="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="movie" value="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="allowFullScreen" value="true">',l+='<param name="wmode" value="transparent">',l+='<param name="flashVars" value="'+o+'">',l+='<embed src="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf" flashvars="'+o+'" width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent">',l+="</object>"),t.Node.create(l)},_getIframeVideoEmbed:function(e,i){var s='<iframe width="100%" height="100%" frameborder="0" allowfullscreen ',n=e.iframe;return i&&(n+=n.indexOf("?")>-1?"&autoplay=1":"?autoplay=1"),s+='src="'+n+'"></iframe>',t.Node.create(s)},_removeVideoBox:function(e){"undefined"!=typeof e&&e.target&&e.target.get("className").indexOf("fl-slideshow-video")<0||(null!==this._videoBox&&(this._videoBox.remove(),this._videoBox=null,this._video=null),t.one("body").detach("fl-slideshow-image|keydown",this._onKey))},_onKey:function(t){if(27==t.keyCode)return this._removeVideoBox(),!1}},{CSS_PREFIX:"fl-slideshow-image",ATTRS:{loadGroup:{value:"none"},loadPriority:{value:!1},crop:{value:!1},checkFilenamesForNoCrop:{value:!0},cropHorizontalsOnly:{value:!1},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},useThumbSizes:{value:!1},constrainWidth:{value:!1},constrainHeight:{value:!1},loadVideos:{value:!0},showVideoButton:{value:!0}}}),t.namespace("FL").SlideshowMouseNav=t.Base.create("fl-slideshow-mouse-nav",t.Plugin.Base,[],{initializer:function(){var t=this.get("trigger");t.on("click",this._triggerClick,this),t.on("mousemove",this._showArrow,this),t.on("mouseleave",this._hideArrow,this)},_triggerClick:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;a>=s/2?e.nextImage():e.prevImage()},_showArrow:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;null!==e.albumInfo&&e.albumInfo.images.length>1&&(a>=s/2?(i.removeClass("fl-slideshow-mouse-nav-prev"),i.addClass("fl-slideshow-mouse-nav-next")):(i.removeClass("fl-slideshow-mouse-nav-next"),i.addClass("fl-slideshow-mouse-nav-prev")))},_hideArrow:function(){var t=this.get("trigger");t.removeClass("fl-slideshow-mouse-nav-next"),t.removeClass("fl-slideshow-mouse-nav-prev")}},{NS:"mouseNav",ATTRS:{trigger:{value:null}}}),t.namespace("FL").SlideshowKenBurns=t.Base.create("fl-slideshow-ken-burns",t.Base,[],{run:function(){var e=null,i=null;t.FL.Utils.cssSupport("transform")&&(e=this.get("image").one("img"),i=this._getTransform(),e.setStyles({"-webkit-transform-origin":i.origin,"-moz-transform-origin":i.origin,"-ms-transform-origin":i.origin,"transform-origin":i.origin,transform:i.start}),e.transition({easing:"ease-out",duration:this.get("duration"),transform:i.end}))},_getTransform:function(){var e=this.get("zoom"),i=this.get("image"),s=0,n=null,a=null;return s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length),n=t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[s],s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.TRANSFORMS.length),a=t.FL.SlideshowKenBurns.TRANSFORMS[s],i.hasClass("fl-slideshow-image-cropped")||"in"!=n?"out"==n?(a.start="scale("+e+") "+a.translate,a.end="scale(1) translate(0, 0)"):(a.start="scale(1) translate(0, 0)",a.end="scale("+e+") "+a.translate):(s=Math.floor(2*Math.random()),a.start=0===s?"scale(1) translate(100px, 0)":"scale(1) translate(-100px, 0)",a.end="scale("+e+") translate(0, 0)",a.origin="center center"),a}},{ATTRS:{image:{value:null},zoom:{value:1.2},duration:{value:2}},ZOOM_DIRECTIONS:["in","out"],TRANSFORMS:[{origin:"left top",translate:"translate(-30px, -15px)"},{origin:"left center",translate:"translate(-30px, 0)"},{origin:"left bottom",translate:"translate(-30px, 15px)"},{origin:"right top",translate:"translate(30px, -15px)"},{origin:"right center",translate:"translate(30px, 0)"},{origin:"right bottom",translate:"translate(30px, 15px)"}]}),t.namespace("FL").SlideshowNav=t.Base.create("fl-slideshow-nav",t.Widget,[t.WidgetChild],{_buttons:null,_buttonsContainer:null,_buttonsLeftContainer:null,_buttonsRightContainer:null,_fontIcons:{buy:"Cart",caption:"InfoEncircled",close:"XCrossEncircled",fullscreen:"ScreenExpand",next:"ArrowRight",nextPage:"ArrowRight",pause:"PlayerPause",play:"PlayerPlay",prev:"ArrowLeft",prevPage:"ArrowLeft",social:"Heart",thumbs:"ViewThumbGrid"},CONTENT_TEMPLATE:null,renderUI:function(){this._renderContainers(),this._renderButtons(),this._renderFontIcons()},bindUI:function(){var t=this.get("root"),e=this.get("id");this._buttons.prev&&this._buttons.prev.on("click",t.prevImage,t),this._buttons.next&&this._buttons.next.on("click",t.nextImage,t),this._buttons.play&&(this._buttons.play.on("click",this._playClicked,this),t.on(e+"|played",this._showPauseButton,this),t.on(e+"|paused",this._showPlayButton,this),t._playing?this._showPauseButton():this._showPlayButton()),this._buttons.buy&&(t.on(e+"|albumLoadComplete",this._updateBuy,this),null!==t.albumInfo&&this._updateBuy()),this._buttons.count&&t.on(e+"|imageLoadComplete",this._updateCount,this),this._buttons.thumbs&&this._buttons.thumbs.on("click",t._toggleThumbs,t),this._buttons.caption&&(t.on(e+"|imageLoadComplete",this._updateCaption,this),this._updateCaption()),this._buttons.social&&this._buttons.social.on("click",t._toggleSocial,t),this._buttons.fullscreen&&t.fullscreen&&this._buttons.fullscreen.on("click",t.fullscreen.toggle,t.fullscreen),this._buttons.close&&this._buttons.close.on("click",t.hide,t)},destructor:function(){var t=this.get("root"),e=this.get("id");t.detach(e+"|*")},_renderContainers:function(){var e=this.get("contentBox"),i=this.get("buttonsLeft"),s=this.get("buttonsRight");this._buttonsContainer=t.Node.create("<div></div>"),this._buttonsContainer.addClass("fl-slideshow-nav-buttons"),e.appendChild(this._buttonsContainer),i.length>0&&(this._buttonsLeftContainer=t.Node.create("<div></div>"),this._buttonsLeftContainer.addClass("fl-slideshow-nav-buttons-left"),e.appendChild(this._buttonsLeftContainer)),s.length>0&&(this._buttonsRightContainer=t.Node.create("<div></div>"),this._buttonsRightContainer.addClass("fl-slideshow-nav-buttons-right"),e.appendChild(this._buttonsRightContainer))},_renderButtons:function(){var e="",i=0,s=0,n=[{names:this.get("buttons"),container:this._buttonsContainer},{names:this.get("buttonsLeft"),container:this._buttonsLeftContainer},{names:this.get("buttonsRight"),container:this._buttonsRightContainer}];for(this._buttons={};i<n.length;i++)for(s=0;s<n[i].names.length;s++)e=n[i].names[s],e.indexOf("count")>-1?(this._buttons[e]=t.Node.create("<span></span>"),
2
+ this._updateCount()):this._buttons[e]=t.Node.create('<a href="javascript:void(0);"></a>'),e.indexOf("buy")>-1&&this._buttons[e].setStyle("display","none"),this._buttons[e].set("name",e),this._buttons[e].addClass("fl-slideshow-nav-"+e),n[i].container.appendChild(this._buttons[e])},_renderFontIcons:function(){var t=null;if(this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"])for(t in this._buttons)"undefined"!=typeof this._buttons[t]&&"undefined"!=typeof this._fontIcons[t]?(this._buttons[t].addClass("sm-fonticon-"+this._fontIcons[t]),this._buttons[t].addClass("sm-fonticon sm-button-skin-default sm-button-nochrome")):t.indexOf("count")>-1&&this._buttons[t].addClass("fonticons-enabled")},_updateCount:function(){var e="",i=t.FL.SlideshowNav.COUNT_TEXT,s=1,n=1;this.get("root").albumInfo&&(s=this.get("root").imageInfo.index+1,n=this.get("root").albumInfo.images.length),e=i.replace("{current}",s).replace("{total}",n),this._buttons.count.set("innerHTML",e)},_updateCaption:function(){var t=this.get("root"),e=t.imageInfo;e&&""===e.caption?(t.caption.slideshowOverlay.enable(),t.caption.slideshowOverlay.hide(),this._buttons.caption.detach("click"),this._buttons.caption.addClass("fl-slideshow-nav-caption-disabled")):(this._buttons.caption.on("click",t._toggleCaption,t),this._buttons.caption.removeClass("fl-slideshow-nav-caption-disabled"))},_updateBuy:function(){var e=null,i=this.get("root"),s=i.get("source")[i.albumIndex],n=i.albumIndex,a=i.get("source")[n];s&&"smugmug"==s.type&&("undefined"!=typeof i.albumInfo.printable?this._updateBuyComplete():(e=new t.FL.SmugMugAPI,e.addParam("method","smugmug.albums.getInfo"),e.addParam("AlbumID",a.id),e.addParam("AlbumKey",a.key),e.on("complete",this._updateBuyComplete,this),e.request()))},_updateBuyComplete:function(t){var e=this.get("root"),i="undefined"==typeof t?e.albumInfo.printable:t.Album.Printable,s=e.albumInfo.link;i?(e.albumInfo.printable=!0,this._buttons.buy.set("href","https://secure.smugmug.com/cart/batchadd/?url="+encodeURIComponent(s)),this._buttons.buy.setStyle("display","inline-block")):(e.albumInfo.printable=!1,this._buttons.buy.setStyle("display","none")),this.fire("resize")},_playClicked:function(){var t=this.get("root");t._playing?t.pause():t.play()},_showPlayButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-pause"),this._buttons.play.addClass("fl-slideshow-nav-play"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPause"),this._buttons.play.addClass("sm-fonticon-PlayerPlay"))},_showPauseButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-play"),this._buttons.play.addClass("fl-slideshow-nav-pause"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPlay"),this._buttons.play.addClass("sm-fonticon-PlayerPause"))}},{CSS_PREFIX:"fl-slideshow-nav",COUNT_TEXT:"{current} of {total}",ATTRS:{buttons:{value:[],writeOnce:!0},buttonsLeft:{value:[],writeOnce:!0},buttonsRight:{value:[],writeOnce:!0},useFontIcons:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowOverlay=t.Base.create("fl-slideshow-overlay",t.Plugin.Base,[],{_focus:!1,_visible:!0,_disabled:!1,_showProps:{duration:.5,easing:"ease-out",opacity:1},_hideProps:{duration:.5,easing:"ease-out",opacity:0},_hideTimer:null,initializer:function(){var t=this.get("host").get("boundingBox");this.afterHostEvent("render",this._initFocus),this.afterHostEvent("render",this._initVisibility),this.get("closeButton")&&this._initCloseButton(),t.addClass("fl-slideshow-overlay")},destructor:function(){this._hideTimerCancel()},_initFocus:function(){var e=this.get("host").get("boundingBox");e.on("mouseenter",t.bind(this._setFocusOnMouseenter,this)),e.on("mouseleave",t.bind(this._setFocusOnMouseleave,this))},_initVisibility:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");this.get("visible")||("display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),t.setStyle("opacity","0"),this._visible=!1)},_initCloseButton:function(){var e=this.get("host").get("boundingBox"),i=null;i=t.Node.create('<a class="fl-slideshow-overlay-close" href="javascript:void(0);"></a>'),i.on("click",t.bind(this._closeButtonClick,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&i.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),e.insert(i)},_closeButtonClick:function(){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this))},_setFocusOnMouseenter:function(){this._focus=!0},_setFocusOnMouseleave:function(){this._focus=!1},disable:function(){this._disabled=!0},enable:function(){this._disabled=!1},show:function(){var e=this.get("host").get("boundingBox"),i=this.get("hideStyle");this._disabled||("display"==i?e.setStyle("display","block"):"left"==i&&e.setStyle("left","auto"),e.transition(this._showProps,t.bind(this._showComplete,this)),this.fire("showStart"))},_showComplete:function(){this._visible=!0,this.hideWithTimer(),this.fire("showComplete")},hide:function(){if(!this._focus&&!this._disabled){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this)),this.fire("hideStart")}},hideWithTimer:function(){this._hideTimerCancel(),this._hideTimer=t.later(this.get("hideDelay"),this,this.hide)},_hideTimerCancel:function(){this._hideTimer&&(this._hideTimer.cancel(),this._hideTimer=null)},_hideComplete:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");"display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),this._visible=!1,this.fire("hideComplete")}},{NS:"slideshowOverlay",ATTRS:{closeButton:{value:!1,writeOnce:!0},hideDelay:{value:3e3,writeOnce:!0},hideStyle:{value:"display",writeOnce:!0},visible:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowSocial=t.Base.create("fl-slideshow-social",t.Widget,[t.WidgetChild],{_buttons:null,renderUI:function(){this._buttons={},this.get("root").get("googlePlusButtonEnabled")&&this._renderGooglePlusButton()},bindUI:function(){var e=this.get("root");e.get("likeButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateLikeButton,this)),e.get("tweetButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateTweetButton,this)),e.get("googlePlusButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateGooglePlusButton,this)),e.get("pinterestButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updatePinterestButton,this))},_updateLikeButton:function(){var e=null,i=this.get("contentBox"),s=this.get("root"),n=s.albumIndex,a=s.get("source")[n],o=s.imageInfo;this._buttons.like&&(this._buttons.like.remove(),this._buttons.like=null),"smugmug"==a.type?(e="https://www.facebook.com/plugins/like.php?",e+="href=http://www.smugmug.com/services/graph/gallery/",e+=a.id+"_"+a.key+"/"+o.id+"_"+o.key):(e="https://www.facebook.com/plugins/like.php?",e+="href="+encodeURIComponent(o.largeURL)),e+="&send=false",e+="&layout=button_count",e+="&width=90",e+="&show_faces=false",e+="&action=like",e+="&colorscheme=light",e+="&height=21",this._buttons.like=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.like.setStyles({overflow:"hidden",width:"90px",height:"21px"}),i.appendChild(this._buttons.like)},_updateTweetButton:function(){var e=null,i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.tweet&&(this._buttons.tweet.remove(),this._buttons.tweet=null),e="https://platform.twitter.com/widgets/tweet_button.html?",e+="url="+encodeURIComponent(i.largeURL),e+="&count=none",this._buttons.tweet=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.tweet.setStyles({overflow:"hidden",width:"90px",height:"21px"}),s.appendChild(this._buttons.tweet)},_renderGooglePlusButton:function(){var t,e;t=document.createElement("script"),t.type="text/javascript",t.src="https://apis.google.com/js/plusone.js",e=document.getElementsByTagName("head")[0],e.parentNode.appendChild(t)},_updateGooglePlusButton:function(){"undefined"==typeof gapi?setTimeout(t.bind(this._updateGooglePlusButtonCallback,this),500):this._updateGooglePlusButtonCallback()},_updateGooglePlusButtonCallback:function(){var e=this.get("root").imageInfo,i=this.get("contentBox");this._buttons.plus&&(this._buttons.plus.remove(),this._buttons.plus=null),"undefined"!=typeof gapi&&(this._buttons.plus=t.Node.create("<div></div>"),i.appendChild(this._buttons.plus),gapi.plusone.render(this._buttons.plus._node,{href:encodeURIComponent(e.largeURL),annotation:"bubble",size:"medium"}))},_updatePinterestButton:function(){var e="https://pinterest.com/pin/create/button/",i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.pin&&(this._buttons.pin.remove(),this._buttons.pin=null),e+="?url="+encodeURIComponent(window.location.href),e+="&media="+encodeURIComponent(i.mediumURL),e+="&description="+encodeURIComponent(i.caption),this._buttons.pin=t.Node.create("<a></a>"),this._buttons.pin.setAttribute("data-pin-config","none"),this._buttons.pin.setAttribute("data-pin-do","buttonPin"),this._buttons.pin.setAttribute("href",e),this._buttons.pin.setAttribute("target","_blank"),this._buttons.pin.set("innerHTML",'<img src="https://assets.pinterest.com/images/pidgets/pin_it_button.png" border="0" />'),s.appendChild(this._buttons.pin)}},{CSS_PREFIX:"fl-slideshow-social",ATTRS:{}}),t.namespace("FL").SlideshowThumbs=t.Base.create("fl-slideshow-thumbs",t.Widget,[t.WidgetParent,t.WidgetChild],{_clipBox:null,_pagesBox:null,_activePageBox:null,_activePageIndex:0,_nextPageBox:null,_activeImages:null,_nextImages:null,_prevImages:null,_leftNav:null,_rightNav:null,_topNav:null,_bottomNav:null,_bbHeight:0,_bbWidth:0,_cbWidth:0,_clipBoxMarginLeft:0,_clipBoxTop:0,_colsPerPage:0,_rowsPerPage:0,_imagesPerPage:0,_numPages:0,_pageHeight:0,_pageWidth:0,_horizontalSpacing:0,_verticalSpacing:0,_leftNavWidth:0,_rightNavWidth:0,_transition:null,_transitioning:!1,_transitionDirection:"next",_gestures:null,initializer:function(){this._activeImages=[],this._nextImages=[],this._prevImages=[]},renderUI:function(){this._renderBoxes(),this._renderNavs()},bindUI:function(){var e=this.get("root"),i=this.get("id"),s=this.get("transition");e.on(i+"|albumLoadComplete",this._albumLoadComplete,this),"ontouchstart"in window&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:this._activePageBox,nextItem:this._nextPageBox}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){this._syncBoxes(),this._syncNavs()},destructor:function(){var e=this.get("root"),i=this.get("id");e.detach(i+"|*"),t.FL.SlideshowImageLoader.removeGroup("thumbs")},unload:function(){var e=this.get("root"),i=this.get("id"),s=0;for(e.detach(i+"|imageLoadComplete"),t.FL.SlideshowImageLoader.removeGroup("thumbs");s<this._activeImages.length;s++)this._activeImages[s].unload()},resize:function(){this._setSizeInfo(),this._togglePageButtons(),this._resizeBoxes(),this._resizeNavs(),this.get("root").albumInfo&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._renderActivePage(),this._preloadNextPage(),this._preloadPrevPage()),this._gestures&&this._numPages<2?this._gestures.disable():this._gestures&&this._gestures.enable()},prevPage:function(){this._transitioning||this._transitionStart("prev")},nextPage:function(){this._transitioning||this._transitionStart("next")},_albumLoadComplete:function(){var t=this.get("root"),e=this.get("id");t.once(e+"|imageLoadComplete",this.resize,this),t.on(e+"|imageLoadComplete",this._imageLoadComplete,this)},_imageLoadComplete:function(){var e=this.get("root").albumInfo,i=t.one(".fl-slideshow-image-active"),s=i?i._imageInfo:null,n=null,a=this.get("root").imageInfo;this._setActiveImage(this._activeImages),n=t.one(".fl-slideshow-image-active"),i&&!n&&(0===a.index&&s.index===e.images.length-1?this.nextPage():0===s.index&&a.index===e.images.length-1?this.prevPage():s.index<a.index?this.nextPage():s.index>a.index&&this.prevPage())},_renderBoxes:function(){this._clipBox=t.Node.create("<div></div>"),this._clipBox.addClass("fl-slideshow-thumbs-clip"),this.get("contentBox").insert(this._clipBox),this._pagesBox=t.Node.create("<div></div>"),this._pagesBox.addClass("fl-slideshow-thumbs-pages"),this._clipBox.insert(this._pagesBox),this._activePageBox=t.Node.create("<div></div>"),this._activePageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._activePageBox),this._nextPageBox=t.Node.create("<div></div>"),this._nextPageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._nextPageBox)},_syncBoxes:function(){this._activePageBox.setStyle("left","0"),this._nextPageBox.setStyle("left","-9999px")},_resizeBoxes:function(){this.set("width",this._bbWidth),this.set("height",this._bbHeight),this.get("contentBox").setStyle("width",this._cbWidth+"px"),this._clipBox.setStyle("width",this._pageWidth+"px"),this._clipBox.setStyle("height",this._pageHeight+"px"),this._clipBox.setStyle("padding",this._verticalSpacing+"px 0 0 "+this._horizontalSpacing+"px "),this._clipBox.setStyle("margin","0 0 0 "+this._clipBoxMarginLeft+"px"),this._clipBox.setStyle("top",this._clipBoxTop),this._pagesBox.setStyle("width",this._pageWidth+"px"),this._pagesBox.setStyle("height",this._pageHeight+"px"),this._activePageBox.setStyle("width",this._pageWidth+"px"),this._activePageBox.setStyle("height",this._pageHeight+"px"),this._nextPageBox.setStyle("width",this._pageWidth+"px"),this._nextPageBox.setStyle("height",this._pageHeight+"px")},_renderActivePage:function(){var t=0,e=this.get("root"),i=this._imagesPerPage*this._activePageIndex,s=i+this._imagesPerPage,n=e.albumInfo.images;for(this._clearActiveImage();t<this._activeImages.length;t++)this._activeImages[t].remove(),this._activeImages[t].unload(),this._activeImages[t].get("boundingBox")._imageInfo=null,this._activeImages[t].get("boundingBox").remove();for(t=0;i<s&&n[i];i++)this._renderImage(this._activeImages,t,this._activePageBox,n[i]),t++;this._setActiveImage(this._activeImages)},_renderNextPage:function(){var t=0,e="next"==this._transitionDirection?this._nextImages:this._prevImages;for(this._nextPageBox.get("children").remove();t<e.length&&e[t]._imageInfo;t++)this._renderImage(e,t,this._nextPageBox,e[t]._imageInfo);this._setActiveImage(e)},_preloadNextPage:function(){var t=this._activePageIndex+1>=this._numPages?0:this._activePageIndex+1;this._preloadPage(t,this._nextImages)},_preloadPrevPage:function(){var t=this._activePageIndex-1<0?this._numPages-1:this._activePageIndex-1;this._preloadPage(t,this._prevImages)},_preloadPage:function(t,e){var i=0,s=this.get("root"),n=s.albumInfo.images,a=t*this._imagesPerPage,o=a+this._imagesPerPage,l=this.get("imageConfig"),h=l.width,r=l.height;if(this._numPages>1){for(;i<e.length;i++)e[i].remove(),e[i].unload();for(i=0;a<o;a++)n[a]&&(this._renderImage(e,i),e[i].preload(n[a],h,r),i++)}},_renderImage:function(e,i,s,n){var a=null,o=this.get("imageConfig");"undefined"==typeof e[i]&&(o.loadGroup="thumbs",o.useThumbSizes=!0,o.loadVideos=!1,e[i]=new t.FL.SlideshowImage(o),a=e[i].get("boundingBox"),a.on("click",this._imageClick,this),a.on("mouseover",this._imageMouseover,this),a.on("mouseout",this._imageMouseout,this)),a=e[i].get("boundingBox"),a.setStyle("margin","0 "+this._horizontalSpacing+"px "+this._verticalSpacing+"px 0"),s&&(this._childrenContainer=s,this.add(e[i]),e[i].resize(o.width,o.height)),n&&(e[i].load(n),a._imageInfo=n)},_uiAddChild:function(t,e){t.render(e),e.appendChild(t.get("boundingBox"))},_imageClick:function(t){var e=this.get("root");this.get("pauseOnClick")&&e.pause(),e.loadImage(t.currentTarget._imageInfo.index),this.fire("imageClick")},_setActiveImage:function(t){var e=0;for(this._clearActiveImage();e<t.length;e++)if(t[e]._imageInfo&&t[e]._imageInfo.index==this.get("root").imageInfo.index){t[e].get("boundingBox").addClass("fl-slideshow-image-active");break}},_clearActiveImage:function(){var e=t.one(".fl-slideshow-image-active");e&&e.removeClass("fl-slideshow-image-active")},_getTransition:function(){var t=this.get("transition");return"slideHorizontal"==t&&"next"==this._transitionDirection?"slideLeft":"slideHorizontal"==t&&"prev"==this._transitionDirection?"slideRight":"slideVertical"==t&&"next"==this._transitionDirection?"slideUp":"slideVertical"==t&&"prev"==this._transitionDirection?"slideDown":t},_transitionStart:function(e){this._numPages>1&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e,this._transitioning=!0,this._nextPageBox.setStyle("left","0px"),this._renderNextPage(),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextPageBox,itemOut:this._activePageBox,type:this._getTransition(),duration:this.get("transitionDuration"),easing:this.get("transitionEasing")}),this._transition.once("complete",this._transitionComplete,this),this._transition.run(),this._gestures&&this._gestures.disable())},_transitionComplete:function(){this._swapPageRefs(),this._transitioning=!1,this._transitionDirection="",this._transition=null,this._gestures&&this._gestures.enable(),this.fire("transitionComplete")},_gesturesMoveStart:function(e){t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e.direction,this._renderNextPage()},_gesturesEndComplete:function(){this._swapPageRefs(),this._transitionDirection="",this.fire("transitionComplete")},_swapPageRefs:function(){var t=this._activePageBox,e=this._activeImages;this._activePageBox=this._nextPageBox,this._nextPageBox=t,this._nextPageBox.setStyle("left","-9999px"),"next"==this._transitionDirection?(this._activeImages=this._nextImages,this._nextImages=e):(this._activeImages=this._prevImages,this._prevImages=e),"next"==this._transitionDirection&&this._activePageIndex+1<this._numPages?this._activePageIndex++:"next"==this._transitionDirection?this._activePageIndex=0:"prev"==this._transitionDirection&&this._activePageIndex-1>-1?this._activePageIndex--:"prev"==this._transitionDirection&&(this._activePageIndex=this._numPages-1),this._gestures&&(this._gestures.set("activeItem",this._activePageBox),this._gestures.set("nextItem",this._nextPageBox)),this._preloadNextPage(),this._preloadPrevPage()},_renderNavs:function(){var e=this.get("topNavButtons"),i=this.get("rightNavButtons"),s=this.get("bottomNavButtons"),n=this.get("leftNavButtons");this.get("topNavEnabled")&&e.length>0&&(this._topNav=new t.FL.SlideshowNav({buttons:e}),this._topNav.get("boundingBox").addClass("fl-slideshow-thumbs-top-nav"),this.add(this._topNav),this._topNav.render(this.get("contentBox")),this._clipBox.insert(this._topNav.get("boundingBox"),"before"),this._bindNavEvents(this._topNav)),this.get("rightNavEnabled")&&i.length>0&&(this._rightNav=new t.FL.SlideshowNav({buttons:i}),this._rightNav.get("boundingBox").addClass("fl-slideshow-thumbs-right-nav"),this.add(this._rightNav),this._rightNav.render(this.get("contentBox")),this._bindNavEvents(this._rightNav)),this.get("bottomNavEnabled")&&s.length>0&&(this._bottomNav=new t.FL.SlideshowNav({buttons:s}),this._bottomNav.get("boundingBox").addClass("fl-slideshow-thumbs-bottom-nav"),this.add(this._bottomNav),this._bottomNav.render(this.get("contentBox")),this._bindNavEvents(this._bottomNav)),this.get("leftNavEnabled")&&n.length>0&&(this._leftNav=new t.FL.SlideshowNav({buttons:n}),this._leftNav.get("boundingBox").addClass("fl-slideshow-thumbs-left-nav"),this.add(this._leftNav),this._leftNav.render(this.get("contentBox")),this._bindNavEvents(this._leftNav))},_syncNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("right","0px")),this._bottomNav&&(e=this._bottomNav.get("boundingBox"),e.setStyle("position","absolute"),e.setStyle("bottom","0px"),e.setStyle("width","100%")),this._leftNav&&(i=this._leftNav.get("boundingBox"),i.setStyle("position","absolute"),i.setStyle("top","0px"),i.setStyle("left","0px"))},_resizeNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),i=this._bbHeight/2-parseInt(t.getComputedStyle("height"),10)/2,t.setStyle("marginTop",i+"px")),this._leftNav&&(e=this._leftNav.get("boundingBox"),i=this._bbHeight/2-parseInt(e.getComputedStyle("height"),10)/2,e.setStyle("marginTop",i+"px"))},_bindNavEvents:function(t){t._buttons.prevPage&&t._buttons.prevPage.on("click",this.prevPage,this),t._buttons.nextPage&&t._buttons.nextPage.on("click",this.nextPage,this),t.on("resize",this.resize,this)},_togglePageButtons:function(){var t=this.get("boundingBox").all(".fl-slideshow-nav-prevPage, .fl-slideshow-nav-nextPage"),e=t.getStyle("display")[0];1==this._numPages&&"inline-block"==e?(t.setStyle("display","none"),this._setSizeInfo()):this._numPages>1&&"none"==e&&(t.setStyle("display","inline-block"),this._setSizeInfo())},_setSizeInfo:function(){var t=this.get("root"),e=this.get("boundingBox"),i=e.getStyle("position"),s=parseInt(e.getStyle("marginLeft"),10),n=parseInt(e.getStyle("marginRight"),10),a=parseInt(e.getStyle("marginTop"),10),o=parseInt(e.getStyle("marginBottom"),10),l=parseInt(e.getStyle("paddingLeft"),10),h=parseInt(e.getStyle("paddingRight"),10),r=parseInt(e.getStyle("paddingTop"),10),g=parseInt(e.getStyle("paddingBottom"),10),u=e.get("parentNode"),d=parseInt(u.getComputedStyle("width"),10),m=parseInt(u.getComputedStyle("height"),10),c=d-l-h-s-n,_=m-r-g-a-o,p=c,v=c,f=_,b=this.get("columns"),y=this.get("rows"),x=this.get("imageConfig"),I=this.get("horizontalSpacing"),S=this.get("verticalSpacing"),w=this.get("spaceEvenly"),B=this.get("centerSinglePage"),T=0,C=0,L=0,N=0,P=b,O=y,R=0,E=1,k=0,F=0,U=0,z=0;e.setStyle("position","relative"),isNaN(b)||(c=v=b*(x.width+I)+I),isNaN(y)||(_=f=y*(x.height+S)+S),this._leftNav&&(T=parseInt(this._leftNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=T:c+=T),this._rightNav&&(C=parseInt(this._rightNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=C:c+=C),this._topNav&&(L=parseInt(this._topNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=L:_+=L),this._bottomNav&&(N=parseInt(this._bottomNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=N:_+=N),isNaN(b)&&(P=Math.floor(v/(x.width+I)),P=P<1?1:P),isNaN(y)&&(O=Math.floor(f/(x.height+S)),O=O<1?1:O),R=P*O,t.albumInfo&&(E=Math.ceil(t.albumInfo.images.length/R)),isNaN(b)&&w&&(I=Math.floor((v-x.width*P)/(P+1))),isNaN(y)&&w&&(S=Math.floor((f-x.height*O)/(O+1))),t.albumInfo&&B&&1==E&&1==O?(p=t.albumInfo.images.length*x.width,p+=I*(t.albumInfo.images.length+1),this._leftNav&&(p+=T),this._rightNav&&(p+=C)):p=c,t.albumInfo&&B&&1==E&&1==O?(v=t.albumInfo.images.length*x.width,v+=I*t.albumInfo.images.length):v=P*(x.width+I),f=O*(x.height+S),E<2?k=T:(U=c,this._rightNav&&(U-=C),this._leftNav?(U-=T,k=T+(U-v-I)/2):k=(U-v-I)/2),E>1&&!w&&(z=_,this._topNav&&(z-=L),this._bottomNav&&(z-=N),F=(z-(S+f))/2),this._bbHeight=_,this._bbWidth=c,this._cbWidth=p,this._clipBoxMarginLeft=k,this._clipBoxTop=F,this._colsPerPage=P,this._rowsPerPage=O,this._imagesPerPage=R,this._numPages=E,this._pageHeight=f,this._pageWidth=v,this._leftNavWidth=T,this._rightNavWidth=C,this._horizontalSpacing=I,this._verticalSpacing=S,this._activePageIndex=Math.floor(t.imageIndex/this._imagesPerPage),e.setStyle("position",i)}},{CSS_PREFIX:"fl-slideshow-thumbs",ATTRS:{columns:{value:"auto"},rows:{value:"auto"},horizontalSpacing:{value:15},verticalSpacing:{value:15},spaceEvenly:{value:!0},centerSinglePage:{value:!0},pauseOnClick:{value:!1},transition:{value:"slideHorizontal"},transitionDuration:{value:.8},transitionEasing:{value:"ease-out"},imageConfig:{value:{crop:!0,width:50,height:50}},topNavEnabled:{value:!1},topNavButtons:{value:["prevPage","nextPage"]},rightNavEnabled:{value:!0},rightNavButtons:{value:["nextPage"]},bottomNavEnabled:{value:!1},bottomNavButtons:{value:["prevPage","nextPage"]},leftNavEnabled:{value:!0},leftNavButtons:{value:["prevPage"]},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowTransition=t.Base.create("fl-slideshow-transition",t.Base,[],{_transitionFunction:"_transitionFade",_type:"fade",initializer:function(){var e=this.get("type"),i=[],s=t.FL.SlideshowTransition.TYPES,n=t.FL.SlideshowTransition.SLIDESHOW_IMAGE_TYPES,a=t.Array.indexOf(n,e)>-1,o=this._isSlideshowImage(),l=this.get("itemIn"),h=this.get("itemOut");e.indexOf(",")>-1&&(i=e.split(","),i.sort(function(){return.5-Math.random()}),e=i[0]),!o&&a?e="fade":o&&(l&&null===l.one("img")||h&&null===h.one("img")?e="none":a&&(t.UA.gecko&&t.UA.gecko<5||t.UA.opera>0||t.UA.ie>0&&t.UA.ie<9)&&(e="fade")),t.FL.SlideshowTransition.TYPES[e]&&(this._transitionFunction=s[e],this._type=e),this._setupItems()},run:function(){this.fire("start"),this[this._transitionFunction].call(this)},_setupItems:function(){var e=this.get("itemIn"),i=this.get("itemOut");e&&(e.setStyle("zIndex",2),e.setStyle("opacity",1),t.FL.Utils.cssSupport("transform")?e.setStyle("transform","translate(0, 0)"):(e.setStyle("top","0"),e.setStyle("left","0"))),i&&i.setStyle("zIndex",1)},_isSlideshowImage:function(){var t=this.get("itemIn"),e=this.get("itemOut");return!(!t||!t.hasClass("fl-slideshow-image"))||!(!e||!e.hasClass("fl-slideshow-image"))},_transitionStart:function(e,i){var s=this.get("itemIn"),n=this.get("itemOut"),a=t.bind(this._transitionComplete,this),o=s?null:a,l=this.get("duration"),h=this.get("easing");s&&(e.duration=e.duration||l,e.easing=e.easing||h,s.transition(e)),n&&(i.duration=i.duration||l,i.easing=i.easing||h,n.transition(i)),a?t.later(1e3*e.duration+100,null,a):o&&t.later(1e3*i.duration+100,null,o)},_transitionComplete:function(){this._set("itemIn",null),this._set("itemOut",null),this.fire("complete")},_transitionNone:function(){var t=this.get("itemIn"),e=this.get("itemOut");t&&t.setStyle("opacity",1),e&&e.setStyle("opacity",0),this._transitionComplete()},_transitionFade:function(){var t=this.get("itemIn");t&&t.setStyle("opacity",0),this._transitionStart({opacity:1},{opacity:0})},_transitionSlideLeft:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(-100%, 0)"}):this._jsTransitionSlide("left")},_transitionSlideRight:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(-100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(100%, 0)"}):this._jsTransitionSlide("right")},_transitionSlideUp:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, 100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, -100%)"}):this._jsTransitionSlide("up")},_transitionSlideDown:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, -100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, 100%)"}):this._jsTransitionSlide("down")},_jsTransitionSlide:function(t){var e=this.get("itemIn"),i=this.get("itemOut"),s=0;i&&"left"==t&&(s=-parseInt(i.getStyle("width"),10)),i&&"right"==t&&(s=parseInt(i.getStyle("width"),10)),i&&"up"==t&&(s=-parseInt(i.getStyle("height"),10)),i&&"down"==t&&(s=parseInt(i.getStyle("height"),10)),e&&e.setStyle("opacity",1),e&&"left"==t&&e.setStyle("left",e.getStyle("width")),e&&"right"==t&&e.setStyle("left","-"+e.getStyle("width")),e&&"up"==t&&e.setStyle("top",e.getStyle("height")),e&&"down"==t&&e.setStyle("top","-"+e.getStyle("height")),"left"==t||"right"==t?this._transitionStart({left:0},{left:s}):this._transitionStart({top:0},{top:s})},_cssTransitionSlide:function(e){var i=this.get("itemIn"),s=this.get("itemOut"),n=t.UA.chrome<36?"transform":"-webkit-transform",a={},o={};a[n]=e.inEnd,o[n]=e.outEnd,i&&(i.setStyle("transition",""),i.setStyle("opacity",1),i.setStyle(n,e.inStart)),s&&(s.setStyle("transition",""),s.setStyle(n,e.outStart)),this._transitionStart(a,o)},_transitionBars:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("bars"),i=this._renderSlices(1,e),s=this.get("duration"),n=0,a=100,o=!1,l=0,h=null,r={duration:s,opacity:1};for("barsRandom"==this._type&&(i=this._randomizeSlices(i));l<i.length;l++)h=t.clone(r),"blinds"==this._type&&(h.width=parseFloat(i[l].getComputedStyle("width"),10)+"px",i[l].setStyle("width","0px"),a=50),o=l==i.length-1,t.later(n,this,this._transitionSlice,[i[l],h,o]),n+=a;this._transitionSlicesFadeLast(n)},_transitionBoxes:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("boxCols"),i=this.get("boxRows"),s=e*i,n="boxesRandom"!=this._type,a=this._renderSlices(i,e,n),o=this.get("duration"),l=0,h=150,r=!1,g=0,u=0,d=0,m=-1,c=null,_={duration:o,opacity:1};if(n)for(;g<s;){for(u=0;u<i;u++)0===u&&(m++,d=m),d>-1&&d<e&&(g++,c=t.clone(_),"boxesGrow"==this._type&&(c.height=parseFloat(a[u][d].getComputedStyle("height"),10)+"px",c.width=parseFloat(a[u][d].getComputedStyle("width"),10)+"px",a[u][d].setStyle("height","0px"),a[u][d].setStyle("width","0px"),h=50),r=g==s-1,t.later(l,this,this._transitionSlice,[a[u][d],c,r])),d--;l+=h}else for(a=this._randomizeSlices(a),h=30;g<a.length;g++)c=t.clone(_),r=g==a.length-1,t.later(l,this,this._transitionSlice,[a[g],c,r]),l+=h;this._transitionSlicesFadeLast(l)},_renderSlices:function(e,i,s){for(var n=this.get("itemIn"),a=parseFloat(n.getComputedStyle("height"),10),o=parseFloat(n.getComputedStyle("width"),10),l=n.one("img"),h=l.get("src"),r=parseFloat(l.getComputedStyle("height"),10),g=parseFloat(l.getComputedStyle("width"),10),u=parseFloat(l.getComputedStyle("left"),10),d=parseFloat(l.getComputedStyle("top"),10),m=0,c=0,_=Math.round(a/e),p=Math.round(o/i),v=null,f=null,b=[];c<e;c++)for("undefined"!=typeof s&&s&&(b[c]=[]),m=0;m<i;m++)v=t.Node.create('<div class="fl-slideshow-transition-slice"></div>'),f=t.Node.create('<img src="'+h+'" />'),v.setStyles({left:p*m+"px",top:_*c+"px",width:m==i-1?o-p*m+"px":p+"px",height:c==e-1?a-_*c+"px":_+"px",opacity:0}),f.setStyles({height:r+"px",width:g+"px",top:d-(_+c*_-_)+"px",left:u-(p+m*p-p)+"px"}),v.append(f),n.append(v),"undefined"!=typeof s&&s?b[c].push(v):b.push(v);return b},_transitionSlicesFadeLast:function(t){var e=this.get("itemOut");e&&!e.hasClass("fl-slideshow-image-cropped")&&e.transition({duration:t/1e3+this.get("duration"),opacity:0})},_transitionSlice:function(e,i,s){var n=s?t.bind(this._transitionSlicesComplete,this):null;e.transition(i,n)},_transitionSlicesComplete:function(){var t=this.get("itemIn");t.all(".fl-slideshow-transition-slice").remove(),t.one(".fl-slideshow-image-img").setStyle("opacity",1),this._transitionComplete()},_randomizeSlices:function(t){var e,i,s=t.length;if(0!==s){for(;--s;)e=Math.floor(Math.random()*(s+1)),i=t[s],t[s]=t[e],t[e]=i;return t}},_transitionKenBurns:function(){var e=this.get("kenBurnsDuration"),i=this.get("duration"),s=this.get("itemIn"),n=this.get("kenBurnsZoom");this._transitionFade(),new t.FL.SlideshowKenBurns({duration:e+i+4,image:s,zoom:n}).run()}},{ATTRS:{itemIn:{value:null},itemOut:{value:null},duration:{value:.5},easing:{value:"ease-out"},type:{value:"fade"},bars:{value:15},boxCols:{value:8},boxRows:{value:4},kenBurnsDuration:{value:4},kenBurnsZoom:{value:1.2}},TYPES:{fade:"_transitionFade",none:"_transitionNone",slideLeft:"_transitionSlideLeft",slideRight:"_transitionSlideRight",slideUp:"_transitionSlideUp",slideDown:"_transitionSlideDown",blinds:"_transitionBars",bars:"_transitionBars",barsRandom:"_transitionBars",boxes:"_transitionBoxes",boxesRandom:"_transitionBoxes",boxesGrow:"_transitionBoxes",kenBurns:"_transitionKenBurns"},SLIDESHOW_IMAGE_TYPES:["blinds","bars","barsRandom","boxes","boxesRandom","boxesGrow","kenBurns"]}),t.namespace("FL").Slideshow=t.Base.create("fl-slideshow",t.FL.SlideshowBase,[],{frame:null,nav:null,imageNavLeft:null,imageNavRight:null,thumbs:null,verticalThumbs:null,caption:null,
3
+ social:null,_nextImagePreloader:null,_initialNavSettings:null,initializer:function(){var e={loadGroup:"main-preload",crop:this.get("crop"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize")};this._nextImagePreloader=new t.FL.SlideshowImage(e),this._isMobile()&&(this._removeNavButton("prev"),this._removeNavButton("prevPage"),this._removeNavButton("next"),this._removeNavButton("nextPage"),this._removeNavButton("fullscreen")),this._hasNavButton("fullscreen")&&(t.FL.SlideshowFullscreen.OS_SUPPORT?this.plug(t.FL.SlideshowFullscreen):this._removeNavButton("fullscreen"))},renderUI:function(){t.FL.Slideshow.superclass.renderUI.apply(this,arguments),this._renderFrame(),this._renderVerticalThumbs(),this._renderNavAndThumbs(),this._renderImageNav(),this._renderMouseNav(),this._renderCaption(),this._renderSocial()},bindUI:function(){var e=this.get("boundingBox"),i=this.frame.get("boundingBox"),s=this.get("navOverlay"),n=this.get("navType"),a=this._getNav(),o=this.get("clickAction");t.FL.Slideshow.superclass.bindUI.apply(this,arguments),t.Do.after(this._resizeChildWidgets,this,"resize"),this.on("albumLoadStart",this._albumLoadStart,this),this.on("albumLoadComplete",this._albumLoadComplete,this),this.on("imageLoadComplete",this._loadFrame,this),this.get("loadingImageAlwaysEnabled")&&(this.frame.on("transitionInit",t.bind(this._showLoadingImageWithDelay,this)),this.frame.on("transitionStart",t.bind(this._hideLoadingImage,this))),this.get("overlayHideOnMousemove")&&(a&&s&&(this.frame.once("transitionComplete",a.slideshowOverlay.hideWithTimer,a.slideshowOverlay),e.on("mousemove",t.bind(this._toggleNav,this))),"buttons"!=n&&"thumbs"!=n&&"custom"!=n||(e.on("mouseenter",t.bind(this._checkOverlaysOnMouseenter,this)),e.on("mouseleave",t.bind(this._hideAllOverlays,this)))),e.delegate("click",t.bind(this._overlayCloseClick,this),".fl-slideshow-overlay-close"),"gallery"!=o&&"url"!=o||i.delegate("click",t.bind(this._frameClick,this),".fl-slideshow-image-img")},syncUI:function(){var e=this.get("boundingBox");t.FL.Slideshow.superclass.syncUI.apply(this,arguments),e._node.onselectstart=function(){return!1},e._node.unselectable="on",e._node.style.MozUserSelect="none","none"!=this.get("clickAction")&&this.frame.get("boundingBox").addClass("fl-click-action-enabled")},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},unload:function(){this.pause(),this.frame.unload(),null!==this.thumbs&&this.thumbs.unload()},_albumLoadStart:function(){this._showLoadingImage()},_albumLoadComplete:function(){this.frame.once("transitionStart",t.bind(this._hideLoadingImage,this))},_resizeChildWidgets:function(){var t=this.get("boundingBox"),e=this.get("contentBox"),i=this.get("imageNavEnabled");this._renderNavAndThumbs(),this.get("verticalThumbsOverlay")?(this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight")),this._resizeVerticalThumbs()):(this._resizeVerticalThumbs(),this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight"))),i&&this._positionImageNav(),this._positionLoadingImage()},_renderVerticalThumbs:function(){var e,i=this.get("responsiveThreshold"),s=this.get("boundingBox"),n=s.get("offsetWidth");this.get("verticalThumbsEnabled")&&n>i&&(this.verticalThumbs=new t.FL.SlideshowThumbs(this._getVerticalThumbsConfig()),this.add(this.verticalThumbs),this.verticalThumbs.render(s),e=this.verticalThumbs.get("boundingBox"),e.addClass("fl-slideshow-vertical-thumbs"),e.setStyle(this.get("verticalThumbsPosition"),0),s.append(e),this.get("verticalThumbsOverlay")?(this.verticalThumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.frame.get("boundingBox").append(e),this.verticalThumbs.resize()):(this.verticalThumbs.resize(),this._adjustContentForVerticalThumbs()),this._bindVerticalThumbs())},_getVerticalThumbsConfig:function(){var t=this.getAttrs(),e={columns:t.verticalThumbsColumns,rows:"auto",centerSinglePage:!1,horizontalSpacing:t.verticalThumbsHorizontalSpacing,verticalSpacing:t.verticalThumbsVerticalSpacing,spaceEvenly:t.verticalThumbsSpaceEvenly,rightNavEnabled:!1,leftNavEnabled:!1,topNavEnabled:t.verticalThumbsTopNavEnabled,topNavButtons:t.verticalThumbsTopNavButtons,bottomNavEnabled:t.verticalThumbsBottomNavEnabled,bottomNavButtons:t.verticalThumbsBottomNavButtons,pauseOnClick:t.verticalThumbsPauseOnClick,transition:t.verticalThumbsTransition,transitionDirection:t.verticalThumbsTransitionDirection,transitionEasing:t.verticalThumbsTransitionEasing,touchSupport:!0,imageConfig:{crop:t.verticalThumbsImageCrop,width:t.verticalThumbsImageWidth,height:t.verticalThumbsImageHeight}};return e},_bindVerticalThumbs:function(){var e=this.get("boundingBox"),i=this.get("overlayHideOnMousemove"),s=this.get("verticalThumbsOverlay"),n=this.verticalThumbs;n&&i&&s&&(this.frame.once("transitionComplete",n.slideshowOverlay.hideWithTimer,n.slideshowOverlay),e.on("mousemove",t.bind(this._toggleVerticalThumbs,this)),e.on("mouseenter",t.bind(this._toggleVerticalThumbs,this)))},_resizeVerticalThumbs:function(){var t,e,i,s,n,a,o,l,h=this.get("verticalThumbsEnabled");h&&(t=this.get("verticalThumbsOverlay"),e=this.get("responsiveThreshold"),i=this.get("boundingBox"),s=i.get("offsetWidth"),n=this.get("navOverlay"),a=this.get("navType"),o=this._getNav(),this.verticalThumbs&&s>e?(this.verticalThumbs.get("boundingBox").setStyle("display","block"),this.verticalThumbs.resize(),t?o&&n&&(l=o.get("boundingBox"),"thumbs"==a?(this._adjustOverlayForVerticalThumbs(l,!0),this.thumbs.resize()):this._adjustOverlayForVerticalThumbs(l)):this._adjustContentForVerticalThumbs()):!this.verticalThumbs&&s>e?this._renderVerticalThumbs():this.verticalThumbs&&s<=e&&(this.verticalThumbs.get("boundingBox").setStyle("display","none"),t||this.get("contentBox").setStyles({left:"auto",position:"relative",right:"auto",width:"auto"})))},_toggleVerticalThumbs:function(){this.verticalThumbs&&(this.verticalThumbs.slideshowOverlay._visible?this.verticalThumbs.slideshowOverlay.hideWithTimer():this.verticalThumbs.slideshowOverlay.show())},_adjustContentForVerticalThumbs:function(){var t=this.get("boundingBox"),e=this.verticalThumbs.get("boundingBox"),i=this.get("verticalThumbsPosition"),s=this.get("contentBox"),n="left"==i?"right":"left",a=t.get("offsetWidth")-e.get("offsetWidth");s.setStyle("position","absolute"),s.setStyle(n,0),s.setStyle("width",a)},_adjustOverlayForVerticalThumbs:function(t,e){var i=this.get("verticalThumbsEnabled"),s=this.get("verticalThumbsOverlay"),n=null,a=null,o="undefined"==typeof e?"":"margin-",l=0;this.verticalThumbs&&i&&s&&(n=this.verticalThumbs.get("boundingBox"),l=n.get("offsetWidth"),a=this.get("verticalThumbsPosition"),"left"==a?t.setStyle(o+"left",l+"px"):t.setStyle(o+"right",l+"px"))},_renderFrame:function(){this.frame=new t.FL.SlideshowFrame({imageConfig:{loadGroup:"main",loadPriority:!0,crop:this.get("crop"),cropHorizontalsOnly:this.get("cropHorizontalsOnly"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize"),showVideoButton:this.get("navOverlay")},touchSupport:!0}),this.add(this.frame),this.frame.render(this.get("contentBox")),this.frame.get("boundingBox").addClass("fl-slideshow-main-image"),this._setPlayingTimerEvent(this.frame,"transitionComplete"),this._loadingImageContainer=this.frame.get("contentBox")},_resizeFrame:function(t,e){var i=this.get("navOverlay"),s=this._getNav();s&&!i&&(e-=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),this.frame.resize(t,e)},_loadFrame:function(e){var i=this.imageInfo.index,s=this.albumInfo.images,n=i+1>=s.length?0:i+1,a=this.frame.get("width"),o=this.frame.get("height");this.frame.load(e.imageInfo),t.FL.SlideshowImageLoader.removeGroup("main-preload"),this._nextImagePreloader.preload(s[n],a,o)},_frameClick:function(){var t=this.get("clickAction"),e=this.get("clickActionUrl");"url"==t?window.location.href=e:"gallery"==t&&(window.location.href=this.imageInfo.link)},_initMiniNav:function(){var t=[];"ontouchstart"in window||t.push("prev"),(this._hasNavButton("thumbs")||"thumbs"==this.get("navType"))&&t.push("thumbs"),this._hasNavButton("caption")&&t.push("caption"),this._hasNavButton("social")&&t.push("social"),this._hasNavButton("buy")&&t.push("buy"),this._hasNavButton("play")&&t.push("play"),!this._hasNavButton("fullscreen")||"ontouchstart"in window||t.push("fullscreen"),"ontouchstart"in window||t.push("next"),this._initialNavSettings={buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight"),type:this.get("navType")},this._set("navButtons",t),this._set("navButtonsLeft",[]),this._set("navButtonsRight",[]),this._set("navType","buttons")},_renderNavAndThumbs:function(){var t,e,i=this.get("navType"),s=!1;"buttons"!=i&&"thumbs"!=i||(t=this.get("boundingBox").get("offsetWidth"),e=this.get("responsiveThreshold"),t<=e&&null===this._initialNavSettings?(this._initMiniNav(),s=!0):t>e&&null!==this._initialNavSettings&&(this._set("navButtons",this._initialNavSettings.buttons),this._set("navButtonsLeft",this._initialNavSettings.buttonsLeft),this._set("navButtonsRight",this._initialNavSettings.buttonsRight),this._set("navType",this._initialNavSettings.type),this._initialNavSettings=null,s=!0),(s||null===this.nav)&&this._renderNav(),s||null===this.thumbs?this._renderThumbs():this._thumbsEnabled()&&this._resizeThumbs(),s&&null!==this.caption&&this._syncCaption(),s&&null!==this.social&&this._syncSocial())},_renderNav:function(){var e=this.frame.get("boundingBox"),i=null,s=this.get("navOverlay"),n=this.get("navPosition");this._destroyNav(),"buttons"==this.get("navType")&&(this.nav=new t.FL.SlideshowNav({buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight")}),this.add(this.nav),this.nav.render(this.get("contentBox")),i=this.nav.get("boundingBox"),s&&(this.nav.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),i.setStyle("position","absolute"),i.setStyle(n,"0px")),"top"==n?e.insert(i,"before"):e.insert(i,"after"),i.addClass("fl-slideshow-main-nav"))},_destroyNav:function(){if(null!==this.nav){this.nav.slideshowOverlay&&this.nav.slideshowOverlay.destroy(),this.nav.get("boundingBox").remove(),this.remove(this.nav);try{this.nav.destroy(!0)}catch(t){}this.nav=null}},_getNav:function(){var t=this.get("navType");return"buttons"==t?this.nav:"thumbs"==t?this.thumbs:null},_toggleNav:function(){var t=this._getNav();t.slideshowOverlay&&(t.slideshowOverlay._visible?t.slideshowOverlay.hideWithTimer():t.slideshowOverlay.show())},_renderImageNav:function(){var e;this.get("imageNavEnabled")&&(this._isMobile()?this._set("imageNavEnabled",!1):(e=this.get("boundingBox"),this.imageNavLeft=new t.FL.SlideshowNav({buttons:["prev"],useFontIcons:!1}),this.imageNavRight=new t.FL.SlideshowNav({buttons:["next"],useFontIcons:!1}),this.add(this.imageNavLeft),this.add(this.imageNavRight),this.imageNavLeft.render(this.frame.get("boundingBox")),this.imageNavRight.render(this.frame.get("boundingBox")),this.imageNavLeft.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.imageNavRight.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.get("overlayHideOnMousemove")&&(this.frame.once("transitionComplete",this.imageNavLeft.slideshowOverlay.hideWithTimer,this.imageNavLeft.slideshowOverlay),this.frame.once("transitionComplete",this.imageNavRight.slideshowOverlay.hideWithTimer,this.imageNavRight.slideshowOverlay),e.on("mousemove",t.bind(this._toggleImageNav,this)),e.on("mouseenter",t.bind(this._toggleImageNav,this))),this.imageNavLeft.get("boundingBox").addClass("fl-slideshow-image-nav-left"),this.imageNavRight.get("boundingBox").addClass("fl-slideshow-image-nav-right")))},_positionImageNav:function(){var t=this.imageNavLeft.get("boundingBox"),e=this.imageNavRight.get("boundingBox"),i=t.get("offsetHeight"),s=this.frame.get("boundingBox").get("offsetHeight"),n=s/2-i/2,a={top:n+"px",display:"block"};t.setStyles(a),e.setStyles(a),this._adjustOverlayForVerticalThumbs(t),this._adjustOverlayForVerticalThumbs(e)},_toggleImageNav:function(){this.imageNavLeft.slideshowOverlay._visible?this.imageNavLeft.slideshowOverlay.hideWithTimer():this.imageNavLeft.slideshowOverlay.show(),this.imageNavRight.slideshowOverlay._visible?this.imageNavRight.slideshowOverlay.hideWithTimer():this.imageNavRight.slideshowOverlay.show()},_renderMouseNav:function(){!this.get("mouseNavEnabled")||"ontouchstart"in window||window.navigator.msPointerEnabled||this.plug(t.FL.SlideshowMouseNav,{trigger:this.frame.get("boundingBox")})},_thumbsEnabled:function(){var t=this.get("navType");return"thumbs"==t||!("buttons"!=t&&"custom"!=t||!this._hasNavButton("thumbs"))},_renderThumbs:function(){var e,i,s,n;if(this._destroyThumbs(),this._thumbsEnabled()){e=this.frame.get("boundingBox"),i=this.get("navOverlay"),s=this.get("navPosition"),n=this.get("navType"),this.thumbs=new t.FL.SlideshowThumbs(this._getThumbsConfig());try{this.add(this.thumbs)}catch(a){}"buttons"==n||"custom"==n?this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left",visible:!1}):"thumbs"==n&&i&&this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.thumbs.render(this.get("contentBox")),"top"==s?e.insert(this.thumbs.get("boundingBox"),"before"):e.insert(this.thumbs.get("boundingBox"),"after"),this.get("thumbsHideOnClick")&&"thumbs"!=n&&this.thumbs.on("imageClick",t.bind(this._hideThumbsOnImageClick,this)),this._syncThumbs()}},_destroyThumbs:function(){if(null!==this.thumbs){this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.destroy(),this.thumbs.get("boundingBox").remove(),this.remove(this.thumbs);try{this.thumbs.destroy(!0)}catch(t){}this.thumbs=null}},_syncThumbs:function(){var t=this.thumbs.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this.get("navType"),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;"buttons"==s&&(a=parseInt(this.nav.get("boundingBox").getComputedStyle("height"),10),t.setStyle("position","absolute"),e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")),("custom"==s||"thumbs"==s&&e)&&(t.setStyle("position","absolute"),t.setStyle(i,"0px")),this.thumbs.resize()},_getThumbsConfig:function(){var t=this.getAttrs(),e=this.get("navType"),i={crop:t.thumbsImageCrop,width:t.thumbsImageWidth,height:t.thumbsImageHeight},s={columns:"auto",rows:1,horizontalSpacing:t.thumbsHorizontalSpacing,verticalSpacing:t.thumbsVerticalSpacing,spaceEvenly:t.thumbsSpaceEvenly,centerSinglePage:t.thumbsCenterSinglePage,pauseOnClick:t.thumbsPauseOnClick,transition:t.thumbsTransition,transitionDirection:t.thumbsTransitionDirection,transitionEasing:t.thumbsTransitionEasing,leftNavButtons:t.navButtonsLeft,rightNavButtons:t.navButtonsRight,imageConfig:i,touchSupport:!0};return"buttons"!=e&&"custom"!=e||("ontouchstart"in window?(s.leftNavEnabled=!1,s.rightNavEnabled=!1):(s.centerSinglePage=!1,s.leftNavButtons=["prevPage"],s.rightNavButtons=["nextPage"])),s},_resizeThumbs:function(){this.thumbs&&this.thumbs.resize()},_toggleThumbs:function(){this._toggleOverlay(this.thumbs.slideshowOverlay)},_hideThumbsOnImageClick:function(){this.thumbs.slideshowOverlay&&(this.thumbs.slideshowOverlay._focus=!1,this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide(),this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable())},_renderCaption:function(){this._hasNavButton("caption")&&(this.caption=new t.FL.SlideshowCaption({lessLinkText:this.get("captionLessLinkText"),moreLinkText:this.get("captionMoreLinkText"),textLength:this.get("captionTextLength"),stripTags:this.get("captionStripTags")}),this.add(this.caption),this.caption.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncCaption())},_syncCaption:function(){var t=this.caption.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleCaption:function(){this._toggleOverlay(this.caption.slideshowOverlay)},_renderSocial:function(){this._hasNavButton("social")&&(this.social=new t.FL.SlideshowSocial,this.add(this.social),this.social.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncSocial())},_syncSocial:function(){var t=this.social.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleSocial:function(){this._toggleOverlay(this.social.slideshowOverlay)},_toggleOverlay:function(t){var e=this.get("navType"),i=this._getNav();t._visible?(i&&i.slideshowOverlay&&i.slideshowOverlay.enable(),t.enable(),t.hide()):(i&&i.slideshowOverlay&&i.slideshowOverlay.disable(),t.show(),t.disable()),this.thumbs&&"thumbs"!=e&&this.thumbs.slideshowOverlay!==t&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide()),this.caption&&this.caption.slideshowOverlay!==t&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hide()),this.social&&this.social.slideshowOverlay!==t&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hide())},_overlayCloseClick:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable(),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.enable(),this.caption&&this.caption.slideshowOverlay.enable(),this.social&&this.social.slideshowOverlay.enable(),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.enable())},_hideAllOverlays:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay._visible&&(this.nav.slideshowOverlay.enable(),this.nav.slideshowOverlay.hideWithTimer()),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay._visible&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hideWithTimer()),this.caption&&this.caption.slideshowOverlay._visible&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hideWithTimer()),this.social&&this.social.slideshowOverlay._visible&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hideWithTimer()),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavLeft.slideshowOverlay.hideWithTimer(),this.imageNavRight.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.hideWithTimer())},_checkOverlaysOnMouseenter:function(){var t=this.get("navType"),e=this.get("navOverlay"),i=this._getNav(),s=!1;this.thumbs&&"thumbs"!=t&&this.thumbs.slideshowOverlay._visible?(s=!0,this.thumbs.slideshowOverlay.disable()):this.caption&&this.caption.slideshowOverlay._visible?(s=!0,this.caption.slideshowOverlay.disable()):this.social&&this.social.slideshowOverlay._visible&&(s=!0,this.social.slideshowOverlay.disable()),i&&s&&e&&i.slideshowOverlay.disable()},_hasNavButton:function(e){var i=this.get("navType");return("buttons"==i||"thumbs"==i||"custom"==i)&&(t.Array.indexOf(this.get("navButtons"),e)>-1||(t.Array.indexOf(this.get("navButtonsLeft"),e)>-1||t.Array.indexOf(this.get("navButtonsRight"),e)>-1))},_removeNavButton:function(e){var i=this.get("navButtons"),s=this.get("navButtonsLeft"),n=this.get("navButtonsRight"),a=this.get("verticalThumbsTopNavButtons"),o=this.get("verticalThumbsBottomNavButtons");t.Array.indexOf(i,e)>-1&&i.splice(t.Array.indexOf(i,e),1),t.Array.indexOf(s,e)>-1&&s.splice(t.Array.indexOf(s,e),1),t.Array.indexOf(n,e)>-1&&n.splice(t.Array.indexOf(n,e),1),t.Array.indexOf(a,e)>-1&&a.splice(t.Array.indexOf(a,e),1),t.Array.indexOf(o,e)>-1&&o.splice(t.Array.indexOf(o,e),1),this._set("navButtons",i),this._set("navButtonsLeft",s),this._set("navButtonsRight",n),this._set("verticalThumbsTopNavButtons",a),this._set("verticalThumbsBottomNavButtons",o)}},{CSS_PREFIX:"fl-slideshow",ATTRS:{clickAction:{value:"none"},clickActionUrl:{value:""},crop:{value:!1},cropHorizontalsOnly:{value:!1},loadingImageAlwaysEnabled:{value:!0},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},transition:{value:"fade"},transitionDuration:{value:1},transitionEasing:{value:"ease-out"},kenBurnsZoom:{value:1.2},navType:{value:"none"},navPosition:{value:"bottom"},navOverlay:{value:!1},navButtons:{value:[]},navButtonsLeft:{value:[]},navButtonsRight:{value:[]},overlayHideOnMousemove:{value:!0},overlayHideDelay:{value:3e3},imageNavEnabled:{value:!1},mouseNavEnabled:{value:!1},thumbsHideOnClick:{value:!0},thumbsHorizontalSpacing:{value:15},thumbsVerticalSpacing:{value:15},thumbsSpaceEvenly:{value:!0},thumbsCenterSinglePage:{value:!0},thumbsPauseOnClick:{value:!1},thumbsTransition:{value:"slideHorizontal"},thumbsTransitionDuration:{value:.8},thumbsTransitionEasing:{value:"ease-out"},thumbsImageCrop:{value:!0},thumbsImageWidth:{value:50},thumbsImageHeight:{value:50},captionLessLinkText:{value:"Read Less"},captionMoreLinkText:{value:"Read More"},captionTextLength:{value:200},captionStripTags:{value:!1},verticalThumbsEnabled:{value:!1},verticalThumbsPosition:{value:"left"},verticalThumbsOverlay:{value:!1},verticalThumbsColumns:{value:1},verticalThumbsTopNavEnabled:{value:!1},verticalThumbsTopNavButtons:{value:["prevPage","nextPage"]},verticalThumbsBottomNavEnabled:{value:!0},verticalThumbsBottomNavButtons:{value:["prevPage","nextPage"]},verticalThumbsHorizontalSpacing:{value:15},verticalThumbsVerticalSpacing:{value:15},verticalThumbsSpaceEvenly:{value:!1},verticalThumbsPauseOnClick:{value:!1},verticalThumbsImageCrop:{value:!0},verticalThumbsImageWidth:{value:75},verticalThumbsImageHeight:{value:75},verticalThumbsTransition:{value:"slideVertical"},verticalThumbsTransitionDuration:{value:.8},verticalThumbsTransitionEasing:{value:"ease-out"},googlePlusButtonEnabled:{value:!0},likeButtonEnabled:{value:!0},pinterestButtonEnabled:{value:!0},tweetButtonEnabled:{value:!0}}})},"2.0.0",{requires:["anim","event-mouseenter","plugin","transition","fl-event-move","fl-slideshow-css","fl-slideshow-base","fl-utils","sm-fonticon"]}),YUI.add("fl-slideshow-album-loader",function(t){t.namespace("FL").SlideshowAlbumLoader=t.Base.create("fl-slideshow-album-loader",t.Base,[],{_source:null,load:function(e){this._source=e,this.fire("start"),this[t.FL.SlideshowAlbumLoader.TYPES[e.type]].call(this)},_loadComplete:function(t){t=this._randomize(t),this.fire("complete",t)},_randomize:function(t){var e;if(this.get("randomize"))for(t.albumInfo.images.sort(function(){return.5-Math.random()}),e=0;e<t.albumInfo.images.length;e++)t.albumInfo.images[e].index=e;return t},_loadSmugMug:function(){var e=new t.FL.SmugMugAPI;e.on("complete",this._loadSmugMugSuccess,this),e.addParam("method","smugmug.images.get"),e.addParam("AlbumID",this._source.id),e.addParam("AlbumKey",this._source.key),e.addParam("Extras","Caption,Format,FileName"),this._source.password&&e.addParam("Password",this._source.password),this._source.sp&&e.addParam("SitePassword",this._source.sp),e.request()},_loadSmugMugSuccess:function(e){var i=e.Album.Images,s={},n="undefined"!=typeof this._source.proxy?this._source.proxy:"",a="",o="",l="",h="",r=0,g=null,u=null;for(s.index=this._source.index,s.id=e.Album.id,s.key=e.Album.Key,s.link=e.Album.URL,s.title=this._source.title?this._source.title:"",s.images=[],a=s.link.replace("http://","").split("/").shift(),a="http://"+a+"/buy/"+e.Album.id+"_"+e.Album.Key+"/",r=0;r<i.length;r++)o=n+e.Album.URL+"/"+i[r].id+"_"+i[r].Key,h=i[r].Format.toLowerCase(),l="mp4"==h?".jpg":"."+h,s.images[r]={},s.images[r].index=r,s.images[r].sourceType="smugmug",s.images[r].albumId=e.Album.id,s.images[r].albumKey=e.Album.Key,s.images[r].id=i[r].id,s.images[r].key=i[r].Key,s.images[r].filename=i[r].FileName,s.images[r].format=h,s.images[r].caption=i[r].Caption||"",s.images[r].link=e.Album.URL+"#"+i[r].id+"_"+i[r].Key,s.images[r].tinyURL=o+"-Ti"+l,s.images[r].thumbURL=o+"-Th"+l,s.images[r].smallURL=o+"-S"+l,s.images[r].mediumURL=o+"-M"+l,s.images[r].largeURL=o+"-L"+l,s.images[r].xlargeURL=o+"-XL"+l,s.images[r].x2largeURL=o+"-X2"+l,s.images[r].x3largeURL=o+"-X3"+l,s.images[r].buyURL=a+i[r].id+"_"+i[r].Key,s.images[r].iframe="",s.images[r].caption.indexOf("iframe")&&(g=t.Node.create("<div>"+s.images[r].caption+"</div>"),u=g.one("iframe"),u&&(s.images[r].iframe=u.getAttribute("src"),s.images[r].caption=s.images[r].caption.replace(/<iframe.*>.*<\/iframe>/gi,"")));this._loadComplete({albumInfo:s})},_loadUrls:function(){var t={},e=0;for(t.index=this._source.index,t.title=this._source.title?this._source.title:"",t.images=[];e<this._source.urls.length;e++)t.images[e]={},t.images[e].index=e,t.images[e].sourceType="urls",t.images[e].filename=this._source.urls[e].largeURL.split("/").pop(),t.images[e].format="",t.images[e].caption=this._source.urls[e].caption||"",t.images[e].link=this._source.urls[e].largeURL,t.images[e].thumbURL=this._source.urls[e].thumbURL||this._source.urls[e].largeURL,t.images[e].smallURL=this._source.urls[e].smallURL||this._source.urls[e].largeURL,t.images[e].mediumURL=this._source.urls[e].mediumURL||this._source.urls[e].largeURL,t.images[e].largeURL=this._source.urls[e].largeURL,t.images[e].xlargeURL=this._source.urls[e].xlargeURL||this._source.urls[e].largeURL,t.images[e].x2largeURL=this._source.urls[e].x2largeURL||this._source.urls[e].largeURL,t.images[e].x3largeURL=this._source.urls[e].x3largeURL||this._source.urls[e].largeURL,t.images[e].buyURL=this._source.urls[e].buyURL||"",t.images[e].iframe=this._source.urls[e].iframe||"";this._loadComplete({albumInfo:t})}},{ATTRS:{randomize:{value:!1}},TYPES:{smugmug:"_loadSmugMug",flickr:"_loadFlickr",picasa:"_loadPicasa",urls:"_loadUrls",html:"_loadHtml"}})},"2.0.0",{requires:["base","fl-smugmug-api"]}),YUI.add("fl-slideshow-base",function(t){t.namespace("FL").SlideshowBase=t.Base.create("fl-slideshow-base",t.Widget,[t.WidgetParent],{_albumLoader:null,albums:[],albumInfo:null,albumIndex:null,imageInfo:null,imageIndex:null,lastImageIndex:null,_resizeTimer:null,_playing:!1,_playingTimer:null,_playingTimerEvent:null,_loadingImage:null,_loadingImageWrap:null,_loadingImageVisible:!1,_loadingImageTimer:null,_loadingImageContainer:null,_initialHeight:null,_initialWidth:null,initializer:function(){this._albumLoader=new t.FL.SlideshowAlbumLoader({randomize:this.get("randomize")})},renderUI:function(){this._renderLoadingImage()},bindUI:function(){this._albumLoader.on("complete",this._loadAlbumComplete,this),t.one(window).on("fl-slideshow-base|resize",this._delayResize,this),t.one(window).on("fl-slideshow-base|orientationchange",this._delayResize,this),t.Node.one("body").on("keydown",t.bind(this._onKey,this))},syncUI:function(){this.get("boundingBox").addClass("fl-slideshow-"+this.get("color")),this.resize(),this.get("loadOnRender")&&this.loadAlbum(this.get("defaultAlbum"),this.get("defaultImage"))},addAlbum:function(t){var e=this.get("source"),i=e.length;e[i]=t,e[i].index=i,this.set("source",e)},loadAlbum:function(e,i){var s=this.get("source"),n="undefined"==typeof i?0:i;this.imageIndex=null,this.lastImageIndex=null,this.fire("albumLoadStart"),this.once("albumLoadComplete",t.bind(this.loadImage,this,n)),s[e]&&"album-data"==s[e].type?(this.albums[e]=s[e].data,this._loadAlbumComplete({albumInfo:this.albums[e]})):s[e]&&this.albums[e]?this._loadAlbumComplete({albumInfo:this.albums[e]}):this._albumLoader.load(s[e]||s[0])},_loadAlbumComplete:function(t){this.albums[t.albumInfo.index]=t.albumInfo,this.albumInfo=t.albumInfo,this.albumIndex=t.albumInfo.index,this.fire("albumLoadComplete"),this.get("autoPlay")&&(this._playingTimerStart(),this.fire("played"),this._playing=!0)},loadImage:function(t){this._playing&&this._playingTimerStart(),t=t<0?this.albumInfo.images.length-1:t,t=t>=this.albumInfo.images.length?0:t,this.lastImageIndex=this.imageIndex,this.imageIndex=t,this.imageInfo=this.albumInfo.images[t],this.fire("imageLoadComplete",{imageInfo:this.imageInfo})},prevImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex-1),this.fire("prevImage")},nextImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex+1),this.fire("nextImage")},_onKey:function(t){switch(t.keyCode){case 37:this.prevImage();break;case 39:this.nextImage()}},resize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=parseInt(t.one("body").get("winWidth"),10),n=this.get("responsiveThreshold");s>n&&e&&"window"==i?this._stretchyWindowResize():s<=n||e&&"ratio"==i?this._stretchyRatioResize():this._standardResize(),this.fire("resize")},_standardResize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=this.get("boundingBox"),n=s.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=this.get("height"),h=this.get("width");if(s.hasClass("fl-fullscreen-active"))return void this._stretchyWindowResize();if(e&&"contain"==i)s.setStyle("height",a+"px"),s.setStyle("width",o+"px");else{if(!t.Lang.isNumber(l))return void this._stretchyRatioResize();s.setStyle("height",l+"px"),h?s.setStyle("width",h+"px"):s.setStyle("width",o+"px")}},_stretchyWindowResize:function(){var e=this.get("boundingBox"),i=this.get("stretchyVerticalSpace"),s=parseInt(e.getStyle("paddingTop"),10),n=parseInt(e.getStyle("paddingBottom"),10),a=parseInt(t.one("body").get("winHeight"),10),o="";e.hasClass("fl-fullscreen-active")&&(i=0,o=parseInt(t.one("body").get("winWidth"),10)+"px"),a=a-s-n-i+"px",e.setStyle("height",a),e.setStyle("width",o)},_stretchyRatioResize:function(){var e=this.get("boundingBox"),i=e.get("parentNode"),s=0,n=this.get("stretchyRatio"),a=parseInt(e.getStyle("paddingTop"),10),o=parseInt(e.getStyle("paddingBottom"),10),l=parseInt(i.getComputedStyle("width"),10),h=parseInt(t.one("body").get("winHeight"),10),r=parseInt(t.one("body").get("winWidth"),10),g=l*n,u="";e.hasClass("fl-fullscreen-active")&&(g=h,u=r),g=g-a-o-s+"px",e.setStyle("height",g),e.setStyle("width",u)},_delayResize:function(){this._resizeTimer&&this._resizeTimer.cancel(),this._resizeTimer=t.later(300,this,this.resize)},play:function(){this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete),this.fire("played"),this._playing=!0},pause:function(){this._playingTimerCancel(),this.fire("paused"),this._playing=!1},_setPlayingTimerEvent:function(t,e){this._playingTimerEvent={obj:t,e:e}},_playingTimerStart:function(e){this._playingTimerCancel(),e||null===this._playingTimerEvent?this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete):this._playingTimerEvent.obj.once("fl-slideshow-base|"+this._playingTimerEvent.e,t.bind(this._playingTimerStart,this))},_playingTimerComplete:function(){this.loadImage(this.imageIndex+1),this.fire("playingTimerComplete")},_playingTimerCancel:function(){this._playingTimer&&this._playingTimer.cancel(),this._playingTimerEvent&&this._playingTimerEvent.obj.detach("fl-slideshow-base|"+this._playingTimerEvent.e)},_renderLoadingImage:function(){var e={lines:11,length:6,width:2,radius:7,color:"",speed:1,trail:60,shadow:!1},i=t.merge(e,this.get("loadingImageSettings"));this.get("loadingImageEnabled")&&(""===i.color&&(i.color=this._colorToHex(t.one("body").getStyle("color"))),this._loadingImage=new t.FL.Spinner(i),this._loadingImageWrap=t.Node.create('<div class="fl-loading-image"></div>'),this._loadingImageWrap.setStyles({position:"absolute","z-index":"1000"}))},_showLoadingImage:function(){this._loadingImage&&!this._loadingImageVisible&&(this._loadingImageVisible=!0,this._loadingImage.spin(),this._loadingImageWrap.insert(this._loadingImage.el),null!==this._loadingImageContainer?this._loadingImageContainer.insert(this._loadingImageWrap):this.get("contentBox").insert(this._loadingImageWrap),
4
+ this._positionLoadingImage())},_showLoadingImageWithDelay:function(){this._loadingImage&&(this._loadingImageTimer=t.later(1e3,this,this._showLoadingImage))},_hideLoadingImage:function(){this._loadingImageTimer&&(this._loadingImageTimer.cancel(),this._loadingImageTimer=null),this._loadingImage&&this._loadingImageVisible&&(this._loadingImageVisible=!1,this._loadingImage.stop(),this._loadingImageWrap.remove())},_positionLoadingImage:function(){if(this._loadingImage&&this._loadingImageVisible){var e=this._loadingImageWrap,i=parseInt(e.getComputedStyle("height"),10),s=parseInt(e.getComputedStyle("width"),10),n=e.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=(o-s)/2,h=(a-i)/2;e.setStyles({left:l+"px",top:h+"px"}),t.one(this._loadingImage.el).setStyles({left:"50%",top:"50%"})}},_colorToHex:function(t){var e,i,s,n,a;return"#"===t.substr(0,1)?t:(e=/(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t),null===e?"#000":(i=parseInt(e[2],10),s=parseInt(e[3],10),n=parseInt(e[4],10),a=n|s<<8|i<<16,a=a.toString(16),"0"===a&&(a="000"),e[1]+"#"+a))}},{CSS_PREFIX:"fl-slideshow-base",ATTRS:{color:{value:"dark",writeOnce:!0},source:{value:[],setter:function(t){t.constructor==Object&&(t=[t]);for(var e=0;e<t.length;e++)t[e].index=e;return t}},defaultAlbum:{value:0},defaultImage:{value:0},loadOnRender:{value:!0},autoPlay:{value:!0},pauseOnNextOrPrev:{value:!0},randomize:{value:!1},speed:{value:4e3},responsiveThreshold:{value:600},stretchy:{value:!1},stretchyType:{value:"ratio"},stretchyVerticalSpace:{value:0},stretchyRatio:{value:.7},loadingImageEnabled:{value:!0},loadingImageSettings:{value:{}}}})},"2.0.0",{requires:["node","base","widget","widget-parent","widget-child","fl-slideshow-album-loader","fl-spinner"]}),YUI.add("fl-smugmug-api",function(t){t.namespace("FL").SmugMugAPI=t.Base.create("fl-smugmug-api",t.Base,[],{_sessionID:null,_requestURL:null,initializer:function(){this._resetRequestURL()},addParam:function(t,e){this._requestURL=this._requestURL+"&"+t+"="+e},loginAnon:function(){this.addParam("method","smugmug.login.anonymously"),this.once("complete",this._loginAnonComplete),this.request()},_loginAnonComplete:function(t){t.Login&&(this._sessionID=t.Login.Session.id)},request:function(){this.addParam("Callback","{callback}"),t.jsonp(this._requestURL,{on:{success:this._requestComplete,timeout:function(){}},context:this,timeout:6e4,args:[]})},_requestComplete:function(t){this._resetRequestURL(),this.fire("complete",t)},_resetRequestURL:function(){this._requestURL=this.get("apiURL")+"?APIKey="+this.get("apiKey"),this._sessionID&&this.addParam("SessionID",this._sessionID)}},{ATTRS:{apiURL:{value:"https://api.smugmug.com/services/api/json/1.3.0/"},apiKey:{value:"7w6kuU5Ee6KSgRRExf2KLgppdkez9JD2"}}})},"2.0.0",{requires:["base","jsonp"]}),YUI.add("fl-spinner",function(t){!function(e,i,s){function n(t,e){for(var i=~~((t[m]-1)/2),s=1;s<=i;s++)e(t[2*s-1],t[2*s])}function a(t){var e=i.createElement(t||"div");return n(arguments,function(t,i){e[t]=i}),e}function o(t,e,i){return i&&!i[L]&&o(t,i),t.insertBefore(e,i||null),t}function l(t,e){var i,s=[f,e,~~(100*t)].join("-"),n="{"+f+":"+t+"}";if(!D[s]){for(i=0;i<A[m];i++)try{H.insertRule("@"+(A[i]&&"-"+A[i].toLowerCase()+"-"||"")+"keyframes "+s+"{0%{"+f+":1}"+e+"%"+n+"to"+n+"}",H.cssRules[m])}catch(a){}D[s]=1}return s}function h(t,e){var i,n,a=t[x];if(a[e]!==s)return e;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<A[m];n++)if(i=A[n]+e,a[i]!==s)return i}function r(t){return n(arguments,function(e,i){t[x][h(t,e)||e]=i}),t}function g(t){return n(arguments,function(e,i){t[e]===s&&(t[e]=i)}),t}var u,d="width",m="length",c="radius",_="lines",p="trail",v="color",f="opacity",b="speed",y="shadow",x="style",I="height",S="left",w="top",B="px",T="childNodes",C="firstChild",L="parentNode",N="position",P="relative",O="absolute",R="animation",E="transform",k="Origin",F="Timeout",U="coord",z="#000",M=x+"Sheets",A="webkit0Moz0ms0O".split(0),D={};o(i.getElementsByTagName("head")[0],a(x));var H=i[M][i[M][m]-1],W=function(t){this.opts=g(t||{},_,12,p,100,m,7,d,5,c,10,v,z,f,.25,b,1)},V=W.prototype={spin:function(t){var i=this,s=i.el=i[_](i.opts);if(t&&o(t,r(s,S,~~(t.offsetWidth/2)+B,w,~~(t.offsetHeight/2)+B),t[C]),!u){var n=i.opts,a=0,l=20/n[b],h=(1-n[f])/(l*n[p]/100),g=l/n[_];!function d(){a++;for(var t=n[_];t;t--){var o=Math.max(1-(a+t*g)%l*h,n[f]);i[f](s,n[_]-t,o,n)}i[F]=i.el&&e["set"+F](d,50)}()}return i},stop:function(){var t=this,i=t.el;return e["clear"+F](t[F]),i&&i[L]&&i[L].removeChild(i),t.el=s,t}};V[_]=function(t){function e(e,i){return r(a(),N,O,d,t[m]+t[d]+B,I,t[d]+B,"background",e,"boxShadow",i,E+k,S,E,"rotate("+~~(360/t[_]*h)+"deg) translate("+t[c]+B+",0)","borderRadius","100em")}for(var i,s=r(a(),N,P),n=l(t[f],t[p]),h=0;h<t[_];h++)i=r(a(),N,O,w,1+~(t[d]/2)+B,E,"translate3d(0,0,0)",R,n+" "+1/t[b]+"s linear infinite "+(1/t[_]/t[b]*h-1/t[b])+"s"),t[y]&&o(i,r(e(z,"0 0 4px "+z),w,2+B)),o(s,o(i,e(t[v],"0 0 1px rgba(0,0,0,.1)")));return s},V[f]=function(t,e,i){t[T][e][x][f]=i};var q="behavior",X="url(#default#VML)",Y="group0roundrect0fill0stroke".split(0);!function(){var t,e=r(a(Y[0]),q,X);if(!h(e,E)&&e.adj){for(t=0;t<Y[m];t++)H.addRule(Y[t],q+":"+X);V[_]=function(){function t(){return r(a(Y[0],U+"size",l+" "+l,U+k,-n+" "+-n),d,l,I,l)}function e(e,i,l){o(h,o(r(t(),"rotation",360/s[_]*e+"deg",S,~~i),o(r(a(Y[1],"arcsize",1),d,n,I,s[d],S,s[c],w,-s[d]/2,"filter",l),a(Y[2],v,s[v],f,s[f]),a(Y[3],f,0))))}var i,s=this.opts,n=s[m]+s[d],l=2*n,h=t(),g=~(s[m]+s[c]+s[d])+B;if(s[y])for(i=1;i<=s[_];i++)e(i,-2,"progid:DXImage"+E+".Microsoft.Blur(pixel"+c+"=2,make"+y+"=1,"+y+f+"=.3)");for(i=1;i<=s[_];i++)e(i);return o(r(a(),"margin",g+" 0 0 "+g,N,P),h)},V[f]=function(t,e,i,s){s=s[y]&&s[_]||0,t[C][T][e+s][C][C][f]=i}}else u=h(e,R)}(),t.namespace("FL").Spinner=W}(window,document)},"2.0.0"),YUI.add("fl-utils",function(t){t.namespace("FL").Utils={cssSupport:function(e){var i=document.body||document.documentElement,s=i.style,n=["Moz","Webkit","Khtml","O","ms","Icab"],a=0;if("transform"==e&&t.UA.gecko&&t.UA.gecko<4)return!1;if("transform"==e&&t.UA.opera>0)return!1;if("transform"==e&&t.UA.ie>0&&t.UA.ie<10)return!1;if("transform"==e&&navigator.userAgent.match(/Trident/))return!1;if("undefined"==typeof s)return!1;if("string"==typeof s[e])return!0;for(e=e.charAt(0).toUpperCase()+e.substr(1);a<n.length;a++)if("string"==typeof s[n[a]+e])return!0}}},"2.0.0");
modules/video/css/frontend.css CHANGED
@@ -3,10 +3,9 @@
3
  }
4
  .fl-wp-video {
5
  position: relative;
6
- padding-top: 30px;
7
  height: 0;
8
  overflow: hidden;
9
- padding-bottom: 53.30%;
10
  }
11
  .fl-wp-video .wp-video {
12
  position: absolute;
3
  }
4
  .fl-wp-video {
5
  position: relative;
 
6
  height: 0;
7
  overflow: hidden;
8
+ padding: 0 0 56.25%;
9
  }
10
  .fl-wp-video .wp-video {
11
  position: absolute;
modules/widget/includes/settings-general.php CHANGED
@@ -29,9 +29,12 @@ if(isset($widget_class) && class_exists($widget_class)) {
29
 
30
  // Widget form
31
  echo '<div class="fl-field" data-preview=\'{"type":"widget"}\'>';
32
- $widget_instance->form($widget_settings);
 
 
33
  // Uncommenting this will display custom fields from plugins like ACF, but we don't have a way to save them, yet..
34
  //do_action_ref_array( 'in_widget_form', array( &$widget_instance, true, $widget_settings ) );
 
35
  echo '<input type="hidden" name="widget" value="' . $widget_class . '" />';
36
  echo '</div>';
37
  }
@@ -41,4 +44,4 @@ else if(isset($widget_class)) {
41
  echo '<div class="fl-builder-widget-missing">';
42
  printf( _x( '%s no longer exists.', '%s stands for widget slug.', 'fl-builder' ), $widget_class );
43
  echo '</div>';
44
- }
29
 
30
  // Widget form
31
  echo '<div class="fl-field" data-preview=\'{"type":"widget"}\'>';
32
+
33
+ FLWidgetModule::render_form( $widget_class, $widget_instance, $widget_settings );
34
+
35
  // Uncommenting this will display custom fields from plugins like ACF, but we don't have a way to save them, yet..
36
  //do_action_ref_array( 'in_widget_form', array( &$widget_instance, true, $widget_settings ) );
37
+
38
  echo '<input type="hidden" name="widget" value="' . $widget_class . '" />';
39
  echo '</div>';
40
  }
44
  echo '<div class="fl-builder-widget-missing">';
45
  printf( _x( '%s no longer exists.', '%s stands for widget slug.', 'fl-builder' ), $widget_class );
46
  echo '</div>';
47
+ }
modules/widget/includes/settings-text-widget.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $settings = wp_parse_args( (array) $settings, array( 'title' => '', 'text' => '' ) );
4
+ $title = sanitize_text_field( $settings['title'] );
5
+
6
+ ?>
7
+ <p><label for="widget-text--title"><?php _e( 'Title:' ); ?></label>
8
+ <input class="widefat" id="widget-text--title" name="widget-text[][title]" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
9
+
10
+ <p><label for="widget-text--text"><?php _e( 'Content:' ); ?></label>
11
+ <textarea class="widefat" rows="16" cols="20" id="widget-text--text" name="widget-text[][text]"><?php echo esc_textarea( $settings['text'] ); ?></textarea></p>
modules/widget/widget.php CHANGED
@@ -5,9 +5,9 @@
5
  */
6
  class FLWidgetModule extends FLBuilderModule {
7
 
8
- /**
9
- * @method __construct
10
- */
11
  public function __construct()
12
  {
13
  parent::__construct(array(
@@ -19,42 +19,59 @@ class FLWidgetModule extends FLBuilderModule {
19
  ));
20
  }
21
 
22
- /**
23
- * @method update
24
- */
25
  public function update( $settings )
26
  {
27
  // Make sure we have a widget.
28
  if ( ! isset( $settings->widget ) || ! class_exists( $settings->widget ) ) {
29
  return $settings;
30
  }
31
-
32
  // Get the widget instance.
33
  $class = $settings->widget;
34
  $instance = new $class();
35
-
36
  // Get the widget settings.
37
  $settings_key = 'widget-' . $instance->id_base;
38
  $widget_settings = array();
39
-
40
  if ( isset( $settings->$settings_key ) ) {
41
  $widget_settings = ( array )$settings->$settings_key;
42
  }
43
-
44
  // Run the widget update method.
45
  $widget_settings = $instance->update( $widget_settings, array() );
46
-
47
  // Save the widget settings as an object.
48
  if ( is_array( $widget_settings ) ) {
49
  $settings->$settings_key = ( object )$widget_settings;
50
  }
51
-
52
  // Delete the WordPress cache for this widget.
53
  wp_cache_delete( $settings->widget, 'widget' );
54
-
55
  // Return the settings.
56
  return $settings;
57
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
59
 
60
  /**
@@ -65,4 +82,4 @@ FLBuilder::register_module('FLWidgetModule', array(
65
  'title' => __('General', 'fl-builder'), // Tab title
66
  'file' => FL_BUILDER_DIR . 'modules/widget/includes/settings-general.php'
67
  )
68
- ));
5
  */
6
  class FLWidgetModule extends FLBuilderModule {
7
 
8
+ /**
9
+ * @return void
10
+ */
11
  public function __construct()
12
  {
13
  parent::__construct(array(
19
  ));
20
  }
21
 
22
+ /**
23
+ * @return void
24
+ */
25
  public function update( $settings )
26
  {
27
  // Make sure we have a widget.
28
  if ( ! isset( $settings->widget ) || ! class_exists( $settings->widget ) ) {
29
  return $settings;
30
  }
31
+
32
  // Get the widget instance.
33
  $class = $settings->widget;
34
  $instance = new $class();
35
+
36
  // Get the widget settings.
37
  $settings_key = 'widget-' . $instance->id_base;
38
  $widget_settings = array();
39
+
40
  if ( isset( $settings->$settings_key ) ) {
41
  $widget_settings = ( array )$settings->$settings_key;
42
  }
43
+
44
  // Run the widget update method.
45
  $widget_settings = $instance->update( $widget_settings, array() );
46
+
47
  // Save the widget settings as an object.
48
  if ( is_array( $widget_settings ) ) {
49
  $settings->$settings_key = ( object )$widget_settings;
50
  }
51
+
52
  // Delete the WordPress cache for this widget.
53
  wp_cache_delete( $settings->widget, 'widget' );
54
+
55
  // Return the settings.
56
  return $settings;
57
  }
58
+
59
+ /**
60
+ * @since 1.10.6
61
+ * @param string $class
62
+ * @param object $instance
63
+ * @param array $settings
64
+ * @return void
65
+ */
66
+ static public function render_form( $class, $instance, $settings )
67
+ {
68
+ if ( 'WP_Widget_Text' === $class ) {
69
+ // Render the legacy text form since the one in 4.8 doesn't work in the builder.
70
+ include FL_BUILDER_DIR . 'modules/widget/includes/settings-text-widget.php';
71
+ } else {
72
+ $instance->form( $settings );
73
+ }
74
+ }
75
  }
76
 
77
  /**
82
  'title' => __('General', 'fl-builder'), // Tab title
83
  'file' => FL_BUILDER_DIR . 'modules/widget/includes/settings-general.php'
84
  )
85
+ ));