Page Builder: PageLayer – Drag and Drop website builder - Version 1.1.6

Version Description

(June 22, 2020) = * [Bug-Fix] In certain cases some js error occurred while dragging and dropping the widget. This is fixed.

Download this release

Release Info

Developer pagelayer
Plugin Icon 128x128 Page Builder: PageLayer – Drag and Drop website builder
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5 to 1.1.6

init.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
 
6
  define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7
  define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
8
- define('PAGELAYER_VERSION', '1.1.5');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
5
 
6
  define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7
  define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
8
+ define('PAGELAYER_VERSION', '1.1.6');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
js/pagelayer-editor.js CHANGED
@@ -2022,8 +2022,12 @@ function pagelayer_save_sections(sel, section = 'section'){
2022
 
2023
  // This function for ajax success call back of global widget
2024
  pagelayer_ajax_func['global_widget'] = function(obj){
2025
-
2026
- for(var post_id in obj){
 
 
 
 
2027
 
2028
  jEle.attr("pagelayer-a-global_id", post_id );
2029
 
2022
 
2023
  // This function for ajax success call back of global widget
2024
  pagelayer_ajax_func['global_widget'] = function(obj){
2025
+
2026
+ if(pagelayer_empty(obj['success'])){
2027
+ return;
2028
+ }
2029
+
2030
+ for(var post_id in obj['success']){
2031
 
2032
  jEle.attr("pagelayer-a-global_id", post_id );
2033
 
js/properties.js CHANGED
@@ -1227,13 +1227,16 @@ function pagelayer_elp_image(row, prop){
1227
  // Main image drag and drop function
1228
  function pagelayer_img_dragAndDrop(dropzoneParent, dropZone, jEle, row){
1229
 
 
 
1230
  dropzoneParent.on('dragover', function(e){
1231
  e.preventDefault();
1232
  // Checking that the dragged element is a file or not
1233
  var dt = e.originalEvent.dataTransfer;
1234
  if(dt.types && (dt.types.indexOf ? dt.types.indexOf('Files') != -1 : dt.types.contains('Files'))){
1235
  dropZone.show();
1236
- }
 
1237
  });
1238
 
1239
  dropzoneParent.on('dragleave', function(e){
@@ -1241,11 +1244,17 @@ function pagelayer_img_dragAndDrop(dropzoneParent, dropZone, jEle, row){
1241
  // Checking that the cursor is in the drag area or not
1242
  if (e.clientX >= (rect.left + rect.width) || e.clientX <= rect.left || e.clientY >= (rect.top + rect.height) || e.clientY <= rect.top) {
1243
  dropZone.hide();
 
1244
  }
1245
  });
1246
 
1247
  dropzoneParent.on('drop', function(e){
1248
 
 
 
 
 
 
1249
  e.preventDefault();
1250
  var pagelayer_ajax_func = {};
1251
 
@@ -1315,6 +1324,8 @@ function pagelayer_img_dragAndDrop(dropzoneParent, dropZone, jEle, row){
1315
  // Uploading image to the media library
1316
  pagelayer_editable_paste_handler(e.originalEvent.dataTransfer.files[0], pagelayer_ajax_func);
1317
 
 
 
1318
  });
1319
  }
1320
 
1227
  // Main image drag and drop function
1228
  function pagelayer_img_dragAndDrop(dropzoneParent, dropZone, jEle, row){
1229
 
1230
+ var reset_dragging = false;
1231
+
1232
  dropzoneParent.on('dragover', function(e){
1233
  e.preventDefault();
1234
  // Checking that the dragged element is a file or not
1235
  var dt = e.originalEvent.dataTransfer;
1236
  if(dt.types && (dt.types.indexOf ? dt.types.indexOf('Files') != -1 : dt.types.contains('Files'))){
1237
  dropZone.show();
1238
+ reset_dragging = true;
1239
+ }
1240
  });
1241
 
1242
  dropzoneParent.on('dragleave', function(e){
1244
  // Checking that the cursor is in the drag area or not
1245
  if (e.clientX >= (rect.left + rect.width) || e.clientX <= rect.left || e.clientY >= (rect.top + rect.height) || e.clientY <= rect.top) {
1246
  dropZone.hide();
1247
+ reset_dragging = false;
1248
  }
1249
  });
1250
 
1251
  dropzoneParent.on('drop', function(e){
1252
 
1253
+ // Is not dropable?
1254
+ if(!reset_dragging){
1255
+ return;
1256
+ }
1257
+
1258
  e.preventDefault();
1259
  var pagelayer_ajax_func = {};
1260
 
1324
  // Uploading image to the media library
1325
  pagelayer_editable_paste_handler(e.originalEvent.dataTransfer.files[0], pagelayer_ajax_func);
1326
 
1327
+ reset_dragging = false;
1328
+
1329
  });
1330
  }
1331
 
main/shortcode_functions.php CHANGED
@@ -310,7 +310,7 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
310
  foreach($modes as $mk => $mv){
311
 
312
  $M_prop = $prop.$mv;
313
- if($param['type'] == 'typography'){
314
  $val = explode(',', $el['atts'][$M_prop]);
315
 
316
  if(!empty($val[0]) && !in_array($val[0], $pagelayer->runtime_fonts)){
@@ -319,7 +319,7 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
319
  }
320
  }
321
 
322
- if($param['type'] == 'font_family'){
323
  $val = $el['atts'][$M_prop];
324
  if(!empty($val) && !in_array($val, $pagelayer->runtime_fonts)){
325
  $pagelayer->runtime_fonts[] = $val;
310
  foreach($modes as $mk => $mv){
311
 
312
  $M_prop = $prop.$mv;
313
+ if($param['type'] == 'typography' && !empty($el['atts'][$M_prop])){
314
  $val = explode(',', $el['atts'][$M_prop]);
315
 
316
  if(!empty($val[0]) && !in_array($val[0], $pagelayer->runtime_fonts)){
319
  }
320
  }
321
 
322
+ if($param['type'] == 'font_family' && !empty($el['atts'][$M_prop])){
323
  $val = $el['atts'][$M_prop];
324
  if(!empty($val) && !in_array($val, $pagelayer->runtime_fonts)){
325
  $pagelayer->runtime_fonts[] = $val;
pagelayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: PageLayer
4
  Plugin URI: http://wordpress.org/plugins/pagelayer/
5
  Description: PageLayer is a WordPress page builder plugin. Its very easy to use and very light on the browser.
6
- Version: 1.1.5
7
  Author: Pagelayer Team
8
  Author URI: https://pagelayer.com/
9
  License: LGPL v2.1
3
  Plugin Name: PageLayer
4
  Plugin URI: http://wordpress.org/plugins/pagelayer/
5
  Description: PageLayer is a WordPress page builder plugin. Its very easy to use and very light on the browser.
6
+ Version: 1.1.6
7
  Author: Pagelayer Team
8
  Author URI: https://pagelayer.com/
9
  License: LGPL v2.1
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: page builder, editor, landing page, drag-and-drop, pagelayer, form-builder
4
  Requires at least: 4.7
5
  Tested up to: 5.4
6
  Requires PHP: 5.5
7
- Stable tag: 1.1.5
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
@@ -109,6 +109,9 @@ Do you have questions related to PageLayer ? Use the following links :
109
 
110
  == Changelog ==
111
 
 
 
 
112
  = 1.1.5 (June 19, 2020) =
113
  * [Premium-Feature] Added the option to save widgets and sections as a Global Widget / Section. Now the user can save the widgets and sections and use them on the entire site.
114
  * [Feature] Image dropzone has been added to the image property, now user can add images via drag and drop.
4
  Requires at least: 4.7
5
  Tested up to: 5.4
6
  Requires PHP: 5.5
7
+ Stable tag: 1.1.6
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.1.6 (June 22, 2020) =
113
+ * [Bug-Fix] In certain cases some js error occurred while dragging and dropping the widget. This is fixed.
114
+
115
  = 1.1.5 (June 19, 2020) =
116
  * [Premium-Feature] Added the option to save widgets and sections as a Global Widget / Section. Now the user can save the widgets and sections and use them on the entire site.
117
  * [Feature] Image dropzone has been added to the image property, now user can add images via drag and drop.