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

Version Description

(May 18, 2021) = * [Bug-Fix] Some images were not imported properly while importing the theme if the same slug was used. This is fixed. * [Bug-Fix] Icon alignment on contact form submit button was not working properly. This is fixed. * [Bug-Fix] After the last update contact form custom template settings were not applied properly. This is fixed. * [Bug-Fix] In certain cases some js error occurred when the post content was empty. This is fixed. * [Bug-Fix] The border radius on the hover of the countdown timer widget was not working properly. This is fixed.

Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.1

css/combined.css CHANGED
@@ -1106,11 +1106,10 @@ font-size: 22px;
1106
  padding: 30px 60px;
1107
  }
1108
 
1109
- .pagelayer-btn-icon-left .pagelayer-btn-icon:last-child{
1110
- display: none;
1111
- }
1112
-
1113
- .pagelayer-btn-icon-right .pagelayer-btn-icon:first-child{
1114
  display: none;
1115
  }
1116
 
1106
  padding: 30px 60px;
1107
  }
1108
 
1109
+ .pagelayer-btn-icon-left .pagelayer-btn-icon:last-child,
1110
+ .pagelayer-btn-icon-right .pagelayer-btn-icon:first-child,
1111
+ .pagelayer-btn-icon-left .pagelayer-cf-icon-right,
1112
+ .pagelayer-btn-icon-right .pagelayer-cf-icon-left{
 
1113
  display: none;
1114
  }
1115
 
css/pagelayer-frontend.css CHANGED
@@ -1106,11 +1106,10 @@ font-size: 22px;
1106
  padding: 30px 60px;
1107
  }
1108
 
1109
- .pagelayer-btn-icon-left .pagelayer-btn-icon:last-child{
1110
- display: none;
1111
- }
1112
-
1113
- .pagelayer-btn-icon-right .pagelayer-btn-icon:first-child{
1114
  display: none;
1115
  }
1116
 
1106
  padding: 30px 60px;
1107
  }
1108
 
1109
+ .pagelayer-btn-icon-left .pagelayer-btn-icon:last-child,
1110
+ .pagelayer-btn-icon-right .pagelayer-btn-icon:first-child,
1111
+ .pagelayer-btn-icon-left .pagelayer-cf-icon-right,
1112
+ .pagelayer-btn-icon-right .pagelayer-cf-icon-left{
 
1113
  display: none;
1114
  }
1115
 
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.5.0');
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.5.1');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
js/widgets.js CHANGED
@@ -989,6 +989,17 @@ function pagelayer_render_end_pl_contact(el){
989
  }
990
  });
991
 
 
 
 
 
 
 
 
 
 
 
 
992
  pagelayer_set_atts(el.$, 'con_post_id', pagelayer_postID);
993
 
994
  }
@@ -1238,19 +1249,6 @@ function pagelayer_render_end_pl_anim_heading(el){
1238
  pagelayer_anim_heading(jEle);
1239
  }
1240
 
1241
- // Showing contact form message in the editor only.
1242
- function pagelayer_render_end_pl_contact(el){
1243
- if(el.atts['show_msg_box']){
1244
- var msgBox = el.$.find('.pagelayer-message-box');
1245
- if(el.$.find('.pagelayer-message-box').length==2){
1246
- msgBox.eq(0).text('Demo success box');
1247
- msgBox.eq(0).addClass('pagelayer-cf-msg-suc');
1248
- msgBox.eq(1).text('Demo failed box');
1249
- msgBox.eq(1).addClass('pagelayer-cf-msg-err');
1250
- }
1251
- }
1252
- }
1253
-
1254
  // Mega Menu popup handler
1255
  pagelayer_add_action('pagelayer_setup_history', function(){
1256
 
989
  }
990
  });
991
 
992
+ // Showing contact form message in the editor only.
993
+ if(el.atts['show_msg_box']){
994
+ var msgBox = el.$.find('.pagelayer-message-box');
995
+ if(el.$.find('.pagelayer-message-box').length==2){
996
+ msgBox.eq(0).text('Demo success box');
997
+ msgBox.eq(0).addClass('pagelayer-cf-msg-suc');
998
+ msgBox.eq(1).text('Demo failed box');
999
+ msgBox.eq(1).addClass('pagelayer-cf-msg-err');
1000
+ }
1001
+ }
1002
+
1003
  pagelayer_set_atts(el.$, 'con_post_id', pagelayer_postID);
1004
 
1005
  }
1249
  pagelayer_anim_heading(jEle);
1250
  }
1251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1252
  // Mega Menu popup handler
