WordPress Page Builder – Beaver Builder - Version 1.3.8.2

Version Description

Download this release

Release Info

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

Code changes from version 1.3.8.1 to 1.3.8.2

fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: http://www.wpbeaverbuilder.com
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 1.3.8.1
7
  * Author: The Beaver Builder Team
8
  * Author URI: http://www.wpbeaverbuilder.com
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.3.8.1');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
@@ -34,7 +34,8 @@ require_once 'classes/FLBuilderPhoto.php';
34
  require_once 'classes/FLBuilderUpdate.php';
35
  require_once 'classes/FLBuilderUtils.php';
36
 
37
- /* Updater */
 
38
  require_once 'includes/updater/updater.php';
39
 
40
  /* Plugin Activation */
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: http://www.wpbeaverbuilder.com
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 1.3.8.2
7
  * Author: The Beaver Builder Team
8
  * Author URI: http://www.wpbeaverbuilder.com
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.3.8.2');
15
  define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
16
  define('FL_BUILDER_URL', plugins_url('/', __FILE__));
17
  define('FL_BUILDER_LITE', true);
34
  require_once 'classes/FLBuilderUpdate.php';
35
  require_once 'classes/FLBuilderUtils.php';
36
 
37
+ /* Includes */
38
+ require_once 'includes/compatibility.php';
39
  require_once 'includes/updater/updater.php';
40
 
41
  /* Plugin Activation */
includes/compatibility.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Misc functions for compatibility with other plugins.
5
+ */
6
+
7
+ /**
8
+ * Support for Option Tree.
9
+ *
10
+ * Older versions of Option Tree don't declare the ot_get_media_post_ID
11
+ * function on the frontend which is needed for the media uploader and
12
+ * throws an error if it doesn't exist.
13
+ */
14
+ function fl_builder_option_tree_support() {
15
+
16
+ if ( !function_exists( 'ot_get_media_post_ID' ) ) {
17
+
18
+ function ot_get_media_post_ID() {
19
+
20
+ // Option ID
21
+ $option_id = 'ot_media_post_ID';
22
+
23
+ // Get the media post ID
24
+ $post_ID = get_option( $option_id, false );
25
+
26
+ // Add $post_ID to the DB
27
+ if ( $post_ID === false ) {
28
+
29
+ global $wpdb;
30
+
31
+ // Get the media post ID
32
+ $post_ID = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE `post_title` = 'Media' AND `post_type` = 'option-tree' AND `post_status` = 'private'" );
33
+
34
+ // Add to the DB
35
+ add_option( $option_id, $post_ID );
36
+ }
37
+
38
+ return $post_ID;
39
+ }
40
+ }
41
+ }
42
+ add_action('after_setup_theme', 'fl_builder_option_tree_support');
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.3.8',
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.3.8.2',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
js/colorpicker.js CHANGED
@@ -13,7 +13,7 @@
13
  inAction,
14
  charMin = 65,
15
  visible,
16
- tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
  defaults = {
18
  eventName: 'click',
19
  onShow: function () {},
@@ -271,6 +271,7 @@
271
  };
272
  },
273
  fixHex = function (hex) {
 
274
  var len = 6 - hex.length;
275
  if (len > 0) {
276
  var o = [];
13
  inAction,
14
  charMin = 65,
15
  visible,
16
+ tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="7" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
  defaults = {
18
  eventName: 'click',
19
  onShow: function () {},
271
  };
272
  },
273
  fixHex = function (hex) {
274
+ var hex = hex.indexOf('#') > -1 ? hex.substring(1) : hex;
275
  var len = 6 - hex.length;
276
  if (len > 0) {
277
  var o = [];