WordPress Page Builder – Beaver Builder - Version 1.5.3

Version Description

Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.3

changelog.txt CHANGED
@@ -1,3 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>1.5.0 - 03/02/2015</h4>
2
  <p><strong>Enhancements</strong></p>
3
  <ul>
1
+ <h4>1.5.3 - 03/31/2015</h4>
2
+ <p><strong>Enhancements</strong></p>
3
+ <ul>
4
+ <li>Added admin settings section for clearing the builder's CSS and JavaScript cache.</li>
5
+ <li>Added a setting to show the full content in the posts module.</li>
6
+ </ul>
7
+ <p><strong>Bug Fixes</strong></p>
8
+ <ul>
9
+ <li>CSS fix for three column layouts in the WooCommerce module.</li>
10
+ <li>Fixed a preview bug with row background overlay colors.</li>
11
+ <li>Fixed an issue with the PHP glob function not returning an array on some systems.</li>
12
+ <li>Fixed CSS conflicts with third party themes and the WordPress editor.</li>
13
+ </ul>
14
+
15
+ <h4>1.5.2 - 03/24/2015</h4>
16
+ <p><strong>Enhancements</strong></p>
17
+ <ul>
18
+ <li>Added logic to the accordion module that scrolls a section into view on mobile if it's not visible.</li>
19
+ </ul>
20
+ <p><strong>Bug Fixes</strong></p>
21
+ <ul>
22
+ <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>
23
+ <li>Icons in accordion titles don't get replaced anymore when clicked.</li>
24
+ <li>Fixed an unescaped translation string JavaScript bug.</li>
25
+ </ul>
26
+
27
+ <h4>1.5.1 - 03/22/2015</h4>
28
+ <p><strong>Enhancements</strong></p>
29
+ <ul>
30
+ <li>Added German translation.</li>
31
+ <li>Added Russian translation.</li>
32
+ <li>Smooth scrolling now works for all links on a page including links in the header on third party themes.</li>
33
+ <li>Added phone and subject fields to the contact form module.</li>
34
+ <li>Added settings to the contact form module for showing and hiding fields.</li>
35
+ <li>Builder cache now clears itself if the domain name of a website changes.</li>
36
+ <li>Modules in the backend are now categorized the same as they are on the frontend.</li>
37
+ <li>Moved column width from the style attribute in the markup to the generated css file.</li>
38
+ </ul>
39
+ <p><strong>Bug Fixes</strong></p>
40
+ <ul>
41
+ <li>Fixed a bug with text editor refresh previews.</li>
42
+ <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>
43
+ <li>Fixed bugs with setting the product order in the WooCommerce module.</li>
44
+ <li>CSS fix for row/column colors overriding the color of elements in the heading module such as em tags.</li>
45
+ <li>Added ignore_sticky_posts to post module queries to prevent sticky posts from showing when not desired.</li>
46
+ <li>Smooth scrolling is only applied to rows, columns and modules to avoid conflicts with third party scripts.</li>
47
+ <li>Autosuggest fields such as links now work on pre WordPress 4.0.</li>
48
+ </ul>
49
+
50
  <h4>1.5.0 - 03/02/2015</h4>
51
  <p><strong>Enhancements</strong></p>
52
  <ul>
classes/class-fl-builder-admin-settings.php CHANGED
@@ -150,6 +150,10 @@ final class FLBuilderAdminSettings {
150
  'title' => __( 'Help Button', 'fl-builder' ),
151
  'show' => self::has_support( 'help-button' ) && ( is_network_admin() || ! self::multisite_support() )
152
  ),
 
 
 
 
153
  'uninstall' => array(
154
  'title' => __( 'Uninstall', 'fl-builder' ),
155
  'show' => is_network_admin() || ! self::multisite_support()
@@ -199,6 +203,9 @@ final class FLBuilderAdminSettings {
199
  // Help Button
200
  self::render_form( 'help-button' );
201
 
 
 
 
202
  // Uninstall
203
  self::render_form( 'uninstall' );
204
  }
@@ -280,6 +287,7 @@ final class FLBuilderAdminSettings {
280
  self::save_editing_capability();
281
  self::save_branding();
282
  self::save_help_button();
 
283
  self::uninstall();
284
  }
285
 
@@ -595,6 +603,50 @@ final class FLBuilderAdminSettings {
595
  }
596
  }
597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  /**
599
  * @method uninstall
600
  * @private
150
  'title' => __( 'Help Button', 'fl-builder' ),
151
  'show' => self::has_support( 'help-button' ) && ( is_network_admin() || ! self::multisite_support() )
152
  ),
153
+ 'cache' => array(
154
+ 'title' => __( 'Cache', 'fl-builder' ),
155
+ 'show' => true
156
+ ),
157
  'uninstall' => array(
158
  'title' => __( 'Uninstall', 'fl-builder' ),
159
  'show' => is_network_admin() || ! self::multisite_support()
203
  // Help Button
204
  self::render_form( 'help-button' );
205
 
206
+ // Cache
207
+ self::render_form( 'cache' );
208
+
209
  // Uninstall
210
  self::render_form( 'uninstall' );
211
  }
287
  self::save_editing_capability();
288
  self::save_branding();
289
  self::save_help_button();
290
+ self::clear_cache();
291
  self::uninstall();
292
  }
293
 
603
  }
604
  }
605
 
606
+ /**
607
+ * @method clear_cache
608
+ * @private
609
+ */
610
+ static private function clear_cache()
611
+ {
612
+ if ( ! current_user_can( 'delete_plugins' ) ) {
613
+ return;
614
+ }
615
+ else if ( isset( $_POST['fl-cache-nonce'] ) && wp_verify_nonce( $_POST['fl-cache-nonce'], 'cache' ) ) {
616
+ if ( is_network_admin() ) {
617
+ self::clear_cache_for_all_sites();
618
+ }
619
+ else {
620
+ FLBuilderModel::delete_all_asset_cache();
621
+ }
622
+ }
623
+ }
624
+
625
+ /**
626
+ * @method clear_cache_for_all_sites
627
+ * @private
628
+ */
629
+ static private function clear_cache_for_all_sites()
630
+ {
631
+ global $blog_id;
632
+ global $wpdb;
633
+
634
+ // Save the original blog id.
635
+ $original_blog_id = $blog_id;
636
+
637
+ // Get all blog ids.
638
+ $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
639
+
640
+ // Loop through the blog ids and clear the cache.
641
+ foreach ( $blog_ids as $id ) {
642
+ switch_to_blog( $id );
643
+ FLBuilderModel::delete_all_asset_cache();
644
+ }
645
+
646
+ // Revert to the original blog.
647
+ switch_to_blog( $original_blog_id );
648
+ }
649
+
650
  /**
651
  * @method uninstall
652
  * @private
classes/class-fl-builder-auto-suggest.php CHANGED
@@ -71,6 +71,25 @@ final class FLBuilderAutoSuggest {
71
  return isset($data) ? json_encode($data) : '';
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * @method posts
76
  */
