WordPress Page Builder – Beaver Builder - Version 1.6.4.3

Version Description

Download this release

Release Info

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

Code changes from version 1.6.4.1 to 1.6.4.3

changelog.txt CHANGED
@@ -1,3 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>1.6.4.1 - 10/21/2015</h4>
2
  <p><strong>Enhancements</strong></p>
3
  <ul>
1
+ <h4>1.6.4.3 - 11/23/2015</h4>
2
+ <p><strong>Enhancements</strong></p>
3
+ <ul>
4
+ <li>Added theme branding to the page builder's branding settings for Agency customers.</li>
5
+ <li>Added show_remove option to photo fields for developers.</li>
6
+ </ul>
7
+ <p><strong>Bug Fixes</strong></p>
8
+ <ul>
9
+ <li>Fixed CSS conflicts with third party themes and the core WordPress media uploader UI.</li>
10
+ <li>Fixed multiple color picker bugs.</li>
11
+ <li>Fixed a bug with the media library not showing on older versions of Safari.</li>
12
+ <li>Fixed a bug with the Accordion module not applying the correct class to all open items.</li>
13
+ <li>Fixed a bug caused by entering text strings into the Number Counter settings.</li>
14
+ <li>Fixed a bug with template assets not loading with the fl_builder_global_posts filter.</li>
15
+ <li>Fixed a bug with the Slideshow module where thumbnail pagination would disappear when two slideshows were on the same page.</li>
16
+ <li>Fixed a bug with module animations not running when positioned below a gallery module.</li>
17
+ <li>Fixed a bug with video background positions being messed up when images haven't fully loaded within a row.</li>
18
+ <li>Fixed a bug causing random sorting of posts in the Posts module not to work.</li>
19
+ </ul>
20
+
21
+ <h4>1.6.4.2 - 11/05/2015</h4>
22
+ <p><strong>Enhancements</strong></p>
23
+ <ul>
24
+ <li>Added a Match Height setting to the Posts module's Grid layout.</li>
25
+ <li>Custom module categories now show up before the WordPress Widgets category.</li>
26
+ <li>Added the fl_builder_module_categories filter.</li>
27
+ <li>Text field enhancements for developers that allow for a list of predefined options. Thanks Oliver!</li>
28
+ <li>Added Danish translation.</li>
29
+ <li>Added Hebrew translation.</li>
30
+ </ul>
31
+ <p><strong>Bug Fixes</strong></p>
32
+ <ul>
33
+ <li>Fixed a bug with cropping photos that have a query string in their URL. Fixes issues with Jetpack's Photon module.</li>
34
+ <li>Fixed a bug with custom image size titles showing as undefined.</li>
35
+ <li>Fixed a bug with margins not working on equal height columns in FireFox.</li>
36
+ <li>Fixed a bug with UI images for the Slideshow module loading from an external domain not on HTTPS.</li>
37
+ <li>Fixed a bug with the Slideshow module caused when the body color is set to an rgba value.</li>
38
+ <li>Fixed a bug with the Subscribe Form module not working in global rows.</li>
39
+ <li>Fixed a bug with full height rows on iOS devices.</li>
40
+ <li>Fixed a bug with the Posts module and the Append extensions on Pages plugin.</li>
41
+ <li>Fixed a bug with editing templates in the Sage theme.</li>
42
+ <li>Fixed a bug with Slideshow module transitions in IE11.</li>
43
+ <li>Fixed a bug with the Insert Pages plugin not working when used within a builder layout.</li>
44
+ </ul>
45
+
46
  <h4>1.6.4.1 - 10/21/2015</h4>
47
  <p><strong>Enhancements</strong></p>
48
  <ul>
classes/class-fl-builder-admin-settings.php CHANGED
@@ -570,11 +570,23 @@ final class FLBuilderAdminSettings {
570
  {
571
  if ( isset( $_POST['fl-branding-nonce'] ) && wp_verify_nonce( $_POST['fl-branding-nonce'], 'branding' ) ) {
572
 
 
573
  $branding = wp_kses_post( $_POST['fl-branding'] );
574
  $branding_icon = sanitize_text_field( $_POST['fl-branding-icon'] );
575
 
 
 
 
 
 
 
 
 
 
 
576
  FLBuilderModel::update_admin_settings_option( '_fl_builder_branding', $branding, false );
577
  FLBuilderModel::update_admin_settings_option( '_fl_builder_branding_icon', $branding_icon, false );
 
578
  }
579
  }
580
 
570
  {
571
  if ( isset( $_POST['fl-branding-nonce'] ) && wp_verify_nonce( $_POST['fl-branding-nonce'], 'branding' ) ) {
572
 
573
+ // Get the plugin branding data.
574
  $branding = wp_kses_post( $_POST['fl-branding'] );
575
  $branding_icon = sanitize_text_field( $_POST['fl-branding-icon'] );
576
 
577
+ // Get the theme branding data.
578
+ $theme_data = array(
579
+ 'name' => wp_kses_post( $_POST['fl-theme-branding-name'] ),
580
+ 'description' => wp_kses_post( $_POST['fl-theme-branding-description'] ),
581
+ 'company_name' => wp_kses_post( $_POST['fl-theme-branding-company-name'] ),
582
+ 'company_url' => sanitize_text_field( $_POST['fl-theme-branding-company-url'] ),
583
+ 'screenshot_url' => sanitize_text_field( $_POST['fl-theme-branding-screenshot-url'] ),
584
+ );
585
+
586
+ // Save the data.
587
  FLBuilderModel::update_admin_settings_option( '_fl_builder_branding', $branding, false );
588
  FLBuilderModel::update_admin_settings_option( '_fl_builder_branding_icon', $branding_icon, false );
589
+ FLBuilderModel::update_admin_settings_option( '_fl_builder_theme_branding', $theme_data, false );
590
  }
591
  }
592
 
classes/class-fl-builder-admin.php CHANGED
@@ -264,4 +264,36 @@ final class FLBuilderAdmin {
264
 
265
  return $plugins;
266
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
264
 
265
  return $plugins;
266
  }
267
+
268
+ /**
269
+ * White labels the builder theme on the themes page.
270
+ *
271
+ * @since 1.6.4.3
272
+ * @param array $themes An array data for each theme.
273
+ * @return array
274
+ */
275
+ static public function white_label_themes_page( $themes )
276
+ {
277
+ if ( isset( $themes['bb-theme'] ) ) {
278
+
279
+ $theme_data = FLBuilderModel::get_theme_branding();
280
+
281
+ if ( ! empty( $theme_data['name'] ) ) {
282
+ $themes['bb-theme']['name'] = $theme_data['name'];
283
+ }
284
+ if ( ! empty( $theme_data['description'] ) ) {
285
+ $themes['bb-theme']['description'] = $theme_data['description'];
286
+ }
287
+ if ( ! empty( $theme_data['company_name'] ) ) {
288
+ $company_url = empty( $theme_data['company_url'] ) ? '#' : $theme_data['company_url'];
289
+ $themes['bb-theme']['author'] = $theme_data['company_name'];
290
+ $themes['bb-theme']['authorAndUri'] = '<a href="' . $company_url . '">' . $theme_data['company_name'] . '</a>';
291
+ }
292
+ if ( ! empty( $theme_data['screenshot_url'] ) ) {
293
+ $themes['bb-theme']['screenshot'] = array( $theme_data['screenshot_url'] );
294
+ }
295
+ }
296
+
297
+ return $themes;
298
+ }
299
  }
classes/class-fl-builder-loop.php CHANGED
@@ -141,7 +141,7 @@ final class FLBuilderLoop {
141
  $format = '&paged=%#%';
142
  }
143
  else {
144
- $format = 'page/%#%/';
145
  }
146
 