1253
  pagelayer_add_action('pagelayer_setup_history', function(){
1254
 
main/import.php CHANGED
@@ -393,7 +393,7 @@ global $pagelayer, $pl_error;
393
  $path = pagelayer_cleanpath($pagelayer_theme_path.'/data/page/'.$k);
394
 
395
  // Is the page there ?
396
- $page = get_page_by_path($v['post_name']);
397
  //r_print($page);
398
 
399
  $new_post = array();
@@ -522,15 +522,17 @@ global $pagelayer, $pl_error, $sitepad;
522
 
523
 
524
  $_media = list_files($pagelayer_theme_path.'/images', 1);
 
525
  //pagelayer_print($_media);die();
526
 
 
 
 
 
527
  // Download images
528
- if(!empty($_REQUEST['download_imgs']) && file_exists($pagelayer_theme_path.'/images.json')){
529
-
530
- $images_list = @json_decode(file_get_contents($pagelayer_theme_path.'/images.json'), true);
531
- //r_print($images_list);die();
532
 
533
- foreach($images_list as $k => $v){
534
 
535
  if(empty($v['download_url'])){
536
  continue;
@@ -558,12 +560,12 @@ global $pagelayer, $pl_error, $sitepad;
558
  // Put image in file
559
  file_put_contents($dest_file, $image_file);
560
 
561
- }
562
 
563
  // Update option to set no
564
  update_option('pagelayer_import_images_'.$template_name, 'yes');
565
 
566
- }elseif(empty($_REQUEST['download_imgs']) && !file_exists($pagelayer_theme_path.'/images.json')){
567
  foreach($_media as $k => $v){
568
  $imagesize = getimagesize($v);
569
 
@@ -583,6 +585,18 @@ global $pagelayer, $pl_error, $sitepad;
583
  $ret = pagelayer_upload_media($file_name, file_get_contents($v));
584
  if(!empty($ret)){
585
  $pagelayer->import_media['{{theme_url}}/images/'.$file_name] = $ret;
 
 
 
 
 
 
 
 
 
 
 
 
586
  }
587
  }
588
  //r_print($pagelayer->import_media);die();
@@ -655,7 +669,7 @@ global $pagelayer, $pl_error, $sitepad;
655
  $new_post = array();
656
 
657
  // Is the page there ?
658
- $template = get_page_by_path($k, OBJECT, $pagelayer->builder['name']);
659
 
660
  // It does exist so save the revision IF its the header and footer
661
  if(!empty($template)){
@@ -769,7 +783,7 @@ global $pagelayer, $pl_error, $sitepad;
769
  $path = pagelayer_cleanpath($pagelayer_theme_path.'/data/'.$data_type.'/'.$k);
770
 
771
  // Is the page there ?
772
- $page = get_page_by_path($v['post_name']);
773
  //r_print($page);
774
 
775
  $new_post = array();
@@ -901,7 +915,7 @@ global $pagelayer, $pl_error, $sitepad;
901
  if(isset($_POST['set_home_page']) || isset($_POST['create_blog_page'])){
902
 
903
  // Get the home page ID
904
- $blog = get_page_by_path('blog');
905
 
906
  // Insert the blog page
907
  if(empty($blog)){
@@ -1556,20 +1570,37 @@ function pagelayer_resizeImage($filename, $newwidth, $newheight){
1556
  switch($imagesize['mime']) {
1557
  case 'image/jpg':
1558
  case 'image/jpeg':
1559
- $source = imagecreatefromjpeg($filename);
1560
  break;
1561
  case 'image/gif':
1562
- $source = imagecreatefromgif($filename);
1563
  break;
1564
  case 'image/png':
1565
- $source = imagecreatefrompng($filename);
1566
  break;
1567
  }
1568
 
 
 
 
 
1569
  imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
1570
  imagedestroy($source);
1571
  ob_start();
1572
- imagepng($thumb);
 
 
 
 
 
 
 
 
 
 
 
 
 
1573
  $image = ob_get_clean();
1574
  imagedestroy($thumb);
1575
 
393
  $path = pagelayer_cleanpath($pagelayer_theme_path.'/data/page/'.$k);
394
 
395
  // Is the page there ?
396
+ $page = get_page_by_path($v['post_name'], OBJECT, array('page'));
397
  //r_print($page);
398
 
399
  $new_post = array();
522
 
523
 
524
  $_media = list_files($pagelayer_theme_path.'/images', 1);
525
+ $imgs_json = array();
526
  //pagelayer_print($_media);die();
527
 
528
+ if(file_exists($pagelayer_theme_path.'/images.json')){
529
+ $imgs_json = @json_decode(file_get_contents($pagelayer_theme_path.'/images.json'), true);
530
+ }
531
+
532
  // Download images
533
+ if(!empty($_REQUEST['download_imgs'])){
 
 
 
534
 
535
+ /* foreach($imgs_json as $k => $v){
536
 
537
  if(empty($v['download_url'])){
538
  continue;
560
  // Put image in file
561
  file_put_contents($dest_file, $image_file);
562
 
563
+ } */
564
 
565
  // Update option to set no
566
  update_option('pagelayer_import_images_'.$template_name, 'yes');
567
 
568
+ }elseif(empty($_REQUEST['download_imgs'])){ // && !file_exists($pagelayer_theme_path.'/images.json')
569
  foreach($_media as $k => $v){
570
  $imagesize = getimagesize($v);
571
 
585
  $ret = pagelayer_upload_media($file_name, file_get_contents($v));
586
  if(!empty($ret)){
587
  $pagelayer->import_media['{{theme_url}}/images/'.$file_name] = $ret;
588
+
589
+ if(isset($imgs_json[$file_name])){
590
+ $fields = array('sitepad_img_source', 'sitepad_download_url', 'sitepad_img_lic');
591
+
592
+ foreach($fields as $field){
593
+ $_field = str_replace('sitepad_', '', $field);
594
+
595
+ if(!empty($imgs_json[$file_name][$_field])){
596
+ update_post_meta($ret, $field, $imgs_json[$file_name][$_field]);
597
+ }
598
+ }
599
+ }
600
  }
601
  }
602
  //r_print($pagelayer->import_media);die();
669
  $new_post = array();
670
 
671
  // Is the page there ?
672
+ $template = get_page_by_path($k, OBJECT, array($pagelayer->builder['name']));
673
 
674
  // It does exist so save the revision IF its the header and footer
675
  if(!empty($template)){
783
  $path = pagelayer_cleanpath($pagelayer_theme_path.'/data/'.$data_type.'/'.$k);
784
 
785
  // Is the page there ?
786
+ $page = get_page_by_path($v['post_name'], OBJECT, array('page'));
787
  //r_print($page);
788
 
789
  $new_post = array();
915
  if(isset($_POST['set_home_page']) || isset($_POST['create_blog_page'])){
916
 
917
  // Get the home page ID
918
+ $blog = get_page_by_path('blog', OBJECT, array('page'));
919
 
920
  // Insert the blog page
921
  if(empty($blog)){
1570
  switch($imagesize['mime']) {
1571
  case 'image/jpg':
1572
  case 'image/jpeg':
1573
+ $source = imagecreatefromjpeg($filename);
1574
  break;
1575
  case 'image/gif':
1576
+ $source = imagecreatefromgif($filename);
1577
  break;
1578
  case 'image/png':
1579
+ $source = imagecreatefrompng($filename);
1580
  break;
1581
  }
1582
 
1583
+ if(empty($source)){
1584
+ return false;
1585
+ }
1586
+
1587
  imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
1588
  imagedestroy($source);
1589
  ob_start();
1590
+
1591
+ switch($imagesize['mime']) {
1592
+ case 'image/jpg':
1593
+ case 'image/jpeg':
1594
+ imagejpeg($thumb);
1595
+ break;
1596
+ case 'image/gif':
1597
+ imagegif($thumb);
1598
+ break;
1599
+ case 'image/png':
1600
+ imagepng($thumb);
1601
+ break;
1602
+ }
1603
+
1604
  $image = ob_get_clean();
1605
  imagedestroy($thumb);
1606
 
main/live.php CHANGED
@@ -238,12 +238,10 @@ filter:blur(2px);
238
 
239
  global $pagelayer;
240
 
241
- if(!empty($pagelayer->data_attr)){
242
- echo '<script>
243
- pagelayer_default_params = '.json_encode($pagelayer->default_params).';
244
- pagelayer.el = '.json_encode($pagelayer->data_attr).';
245
  </script>';
246
- }
247
 
248
  wp_enqueue_script('heartbeat');
249
  _wp_footer_scripts();
238
 
239
  global $pagelayer;
240
 
241
+ echo '<script>
242
+ pagelayer_default_params = '.json_encode($pagelayer->default_params, JSON_FORCE_OBJECT).';
243
+ pagelayer.el = '.json_encode($pagelayer->data_attr, JSON_FORCE_OBJECT).';
 
244
  </script>';
 
245
 
246
  wp_enqueue_script('heartbeat');
247
  _wp_footer_scripts();
main/shortcodes.php CHANGED
@@ -4980,6 +4980,9 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_btn', array(
4980
  'pagelayer-btn-icon-left' => __pl('left'),
4981
  'pagelayer-btn-icon-right' => __pl('right')
4982
  ),
 
 
 
4983
  ),
4984
  'icon_spacing' => array(
4985
  'type' => 'slider',
@@ -4991,7 +4994,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_btn', array(
4991
  'screen' => 1,
4992
  'css' => ['{{element}} .pagelayer-btn-icon' => 'padding: 0 {{val}}px;'],
4993
  'req' => array(
4994
- '!icon' => 'none'
4995
  ),
4996
  ),
4997
  ],
@@ -8860,7 +8863,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_address', array(
8860
  'max' => 100,
8861
  'step' => 1,
8862
  'screen' => 1,
8863
- 'css' => ['{{element}} .pagelayer-address-icon' => 'margin-right: {{val}}px;']
8864
  ),
8865
  ),
8866
  'icon_style' =>[
@@ -8936,7 +8939,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_email', array(
8936
  'max' => 100,
8937
  'step' => 1,
8938
  'screen' => 1,
8939
- 'css' => ['{{element}} .pagelayer-email-icon' => 'margin-right: {{val}}px;']
8940
  ),
8941
  ),
8942
  'icon_style' =>[
@@ -9012,7 +9015,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_phone', array(
9012
  'max' => 100,
9013
  'step' => 1,
9014
  'screen' => 1,
9015
- 'css' => ['{{element}} .pagelayer-phone-icon' => 'margin-right: {{val}}px;']
9016
  ),
9017
  ),
9018
  'icon_style' =>[
4980
  'pagelayer-btn-icon-left' => __pl('left'),
4981
  'pagelayer-btn-icon-right' => __pl('right')
4982
  ),
4983
+ 'req' => array(
4984
+ '!icon' => ''
4985
+ ),
4986
  ),
4987
  'icon_spacing' => array(
4988
  'type' => 'slider',
4994
  'screen' => 1,
4995
  'css' => ['{{element}} .pagelayer-btn-icon' => 'padding: 0 {{val}}px;'],
4996
  'req' => array(
4997
+ '!icon' => ''
4998
  ),
4999
  ),
5000
  ],
8863
  'max' => 100,
8864
  'step' => 1,
8865
  'screen' => 1,
8866
+ 'css' => ['body:not(.rtl) {{element}} .pagelayer-address-icon' => 'margin-right: {{val}}px;', 'body.rtl {{element}} .pagelayer-address-icon' => 'margin-left:{{val}}px']
8867
  ),
8868
  ),
8869
  'icon_style' =>[
8939
  'max' => 100,
8940
  'step' => 1,
8941
  'screen' => 1,
8942
+ 'css' => ['body:not(.rtl) {{element}} .pagelayer-email-icon' => 'margin-right: {{val}}px;', 'body.rtl {{element}} .pagelayer-email-icon' => 'margin-left:{{val}}px']
8943
  ),
8944
  ),