@@ -79,7 +98,7 @@ final class FLBuilderAutoSuggest {
79
  global $wpdb;
80
 
81
  $data = array();
82
- $like = esc_sql($wpdb->esc_like(urldecode($_REQUEST['fl_as_query'])));
83
  $type = esc_sql($_REQUEST['fl_as_action_data']);
84
 
85
  $posts = $wpdb->get_results("
@@ -166,7 +185,7 @@ final class FLBuilderAutoSuggest {
166
  global $wpdb;
167
 
168
  $data = array();
169
- $like = esc_sql($wpdb->esc_like(urldecode($_REQUEST['fl_as_query'])));
170
  $users = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE user_login LIKE '%{$like}%'");
171
 
172
  foreach($users as $user) {
@@ -205,10 +224,10 @@ final class FLBuilderAutoSuggest {
205
  global $wpdb;
206
 
207
  $data = array();
208
- $like = esc_sql($wpdb->esc_like(urldecode($_REQUEST['fl_as_query'])));
209
  $types = FLBuilderLoop::post_types();
210
  $slugs = array();
211
-
212
  foreach($types as $slug => $type) {
213
  $slugs[] = esc_sql($slug);
214
  }
71
  return isset($data) ? json_encode($data) : '';
72
  }
73
 
74
+ /**
75
+ * @method get_like
76
+ */
77
+ static public function get_like()
78
+ {
79
+ global $wpdb;
80
+
81
+ $like = urldecode( $_REQUEST['fl_as_query'] );
82
+
83
+ if ( method_exists( $wpdb, 'esc_like' ) ) {
84
+ $like = esc_sql( $wpdb->esc_like( $like ) );
85
+ }
86
+ else {
87
+ $like = like_escape( esc_sql( $like ) );
88
+ }
89
+
90
+ return $like;
91
+ }
92
+
93
  /**
94
  * @method posts
95
  */
98
  global $wpdb;
99
 
100
  $data = array();
101
+ $like = self::get_like();
102
  $type = esc_sql($_REQUEST['fl_as_action_data']);
103
 
104
  $posts = $wpdb->get_results("
185
  global $wpdb;
186
 
187
  $data = array();
188
+ $like = self::get_like();
189
  $users = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE user_login LIKE '%{$like}%'");
190
 
191
  foreach($users as $user) {
224
  global $wpdb;
225
 
226
  $data = array();
227
+ $like = self::get_like();
228
  $types = FLBuilderLoop::post_types();
229
  $slugs = array();
230
+
231
  foreach($types as $slug => $type) {
232
  $slugs[] = esc_sql($slug);
233
  }
classes/class-fl-builder-loop.php CHANGED
@@ -20,13 +20,14 @@ final class FLBuilderLoop {
20
  $users = empty($settings->users) ? '' : $settings->users;
21
 
22
  $args = array(
23
- 'paged' => is_front_page() ? get_query_var('page') : get_query_var('paged'),
24
- 'posts_per_page' => $posts_per_page,
25
- 'post_type' => $post_type,
26
- 'orderby' => $order_by,
27
- 'order' => $order,
28
- 'author' => $users,
29
- 'tax_query' => array('relation' => 'AND')
 
30
  );
31
 
32
  // Build the taxonomy query.
20
  $users = empty($settings->users) ? '' : $settings->users;
21
 
22
  $args = array(
23
+ 'paged' => is_front_page() ? get_query_var('page') : get_query_var('paged'),
24
+ 'posts_per_page' => $posts_per_page,
25
+ 'post_type' => $post_type,
26
+ 'orderby' => $order_by,
27
+ 'order' => $order,
28
+ 'author' => $users,
29
+ 'tax_query' => array('relation' => 'AND'),
30
+ 'ignore_sticky_posts' => true
31
  );
32
 
33
  // Build the taxonomy query.
classes/class-fl-builder-model.php CHANGED
@@ -583,10 +583,19 @@ final class FLBuilderModel {
583
  $cache_dir = self::get_cache_dir();
584
 
585
  if($post_id == null) {
586
- array_map('unlink', glob($cache_dir['path'] . '*.css'));
587
- array_map('unlink', glob($cache_dir['path'] . '*.js'));
 
 
 
 
 
 
 
 
588
  }
589
  else {
 
590
  $css = $cache_dir['path'] . $post_id . '-layout.css';
591
  $css_draft = $cache_dir['path'] . $post_id . '-layout-draft.css';
592
  $css_preview = $cache_dir['path'] . $post_id . '-layout-preview.css';
@@ -615,6 +624,25 @@ final class FLBuilderModel {
615
  }
616
  }
617
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
618
  /**
619
  * @method generate_node_id
620
  */
@@ -1435,7 +1463,7 @@ final class FLBuilderModel {
1435
  /**
1436
  * @method get_categorized_modules
1437
  */
1438
- static public function get_categorized_modules()
1439
  {
1440
  $enabled_modules = self::get_enabled_modules();
1441
 
@@ -1455,7 +1483,7 @@ final class FLBuilderModel {
1455
  // Build the categories array.
1456
  foreach(self::$modules as $module) {
1457
 
1458
- if(!in_array($module->slug, $enabled_modules)) {
1459
  continue;
1460
  }
1461
  else if($module->slug == 'widget') {
@@ -2704,7 +2732,7 @@ final class FLBuilderModel {
2704
  'video' => false,
2705
  'video_embed' => '<iframe width="420" height="315" src="https://www.youtube.com/embed/CNJbH2gaACo" frameborder="0" allowfullscreen></iframe>',
2706
  'knowledge_base' => true,
2707
- 'knowledge_base_url' => 'https://www.wpbeaverbuilder.com/documentation/?utm_source=external&utm_medium=builder&utm_campaign=docs-button',
2708
  'forums' => true,
2709
  'forums_url' => 'https://www.wpbeaverbuilder.com/support/?utm_source=external&utm_medium=builder&utm_campaign=forums-button',
2710
  );
583
  $cache_dir = self::get_cache_dir();
584
 
585
  if($post_id == null) {
586
+
587
+ $css = glob( $cache_dir['path'] . '*.css' );
588
+ $js = glob( $cache_dir['path'] . '*.js' );
589
+
590
+ if ( is_array( $css ) ) {
591
+ array_map( 'unlink', $css );
592
+ }
593
+ if ( is_array( $js ) ) {
594
+ array_map( 'unlink', $js );
595
+ }
596
  }
597
  else {
598
+
599
  $css = $cache_dir['path'] . $post_id . '-layout.css';
600
  $css_draft = $cache_dir['path'] . $post_id . '-layout-draft.css';
601
  $css_preview = $cache_dir['path'] . $post_id . '-layout-preview.css';
624
  }
625
  }
626
 
627
+ /**
628
+ * Delete the asset cache if the domain has changed.
629
+ *
630
+ * @method delete_asset_cache_domain_change
631
+ */
632
+ static public function delete_asset_cache_domain_change()
633
+ {
634
+ $home_url = home_url();
635
+ $saved_url = get_option( '_fl_builder_home_url' );
636
+
637
+ if ( ! $saved_url ) {
638
+ update_option( '_fl_builder_home_url', $home_url );
639
+ }
640
+ else if ( $home_url != $saved_url ) {
641
+ self::delete_all_asset_cache();
642
+ update_option( '_fl_builder_home_url', $home_url );
643
+ }
644
+ }
645
+
646
  /**
647
  * @method generate_node_id
648
  */
1463
  /**
1464
  * @method get_categorized_modules
1465
  */
1466
+ static public function get_categorized_modules( $show_disabled = false )
1467
  {
1468
  $enabled_modules = self::get_enabled_modules();
1469
 
1483
  // Build the categories array.
1484
  foreach(self::$modules as $module) {
1485
 
1486
+ if(!in_array($module->slug, $enabled_modules) && !$show_disabled) {
1487
  continue;
1488
  }
1489
  else if($module->slug == 'widget') {
2732
  'video' => false,
2733
  'video_embed' => '<iframe width="420" height="315" src="https://www.youtube.com/embed/CNJbH2gaACo" frameborder="0" allowfullscreen></iframe>',
2734
  'knowledge_base' => true,
2735
+ 'knowledge_base_url' => 'https://www.wpbeaverbuilder.com/knowledge-base/?utm_source=external&utm_medium=builder&utm_campaign=docs-button',
2736
  'forums' => true,
2737
  'forums_url' => 'https://www.wpbeaverbuilder.com/support/?utm_source=external&utm_medium=builder&utm_campaign=forums-button',
2738
  );
classes/class-fl-builder-update.php CHANGED
@@ -11,33 +11,34 @@ final class FLBuilderUpdate {
11
  static public function init()
12
  {
13
  // Make sure the user is logged in.
14
- if(!is_user_logged_in()) {
15
  return;
16
  }
17
 
18
- // Get the current version.
19
- $version = get_site_option('_fl_builder_version');
20
-
21
- // No version number. This must be a fresh install.
22
- if(!$version) {
23
- update_site_option('_fl_builder_version', FL_BUILDER_VERSION);
24
  return;
25
  }
26
 
27
- // Don't update for dev copies.
28
- else if(FL_BUILDER_VERSION == '{FL_BUILDER_VERSION}') {
 
 
 
 
29
  return;
30
  }
31
-
32
  // Only run updates if the version numbers don't match.
33
- else if(!version_compare($version, FL_BUILDER_VERSION, '=')) {
34
 
35
- if(is_multisite()) {
36
- self::run_multisite();
37
  }
38
  else {
39
- self::run();
40
  }
 
 
41
  }
42
  }
43
 
@@ -45,35 +46,27 @@ final class FLBuilderUpdate {
45
  * @method run
46
  * @private
47
  */
48
- static private function run()
49
  {
50
- // Get the current version.
51
- $version = get_site_option('_fl_builder_version');
52
-
53
  // Update to 1.2.8 or greater.
54
- if(version_compare($version, '1.2.8', '<')) {
55
  self::v_1_2_8();
56
  }
57
 
58
  // Update to 1.4.6 or greater.
59
- if(version_compare($version, '1.4.6', '<')) {
60
  self::v_1_4_6();
61
  }
62
 
63
  // Clear all asset cache.
64
  FLBuilderModel::delete_all_asset_cache();
65
-
66
- // Update the version number.
67
- if(!is_multisite()) {
68
- update_site_option('_fl_builder_version', FL_BUILDER_VERSION);
69
- }
70
  }
71
 
72
  /**
73
  * @method run_multisite
74
  * @private
75
  */
76
- static private function run_multisite()
77
  {
78
  global $blog_id;
79
  global $wpdb;
@@ -82,19 +75,16 @@ final class FLBuilderUpdate {
82
  $original_blog_id = $blog_id;
83
 
84
  // Get all blog ids.
85
- $blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
86
 
87
  // Loop through the blog ids and run the update.
88
- foreach($blog_ids as $id) {
89
- switch_to_blog($id);
90
- self::run();
91
  }
92
 
93
  // Revert to the original blog.
94
- switch_to_blog($original_blog_id);
95
-
96
- // Update the version number.
97
- update_site_option('_fl_builder_version', FL_BUILDER_VERSION);
98
  }
99
 
100
  /**
@@ -267,8 +257,15 @@ final class FLBuilderUpdate {
267
  self::v_1_2_8_convert_global_settings();
268
 
269
  // Delete all asset cache.
270
- array_map('unlink', glob($cache_dir['path'] . '*.css'));
271
- array_map('unlink', glob($cache_dir['path'] . '*.js'));
 
 
 
 
 
 
 
272
  }
273
  }
274
 
11
  static public function init()
12
  {
13
  // Make sure the user is logged in.
14
+ if ( ! is_user_logged_in() ) {
15
  return;
16
  }
17
 
18
+ // Don't update for dev copies.
19
+ if ( FL_BUILDER_VERSION == '{FL_BUILDER_VERSION}' ) {
 
 
 
 
20
  return;
21
  }
22
 
23
+ // Get the saved version.
24
+ $saved_version = get_site_option( '_fl_builder_version' );
25
+
26
+ // No saved version number. This must be a fresh install.
27
+ if ( ! $saved_version ) {
28
+ update_site_option( '_fl_builder_version', FL_BUILDER_VERSION );
29
  return;
30
  }
 
31
  // Only run updates if the version numbers don't match.
32
+ else if ( ! version_compare( $saved_version, FL_BUILDER_VERSION, '=' ) ) {
33
 
34
+ if ( is_multisite() ) {
35
+ self::run_multisite( $saved_version );
36
  }
37
  else {
38
+ self::run( $saved_version );
39
  }
40
+
41
+ update_site_option( '_fl_builder_version', FL_BUILDER_VERSION );
42
  }
43
  }
44
 
46
  * @method run
47
  * @private
48
  */
49
+ static private function run( $saved_version )
50
  {
 
 
 
51
  // Update to 1.2.8 or greater.
52
+ if ( version_compare( $saved_version, '1.2.8', '<' ) ) {
53
  self::v_1_2_8();
54
  }
55
 
56
  // Update to 1.4.6 or greater.
57
+ if ( version_compare( $saved_version, '1.4.6', '<' ) ) {
58
  self::v_1_4_6();
59
  }
60
 
61
  // Clear all asset cache.
62
  FLBuilderModel::delete_all_asset_cache();
 
 
 
 
 
63
  }
64
 
65
  /**
66
  * @method run_multisite
67
  * @private
68
  */
69
+ static private function run_multisite( $saved_version )
70
  {
71
  global $blog_id;
72
  global $wpdb;
75
  $original_blog_id = $blog_id;
76
 
77
  // Get all blog ids.
78
+ $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
79
 
80
  // Loop through the blog ids and run the update.
81
+ foreach ( $blog_ids as $id ) {
82
+ switch_to_blog( $id );
83
+ self::run( $saved_version );
84
  }
85
 
86
  // Revert to the original blog.
87
+ switch_to_blog( $original_blog_id );
 
 
 
88
  }
89
 
90
  /**
257
  self::v_1_2_8_convert_global_settings();
258
 
259
  // Delete all asset cache.
260
+ $css = glob( $cache_dir['path'] . '*.css' );
261
+ $js = glob( $cache_dir['path'] . '*.js' );
262
+
263
+ if ( is_array( $css ) ) {
264
+ array_map( 'unlink', $css );
265
+ }
266
+ if ( is_array( $js ) ) {
267
+ array_map( 'unlink', $js );
268
+ }
269
  }
270
  }
271
 
classes/class-fl-builder.php CHANGED
@@ -903,24 +903,30 @@ final class FLBuilder {
903
  */
904
  static public function render_row_attributes( $row )
905
  {
 
 
 
906
  // ID
907
  if ( ! empty( $row->settings->id ) ) {
908
- echo ' id="' . $row->settings->id . '"';
909
  }
910
 
911
  // Class
912
  echo ' class="fl-row';
913
  echo ' fl-row-' . $row->settings->width . '-width';
914
  echo ' fl-row-bg-' . $row->settings->bg_type;
915
- echo ' fl-node-' . $row->node;
916
 
917
- if ( ! empty( $row->settings->class ) ) {
918
- echo apply_filters( 'fl_builder_row_custom_class', ' ' . $row->settings->class, $row );
919
  }
920
  if ( ! empty( $row->settings->responsive_display ) ) {
921
  echo ' fl-visible-' . $row->settings->responsive_display;
922
  }
 
 
 
923
 
 
924
  echo '"';
925
 
926
  // Data
@@ -1040,9 +1046,11 @@ final class FLBuilder {
1040
  */
1041
  static public function render_column_attributes( $col )
1042
  {
 
 
1043
  // ID
1044
  if ( ! empty( $col->settings->id ) ) {
1045
- echo ' id="' . $col->settings->id . '"';
1046
  }
1047
 
1048
  // Class
@@ -1051,16 +1059,14 @@ final class FLBuilder {
1051
  if ( $col->settings->size <= 50 ) {
1052
  echo ' fl-col-small';
1053
  }
1054
-
1055
- echo ' fl-node-' . $col->node;
1056
-
1057
- if ( ! empty( $col->settings->class ) ) {
1058
- echo apply_filters( 'fl_builder_column_custom_class', ' ' . $col->settings->class, $col );
1059
- }
1060
  if ( ! empty( $col->settings->responsive_display ) ) {
1061
  echo ' fl-visible-' . $col->settings->responsive_display;
1062
  }
 
 
 
1063
 
 
1064
  echo '"';
1065
 
1066
  // Width
@@ -1177,26 +1183,28 @@ final class FLBuilder {
1177
  */
1178
  static public function render_module_attributes( $module )
1179
  {
 
 
1180
  // ID
1181
  if ( ! empty( $module->settings->id ) ) {
1182
- echo ' id="' . $module->settings->id . '"';
1183
  }
1184
 
1185
  // Class
1186
  echo ' class="fl-module';
1187
  echo ' fl-module-' . $module->settings->type;
1188
- echo ' fl-node-' . $module->node;
1189
 
1190
- if ( ! empty( $module->settings->class ) ) {
1191
- echo apply_filters( 'fl_builder_module_custom_class', ' ' . $module->settings->class, $module );
1192
- }
1193
  if ( ! empty( $module->settings->responsive_display ) ) {
1194
  echo ' fl-visible-' . $module->settings->responsive_display;
1195
  }
1196
  if ( ! empty( $module->settings->animation ) ) {
1197
  echo ' fl-animation fl-' . $module->settings->animation;
1198
  }
 
 
 
1199
 
 
1200
  echo '"';
1201
 
1202
  // Data
903
  */
904
  static public function render_row_attributes( $row )
905
  {
906
+ $custom_class = apply_filters( 'fl_builder_row_custom_class', $row->settings->class, $row );
907
+ $overlay_bgs = array( 'photo', 'parallax', 'slideshow', 'video' );
908
+
909
  // ID
910
  if ( ! empty( $row->settings->id ) ) {
911
+ echo ' id="' . esc_attr( $row->settings->id ) . '"';
912
  }
913
 
914
  // Class
915
  echo ' class="fl-row';
916
  echo ' fl-row-' . $row->settings->width . '-width';
917
  echo ' fl-row-bg-' . $row->settings->bg_type;
 
918
 
919
+ if ( in_array( $row->settings->bg_type, $overlay_bgs ) && ! empty( $row->settings->bg_overlay_color ) ) {
920
+ echo ' fl-row-bg-overlay';
921
  }
922
  if ( ! empty( $row->settings->responsive_display ) ) {
923
  echo ' fl-visible-' . $row->settings->responsive_display;
924
  }
925
+ if ( ! empty( $custom_class ) ) {
926
+ echo ' ' . trim( esc_attr( $custom_class ) );
927
+ }
928
 
929
+ echo ' fl-node-' . $row->node;
930
  echo '"';
931
 
932
  // Data
1046
  */
1047
  static public function render_column_attributes( $col )
1048
  {
1049
+ $custom_class = apply_filters( 'fl_builder_column_custom_class', $col->settings->class, $col );
1050
+
1051
  // ID
1052
  if ( ! empty( $col->settings->id ) ) {
1053
+ echo ' id="' . esc_attr( $col->settings->id ) . '"';
1054
  }
1055
 
1056
  // Class
1059
  if ( $col->settings->size <= 50 ) {
1060
  echo ' fl-col-small';
1061
  }
 
 
 
 
 
 
1062
  if ( ! empty( $col->settings->responsive_display ) ) {
1063
  echo ' fl-visible-' . $col->settings->responsive_display;
1064
  }
1065
+ if ( ! empty( $custom_class ) ) {
1066
+ echo ' ' . trim( esc_attr( $custom_class ) );
1067
+ }
1068
 
1069
+ echo ' fl-node-' . $col->node;
1070
  echo '"';
1071
 
1072
  // Width
1183
  */
1184
  static public function render_module_attributes( $module )
1185
  {
1186
+ $custom_class = apply_filters( 'fl_builder_module_custom_class', $module->settings->class, $module );
1187
+
1188
  // ID
1189
  if ( ! empty( $module->settings->id ) ) {
1190
+ echo ' id="' . esc_attr( $module->settings->id ) . '"';
1191
  }
1192
 
1193
  // Class
1194
  echo ' class="fl-module';
1195
  echo ' fl-module-' . $module->settings->type;
 
1196
 
 
 
 
1197
  if ( ! empty( $module->settings->responsive_display ) ) {
1198
  echo ' fl-visible-' . $module->settings->responsive_display;
1199
  }
1200
  if ( ! empty( $module->settings->animation ) ) {
1201
  echo ' fl-animation fl-' . $module->settings->animation;
1202
  }
1203
+ if ( ! empty( $custom_class ) ) {
1204
+ echo ' ' . trim( esc_attr( $custom_class ) );
1205
+ }
1206
 
1207
+ echo ' fl-node-' . $module->node;
1208
  echo '"';
1209
 
1210
  // Data
css/fl-builder-layout.css CHANGED
@@ -133,6 +133,25 @@
133
  top: 0;
134
  }
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  /* Modules
137
  ------------------------------------------------------ */
138
 
133
  top: 0;
134
  }
135
 
136
+ /* Bg Overlay */
137
+ .fl-row-bg-overlay .fl-row-content-wrap {
138
+ position: relative;
139
+ }
140
+ .fl-row-bg-overlay .fl-row-content-wrap:after {
141
+ content: '';
142
+ display: block;
143
+ position: absolute;
144
+ top: 0;
145
+ right: 0;
146
+ bottom: 0;
147
+ left: 0;
148
+ z-index: 0;
149
+ }
150
+ .fl-row-bg-overlay .fl-row-content {
151
+ position: relative;
152
+ z-index: 1;
153
+ }
154
+
155
  /* Modules
156
  ------------------------------------------------------ */
157
 
css/fl-builder.css CHANGED
@@ -4,6 +4,9 @@
4
  html.fl-builder-edit {
5
  margin-top: 43px !important;
6
  }
 
 
 
7
  .fl-builder-edit #wpadminbar {
8
  display: none;
9
  }
@@ -996,6 +999,12 @@ form.fl-builder-settings {
996
  }
997
 
998
  /* Text Editors */
 
 
 
 
 
 
999
  .fl-builder-settings .wp-editor-container {
1000
  border: 1px solid #e5e5e5;
1001
  }
@@ -1028,6 +1037,8 @@ form.fl-builder-settings {
1028
  -moz-box-sizing: border-box;
1029
  -webkit-box-sizing: border-box;
1030
  }
 
 
1031
  .fl-builder form#wp-link {
1032
  color: #000;
1033
  font-family: Helvetica, Verdana, sans-serif;
@@ -1355,6 +1366,9 @@ body > .fl-builder-tour-dimmed {
1355
  box-shadow: 0 0 40px rgba(0,0,0,.3);
1356
  color: #666;
1357
  font-size: 13px;
 
 
 
1358
  max-width: none;
1359
  padding: 0;
1360
  width: 300px;
@@ -1369,6 +1383,8 @@ body > .fl-builder-tour-dimmed {
1369
  .popover[class*=tour-] .popover-title {
1370
  border-radius: 0;
1371
  color: #333;
 
 
1372
  }
1373
  .popover[class*=tour-] .fa-times {
1374
  color: #b3b3b3;
4
  html.fl-builder-edit {
5
  margin-top: 43px !important;
6
  }
7
+ .fl-builder-edit body {
8
+ position: static;
9
+ }
10
  .fl-builder-edit #wpadminbar {
11
  display: none;
12
  }
999
  }
1000
 
1001
  /* Text Editors */
1002
+ .fl-builder-settings .wp-switch-editor {
1003
+ background: #ebebeb;
1004
+ border: 1px solid #e5e5e5;
1005
+ border-radius: 0;
1006
+ color: #333;
1007
+ }
1008
  .fl-builder-settings .wp-editor-container {
1009
  border: 1px solid #e5e5e5;
1010
  }
1037
  -moz-box-sizing: border-box;
1038
  -webkit-box-sizing: border-box;
1039
  }
1040
+
1041
+ /* Editor Link Modal */
1042
  .fl-builder form#wp-link {
1043
  color: #000;
1044
  font-family: Helvetica, Verdana, sans-serif;
1366
  box-shadow: 0 0 40px rgba(0,0,0,.3);
1367
  color: #666;
1368
  font-size: 13px;
1369
+ font-family: Helvetica, Verdana, sans-serif;
1370
+ font-weight: normal;
1371
+ line-height: 18px;
1372
  max-width: none;
1373
  padding: 0;
1374
  width: 300px;
1383
  .popover[class*=tour-] .popover-title {
1384
  border-radius: 0;
1385
  color: #333;
1386
+ letter-spacing: normal;
1387
+ text-transform: none;
1388
  }
1389
  .popover[class*=tour-] .fa-times {
1390
  color: #b3b3b3;
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.5.0
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.5.0');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
@@ -52,9 +52,6 @@ add_action('init', 'FLBuilderUpdate:
52
  add_action('init', 'FLBuilderModel::load_settings', 1);
53
  add_action('init', 'FLBuilderModel::load_modules', 2);
54
 
55
- /* Admin AJAX Actions */
56
- add_action('wp_ajax_fl_builder_save', 'FLBuilderModel::update');
57
-
58
  /* Admin AJAX Filters */
59
  add_filter('heartbeat_received', 'FLBuilderModel::lock_post', 10, 2);
60
 
@@ -90,6 +87,7 @@ add_action('fl_ajax_fl_builder_render_new_module_settings', 'FLBuilder::rende
90
  add_action('fl_ajax_fl_builder_render_module_settings', 'FLBuilder::render_module_settings');
91
 
92
  /* Actions */
 
93
  add_action('init', 'FLBuilder::register_templates_post_type');
94
  add_action('send_headers', 'FLBuilder::no_cache_headers');
95
  add_action('wp', 'FLBuilder::ajax');
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.5.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.5.3');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
52
  add_action('init', 'FLBuilderModel::load_settings', 1);
53
  add_action('init', 'FLBuilderModel::load_modules', 2);
54
 
 
 
 
55
  /* Admin AJAX Filters */
56
  add_filter('heartbeat_received', 'FLBuilderModel::lock_post', 10, 2);
57
 
87
  add_action('fl_ajax_fl_builder_render_module_settings', 'FLBuilder::render_module_settings');
88
 
89
  /* Actions */
90
+ add_action('init', 'FLBuilderModel::delete_asset_cache_domain_change');
91
  add_action('init', 'FLBuilder::register_templates_post_type');
92
  add_action('send_headers', 'FLBuilder::no_cache_headers');
93
  add_action('wp', 'FLBuilder::ajax');
includes/admin-settings-cache.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="fl-cache-form" class="fl-settings-form">
2
+
3
+ <h3 class="fl-settings-form-header"><?php _e('Cache', 'fl-builder'); ?></h3>
4
+
5
+ <form id="cache-form" action="<?php FLBuilderAdminSettings::render_form_action( 'cache' ); ?>" method="post">
6
+
7
+ <div class="fl-settings-form-content">
8
+
9
+ <p><?php _e( 'A CSS and JavaScript file is dynamically generated and cached each time you create a new layout. Sometimes the cache needs to be refreshed when you migrate your site to another server or update to the latest version. If you are running into any issues, please try clearing the cache by clicking the button below.', 'fl-builder' ); ?></p>
10
+
11
+ <?php if ( is_network_admin() ) : ?>
12
+ <p><strong><?php _e( 'NOTE:', 'fl-builder' ); ?></strong> <?php _e('This applies to all sites on the network.', 'fl-builder'); ?></p>
13
+ <?php elseif ( ! is_network_admin() && is_multisite() ) : ?>
14
+ <p><strong><?php _e( 'NOTE:', 'fl-builder' ); ?></strong> <?php _e('This only applies to this site. Please visit the Network Admin Settings to clear the cache for all sites on the network.', 'fl-builder'); ?></p>
15
+ <?php endif; ?>
16
+
17
+ </div>
18
+ <p class="submit">
19
+ <input type="submit" name="update" class="button-primary" value="<?php esc_attr_e( 'Clear Cache', 'fl-builder' ); ?>" />
20
+ <?php wp_nonce_field('cache', 'fl-cache-nonce'); ?>
21
+ </p>
22
+ </form>
23
+ </div>
includes/admin-settings-modules.php CHANGED
@@ -16,27 +16,48 @@
16
  <p><?php _e('Check or uncheck modules below to enable or disable them.', 'fl-builder'); ?></p>
17
  <?php
18
 
19
- $enabled_modules = FLBuilderModel::get_enabled_modules();
20
- $checked = in_array('all', $enabled_modules) ? 'checked' : '';
 
21
 
22
  ?>
23
  <label>
24
  <input class="fl-module-all-cb" type="checkbox" name="fl-modules[]" value="all" <?php echo $checked; ?> />
25
  <?php _ex( 'All', 'Plugin setup page: Modules.', 'fl-builder' ); ?>
26
  </label>
27
- <?php
28
-
29
- foreach(FLBuilderModel::$modules as $module) :
30
-
31
- $checked = in_array($module->slug, $enabled_modules) ? 'checked' : '';
32
-
33
- ?>
34
- <p>
35
- <label>
36
- <input class="fl-module-cb" type="checkbox" name="fl-modules[]" value="<?php echo $module->slug; ?>" <?php echo $checked; ?> />
37
- <?php echo $module->name; ?>
38
- </label>
39
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  <?php endforeach; ?>
41
  </div>
42
  <p class="submit">
16
  <p><?php _e('Check or uncheck modules below to enable or disable them.', 'fl-builder'); ?></p>
17
  <?php
18
 
19
+ $categories = FLBuilderModel::get_categorized_modules( true );
20
+ $enabled_modules = FLBuilderModel::get_enabled_modules();
21
+ $checked = in_array('all', $enabled_modules) ? 'checked' : '';
22
 
23
  ?>
24
  <label>
25
  <input class="fl-module-all-cb" type="checkbox" name="fl-modules[]" value="all" <?php echo $checked; ?> />
26
  <?php _ex( 'All', 'Plugin setup page: Modules.', 'fl-builder' ); ?>
27
  </label>
28
+ <?php foreach ( $categories as $title => $modules ) : ?>
29
+ <h3><?php echo $title; ?></h3>
30
+ <?php
31
+
32
+ if ( $title == __( 'WordPress Widgets', 'fl-builder') ) :
33
+
34
+ $checked = in_array('widget', $enabled_modules) ? 'checked' : '';
35
+
36
+ ?>
37
+ <p>
38
+ <label>
39
+ <input class="fl-module-cb" type="checkbox" name="fl-modules[]" value="widget" <?php echo $checked; ?> />
40
+ <?php echo $title; ?>
41
+ </label>
42
+ </p>
43
+ <?php
44
+
45
+ continue;
46
+
47
+ endif;
48
+
49
+ foreach ( $modules as $module ) :
50
+
51
+ $checked = in_array($module->slug, $enabled_modules) ? 'checked' : '';
52
+
53
+ ?>
54
+ <p>
55
+ <label>
56
+ <input class="fl-module-cb" type="checkbox" name="fl-modules[]" value="<?php echo $module->slug; ?>" <?php echo $checked; ?> />
57
+ <?php echo $module->name; ?>
58
+ </label>
59
+ </p>
60
+ <?php endforeach; ?>
61
  <?php endforeach; ?>
62
  </div>
63
  <p class="submit">
includes/column-css.php CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  <?php if(!empty($col->settings->text_color)) : ?>
2
  .fl-node-<?php echo $col->node; ?>,
3
  .fl-node-<?php echo $col->node; ?> * {
1
+ .fl-node-<?php echo $col->node; ?> {
2
+ width: <?php echo $col->settings->size; ?>%;
3
+ }
4
+
5
  <?php if(!empty($col->settings->text_color)) : ?>
6
  .fl-node-<?php echo $col->node; ?>,
7
  .fl-node-<?php echo $col->node; ?> * {
includes/js-config.php CHANGED
@@ -35,7 +35,7 @@ var FLBuilderStrings = {
35
  duplicateTemplate: '<?php esc_attr_e('Duplicate This Template', 'fl-builder'); ?>',
36
  editGlobalSettings: '<?php esc_attr_e('Edit Global Settings', 'fl-builder'); ?>',
37
  emptyMessage: '<?php esc_attr_e('Drop a row layout or module to get started!', 'fl-builder') ?>',
38
- errorMessage: '<?php _e('Beaver Builder caught the following JavaScript error. If Beaver Builder is not functioning as expected the cause is most likely this error. Please help us by disabling all plugins and testing Beaver Builder while reactivating each to determine if the issue is related to a third party plugin.', 'fl-builder') ?>',
39
  fullSize: '<?php esc_attr_e('Full Size', 'fl-builder'); ?>',
40
  getHelp: '<?php esc_attr_e('Get Help', 'fl-builder'); ?>',
41
  gettingStartedVideo: '<?php esc_attr_e('Getting Started Video', 'fl-builder'); ?>',
35
  duplicateTemplate: '<?php esc_attr_e('Duplicate This Template', 'fl-builder'); ?>',
36
  editGlobalSettings: '<?php esc_attr_e('Edit Global Settings', 'fl-builder'); ?>',
37
  emptyMessage: '<?php esc_attr_e('Drop a row layout or module to get started!', 'fl-builder') ?>',
38
+ errorMessage: '<?php esc_attr_e('Beaver Builder caught the following JavaScript error. If Beaver Builder is not functioning as expected the cause is most likely this error. Please help us by disabling all plugins and testing Beaver Builder while reactivating each to determine if the issue is related to a third party plugin.', 'fl-builder') ?>',
39
  fullSize: '<?php esc_attr_e('Full Size', 'fl-builder'); ?>',
40
  getHelp: '<?php esc_attr_e('Get Help', 'fl-builder'); ?>',
41
  gettingStartedVideo: '<?php esc_attr_e('Getting Started Video', 'fl-builder'); ?>',
includes/row-css.php CHANGED
@@ -25,25 +25,10 @@
25
  <?php endif; ?>
26
 
27
  <?php if( in_array( $row->settings->bg_type, array('photo', 'parallax', 'slideshow', 'video') ) && !empty($row->settings->bg_overlay_color)) : ?>
28
- .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap {
29
- position: relative;
30
- }
31
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap:after {
32
- content: '';
33
- display: block;
34
- position: absolute;
35
- top: 0;
36
- right: 0;
37
- bottom: 0;
38
- left: 0;
39
- z-index: 0;
40
  background-color: #<?php echo $row->settings->bg_overlay_color; ?>;
41
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($row->settings->bg_overlay_color)) ?>, <?php echo $row->settings->bg_overlay_opacity/100; ?>);
42
  }
43
- .fl-node-<?php echo $row->node; ?> .fl-row-content {
44
- position: relative;
45
- z-index: 1;
46
- }
47
  <?php endif; ?>
48
 
49
  <?php if($row->settings->bg_type == 'parallax' && !empty($row->settings->bg_parallax_image_src)) : ?>
25
  <?php endif; ?>
26
 
27
  <?php if( in_array( $row->settings->bg_type, array('photo', 'parallax', 'slideshow', 'video') ) && !empty($row->settings->bg_overlay_color)) : ?>
 
 
 
28
  .fl-node-<?php echo $row->node; ?> .fl-row-content-wrap:after {
 
 
 
 
 
 
 
 
29
  background-color: #<?php echo $row->settings->bg_overlay_color; ?>;
30
  background-color: rgba(<?php echo implode(',', FLBuilderColor::hex_to_rgb($row->settings->bg_overlay_color)) ?>, <?php echo $row->settings->bg_overlay_opacity/100; ?>);
31
  }
 
 
 
 
32
  <?php endif; ?>
33
 
34
  <?php if($row->settings->bg_type == 'parallax' && !empty($row->settings->bg_parallax_image_src)) : ?>
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.5.0',
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.5.3',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
js/fl-builder-layout.js CHANGED
@@ -40,9 +40,7 @@
40
  }
41
 
42
  // Init anchor links.
43
- if ( $( '.fl-builder-content a' ).length > 0 ) {
44
- FLBuilderLayout._initAnchorLinks();
45
- }
46
  },
47
 
48
  _destroy: function()
@@ -176,7 +174,7 @@
176
 
177
  _initAnchorLinks: function()
178
  {
179
- $( '.fl-builder-content a' ).each( FLBuilderLayout._initAnchorLink );
180
  },
181
 
182
  _initAnchorLink: function()
@@ -194,7 +192,9 @@
194
  element = $( '#' + id );
195
 
196
  if ( element.length > 0 ) {
197
- $( link ).on( 'click', FLBuilderLayout._scrollToElementOnLinkClick );
 
 
198
  }
199
  }
200
  catch( e ) {}
40
  }
41
 
42
  // Init anchor links.
43
+ FLBuilderLayout._initAnchorLinks();
 
 
44
  },
45
 
46
  _destroy: function()
174
 
175
  _initAnchorLinks: function()
176
  {
177
+ $( 'a' ).each( FLBuilderLayout._initAnchorLink );
178
  },
179
 
180
  _initAnchorLink: function()
192
  element = $( '#' + id );
193
 
194
  if ( element.length > 0 ) {
195
+ if ( element.hasClass( 'fl-row' ) || element.hasClass( 'fl-col' ) || element.hasClass( 'fl-module' ) ) {
196
+ $( link ).on( 'click', FLBuilderLayout._scrollToElementOnLinkClick );
197
+ }
198
  }
199
  }
200
  catch( e ) {}
js/fl-builder-preview.js CHANGED
@@ -582,6 +582,7 @@ var FLBuilderPreview;
582
  var rgb, alpha, value;
583
 
584
  if(this.elements.bgOverlayColor.val() == '' || isNaN(this.elements.bgOverlayOpacity.val())) {
 
585
  this.updateCSSRule(this.classes.content + ':after', 'background-color', 'transparent');
586
  }
587
  else {
@@ -591,18 +592,8 @@ var FLBuilderPreview;
591
  value = 'rgba(' + rgb.join() + ', ' + alpha + ')';
592
 
593
  this.delay(100, $.proxy(function(){
594
- this.updateCSSRule(this.classes.content, 'position', 'relative');
595
- this.updateCSSRule(this.classes.content + ':after', {
596
- 'background-color' : value,
597
- 'content' : "''",
598
- 'display' : 'block',
599
- 'position' : 'absolute',
600
- 'top' : '0',
601
- 'right' : '0',
602
- 'bottom' : '0',
603
- 'left' : '0',
604
- 'z-index' : '0'
605
- });
606
  }, this));
607
 
608
  }
@@ -1288,7 +1279,12 @@ var FLBuilderPreview;
1288
  text = $('<div>' + editor.getContent() + '</div>');
1289
  }
1290
  else {
1291
- text = $('<div>' + textarea.val() + '</div>');
 
 
 
 
 
1292
  }
1293
 
1294
  text.find('script').remove();
582
  var rgb, alpha, value;
583
 
584
  if(this.elements.bgOverlayColor.val() == '' || isNaN(this.elements.bgOverlayOpacity.val())) {
585
+ this.elements.node.removeClass('fl-row-bg-overlay');
586
  this.updateCSSRule(this.classes.content + ':after', 'background-color', 'transparent');
587
  }
588
  else {
592
  value = 'rgba(' + rgb.join() + ', ' + alpha + ')';
593
 
594
  this.delay(100, $.proxy(function(){
595
+ this.elements.node.addClass('fl-row-bg-overlay');
596
+ this.updateCSSRule(this.classes.content + ':after', 'background-color', value);
 
 
 
 
 
 
 
 
 
 
597
  }, this));
598
 
599
  }
1279
  text = $('<div>' + editor.getContent() + '</div>');
1280
  }
1281
  else {
1282
+ if ( 'undefined' == typeof switchEditors || 'undefined' == typeof switchEditors.wpautop ) {
1283
+ text = $('<div>' + textarea.val() + '</div>');
1284
+ }
1285
+ else {
1286
+ text = $('<div>' + switchEditors.wpautop( textarea.val() ) + '</div>');
1287
+ }
1288
  }
1289
 
1290
  text.find('script').remove();
js/fl-builder.js CHANGED
@@ -3794,7 +3794,6 @@ var FLBuilder;
3794
  {
3795
  var wpEditors = $('.fl-builder-settings textarea.wp-editor-area');
3796
 
3797
- $('.wp-switch-editor.switch-tmce').trigger('click');
3798
  wpEditors.each(FLBuilder._updateEditorField);
3799
  },
3800
 
@@ -3804,21 +3803,20 @@ var FLBuilder;
3804
  */
3805
  _updateEditorField: function()
3806
  {
3807
- var textarea = $(this),
3808
- content = '',
3809
- id = textarea.attr('id'),
3810
- name = textarea.closest('.fl-editor-field').attr('id'),
3811
- editor = typeof tinyMCE == 'undefined' ? false : tinyMCE.get(id);
3812
 
3813
- if(editor) {
3814
- content = editor.getContent();
3815
- }
3816
- else {
3817
- content = $('#' + id).val();
3818
  }
3819
 
3820
- textarea.val(content);
3821
- textarea.attr('name', name);
 
3822
  },
3823
 
3824
  /* AJAX
3794
  {
3795
  var wpEditors = $('.fl-builder-settings textarea.wp-editor-area');
3796
 
 
3797
  wpEditors.each(FLBuilder._updateEditorField);
3798
  },
3799
 
3803
  */
3804
  _updateEditorField: function()
3805
  {
3806
+ var textarea = $( this ),
3807
+ wrap = textarea.closest( '.wp-editor-wrap' ),
3808
+ id = textarea.attr( 'id' ),
3809
+ setting = textarea.closest( '.fl-editor-field' ).attr( 'id' ),
3810
+ editor = typeof tinyMCE == 'undefined' ? false : tinyMCE.get( id );
3811
 
3812
+ // Update the textarea content if tinymce is active.
3813
+ if ( editor && wrap.hasClass( 'tmce-active' ) ) {
3814
+ textarea.val( editor.getContent() );
 
 
3815
  }
3816
 
3817
+ // Set the textarea name to our setting name so
3818
+ // it can be referenced in the settings object.
3819
+ textarea.attr( 'name', setting );
3820
  },
3821
 
3822
  /* AJAX
languages/de_DE.mo ADDED
Binary file
languages/de_DE.po ADDED
@@ -0,0 +1,4053 @@