147
  echo paginate_links(array(
141
  $format = '&paged=%#%';
142
  }
143
  else {
144
+ $format = '/page/%#%/';
145
  }
146
 
147
  echo paginate_links(array(
classes/class-fl-builder-model.php CHANGED
@@ -1951,6 +1951,13 @@ final class FLBuilderModel {
1951
  static public function get_categorized_modules( $show_disabled = false )
1952
  {
1953
  $enabled_modules = self::get_enabled_modules();
 
 
 
 
 
 
 
1954
 
1955
  // Get the core category keys.
1956
  $basic_key = __('Basic Modules', 'fl-builder');
@@ -1959,11 +1966,9 @@ final class FLBuilderModel {
1959
  $widgets_key = __('WordPress Widgets', 'fl-builder');
1960
 
1961
  // Build the default category arrays.
1962
- $categories = array();
1963
  $categories[ $basic_key ] = array();
1964
  $categories[ $advanced_key ] = array();
1965
  $categories[ $other_key ] = array();
1966
- $categories[ $widgets_key ] = array();
1967
 
1968
  // Build the categories array.
1969
  foreach(self::$modules as $module) {
@@ -1975,7 +1980,7 @@ final class FLBuilderModel {
1975
  continue;
1976
  }
1977
  else if($module->slug == 'widget') {
1978
- $categories[$widgets_key] = self::get_wp_widgets();
1979
  }
1980
  else if(isset($module->category)) {
1981
 
@@ -1989,6 +1994,11 @@ final class FLBuilderModel {
1989
  $categories[$other_key][$module->name] = $module;
1990
  }
1991
  }
 
 
 
 
 
1992
 
1993
  // Sort the modules.
1994
  foreach($categories as $title => $modules) {
@@ -2410,7 +2420,7 @@ final class FLBuilderModel {
2410
  */
2411
  static public function register_settings_form($id, $form)
2412
  {
2413
- self::$settings_forms[$id] = $form;
2414
  }
2415
 
2416
  /**
@@ -4273,6 +4283,26 @@ final class FLBuilderModel {
4273
  return false === $value ? FL_BUILDER_URL . 'img/beaver.png' : $value;
4274
  }
4275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4276
  /**
4277
  * Returns an array of slugs for all enabled icon sets.
4278
  *
@@ -4496,6 +4526,7 @@ final class FLBuilderModel {
4496
  delete_option('_fl_builder_enabled_icons');
4497
  delete_option('_fl_builder_branding');
4498
  delete_option('_fl_builder_branding_icon');
 
4499
  delete_option('_fl_builder_editing_capability');
4500
  delete_option('_fl_builder_global_templates_editing_capability');
4501
  delete_option('_fl_builder_help_button');
1951
  static public function get_categorized_modules( $show_disabled = false )
1952
  {
1953
  $enabled_modules = self::get_enabled_modules();
1954
+ $widgets = null;
1955
+ $categories = array();
1956
+
1957
+ // Add any predefined custom categories.
1958
+ foreach ( apply_filters( 'fl_builder_module_categories', array() ) as $custom_category ) {
1959
+ $categories[ $custom_category ] = array();
1960
+ }
1961
 
1962
  // Get the core category keys.
1963
  $basic_key = __('Basic Modules', 'fl-builder');
1966
  $widgets_key = __('WordPress Widgets', 'fl-builder');
1967
 
1968
  // Build the default category arrays.
 
1969
  $categories[ $basic_key ] = array();
1970
  $categories[ $advanced_key ] = array();
1971
  $categories[ $other_key ] = array();
 
1972
 
1973
  // Build the categories array.
1974
  foreach(self::$modules as $module) {
1980
  continue;
1981
  }
1982
  else if($module->slug == 'widget') {
1983
+ $widgets = self::get_wp_widgets();
1984
  }
1985
  else if(isset($module->category)) {
1986
 
1994
  $categories[$other_key][$module->name] = $module;
1995
  }
1996
  }
1997
+
1998
+ // Add widgets if we have them.
1999
+ if ( $widgets ) {
2000
+ $categories[$widgets_key] = $widgets;
2001
+ }
2002
 
2003
  // Sort the modules.
2004
  foreach($categories as $title => $modules) {
2420
  */
2421
  static public function register_settings_form($id, $form)
2422
  {
2423
+ self::$settings_forms[$id] = apply_filters( 'fl_builder_register_settings_form', $form, $id );
2424
  }
2425
 
2426
  /**
4283
  return false === $value ? FL_BUILDER_URL . 'img/beaver.png' : $value;
4284
  }
4285
 
4286
+ /**
4287
+ * Returns the custom branding data for the builder theme.
4288
+ *
4289
+ * @since 1.6.4.3
4290
+ * @return array
4291
+ */
4292
+ static public function get_theme_branding()
4293
+ {
4294
+ $value = self::get_admin_settings_option( '_fl_builder_theme_branding', false );
4295
+ $defaults = array(
4296
+ 'name' => '',
4297
+ 'description' => '',
4298
+ 'company_name' => '',
4299
+ 'company_url' => '',
4300
+ 'screenshot_url' => '',
4301
+ );
4302
+
4303
+ return ! $value ? $defaults : $value;
4304
+ }
4305
+
4306
  /**
4307
  * Returns an array of slugs for all enabled icon sets.
4308
  *
4526
  delete_option('_fl_builder_enabled_icons');
4527
  delete_option('_fl_builder_branding');
4528
  delete_option('_fl_builder_branding_icon');
4529
+ delete_option('_fl_builder_theme_branding');
4530
  delete_option('_fl_builder_editing_capability');
4531
  delete_option('_fl_builder_global_templates_editing_capability');
4532
  delete_option('_fl_builder_help_button');
classes/class-fl-builder.php CHANGED
@@ -7,6 +7,14 @@
7
  */
8
  final class FLBuilder {
9
 
 
 
 
 
 
 
 
 
10
  /**
11
  * Localization
12
  *
@@ -324,6 +332,7 @@ final class FLBuilder {
324
  wp_register_script('jquery-bxslider', $js_url . 'jquery.bxslider.min.js', array('jquery-easing', 'jquery-fitvids'), $ver, true);
325
  wp_register_script('jquery-easing', $js_url . 'jquery.easing.1.3.js', array('jquery'), '1.3', true);
326
  wp_register_script('jquery-fitvids', $js_url . 'jquery.fitvids.js', array('jquery'), $ver, true);
 
327
  wp_register_script('jquery-infinitescroll', $js_url . 'jquery.infinitescroll.js', array('jquery'), $ver, true);
328
  wp_register_script('jquery-magnificpopup', $js_url . 'jquery.magnificpopup.min.js', array('jquery'), $ver, true);
329
  wp_register_script('jquery-mosaicflow', $js_url . 'jquery.mosaicflow.min.js', array('jquery'), $ver, true);
@@ -352,10 +361,10 @@ final class FLBuilder {
352
 
353
  $posts = get_posts(array(
354
  'post__in' => $post_ids,
355
- 'post_type' => 'any',
356
  'posts_per_page' => -1
357
  ));
358
-
359
  foreach($posts as $post) {
360
  self::enqueue_layout_styles_scripts($post->ID);
361
  }
@@ -387,6 +396,9 @@ final class FLBuilder {
387
  wp_enqueue_script('fl-slideshow');
388
  wp_enqueue_style('fl-slideshow');
389
  }
 
 
 
390
  }
391
 
392
  // Enqueue required module CSS and JS
@@ -819,11 +831,15 @@ final class FLBuilder {
819
  {
820
  $post_id = FLBuilderModel::get_post_id();
821
  $enabled = FLBuilderModel::is_builder_enabled();
 
822
  $ajax = defined( 'DOING_AJAX' );
823
  $in_loop = in_the_loop();
824
  $is_global = in_array( $post_id, FLBuilderModel::get_global_posts() );
825
 
826
- if( $enabled && ! $ajax && ( $in_loop || $is_global ) ) {
 
 
 
827
 
828
  // Remove the builder's render_content filter so it's not called again.
829
  remove_filter( 'the_content', 'FLBuilder::render_content' );
@@ -835,13 +851,16 @@ final class FLBuilder {
835
  echo '</div>';
836
  $content = ob_get_clean();
837
 
 
 
 
838
  // Do shortcodes here since letting the WP filter run can cause an infinite loop.
839
  $pattern = get_shortcode_regex();
840
  $content = preg_replace_callback( "/$pattern/s", 'FLBuilder::double_escape_shortcodes', $content );
841
  $content = do_shortcode( $content );
842
 
843
- // Reapply the builder's render_content filter.
844
- add_filter( 'the_content', 'FLBuilder::render_content' );
845
  }
846
 
847
  return $content;
@@ -1018,6 +1037,7 @@ final class FLBuilder {
1018
  */
1019
  static public function render_settings_field($name, $field, $settings = null)
1020
  {
 
1021
  $i = null;
1022
  $is_multiple = isset($field['multiple']) && $field['multiple'] === true;
1023
  $supports_multiple = $field['type'] != 'editor' && $field['type'] != 'photo' && $field['type'] != 'service';
@@ -1270,15 +1290,15 @@ final class FLBuilder {
1270
  * @param string $template The current template to be loaded.
1271
  * @return string
1272
  */
1273
- static public function render_template($template)
1274
  {
1275
  global $post;
 
 
1276
 
1277
- if($post && $post->post_type == 'fl-builder-template') {
1278
-
1279
- $page = locate_template(array('page.php'));
1280
 
1281
- if(!empty($page)) {
1282
  return $page;
1283
  }
1284
  }
@@ -1863,7 +1883,7 @@ final class FLBuilder {
1863
  echo ' data-node="' . $module->node . '" ';
1864
  echo ' data-animation-delay="' . $module->settings->animation_delay . '" ';
1865
 
1866
- if ( FLBuilderModel::is_builder_active() ) {
1867
  echo ' data-parent="' . $module->parent . '" ';
1868
  echo ' data-type="' . $module->settings->type . '" ';
1869
  echo ' data-name="' . $module->name . '" ';
7
  */
8
  final class FLBuilder {
9
 
10
+ /**
11
+ * The ID of a post that is currently being rendered.
12
+ *
13
+ * @since 1.6.4.2
14
+ * @var int $post_rendering
15
+ */
16
+ static public $post_rendering = null;
17
+
18
  /**
19
  * Localization
20
  *
332
  wp_register_script('jquery-bxslider', $js_url . 'jquery.bxslider.min.js', array('jquery-easing', 'jquery-fitvids'), $ver, true);
333
  wp_register_script('jquery-easing', $js_url . 'jquery.easing.1.3.js', array('jquery'), '1.3', true);
334
  wp_register_script('jquery-fitvids', $js_url . 'jquery.fitvids.js', array('jquery'), $ver, true);
335
+ wp_register_script('jquery-imagesloaded', $js_url . 'jquery.imagesloaded.js', array('jquery'), $ver, true);
336
  wp_register_script('jquery-infinitescroll', $js_url . 'jquery.infinitescroll.js', array('jquery'), $ver, true);
337
  wp_register_script('jquery-magnificpopup', $js_url . 'jquery.magnificpopup.min.js', array('jquery'), $ver, true);
338
  wp_register_script('jquery-mosaicflow', $js_url . 'jquery.mosaicflow.min.js', array('jquery'), $ver, true);
361
 
362
  $posts = get_posts(array(
363
  'post__in' => $post_ids,
364
+ 'post_type' => get_post_types(),
365
  'posts_per_page' => -1
366
  ));
367
+
368
  foreach($posts as $post) {
369
  self::enqueue_layout_styles_scripts($post->ID);
370
  }
396
  wp_enqueue_script('fl-slideshow');
397
  wp_enqueue_style('fl-slideshow');
398
  }
399
+ else if($row->settings->bg_type == 'video') {
400
+ wp_enqueue_script('jquery-imagesloaded');
401
+ }
402
  }
403
 
404
  // Enqueue required module CSS and JS
831
  {
832
  $post_id = FLBuilderModel::get_post_id();
833
  $enabled = FLBuilderModel::is_builder_enabled();
834
+ $rendering = $post_id === self::$post_rendering;
835
  $ajax = defined( 'DOING_AJAX' );
836
  $in_loop = in_the_loop();
837
  $is_global = in_array( $post_id, FLBuilderModel::get_global_posts() );
838
 
839
+ if( $enabled && ! $rendering && ! $ajax && ( $in_loop || $is_global ) ) {
840
+
841
+ // Set the post rendering ID.
842
+ self::$post_rendering = $post_id;
843
 
844
  // Remove the builder's render_content filter so it's not called again.
845
  remove_filter( 'the_content', 'FLBuilder::render_content' );
851
  echo '</div>';
852
  $content = ob_get_clean();
853
 
854
+ // Reapply the builder's render_content filter.
855
+ add_filter( 'the_content', 'FLBuilder::render_content' );
856
+
857
  // Do shortcodes here since letting the WP filter run can cause an infinite loop.
858
  $pattern = get_shortcode_regex();
859
  $content = preg_replace_callback( "/$pattern/s", 'FLBuilder::double_escape_shortcodes', $content );
860
  $content = do_shortcode( $content );
861
 
862
+ // Clear the post rendering ID.
863
+ self::$post_rendering = null;
864
  }
865
 
866
  return $content;
1037
  */
1038
  static public function render_settings_field($name, $field, $settings = null)
1039
  {
1040
+ $field = apply_filters( 'fl_builder_render_settings_field', $field, $name, $settings ); // Allow field settings filtering first
1041
  $i = null;
1042
  $is_multiple = isset($field['multiple']) && $field['multiple'] === true;
1043
  $supports_multiple = $field['type'] != 'editor' && $field['type'] != 'photo' && $field['type'] != 'service';
1290
  * @param string $template The current template to be loaded.
1291
  * @return string
1292
  */
1293
+ static public function render_template( $template )
1294
  {
1295
  global $post;
1296
+
1297
+ if ( 'string' == gettype( $template ) && $post && $post->post_type == 'fl-builder-template' ) {
1298
 
1299
+ $page = locate_template( array( 'page.php' ) );
 
 
1300
 
1301
+ if ( ! empty( $page ) ) {
1302
  return $page;
1303
  }
1304
  }
1883
  echo ' data-node="' . $module->node . '" ';
1884
  echo ' data-animation-delay="' . $module->settings->animation_delay . '" ';
1885
 
1886
+ if ( $active ) {
1887
  echo ' data-parent="' . $module->parent . '" ';
1888
  echo ' data-type="' . $module->settings->type . '" ';
1889
  echo ' data-name="' . $module->name . '" ';
css/fl-builder-layout.css CHANGED
@@ -191,7 +191,7 @@
191
  * iPad with portrait orientation.
192
  */
193
  @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait){
194
- .fl-row-full-height .fl-row-content{
195
  height: 1024px;
196
  }
197
  }
@@ -199,8 +199,8 @@
199
  /**
200
  * iPad with landscape orientation.
201
  */
202
- @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape){
203
- .fl-row-full-height .fl-row-content{
204
  height: 768px;
205
  }
206
  }
@@ -210,7 +210,7 @@
210
  * You can also target devices with aspect ratio.
211
  */
212
  @media screen and (device-aspect-ratio: 40/71) {
213
- .fl-row-full-height .fl-row-content {
214
  height: 500px;
215
  }
216
  }
@@ -244,6 +244,8 @@
244
  -webkit-flex-direction: column;
245
  -ms-flex-direction: column;
246
  flex-direction: column;
 
 
247
  max-width: 100%;
248
  width: 100%;
249
  }
191
  * iPad with portrait orientation.
192
  */
193
  @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait){
194
+ .fl-row-full-height .fl-row-content-wrap{
195
  height: 1024px;
196
  }
197
  }
199
  /**
200
  * iPad with landscape orientation.
201
  */
202
+ @media all and (device-width: 1024px) and (device-height: 768px) and (orientation:landscape){
203
+ .fl-row-full-height .fl-row-content-wrap{
204
  height: 768px;
205
  }
206
  }
210
  * You can also target devices with aspect ratio.
211
  */
212
  @media screen and (device-aspect-ratio: 40/71) {
213
+ .fl-row-full-height .fl-row-content-wrap {
214
  height: 500px;
215
  }
216
  }
244
  -webkit-flex-direction: column;
245
  -ms-flex-direction: column;
246
  flex-direction: column;
247
+ flex-shrink: 1;
248
+ min-width: 1px;
249
  max-width: 100%;
250
  width: 100%;
251
  }
css/fl-builder-rtl.css CHANGED
@@ -11,7 +11,7 @@
11
  /* Panel
12
  ------------------------------------------------------ */
13
 
14
- .fl-builder-blocks-section > span i {
15
  float: left;
16
  }
17
 
@@ -58,4 +58,81 @@
58
  .fl-help-tooltip-text {
59
  left: auto;
60
  right: 23px;
61
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  /* Panel
12
  ------------------------------------------------------ */
13
 
14
+ .fl-builder-blocks-section .fl-builder-blocks-section-title i {
15
  float: left;
16
  }
17
 
58
  .fl-help-tooltip-text {
59
  left: auto;
60
  right: 23px;
61
+ }
62
+
63
+ /* Tour
64
+ ------------------------------------------------------ */
65
+
66
+ .popover[class*=tour-] {
67
+ text-align: right;
68
+ }
69
+
70
+ .popover[class*=tour-] .fa-times {
71
+ right: auto;
72
+ left: 3px;
73
+ }
74
+
75
+ /* LightBox
76
+ ------------------------------------------------------ */
77
+
78
+ .fl-lightbox-footer {
79
+ text-align: left;
80
+ }
81
+
82
+ .fl-lightbox-header .fl-builder-settings-fields {
83
+ right: auto;
84
+ left: 10px;
85
+ }
86
+
87
+ /* Nano Scroller
88
+ ------------------------------------------------------ */
89
+
90
+ .fl-nanoscroller > .fl-nanoscroller-pane {
91
+ right: auto;
92
+ left: 2px;
93
+ }
94
+
95
+ /* Color Picker
96
+ ------------------------------------------------------ */
97
+
98
+ .fl-color-picker-preset-add {
99
+ right: auto;
100
+ left: 8px;
101
+ }
102
+
103
+ .fl-color-picker-preset-add:before {
104
+ left: auto;
105
+ right: 3px;
106
+ }
107
+
108
+ .fl-color-picker-preset-add:after {
109
+ left: auto;
110
+ right: 6px;
111
+ }
112
+
113
+ .fl-color-picker-clear .fl-color-picker-icon-remove {
114
+ left: 0;
115
+ right: auto;
116
+ }
117
+
118
+ .fl-color-picker-icon-remove:before {
119
+ left: auto;
120
+ right: 6px;
121
+ }
122
+
123
+ .fl-color-picker-icon-remove:after {
124
+ left: auto;
125
+ right: 6px;
126
+ }
127
+
128
+ .fl-color-picker-presets-list .fl-color-picker-preset-remove {
129
+ right: auto;
130
+ left: 5px;
131
+ }
132
+
133
+ /* Auto Suggest
134
+ ------------------------------------------------------ */
135
+
136
+ ul.as-selections li {
137
+ float: right;
138
+ }
css/fl-builder.css CHANGED
@@ -1028,6 +1028,9 @@ form.fl-builder-settings {
1028
  border: none;
1029
  width: 100%;
1030
  }
 
 
 
1031
  .fl-form-table th {
1032
  border: none !important;
1033
  background: #fff !important;
@@ -1147,6 +1150,63 @@ form.fl-builder-settings {
1147
  margin-bottom: 15px;
1148
  }
1149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1150
  /* Text Field */
1151
  .fl-builder-settings-fields input.text-full {
1152
  width: 97%;
@@ -1160,8 +1220,6 @@ form.fl-builder-settings {
1160
  /* Color Picker */
1161
  .fl-color-picker {
1162
  cursor: pointer;
1163
- /*height: 30px;*/
1164
- /*width: 48px;*/
1165
  }
1166
  .fl-color-picker .fl-color-picker-clear:hover {
1167
  background-color: #ededed;
@@ -1219,11 +1277,15 @@ form.fl-builder-settings {
1219
  .fl-photo-field .fl-photo-edit {
1220
  margin: 0 0 0 11px;
1221
  }
1222
- .fl-photo-field .fl-photo-replace {
 
1223
  margin: 0 0 0 8px;
1224
  }
1225
 
1226
  /* Media Uploader */
 
 
 
1227
  .fl-builder-edit .media-modal-content .thumbnail {
1228
  padding: 0;
1229
  border: none;
1028
  border: none;
1029
  width: 100%;
1030
  }
1031
+ .fl-form-table tbody {
1032
+ border: none;
1033
+ }
1034
  .fl-form-table th {
1035
  border: none !important;
1036
  background: #fff !important;
1150
  margin-bottom: 15px;
1151
  }
1152
 
1153
+ /* Core WordPress UI */
1154
+ .wp-core-ui h1,
1155
+ .wp-core-ui h2,
1156
+ .wp-core-ui h3,
1157
+ .wp-core-ui h4,
1158
+ .wp-core-ui h5,
1159
+ .wp-core-ui h6 {
1160
+ color: #333;
1161
+ }
1162
+ .wp-core-ui .submitbox .submitdelete {
1163
+ color: #a00;
1164
+ }
1165
+ .wp-core-ui button {
1166
+ font-weight: normal;
1167
+ text-transform: capitalize;
1168
+ }
1169
+ .wp-core-ui textarea,
1170
+ .wp-core-ui input[type=text],
1171
+ .wp-core-ui input[type=password],
1172
+ .wp-core-ui input[type=file],
1173
+ .wp-core-ui input[type=email],
1174
+ .wp-core-ui input[type=number],
1175
+ .wp-core-ui input[type=search],
1176
+ .wp-core-ui input[type=tel],
1177
+ .wp-core-ui input[type=url],
1178
+ .wp-core-ui select {
1179
+ background-color: #fff;
1180
+ border-color: #dfdfdf;
1181
+ border-style: solid;
1182
+ border-width: 1px;
1183
+ border-radius: 3px;
1184
+ -moz-border-radius: 3px;
1185
+ -webkit-border-radius: 3px;
1186
+ box-shadow: none;
1187
+ -moz-box-shadow: none;
1188
+ -webkit-box-shadow: none;
1189
+ color: #333;
1190
+ font-weight: normal;
1191
+ }
1192
+ .wp-core-ui textarea:focus,
1193
+ .wp-core-ui input[type=text]:focus,
1194
+ .wp-core-ui input[type=password]:focus,
1195
+ .wp-core-ui input[type=file]:focus,
1196
+ .wp-core-ui input[type=email]:focus,
1197
+ .wp-core-ui input[type=number]:focus,
1198
+ .wp-core-ui input[type=search]:focus,
1199
+ .wp-core-ui input[type=tel]:focus,
1200
+ .wp-core-ui input[type=url]:focus,
1201
+ .wp-core-ui select:focus {
1202
+ background: transparent;
1203
+ border-color: #aaa;
1204
+ }
1205
+ .wp-core-ui input[type=search] {
1206
+ background-image: none;
1207
+ padding: 6px;
1208
+ }
1209
+
1210
  /* Text Field */
1211
  .fl-builder-settings-fields input.text-full {
1212
  width: 97%;
1220
  /* Color Picker */
1221
  .fl-color-picker {
1222
  cursor: pointer;
 
 
1223
  }
1224
  .fl-color-picker .fl-color-picker-clear:hover {
1225
  background-color: #ededed;
1277
  .fl-photo-field .fl-photo-edit {
1278
  margin: 0 0 0 11px;
1279
  }
1280
+ .fl-photo-field .fl-photo-replace,
1281
+ .fl-photo-field .fl-photo-remove {
1282
  margin: 0 0 0 8px;
1283
  }
1284
 
1285
  /* Media Uploader */
1286
+ .fl-builder-edit .media-frame {
1287
+ -webkit-backface-visibility: hidden;
1288
+ }
1289
  .fl-builder-edit .media-modal-content .thumbnail {
1290
  padding: 0;
1291
  border: none;
css/fl-color-picker.css CHANGED
@@ -1,7 +1,6 @@
1
- /**
2
- * This is for convenience of developing only. The minified result should go into
3
- * the _css var in iris.js. Run grunt cssmin to generate.
4
- */
5
  .fl-color-picker-ui .iris-picker {
6
  width: 200px;
7
  height: 215px;
@@ -167,9 +166,10 @@
167
  height: 1px;
168
  }
169
 
170
- /* Beaver Picker Stuff ---------------------------------------------- */
 
171
 
172
- .fl-color-picker-wrapper{
173
  position: relative;
174
  width: 48px;
175
  height: 32px;
@@ -203,6 +203,7 @@
203
 
204
  .fl-color-picker-ui{
205
  display: inline-block;
 
206
  z-index: 999999;
207
  position: fixed;
208
  overflow: hidden;
@@ -240,7 +241,13 @@
240
  -webkit-box-shadow: none;
241
  box-shadow: none;
242
  }
243
-
 
 
 
 
 
 
244
  .fl-color-picker-preset-add{
245
  position: absolute;
246
  top: 8px;
@@ -418,7 +425,8 @@
418
  transform: translate(-50%,-50%);
419
  }
420
 
421
- /* CSS icons ========================================= */
 
422
 
423
  .fl-color-picker-icon-check{
424
  position: relative;
1
+ /* Iris Base
2
+ ---------------------------------------------------- */
3
+
 
4
  .fl-color-picker-ui .iris-picker {
5
  width: 200px;
6
  height: 215px;
166
  height: 1px;
167
  }
168
 
169
+ /* Beaver Picker
170
+ ---------------------------------------------------- */
171
 
172
+ .fl-color-picker-wrapper {
173
  position: relative;
174
  width: 48px;
175
  height: 32px;
203
 
204
  .fl-color-picker-ui{
205
  display: inline-block;
206
+ font-family: Helvetica, Verdana, sans-serif;
207
  z-index: 999999;
208
  position: fixed;
209
  overflow: hidden;
241
  -webkit-box-shadow: none;
242
  box-shadow: none;
243
  }
244
+ .fl-color-picker-ui .iris-square-value {
245
+ -webkit-transition: none;
246
+ -moz-transition: none;
247
+ -ms-transition: none;
248
+ -o-transition: none;
249
+ transition: none;
250
+ }
251
  .fl-color-picker-preset-add{
252
  position: absolute;
253
  top: 8px;
425
  transform: translate(-50%,-50%);
426
  }
427
 
428
+ /* Color Picker Icons
429
+ ---------------------------------------------------- */
430
 
431
  .fl-color-picker-icon-check{
432
  position: relative;
css/fl-slideshow.css CHANGED
@@ -61,7 +61,7 @@
61
  .fl-fullscreen-close-message span {
62
  display: inline-block;
63
  padding: 15px 25px;
64
- background: url('http://www.smugmug.com/photos/1852179328_QJKsRGc-O.png') repeat;
65
  border-radius: 8px;
66
  -moz-border-radius: 8px;
67
  -webkit-border-radius: 8px;
@@ -98,7 +98,7 @@
98
  height: 60px;
99
  position: absolute;
100
  z-index: 2;
101
- background: url('http://www.smugmug.com/photos/1891028873_pGVrr7F-O.png') -120px -80px no-repeat;
102
  }
103
  .fl-slideshow-video-button:hover {
104
  background-position: -220px -80px;
@@ -110,7 +110,7 @@
110
  bottom: 0;
111
  left: 0;
112
  z-index: 1000;
113
- background: url('http://www.smugmug.com/photos/1852179328_QJKsRGc-O.png') repeat;
114
  }
115
  .fl-slideshow-video-wrap {
116
  top: 45px;
@@ -136,7 +136,7 @@
136
  top: 5px;
137
  width: 40px;
138
  height: 40px;
139
- background: url('http://www.smugmug.com/photos/1891028873_pGVrr7F-O.png') 0 -80px no-repeat;
140
  }
141
  .fl-slideshow-video-close:hover {
142
  background-position: -40px -80px;
@@ -212,7 +212,7 @@
212
  display: inline-block;
213
  width: 40px;
214
  height: 40px;
215
- background-image: url('http://www.smugmug.com/photos/1891028873_pGVrr7F-O.png');
216
  vertical-align: middle;
217
  }
218
  .fl-slideshow-nav-count {
@@ -277,7 +277,7 @@
277
  background: none !important;
278
  }
279
  .fl-slideshow-image-nav-left a {
280
- background: url('http://www.smugmug.com/photos/1958336862_VJJkzTT-O.png') left center no-repeat !important;
281
  }
282
  .fl-slideshow-image-nav-left a:hover {
283
  background-position: -70px center !important;
@@ -295,7 +295,7 @@
295
  background: none !important;
296
  }
297
  .fl-slideshow-image-nav-right a {
298
- background: url('http://www.smugmug.com/photos/1958336867_z422z4t-O.png') right center no-repeat !important;
299
  }
300
  .fl-slideshow-image-nav-right a:hover {
301
  background-position: 30px center !important;
@@ -313,12 +313,12 @@
313
  .fl-slideshow-mouse-nav-prev,
314
  .fl-slideshow-mouse-nav-prev div,
315
  .fl-slideshow-mouse-nav-prev img {
316
- cursor: url('http://www.smugmug.com/photos/1953630432_HdGWtRw-O.png'), w-resize !important;
317
  }
318
  .fl-slideshow-mouse-nav-next,
319
  .fl-slideshow-mouse-nav-next div,
320
  .fl-slideshow-mouse-nav-next img {
321
- cursor: url('http://www.smugmug.com/photos/1953631239_mJjjpW9-O.png'), e-resize !important;
322
  }
323
 
324
  /* Thumbs
@@ -415,7 +415,7 @@
415
  --------------------------------------------------------------*/
416
 
417
  .fl-slideshow-overlay {
418
- background: url('http://www.smugmug.com/photos/1852179328_QJKsRGc-O.png') repeat;
419
  }
420
  .fl-slideshow-overlay-close {
421
  position: absolute;
@@ -423,7 +423,7 @@
423
  right: 0;
424
  width: 40px;
425
  height: 40px;
426
- background: url('http://www.smugmug.com/photos/1891028873_pGVrr7F-O.png') 0 -80px no-repeat;
427
  }
428
  .fl-slideshow-overlay-close:hover {
429
  background-position: -40px -80px;
@@ -432,7 +432,7 @@
432
  .fl-slideshow-social .fl-slideshow-overlay-close {
433
  width: 30px;
434
  height: 30px;
435
- background: url('http://www.smugmug.com/photos/1891028873_pGVrr7F-O.png') -80px -80px no-repeat;
436
  }
437
  .fl-slideshow-caption .fl-slideshow-overlay-close:hover,
438
  .fl-slideshow-social .fl-slideshow-overlay-close:hover {
@@ -457,15 +457,15 @@
457
 
458
  /* Nav */
459
  .fl-slideshow-light .fl-slideshow-nav a {
460
- background-image: url('http://www.smugmug.com/photos/1900766460_zx7TpJF-O.png');
461
  }
462
 
463
  /* Video */
464
  .fl-slideshow-light .fl-slideshow-video {
465
- background: url('http://www.smugmug.com/photos/1900766462_Bzx8kTW-O.png') repeat;
466
  }
467
  .fl-slideshow-light .fl-slideshow-video-close {
468
- background: url('http://www.smugmug.com/photos/1900766460_zx7TpJF-O.png') 0 -80px no-repeat;
469
  }
470
  .fl-slideshow-light .fl-slideshow-video-close:hover {
471
  background-position: -40px -80px;
@@ -491,14 +491,14 @@
491
 
492
  /* Overlays */
493
  .fl-slideshow-light .fl-slideshow-overlay {
494
- background-image: url('http://www.smugmug.com/photos/1900766462_Bzx8kTW-O.png');
495
  }
496
  .fl-slideshow-light .fl-slideshow-overlay-close {
497
- background-image: url('http://www.smugmug.com/photos/1900766460_zx7TpJF-O.png');
498
  }
499
  .fl-slideshow-light .fl-slideshow-caption .fl-slideshow-overlay-close,
500
  .fl-slideshow-light .fl-slideshow-social .fl-slideshow-overlay-close {
501
- background-image: url('http://www.smugmug.com/photos/1900766460_zx7TpJF-O.png');
502
  }
503
 
504
  /* SM Font Icon Overrides
61
  .fl-fullscreen-close-message span {
62
  display: inline-block;
63
  padding: 15px 25px;
64
+ background: url('../img/slideshow/transparent-bg-dark.png') repeat;
65
  border-radius: 8px;
66
  -moz-border-radius: 8px;
67
  -webkit-border-radius: 8px;
98
  height: 60px;
99
  position: absolute;
100
  z-index: 2;
101
+ background: url('../img/slideshow/icons-light.png') -120px -80px no-repeat;
102
  }
103
  .fl-slideshow-video-button:hover {
104
  background-position: -220px -80px;
110
  bottom: 0;
111
  left: 0;
112
  z-index: 1000;
113
+ background: url('../img/slideshow/transparent-bg-dark.png') repeat;
114
  }
115
  .fl-slideshow-video-wrap {
116
  top: 45px;
136
  top: 5px;
137
  width: 40px;
138
  height: 40px;
139
+ background: url('../img/slideshow/icons-light.png') 0 -80px no-repeat;
140
  }
141
  .fl-slideshow-video-close:hover {
142
  background-position: -40px -80px;
212
  display: inline-block;
213
  width: 40px;
214
  height: 40px;
215
+ background-image: url('../img/slideshow/icons-light.png');
216
  vertical-align: middle;
217
  }
218
  .fl-slideshow-nav-count {
277
  background: none !important;
278
  }
279
  .fl-slideshow-image-nav-left a {
280
+ background: url('../img/slideshow/arrows-prev.png') left center no-repeat !important;
281
  }
282
  .fl-slideshow-image-nav-left a:hover {
283
  background-position: -70px center !important;
295
  background: none !important;
296
  }
297
  .fl-slideshow-image-nav-right a {
298
+ background: url('../img/slideshow/arrows-next.png') right center no-repeat !important;
299
  }
300
  .fl-slideshow-image-nav-right a:hover {
301
  background-position: 30px center !important;
313
  .fl-slideshow-mouse-nav-prev,
314
  .fl-slideshow-mouse-nav-prev div,
315
  .fl-slideshow-mouse-nav-prev img {
316
+ cursor: url('../img/slideshow/arrow-prev.png'), w-resize !important;
317
  }
318
  .fl-slideshow-mouse-nav-next,
319
  .fl-slideshow-mouse-nav-next div,
320
  .fl-slideshow-mouse-nav-next img {
321
+ cursor: url('../img/slideshow/arrow-next.png'), e-resize !important;
322
  }
323
 
324
  /* Thumbs
415
  --------------------------------------------------------------*/
416
 
417
  .fl-slideshow-overlay {
418
+ background: url('../img/slideshow/transparent-bg-dark.png') repeat;
419
  }
420
  .fl-slideshow-overlay-close {
421
  position: absolute;
423
  right: 0;
424
  width: 40px;
425
  height: 40px;
426
+ background: url('../img/slideshow/icons-light.png') 0 -80px no-repeat;
427
  }
428
  .fl-slideshow-overlay-close:hover {
429
  background-position: -40px -80px;
432
  .fl-slideshow-social .fl-slideshow-overlay-close {
433
  width: 30px;
434
  height: 30px;
435
+ background: url('../img/slideshow/icons-light.png') -80px -80px no-repeat;
436
  }
437
  .fl-slideshow-caption .fl-slideshow-overlay-close:hover,
438
  .fl-slideshow-social .fl-slideshow-overlay-close:hover {
457
 
458
  /* Nav */
459
  .fl-slideshow-light .fl-slideshow-nav a {
460
+ background-image: url('../img/slideshow/icons-dark.png');
461
  }
462
 
463
  /* Video */
464
  .fl-slideshow-light .fl-slideshow-video {
465
+ background: url('../img/slideshow/transparent-bg-light.png') repeat;
466
  }
467
  .fl-slideshow-light .fl-slideshow-video-close {
468
+ background: url('../img/slideshow/icons-dark.png') 0 -80px no-repeat;
469
  }
470
  .fl-slideshow-light .fl-slideshow-video-close:hover {
471
  background-position: -40px -80px;
491
 
492
  /* Overlays */
493
  .fl-slideshow-light .fl-slideshow-overlay {
494
+ background-image: url('../img/slideshow/transparent-bg-light.png');
495
  }
496
  .fl-slideshow-light .fl-slideshow-overlay-close {
497
+ background-image: url('../img/slideshow/icons-dark.png');
498
  }
499
  .fl-slideshow-light .fl-slideshow-caption .fl-slideshow-overlay-close,
500
  .fl-slideshow-light .fl-slideshow-social .fl-slideshow-overlay-close {
501
+ background-image: url('../img/slideshow/icons-dark.png');
502
  }
503
 
504
  /* SM Font Icon Overrides
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 1.6.4.1
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
9
  * Copyright: (c) 2014 Beaver Builder
@@ -11,7 +11,7 @@
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
- define('FL_BUILDER_VERSION', '1.6.4.1');
15
  define('FL_BUILDER_FILE', __FILE__);
16
  define('FL_BUILDER_DIR', plugin_dir_path(FL_BUILDER_FILE));
17
  define('FL_BUILDER_URL', plugins_url('/', FL_BUILDER_FILE));
@@ -71,6 +71,7 @@ add_filter('page_row_actions', 'FLBuilderAdminPo
71
  add_filter('post_row_actions', 'FLBuilderAdminPosts::render_row_actions_link');
72
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'FLBuilderAdmin::render_plugin_action_links');
73
  add_filter('all_plugins', 'FLBuilderAdmin::white_label_plugins_page');
 
74
 
75
  /* AJAX Actions */
76
  add_action('fl_ajax_fl_builder_save', 'FLBuilderModel::update');
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 1.6.4.3
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
9
  * Copyright: (c) 2014 Beaver Builder
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
+ define('FL_BUILDER_VERSION', '1.6.4.3');
15
  define('FL_BUILDER_FILE', __FILE__);
16
  define('FL_BUILDER_DIR', plugin_dir_path(FL_BUILDER_FILE));
17
  define('FL_BUILDER_URL', plugins_url('/', FL_BUILDER_FILE));
71
  add_filter('post_row_actions', 'FLBuilderAdminPosts::render_row_actions_link');
72
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'FLBuilderAdmin::render_plugin_action_links');
73
  add_filter('all_plugins', 'FLBuilderAdmin::white_label_plugins_page');
74
+ add_filter('wp_prepare_themes_for_js', 'FLBuilderAdmin::white_label_themes_page');
75
 
76
  /* AJAX Actions */
77
  add_action('fl_ajax_fl_builder_save', 'FLBuilderModel::update');
img/slideshow/arrow-next.png ADDED
Binary file
img/slideshow/arrow-prev.png ADDED
Binary file
img/slideshow/arrows-next.png ADDED
Binary file
img/slideshow/arrows-prev.png ADDED
Binary file
img/slideshow/icons-dark.png ADDED
Binary file
img/slideshow/icons-light.png ADDED
Binary file
img/slideshow/transparent-bg-dark.png ADDED
Binary file
img/slideshow/transparent-bg-light.png ADDED
Binary file
includes/field-photo.php CHANGED
@@ -10,7 +10,11 @@
10
  </select>
11
  <br />
12
  <a class="fl-photo-edit" href="javascript:void(0);" onclick="return false;"><?php _e('Edit', 'fl-builder'); ?></a>
 
 
 
13
  <a class="fl-photo-replace" href="javascript:void(0);" onclick="return false;"><?php _e('Replace', 'fl-builder'); ?></a>
 
14
  <div class="fl-clear"></div>
15
  </div>
16
  <input name="<?php echo $name; ?>" type="hidden" value='<?php echo $value; ?>' />
10
  </select>
11
  <br />
12
  <a class="fl-photo-edit" href="javascript:void(0);" onclick="return false;"><?php _e('Edit', 'fl-builder'); ?></a>
13
+ <?php if(isset($field['show_remove']) && $field['show_remove']) : ?>
14
+ <a class="fl-photo-remove" href="javascript:void(0);" onclick="return false;"><?php _e('Remove', 'fl-builder'); ?></a>
15
+ <?php else : ?>
16
  <a class="fl-photo-replace" href="javascript:void(0);" onclick="return false;"><?php _e('Replace', 'fl-builder'); ?></a>
17
+ <?php endif; ?>
18
  <div class="fl-clear"></div>
19
  </div>
20
  <input name="<?php echo $name; ?>" type="hidden" value='<?php echo $value; ?>' />
includes/field-text.php CHANGED
@@ -1 +1,72 @@
1
- <input type="text" name="<?php echo $name; ?>" value="<?php echo htmlspecialchars($value); ?>" class="text<?php if(isset($field['class'])) echo ' '. $field['class']; if(!isset($field['size'])) echo ' text-full'; ?>" <?php if(isset($field['placeholder'])) echo ' placeholder="'. $field['placeholder'] .'"'; if(isset($field['maxlength'])) echo ' maxlength="'. $field['maxlength'] .'"'; if(isset($field['size'])) echo ' size="'. $field['size'] .'"'; ?> />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <input type="text" name="<?php echo $name; ?>" value="<?php echo htmlspecialchars($value); ?>" class="text<?php if(isset($field['class'])) echo ' '. $field['class']; if(!isset($field['size'])) echo ' text-full'; ?>" <?php if(isset($field['placeholder'])) echo ' placeholder="'. $field['placeholder'] .'"'; if(isset($field['maxlength'])) echo ' maxlength="'. $field['maxlength'] .'"'; if(isset($field['size'])) echo ' size="'. $field['size'] .'"'; ?> />
2
+
3
+ <?php
4
+
5
+ /**
6
+ * Adding predefined values selector
7
+ */
8
+
9
+ if (
10
+ isset( $field['options'] )
11
+ && is_array( $field['options'] )
12
+ && ! empty( $field['options'] )
13
+ ) :
14
+
15
+ // Adding empty value if missing
16
+
17
+ if ( ! isset( $field['options'][''] ) ) {
18
+ $field['options'][''] = esc_html_x( '- Add predefined -', 'Add predefined value.', 'fl-builder' );
19
+ }
20
+
21
+ // Moving the empty value to top
22
+
23
+ $selector_value_empty = $field['options'][''];
24
+
25
+ unset( $field['options'][''] );
26
+
27
+ $field['options'] = array( '' => $selector_value_empty ) + $field['options'];
28
+
29
+ // Outputting select field
30
+
31
+ ?>
32
+
33
+ <select class="fl-select-add-value" data-target="<?php echo esc_attr( $name ); ?>">
34
+ <?php
35
+
36
+ foreach( $field['options'] as $option_value => $option ) {
37
+
38
+ if (
39
+ is_array( $option )
40
+ && isset( $option['label'] )
41
+ && isset( $option['options'] )
42
+ ) {
43
+
44
+ // Optgroups
45
+
46
+ echo '<optgroup label="' . esc_attr( $option['label'] ) . '">';
47
+
48
+ foreach( (array) $option['options'] as $optgroup_option_value => $optgroup_option ) {
49
+ echo '<option value="' . esc_attr( $optgroup_option_value ) . '">' . esc_html( $optgroup_option ) . '</option>';
50
+ }
51
+
52
+ echo '</optgroup>';
53
+
54
+
55
+ } else {
56
+
57
+ // Standard options
58
+
59
+ echo '<option value="' . esc_attr( $option_value ) . '">' . esc_html( $option ) . '</option>';
60
+
61
+ }
62
+
63
+ } // /foreach
64
+
65
+ ?>
66
+ </select>
67
+
68
+ <?php
69
+
70
+ endif;
71
+
72
+ ?>
includes/loop-settings.php CHANGED
@@ -32,7 +32,7 @@ FLBuilderModel::default_settings($settings, array(
32
  'author' => __('Author', 'fl-builder'),
33
  'comment_count' => __('Comment Count', 'fl-builder'),
34
  'menu_order' => __('Menu Order', 'fl-builder'),
35
- 'random' => __('Random', 'fl-builder'),
36
  )
37
  ), $settings);
38
 
32
  'author' => __('Author', 'fl-builder'),
33
  'comment_count' => __('Comment Count', 'fl-builder'),
34
  'menu_order' => __('Menu Order', 'fl-builder'),
35
+ 'rand' => __('Random', 'fl-builder'),
36
  )
37
  ), $settings);
38
 
includes/ui-js-config.php CHANGED
@@ -1,6 +1,8 @@
1
  <script>
2
 
3
  var FLBuilderConfig = {
 
 
4
  debug: <?php if( defined( 'WP_DEBUG' ) && WP_DEBUG ) echo 'true'; else echo 'false'; ?>,
5
  enabledTemplates: '<?php echo $enabled_templates; ?>',
6
  help: <?php echo json_encode( $help_button ); ?>,
@@ -14,8 +16,7 @@ var FLBuilderConfig = {
14
  simpleUi: <?php if(!current_user_can(FLBuilderModel::get_editing_capability())) echo 'true'; else echo 'false'; ?>,
15
  upgradeUrl: '<?php if(FL_BUILDER_LITE === true) $campaign = 'upgrade-button'; else $campaign = 'buy-button'; echo FLBuilderModel::get_upgrade_url( array( 'utm_source' => 'external', 'utm_medium' => 'builder', 'utm_campaign' => $campaign ) ); ?>',
16
  userCanEditGlobalTemplates: <?php if(current_user_can(FLBuilderModel::get_global_templates_editing_capability())) echo 'true'; else echo 'false'; ?>,
17
- userTemplateType: '<?php echo FLBuilderModel::get_user_template_type(); ?>',
18
- colorPresets: <?php echo json_encode( $color_presets ); ?>
19
  };
20
 
21
  var FLBuilderStrings = {
1
  <script>
2
 
3
  var FLBuilderConfig = {
4
+ colorPresets: <?php echo json_encode( $color_presets ); ?>,
5
+ customImageSizeTitles: <?php echo json_encode( apply_filters( 'image_size_names_choose', array() ) ); ?>,
6
  debug: <?php if( defined( 'WP_DEBUG' ) && WP_DEBUG ) echo 'true'; else echo 'false'; ?>,
7
  enabledTemplates: '<?php echo $enabled_templates; ?>',
8
  help: <?php echo json_encode( $help_button ); ?>,
16
  simpleUi: <?php if(!current_user_can(FLBuilderModel::get_editing_capability())) echo 'true'; else echo 'false'; ?>,
17
  upgradeUrl: '<?php if(FL_BUILDER_LITE === true) $campaign = 'upgrade-button'; else $campaign = 'buy-button'; echo FLBuilderModel::get_upgrade_url( array( 'utm_source' => 'external', 'utm_medium' => 'builder', 'utm_campaign' => $campaign ) ); ?>',
18
  userCanEditGlobalTemplates: <?php if(current_user_can(FLBuilderModel::get_global_templates_editing_capability())) echo 'true'; else echo 'false'; ?>,
19
+ userTemplateType: '<?php echo FLBuilderModel::get_user_template_type(); ?>'
 
20
  };
21
 
22
  var FLBuilderStrings = {
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.6.4.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.6.4.3',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
includes/updater/classes/class-fl-updater.php CHANGED
@@ -93,7 +93,10 @@ final class FLUpdater {
93
  $plugin = self::get_plugin_file($this->settings['slug']);
94
  $new_ver = $response->new_version;
95
  $curr_ver = $this->settings['version'];
96
-
 
 
 
97
  if(version_compare($new_ver, $curr_ver, '>')) {
98
  $transient->response[$plugin] = $response;
99
  }
@@ -128,14 +131,7 @@ final class FLUpdater {
128
  public function update_message( $plugin_data, $response )
129
  {
130
  if ( empty( $response->package ) ) {
131
- echo '<p style="padding:10px 20px; margin-top: 10px; background: #d54e21; color: #fff;">';
132
- echo __( '<strong>UPDATE UNAVAILABLE!</strong>', 'fl-builder' );
133
- echo '&nbsp;&nbsp;&nbsp;';
134
- echo __('Please subscribe to enable automatic updates for this plugin.', 'fl-builder');
135
- echo ' <a href="' . $plugin_data['PluginURI'] . '" target="_blank" style="color: #fff; text-decoration: underline;">';
136
- echo __('Subscribe Now', 'fl-builder');
137
- echo ' &raquo;</a>';
138
- echo '</p>';
139
  }
140
  }
141
 
@@ -283,6 +279,33 @@ final class FLUpdater {
283
  return false;
284
  }
285
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  /**
287
  * Static method for retrieving the plugin file path for a
288
  * product relative to the plugins directory.
93
  $plugin = self::get_plugin_file($this->settings['slug']);
94
  $new_ver = $response->new_version;
95
  $curr_ver = $this->settings['version'];
96
+
97
+ if ( empty( $response->package ) ) {
98
+ $response->upgrade_notice = FLUpdater::get_update_error_message();
99
+ }
100
  if(version_compare($new_ver, $curr_ver, '>')) {
101
  $transient->response[$plugin] = $response;
102
  }
131
  public function update_message( $plugin_data, $response )
132
  {
133
  if ( empty( $response->package ) ) {
134
+ echo FLUpdater::get_update_error_message( $plugin_data );
 
 
 
 
 
 
 
135
  }
136
  }
137
 
279
  return false;
280
  }
281
 
282
+ /**
283
+ * Returns an update message for if an update
284
+ * is available but there is no active subscription.
285
+ *
286
+ * @since 1.6.4.3
287
+ * @param array $plugin_data An array of data for this plugin.
288
+ * @return string
289
+ */
290
+ static private function get_update_error_message( $plugin_data = null )
291
+ {
292
+ $message = '';
293
+ $message .= '<p style="padding:10px 20px; margin-top: 10px; background: #d54e21; color: #fff;">';
294
+ $message .= __( '<strong>UPDATE UNAVAILABLE!</strong>', 'fl-builder' );
295
+ $message .= '&nbsp;&nbsp;&nbsp;';
296
+ $message .= __('Please subscribe to enable automatic updates for this plugin.', 'fl-builder');
297
+
298
+ if ( $plugin_data && isset( $plugin_data['PluginURI'] ) ) {
299
+ $message .= ' <a href="' . $plugin_data['PluginURI'] . '" target="_blank" style="color: #fff; text-decoration: underline;">';
300
+ $message .= __('Subscribe Now', 'fl-builder');
301
+ $message .= ' &raquo;</a>';
302
+ }
303
+
304
+ $message .= '</p>';
305
+
306
+ return $message;
307
+ }
308
+
309
  /**
310
  * Static method for retrieving the plugin file path for a
311
  * product relative to the plugins directory.
includes/updater/includes/form.php CHANGED
@@ -19,7 +19,7 @@
19
 
20
  <?php if(isset($_POST['fl-updater-nonce'])) : ?>
21
  <div class="updated">
22
- <p><?php _e('Email address saved!', 'fl-builder'); ?></p>
23
  </div>
24
  <?php endif; ?>
25
 
19
 
20
  <?php if(isset($_POST['fl-updater-nonce'])) : ?>
21
  <div class="updated">
22
+ <p><?php _e('License key saved!', 'fl-builder'); ?></p>
23
  </div>
24
  <?php endif; ?>
25
 
js/fl-builder-layout.js CHANGED
@@ -320,7 +320,14 @@
320
  */
321
  _resizeBgVideos: function()
322
  {
323
- $('.fl-bg-video').each(FLBuilderLayout._resizeBgVideo);
 
 
 
 
 
 
 
324
  },
325
 
326
  /**
@@ -431,8 +438,6 @@
431
  responsiveLabel = null,
432
  tabIndex = null,
433
  label = null;
434
-
435
- console.log( hash );
436
 
437
  if ( '' != hash ) {
438
 
320
  */
321
  _resizeBgVideos: function()
322
  {
323
+ $('.fl-bg-video').each( function() {
324
+
325
+ FLBuilderLayout._resizeBgVideo.apply( this );
326
+
327
+ if ( $( this ).parent().find( 'img' ).length > 0 ) {
328
+ $( this ).parent().imagesLoaded( $.proxy( FLBuilderLayout._resizeBgVideo, this ) );
329
+ }
330
+ } );
331
  },
332
 
333
  /**
438
  responsiveLabel = null,
439
  tabIndex = null,
440
  label = null;
 
 
441
 
442
  if ( '' != hash ) {
443
 
js/fl-builder.js CHANGED
@@ -670,6 +670,7 @@
670
  $('body').delegate('.fl-photo-field .fl-photo-select', 'click', FLBuilder._selectSinglePhoto);
671
  $('body').delegate('.fl-photo-field .fl-photo-edit', 'click', FLBuilder._selectSinglePhoto);
672
  $('body').delegate('.fl-photo-field .fl-photo-replace', 'click', FLBuilder._selectSinglePhoto);
 
673
 
674
  /* Multiple Photo Fields */
675
  $('body').delegate('.fl-multiple-photos-field .fl-multiple-photos-select', 'click', FLBuilder._selectMultiplePhotos);
@@ -698,6 +699,9 @@
698
 
699
  /* Loop Builder Fields */
700
  $('body').delegate('.fl-loop-builder select[name=post_type]', 'change', FLBuilder._loopBuilderPostTypeChange);
 
 
 
701
  },
702
 
703
  /**
@@ -4916,6 +4920,27 @@
4916
  srcSelect.trigger('change');
4917
  },
4918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4919
  /**
4920
  * Returns the src URL for a photo.
4921
  *
@@ -4952,6 +4977,7 @@
4952
  var html = '',
4953
  size = null,
4954
  selected = null,
 
4955
  titles = {
4956
  full : FLBuilderStrings.fullSize,
4957
  large : FLBuilderStrings.large,
@@ -4965,8 +4991,19 @@
4965
  else {
4966
 
4967
  for(size in photo.sizes) {
 
 
 
 
 
 
 
 
 
 
 
4968
  selected = size == 'full' ? ' selected="selected"' : '';
4969
- html += '<option value="' + photo.sizes[size].url + '"' + selected + '>' + titles[size] + ' - ' + photo.sizes[size].width + ' x ' + photo.sizes[size].height + '</option>';
4970
  }
4971
  }
4972
 
@@ -5620,6 +5657,40 @@
5620
  $('.fl-loop-builder-filter').hide();
5621
  $('.fl-loop-builder-' + val + '-filter').show();
5622
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5623
 
5624
  /* AJAX
5625
  ----------------------------------------------------------*/
670
  $('body').delegate('.fl-photo-field .fl-photo-select', 'click', FLBuilder._selectSinglePhoto);
671
  $('body').delegate('.fl-photo-field .fl-photo-edit', 'click', FLBuilder._selectSinglePhoto);
672
  $('body').delegate('.fl-photo-field .fl-photo-replace', 'click', FLBuilder._selectSinglePhoto);
673
+ $('body').delegate('.fl-photo-field .fl-photo-remove', 'click', FLBuilder._singlePhotoRemoved);
674
 
675
  /* Multiple Photo Fields */
676
  $('body').delegate('.fl-multiple-photos-field .fl-multiple-photos-select', 'click', FLBuilder._selectMultiplePhotos);
699
 
700
  /* Loop Builder Fields */
701
  $('body').delegate('.fl-loop-builder select[name=post_type]', 'change', FLBuilder._loopBuilderPostTypeChange);
702
+
703
+ /* Text Fields - Add Value Selector */
704
+ $('body').delegate('.fl-select-add-value', 'change', FLBuilder._textFieldAddValueSelectChange);
705
  },
706
 
707
  /**
4920
  srcSelect.trigger('change');
4921
  },
4922
 
4923
+ /**
4924
+ * Clears a photo that has been selected in a single photo field.
4925
+ *
4926
+ * @since 1.6.4.3
4927
+ * @access private
4928
+ * @method _singlePhotoRemoved
4929
+ */
4930
+ _singlePhotoRemoved: function()
4931
+ {
4932
+ var selection = FLBuilder._singlePhotoSelector.state().get('selection'),
4933
+ wrap = $(this).closest('.fl-photo-field'),
4934
+ photoField = wrap.find('input[type=hidden]'),
4935
+ srcSelect = wrap.find('select');
4936
+
4937
+ selection.reset();
4938
+ wrap.addClass('fl-photo-empty');
4939
+ photoField.val('');
4940
+ srcSelect.html('');
4941
+ srcSelect.trigger('change');
4942
+ },
4943
+
4944
  /**
4945
  * Returns the src URL for a photo.
4946
  *
4977
  var html = '',
4978
  size = null,
4979
  selected = null,
4980
+ title = '',
4981
  titles = {
4982
  full : FLBuilderStrings.fullSize,
4983
  large : FLBuilderStrings.large,
4991
  else {
4992
 
4993
  for(size in photo.sizes) {
4994
+
4995
+ if ( 'undefined' != typeof titles[ size ] ) {
4996
+ title = titles[ size ] + ' - ';
4997
+ }
4998
+ else if ( 'undefined' != typeof FLBuilderConfig.customImageSizeTitles[ size ] ) {
4999
+ title = FLBuilderConfig.customImageSizeTitles[ size ] + ' - ';
5000
+ }
5001
+ else {
5002
+ title = '';
5003
+ }
5004
+
5005
  selected = size == 'full' ? ' selected="selected"' : '';
5006
+ html += '<option value="' + photo.sizes[size].url + '"' + selected + '>' + title + photo.sizes[size].width + ' x ' + photo.sizes[size].height + '</option>';
5007
  }
5008
  }
5009
 
5657
  $('.fl-loop-builder-filter').hide();
5658
  $('.fl-loop-builder-' + val + '-filter').show();
5659
  },
5660
+
5661
+ /* Text Fields - Add Value Selector
5662
+ ----------------------------------------------------------*/
5663
+
5664
+ /**
5665
+ * Callback for when "add value" selectors for text fields changes.
5666
+ *
5667
+ * @since 1.6.5
5668
+ * @access private
5669
+ * @method _textFieldAddValueSelectChange
5670
+ */
5671
+ _textFieldAddValueSelectChange: function()
5672
+ {
5673
+
5674
+ var dropdown = $( this ),
5675
+ textField = $( 'input[name="' + dropdown.data( 'target' ) + '"]' ),
5676
+ currentValue = textField.val(),
5677
+ addingValue = dropdown.val();
5678
+
5679
+ // Adding selected value to target text field only once
5680
+
5681
+ if ( -1 == currentValue.indexOf( addingValue ) ) {
5682
+
5683
+ textField
5684
+ .attr( 'value', ( currentValue.trim() + ' ' + addingValue.trim() ) );
5685
+
5686
+ }
5687
+
5688
+ // Resetting the selector
5689
+
5690
+ dropdown
5691
+ .val( '' );
5692
+
5693
+ },
5694
 
5695
  /* AJAX
5696
  ----------------------------------------------------------*/
js/fl-color-picker.js CHANGED
@@ -1,30 +1,32 @@
1
- /*! Iris Color Picker - v1.0.7 - 2014-11-28
2
- * https://github.com/Automattic/Iris
3
- * Copyright (c) 2014 Matt Wiebe; Licensed GPLv2 */
4
-
 
 
 
 
 
 
 
5
  var FLBuilderColorPicker;
6
 
7
- (function( $, undef ){
8
-
9
- // global variable to store color presets
10
- var FLBuilderColorPresets = [];
11
- var nonGradientIE, gradientType, vendorPrefixes, UA, isIE, IEVersion;
12
 
13
- // Even IE9 doesn't support gradients. Elaborate sigh.
14
- UA = navigator.userAgent.toLowerCase();
15
- isIE = navigator.appName === 'Microsoft Internet Explorer';
16
- IEVersion = isIE ? parseFloat( UA.match( /msie ([0-9]{1,}[\.0-9]{0,})/ )[1] ) : 0;
17
- nonGradientIE = ( isIE && IEVersion < 10 );
18
- gradientType = false;
19
- // we don't bother with an unprefixed version, as it has a different syntax
20
- vendorPrefixes = [ '-moz-', '-webkit-', '-o-', '-ms-' ];
21
 
22
  /**
23
  * Run some tests to check if the current browser supports CSS3 gradients.
24
  * Sets gradientType accordingly.
25
  *
26
  * @since 1.6.4
27
- * @return void
28
  */
29
  function testGradientType() {
30
  var el, base,
@@ -34,21 +36,23 @@ var FLBuilderColorPicker;
34
  if ( nonGradientIE ) {
35
  // if yes, set gradientType to filter
36
  gradientType = 'filter';
37
-
38
- } else {
39
 
40
  // if no, runs a quick test to check if the browser supports modern gradient syntax
41
  el = $( '<div id="iris-gradtest" />' );
42
  base = 'linear-gradient(top,#fff,#000)';
 
43
  $.each( vendorPrefixes, function( i, val ){
 
44
  el.css( bgImageString, val + base );
45
 
46
  if ( el.css( bgImageString ).match( 'gradient' ) ) {
47
  gradientType = i;
48
  return false;
49
  }
50
-
51
  });
 
52
  // check for legacy webkit gradient syntax
53
  if ( gradientType === false ) {
54
  el.css( 'background', '-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))' );
@@ -58,33 +62,42 @@ var FLBuilderColorPicker;
58
  }
59
 
60
  }
 
61
  el.remove();
62
  }
63
-
64
  }
65
 
66
  /**
67
- * Only for CSS3 gradients. oldIE will use a separate function.
68
- *
69
- * Accepts as many color stops as necessary from 2nd arg on, or 2nd
70
- * arg can be an array of color stops
71
- *
72
- * @param {string} origin Gradient origin - top or left, defaults to left.
73
- * @return {string} Appropriate CSS3 gradient string for use in
74
- */
 
 
75
  function createGradient( origin, stops ) {
76
- origin = ( origin === 'top' ) ? 'top' : 'left';
77
- stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 );
 
78
  if ( gradientType === 'webkit' ) {
79
  return legacyWebkitGradient( origin, stops );
80
- } else {
 
81
  return vendorPrefixes[ gradientType ] + 'linear-gradient(' + origin + ', ' + stops.join(', ') + ')';
82
  }
83
  }
84
 
85
  /**
86
- * Stupid gradients for a stupid browser.
87
- */
 
 
 
 
 
88
  function stupidIEGradient( origin, stops ) {
89
  var type, self, lastIndex, filter, startPosProp, endPosProp, dimensionProp, template, html;
90
 
@@ -101,13 +114,16 @@ var FLBuilderColorPicker;
101
  dimensionProp = ( type === 1 ) ? 'height' : 'width';
102
  template = '<div class="iris-ie-gradient-shim" style="position:absolute;' + dimensionProp + ':100%;' + startPosProp + ':%start%;' + endPosProp + ':%end%;' + filter + ':%filter%;" data-color:"%color%"></div>';
103
  html = '';
 
104
  // need a positioning context
105
  if ( self.css('position') === 'static' ) {
106
  self.css( {position: 'relative' } );
107
  }
108
 
109
  stops = fillColorStops( stops );
 
110
  $.each(stops, function( i, startColor ) {
 
111
  var endColor, endStop, filterVal;
112
 
113
  // we want two at a time. if we're on the last pair, bail.
@@ -116,6 +132,7 @@ var FLBuilderColorPicker;
116
  }
117
 
118
  endColor = stops[ i + 1 ];
 
119
  //if our pairs are at the same color stop, moving along.
120
  if ( startColor.stop === endColor.stop ) {
121
  return;
@@ -124,10 +141,10 @@ var FLBuilderColorPicker;
124
  endStop = 100 - parseFloat( endColor.stop ) + '%';
125
  startColor.octoHex = new Color( startColor.color ).toIEOctoHex();
126
  endColor.octoHex = new Color( endColor.color ).toIEOctoHex();
127
-
128
  filterVal = 'progid:DXImageTransform.Microsoft.Gradient(GradientType=' + type + ', StartColorStr=\'' + startColor.octoHex + '\', EndColorStr=\'' + endColor.octoHex + '\')';
129
  html += template.replace( '%start%', startColor.stop ).replace( '%end%', endStop ).replace( '%filter%', filterVal );
130
  });
 
131
  self.find( '.iris-ie-gradient-shim' ).remove();
132
  $( html ).prependTo( self );
133
  }
@@ -137,20 +154,30 @@ var FLBuilderColorPicker;
137
  *
138
  * @see fillColorStops
139
  * @since 1.6.4
 
140
  * @param {String} origin Where the gradient starts.
141
- * @param {type} colorList [description]
142
  * @return {String} The correct CSS gradient syntax.
143
  */
144
  function legacyWebkitGradient( origin, colorList ) {
145
  var stops = [];
 
146
  origin = ( origin === 'top' ) ? '0% 0%,0% 100%,' : '0% 100%,100% 100%,';
147
  colorList = fillColorStops( colorList );
 
148
  $.each( colorList, function( i, val ){
149
  stops.push( 'color-stop(' + ( parseFloat( val.stop ) / 100 ) + ', ' + val.color + ')' );
150
  });
 
151
  return '-webkit-gradient(linear,' + origin + stops.join(',') + ')';
152
  };
153
 
 
 
 
 
 
 
154
  function fillColorStops( colorList ) {
155
  var colors = [],
156
  percs = [],
@@ -184,9 +211,16 @@ var FLBuilderColorPicker;
184
  $.each( percs, function( i ){
185
  newColorList[i] = { color: colors[i], stop: percs[i] };
186
  });
 
187
  return newColorList;
188
  }
189
 
 
 
 
 
 
 
190
  function backFillColorStops( stops ) {
191
  var first = 0,
192
  last = stops.length - 1,
@@ -200,6 +234,7 @@ var FLBuilderColorPicker;
200
  if ( stops.length <= 2 || $.inArray( false, stops ) < 0 ) {
201
  return stops;
202
  }
 
203
  while ( i < stops.length - 1 ) {
204
  if ( ! foundFirst && stops[i] === false ) {
205
  first = i - 1;
@@ -210,19 +245,27 @@ var FLBuilderColorPicker;
210
  }
211
  i++;
212
  }
 
213
  steps = last - first;
214
  firstVal = parseInt( stops[first].replace('%'), 10 );
215
  incr = ( parseFloat( stops[last].replace('%') ) - firstVal ) / steps;
216
  i = first + 1;
217
  step = 1;
 
218
  while ( i < last ) {
219
  stops[i] = ( firstVal + ( step * incr ) ) + '%';
220
  step++;
221
  i++;
222
  }
 
223
  return backFillColorStops( stops );
224
  }
225
 
 
 
 
 
 
226
  $.fn.gradient = function() {
227
  var args = arguments;
228
 
@@ -237,6 +280,11 @@ var FLBuilderColorPicker;
237
  });
238
  };
239
 
 
 
 
 
 
240
  $.fn.raninbowGradient = function( origin, args ) {
241
  var opts, template, i, steps;
242
 
@@ -245,19 +293,22 @@ var FLBuilderColorPicker;
245
  template = 'hsl(%h%,' + opts.s + '%,' + opts.l + '%)';
246
  i = 0;
247
  steps = [];
 
248
  while ( i <= 360 ) {
249
  steps.push( template.replace('%h%', i) );
250
  i += 30;
251
  }
 
252
  return this.each(function() {
253
  $(this).gradient( origin, steps );
254
  });
255
  };
256
 
257
  /**
258
- * Helper class for Color Picker.
259
  *
260
  * @class FLBuilderColorPicker
 
261
  * @since 1.6.4
262
  */
263
  FLBuilderColorPicker = function( settings )
@@ -302,6 +353,12 @@ var FLBuilderColorPicker;
302
 
303
  };
304
 
 
 
 
 
 
 
305
  FLBuilderColorPicker.prototype = {
306
 
307
  /**
@@ -319,18 +376,51 @@ var FLBuilderColorPicker;
319
  * @property {String} _color
320
  */
321
  _color : '',
 
 
 
 
 
 
 
322
  _currentElement : '',
 
 
 
 
 
 
 
323
  _inited : false,
 
 
 
 
 
 
 
324
  _defaultHSLControls : {
325
  horiz : 's',
326
  vert : 'l',
327
  strip : 'h'
328
  },
 
 
 
 
 
 
 
329
  _defaultHSVControls : {
330
  horiz : 'h',
331
  vert : 'v',
332
  strip : 's'
333
  },
 
 
 
 
 
334
  _scale : {
335
  h: 360,
336
  s: 100,
@@ -338,6 +428,12 @@ var FLBuilderColorPicker;
338
  v: 100
339
  },
340
 
 
 
 
 
 
 
341
  _init: function(){
342
 
343
  var self = this,
@@ -399,7 +495,7 @@ var FLBuilderColorPicker;
399
  // cache reference to the picker wrapper
400
  this._ui = $( '.fl-color-picker-ui' );
401
  this._iris = $( '.iris-picker' );
402
- this._wrapper = $('.fl-lightbox-content-wrap');
403
 
404
  if( !$('html').hasClass( 'fl-color-picker-init' ) ){
405
  this._ui
@@ -424,19 +520,22 @@ var FLBuilderColorPicker;
424
  // bind picker control events
425
  this._pickerControls();
426
 
427
- if( !$('html').hasClass( 'fl-color-picker-init' ) ){
428
- // bind presets control events
429
- this._presetsControls();
430
- }
431
 
432
  // now we know that the picker is already added to the body
433
  $('html').addClass( 'fl-color-picker-init' );
434
 
435
  },
436
 
 
 
 
 
437
  _prepareColorFields: function(){
438
 
439
  var self = this;
 
440
  // append presets initial html and trigger that toggles the picker
441
  $('.fl-color-picker-value').each( function(){
442
 
@@ -447,23 +546,14 @@ var FLBuilderColorPicker;
447
  // set initial color
448
  $colorTrigger.css({ backgroundColor: '#' + $this.val().toString() });
449
  }
450
-
451
  });
452
-
453
- $('.fl-lightbox-content-wrap').on( 'click', '.fl-color-picker-color', function(){
454
- var val = $( this ).next('.fl-color-picker-value').val();
455
- self._color = new Color( val ).setHSpace( self.options.mode );
456
- self.options.color = self._color.toString();
457
- self._setColor( val );
458
- } );
459
-
460
  },
461
 
462
  /**
463
  * Sets templates to build the color picker markup.
464
  *
465
  * @since 1.6.4
466
- * @return void
467
  */
468
  _setTemplates: function(){
469
 
@@ -484,6 +574,13 @@ var FLBuilderColorPicker;
484
 
485
  },
486
 
 
 
 
 
 
 
 
487
  _has: function( needle, haystack ) {
488
  var ret = false;
489
  $.each( haystack, function( i, v ){
@@ -501,7 +598,7 @@ var FLBuilderColorPicker;
501
  *
502
  * @see _addPresetView
503
  * @since 1.6.4
504
- * @return void
505
  */
506
  _buildUI: function(){
507
  var self = this;
@@ -551,7 +648,7 @@ var FLBuilderColorPicker;
551
  * Shows a visual feedback when a color is added as a preset.
552
  *
553
  * @since 1.6.4
554
- * @return void
555
  */
556
  _addPresetFeedback: function(){
557
 
@@ -571,47 +668,46 @@ var FLBuilderColorPicker;
571
  * Sets some triggers for positioning logic of the picker and color reset.
572
  *
573
  * @since 1.6.4
574
- * @return void
575
  */
576
  _pickerControls: function(){
577
  var self = this;
578
 
579
  // logic for picker positioning
580
- this._wrapper.on( 'click', '.fl-color-picker-color', function(){
581
- var $this = $(this);
582
- self._currentElement = $this.parent().find('.fl-color-picker-value');
583
-
584
- self._ui.position({
585
- my: 'left top',
586
- at: 'left bottom',
587
- of: $this,
588
- collision: 'flipfit',
589
- using: function( position, feedback ){
590
- self._togglePicker( position );
591
- }
592
- })
593
-
594
- } );
595
-
596
- this._wrapper.on( 'click', '.fl-color-picker-clear', function(){
597
- var $this = $(this);
598
- self._currentElement = $this.parent().find('.fl-color-picker-value');
599
 
600
- $this
601
- .prev( '.fl-color-picker-color' )
602
- .css({ backgroundColor: 'transparent' })
603
- .addClass('fl-color-picker-empty');
604
 
605
- self._setColor( '' );
606
- self.element.val( '' );
607
- self._currentElement
608
- .val( '' )
609
- .trigger( 'change' );
610
- } );
611
 
612
  // logic to hide picker when the user clicks outside it
613
  $( document ).on( 'click', function( event ) {
614
-
615
  if ( 0 === $( event.target ).closest( '.fl-color-picker-ui' ).length ) {
616
  $( '.fl-color-picker-ui.fl-color-picker-active' ).removeClass( 'fl-color-picker-active' );
617
  }
@@ -625,7 +721,7 @@ var FLBuilderColorPicker;
625
  * @see _addPreset
626
  * @see _removePreset
627
  * @since 1.6.4
628
- * @return void
629
  */
630
  _presetsControls: function(){
631
  var self = this,
@@ -636,9 +732,11 @@ var FLBuilderColorPicker;
636
  presetsList = presets.find( '.fl-color-picker-presets-list' );
637
 
638
  // add preset
639
- addPreset.on( 'click', function(){
640
- self._addPreset( self.element.val() );
641
- } );
 
 
642
 
643
  // presets toggle
644
  presetsList
@@ -646,16 +744,16 @@ var FLBuilderColorPicker;
646
  .hide();
647
 
648
  presets
 
649
  .on( 'click', '.fl-color-picker-presets-toggle', function(){
650
-
651
  presetsOpenLabel.toggleClass('fl-color-picker-active');
652
  presetsCloseLabel.toggleClass('fl-color-picker-active');
653
-
654
  presetsList.slideToggle( 500 );
655
  } )
656
  // set preset as current color
657
  .on( 'click', '.fl-color-picker-preset', function( e ){
658
  var currentColor = new Color( $( this ).data( 'color' ).toString() );
 
659
  self._setColor( currentColor );
660
  self._currentElement
661
  .parent()
@@ -665,22 +763,21 @@ var FLBuilderColorPicker;
665
 
666
  presetsOpenLabel.toggleClass('fl-color-picker-active');
667
  presetsCloseLabel.toggleClass('fl-color-picker-active');
668
-
669
  presetsList.slideToggle( 500 );
670
- } )
671
  // removes a preset
672
  .on( 'click', '.fl-color-picker-preset-remove', function( e ){
673
  e.stopPropagation();
674
  self._removePreset( $( this ).parent().data( 'color' ) );
675
  });
676
-
677
  },
678
 
679
  /**
680
  * Removes a color preset from the array of presets and from the UI.
681
  *
682
- * @param {string} preset The respective hex value of the preset.
683
- * @return void
 
684
  */
685
  _removePreset: function( preset ){
686
  if( confirm( this.options.labels.removePresetConfirm ) ){
@@ -714,9 +811,9 @@ var FLBuilderColorPicker;
714
  *
715
  * @see _addPresetView
716
  * @see _addPresetFeedback
717
- * @param {string} preset The respective hex value of the preset.
 
718
  * @since 1.6.4
719
- * @return void
720
  */
721
  _addPreset: function( preset ){
722
  var color = preset.toString().replace( /^#/, '' );
@@ -744,10 +841,9 @@ var FLBuilderColorPicker;
744
  /**
745
  * Logic for positioning of the color picker.
746
  *
747
- *
748
- * @param {Object} position An object containing x and y location for positioning.
749
- * @since 1.6.4
750
- * @return void
751
  */
752
  _togglePicker: function( position ){
753
  var self = this;
@@ -778,6 +874,10 @@ var FLBuilderColorPicker;
778
 
779
  },
780
 
 
 
 
 
781
  _paint: function() {
782
  var self = this;
783
  self._paintDimension( 'right', 'strip' );
@@ -785,6 +885,12 @@ var FLBuilderColorPicker;
785
  self._paintDimension( 'left', 'horiz' );
786
  },
787
 
 
 
 
 
 
 
788
  _paintDimension: function( origin, control ) {
789
  var self = this,
790
  c = self._color,
@@ -866,6 +972,11 @@ var FLBuilderColorPicker;
866
  }
867
  },
868
 
 
 
 
 
 
869
  _getHSpaceColor: function() {
870
  return ( this.options.mode === 'hsv' ) ? this._color.toHsv() : this._color.toHsl();
871
  },
@@ -874,8 +985,9 @@ var FLBuilderColorPicker;
874
  * Logic to listen to events from the main color input and to bind it to the current color field.
875
  *
876
  * @see _setColor
877
- * @since 1.6.4
878
- * @return void
 
879
  */
880
  _addInputListeners: function( input ) {
881
  var self = this,
@@ -937,14 +1049,12 @@ var FLBuilderColorPicker;
937
 
938
  input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
939
 
940
- // If we initialized hidden, show on first focus. The rest is up to you.
941
- if ( self.options.hide ) {
942
- input.one( 'focus', function() {
943
- self.show();
944
- });
945
- }
946
  },
947
 
 
 
 
 
948
  _initControls: function() {
949
  var self = this,
950
  controls = self.controls,
@@ -1043,13 +1153,14 @@ var FLBuilderColorPicker;
1043
  event.target = self.controls.squareDrag.get(0);
1044
  self.controls.squareDrag.css( pos ).trigger( event );
1045
  });
1046
-
1047
- // palettes
1048
- if ( self.options.palettes ) {
1049
- self._paletteListeners();
1050
- }
1051
  },
1052
 
 
 
 
 
 
 
1053
  _squareDrag: function( event, ui ) {
1054
  var self = this,
1055
  controlOpts = self.options.controls,
@@ -1063,6 +1174,11 @@ var FLBuilderColorPicker;
1063
  self._change.apply( self, arguments );
1064
  },
1065
 
 
 
 
 
 
1066
  _setColor: function( value ) {
1067
  var self = this,
1068
  oldValue = self.options.color,
@@ -1085,9 +1201,14 @@ var FLBuilderColorPicker;
1085
  self.active = 'external';
1086
  self._change();
1087
  }
1088
-
1089
  },
1090