8945
  'icon_style' =>[
9015
  'max' => 100,
9016
  'step' => 1,
9017
  'screen' => 1,
9018
+ 'css' => ['body:not(.rtl) {{element}} .pagelayer-phone-icon' => 'margin-right: {{val}}px;', 'body.rtl {{element}} .pagelayer-phone-icon' => 'margin-left:{{val}}px']
9019
  ),
9020
  ),
9021
  'icon_style' =>[
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.5.0
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.5.1
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, drag-and-drop, landing page, replace image, pagelaye
4
  Requires at least: 4.7
5
  Tested up to: 5.7
6
  Requires PHP: 5.5
7
- Stable tag: 1.5.0
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
@@ -109,6 +109,13 @@ Do you have questions related to PageLayer ? Use the following links :
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
112
  = 1.5.0 (May 10, 2021) =
113
  * [Feature] Added icon option for the toggle menu.
114
  * [Task] The post info widget has been improved for the tag and category styles.
4
  Requires at least: 4.7
5
  Tested up to: 5.7
6
  Requires PHP: 5.5
7
+ Stable tag: 1.5.1
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.5.1 (May 18, 2021) =
113
+ * [Bug-Fix] Some images were not imported properly while importing the theme if the same slug was used. This is fixed.
114
+ * [Bug-Fix] Icon alignment on contact form submit button was not working properly. This is fixed.
115
+ * [Bug-Fix] After the last update contact form custom template settings were not applied properly. This is fixed.
116
+ * [Bug-Fix] In certain cases some js error occurred when the post content was empty. This is fixed.
117
+ * [Bug-Fix] The border radius on the hover of the countdown timer widget was not working properly. This is fixed.
118
+
119
  = 1.5.0 (May 10, 2021) =
120
  * [Feature] Added icon option for the toggle menu.
121
  * [Task] The post info widget has been improved for the tag and category styles.