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

Version Description

(November 4, 2020) = * [Added] Added option for the top / bottom position for the contact form success / failed message. * [Added] Added "Open link in new window (tab)" option to the social widget. * [Bug-Fix] After submitting the contact form the default success/failed message was not shown if the message was not set from the setting. This is fixed. * [Bug-Fix] The post content widget was not working properly for the password protected posts. This is fixed.

Download this release

Release Info

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

Code changes from version 1.3.3 to 1.3.4

css/combined.css CHANGED
@@ -3394,6 +3394,20 @@ border-radius:50%;
3394
  .pagelayer-contact-submit-btn{
3395
  cursor:pointer;
3396
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3397
  /* Contact Form End */
3398
 
3399
  /*** Post Excerpt ***/
3394
  .pagelayer-contact-submit-btn{
3395
  cursor:pointer;
3396
  }
3397
+
3398
+ .pagelayer-cf-msg-suc,.pagelayer-cf-msg-err{
3399
+ padding: 10px;
3400
+ padding: 10px;
3401
+ margin: 10px 0px;
3402
+ background: #a4f4ad;
3403
+ border: 1px solid #6fc16f;
3404
+ border-radius: 4px;
3405
+ }
3406
+
3407
+ .pagelayer-cf-msg-err{
3408
+ background: #f9dacb;
3409
+ border: 1px solid #ff746e;
3410
+ }
3411
  /* Contact Form End */
3412
 
3413
  /*** Post Excerpt ***/
css/pagelayer-editor.css CHANGED
@@ -3573,5 +3573,21 @@ position: absolute;
3573
  top: 20px;
3574
  right: 25px;
3575
  z-index: 999;
 
 
 
 
 
 
 
 
 
3576
  }
3577
- /* Pagelayer post setting modal end*/
 
 
 
 
 
 
 
3573
  top: 20px;
3574
  right: 25px;
3575
  z-index: 999;
3576
+ cursor:pointer;
3577
+ }
3578
+
3579
+ @keyframes highlight {
3580
+ 0% {
3581
+ background: #dfdfdf;
3582
+ }
3583
+ 100% {
3584
+ background: #fff;
3585
  }
3586
+ }
3587
+
3588
+ .highlight {
3589
+ animation: highlight 1s;
3590
+ animation-iteration-count: 5;
3591
+ }
3592
+ /* Pagelayer post setting modal end*/
3593
+
css/pagelayer-frontend.css CHANGED
@@ -3394,6 +3394,20 @@ border-radius:50%;
3394
  .pagelayer-contact-submit-btn{
3395
  cursor:pointer;
3396
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3397
  /* Contact Form End */
3398
 
3399
  /*** Post Excerpt ***/
3394
  .pagelayer-contact-submit-btn{
3395
  cursor:pointer;
3396
  }
3397
+
3398
+ .pagelayer-cf-msg-suc,.pagelayer-cf-msg-err{
3399
+ padding: 10px;
3400
+ padding: 10px;
3401
+ margin: 10px 0px;
3402
+ background: #a4f4ad;
3403
+ border: 1px solid #6fc16f;
3404
+ border-radius: 4px;
3405
+ }
3406
+
3407
+ .pagelayer-cf-msg-err{
3408
+ background: #f9dacb;
3409
+ border: 1px solid #ff746e;
3410
+ }
3411
  /* Contact Form End */
3412
 
3413
  /*** Post Excerpt ***/
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.3.3');
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.3.4');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
js/combined.js CHANGED
@@ -874,28 +874,44 @@ function pagelayer_contact_submit(jEle, e){
874
  //var fdata = jQuery(jEle).closest('form').serialize();
875
  var redirect = jQuery(jEle).find('input[name="cfa-redirect"]');
876
  var formData = new FormData( jQuery(jEle)[0] );
 
877
 
878
  // Append the nonce
879
  formData.append('pagelayer_nonce', pagelayer_global_nonce);
880
 
 
 
 
 
 
 
 
 
 
 
 
881
  jQuery.ajax({
882
- url: pagelayer_ajaxurl+'action=pagelayer_contact_submit',
883
- type: "POST",
884
- data: formData,
885
- processData: false,
886
- contentType: false,
887
- cache:false,
888
- success:function(result){
889
- var json = jQuery.parseJSON(result);
890
- if('success' in json){
891
- jQuery(jEle).parent().find(".pagelayer-message-box").html(json['success']).fadeIn().delay(10000).fadeOut();
892
-
 
893
  if(redirect.length > 0 && !pagelayer_empty(redirect.val())){
894
  window.location.href = redirect.val();
895
  }
896
- }else{
897
- jQuery(jEle).parent().find(".pagelayer-message-box").html(json['failed']).fadeIn().delay(10000).fadeOut();
898
- }
 
 
 
899
  }
900
  });
901
  jEle.reset();
874
  //var fdata = jQuery(jEle).closest('form').serialize();
875
  var redirect = jQuery(jEle).find('input[name="cfa-redirect"]');
876
  var formData = new FormData( jQuery(jEle)[0] );
877
+ var par = jQuery(jEle).parent();
878
 
879
  // Append the nonce
880
  formData.append('pagelayer_nonce', pagelayer_global_nonce);
881
 
882
+ // Hide any message
883
+ par.find(".pagelayer-message-box").hide();
884
+
885
+ // Message pos to use ?
886
+ var msg_pos = 'top';
887
+ if(par.parent().hasClass('pagelayer-message-box-bottom')){
888
+ msg_pos = 'bottom';
889
+ }
890
+
891
+ par.find(".pagelayer-message-box").removeClass('pagelayer-cf-msg-err pagelayer-cf-msg-suc');
892
+
893
  jQuery.ajax({
894
+ url: pagelayer_ajaxurl+'action=pagelayer_contact_submit',
895
+ type: "POST",
896
+ data: formData,
897
+ processData: false,
898
+ contentType: false,
899
+ cache:false,
900
+ success:function(result){
901
+ var json = jQuery.parseJSON(result);
902
+
903
+ if('success' in json){
904
+ par.find(".pagelayer-message-"+msg_pos).addClass('pagelayer-cf-msg-suc').html(json['success']).fadeIn();
905
+
906
  if(redirect.length > 0 && !pagelayer_empty(redirect.val())){
907
  window.location.href = redirect.val();
908
  }
909
+ }else{
910
+ par.find(".pagelayer-message-"+msg_pos).addClass('pagelayer-cf-msg-err').html(json['failed']).fadeIn();
911
+ }
912
+ },
913
+ error:function(result){
914
+ par.find(".pagelayer-message-"+msg_pos).addClass('pagelayer-cf-msg-err').html(json['failed']).fadeIn();
915
  }
916
  });
917
  jEle.reset();
js/pagelayer-editor.js CHANGED
@@ -19,6 +19,7 @@ pagelayer = {
19
  props_ref : {},
20
  pro_txt : '',
21
  loaded : 0,
 
22
  }
23
 
24
  var pagelayer_history_obj = {}, pagelayer_revision_obj = {};
@@ -3305,6 +3306,7 @@ function pagelayer_save(){
3305
  pagelayer_nonce: pagelayer_ajax_nonce,
3306
  global_widgets: global_data,
3307
  contacts: contacts_props,
 
3308
  copyright: pagelayer_copyright
3309
  },
3310
  success: function(response, status, xhr){
@@ -3325,6 +3327,11 @@ function pagelayer_save(){
3325
  complete: function(xhr,status){
3326
  pagelayer.$$('.pagelayer-update-text').show();
3327
  pagelayer.$$('.pagelayer-update-loader').hide();
 
 
 
 
 
3328
  }
3329
  });
3330
 
@@ -4010,10 +4017,10 @@ function pagelayer_history_setup(force){
4010
  props_new.attr('pagelayer-a-post_status', post_status);
4011
  }
4012
 
4013
- // Need to pass true to render table
4014
  pagelayer_element_setup('.pagelayer-ele', true);
4015
  pagelayer_add_widget();
4016
- alert(obj['success']);
4017
  }
4018
  }
4019
  });
19
  props_ref : {},
20
  pro_txt : '',
21
  loaded : 0,
22
+ post_status : '',
23
  }
24
 
25
  var pagelayer_history_obj = {}, pagelayer_revision_obj = {};
3306
  pagelayer_nonce: pagelayer_ajax_nonce,
3307
  global_widgets: global_data,
3308
  contacts: contacts_props,
3309
+ post_status: pagelayer.post_status,
3310
  copyright: pagelayer_copyright
3311
  },
3312
  success: function(response, status, xhr){
3327
  complete: function(xhr,status){
3328
  pagelayer.$$('.pagelayer-update-text').show();
3329
  pagelayer.$$('.pagelayer-update-loader').hide();
3330
+
3331
+ if(!pagelayer_empty(pagelayer.post_status)){
3332
+ pagelayer.$$('.pagelayer-props-modal .pagelayer-meta-iframe').attr('src', pagelayer_post_props );
3333
+ pagelayer.post_status = '';
3334
+ }
3335
  }
3336
  });
3337
 
4017
  props_new.attr('pagelayer-a-post_status', post_status);
4018
  }
4019
 
4020
+ // Need to pass true to render table
4021
  pagelayer_element_setup('.pagelayer-ele', true);
4022
  pagelayer_add_widget();
4023
+ alert(obj['success']);
4024
  }
4025
  }
4026
  });
js/pagelayer-frontend.js CHANGED
@@ -874,28 +874,44 @@ function pagelayer_contact_submit(jEle, e){
874
  //var fdata = jQuery(jEle).closest('form').serialize();
875
  var redirect = jQuery(jEle).find('input[name="cfa-redirect"]');
876
  var formData = new FormData( jQuery(jEle)[0] );
 
877
 
878
  // Append the nonce
879
  formData.append('pagelayer_nonce', pagelayer_global_nonce);
880
 
 
 
 
 
 
 
 
 
 
 
 
881
  jQuery.ajax({
882
- url: pagelayer_ajaxurl+'action=pagelayer_contact_submit',
883
- type: "POST",
884
- data: formData,
885
- processData: false,
886
- contentType: false,
887
- cache:false,
888
- success:function(result){
889
- var json = jQuery.parseJSON(result);
890
- if('success' in json){
891
- jQuery(jEle).parent().find(".pagelayer-message-box").html(json['success']).fadeIn().delay(10000).fadeOut();
892
-
 
893
  if(redirect.length > 0 && !pagelayer_empty(redirect.val())){
894
  window.location.href = redirect.val();
895
  }
896
- }else{
897
- jQuery(jEle).parent().find(".pagelayer-message-box").html(json['failed']).fadeIn().delay(10000).fadeOut();
898
- }
 
 
 
899
  }
900
  });
901
  jEle.reset();
874
  //var fdata = jQuery(jEle).closest('form').serialize();
875
  var redirect = jQuery(jEle).find('input[name="cfa-redirect"]');
876
  var formData = new FormData( jQuery(jEle)[0] );
877
+ var par = jQuery(jEle).parent();
878
 
879
  // Append the nonce
880
  formData.append('pagelayer_nonce', pagelayer_global_nonce);
881
 
882
+ // Hide any message
883
+ par.find(".pagelayer-message-box").hide();
884
+
885
+ // Message pos to use ?
886
+ var msg_pos = 'top';
887
+ if(par.parent().hasClass('pagelayer-message-box-bottom')){
888
+ msg_pos = 'bottom';
889
+ }
890
+
891
+ par.find(".pagelayer-message-box").removeClass('pagelayer-cf-msg-err pagelayer-cf-msg-suc');
892
+
893
  jQuery.ajax({
894
+ url: pagelayer_ajaxurl+'action=pagelayer_contact_submit',
895
+ type: "POST",
896
+ data: formData,
897
+ processData: false,
898
+ contentType: false,
899
+ cache:false,
900
+ success:function(result){
901
+ var json = jQuery.parseJSON(result);
902
+
903
+ if('success' in json){
904
+ par.find(".pagelayer-message-"+msg_pos).addClass('pagelayer-cf-msg-suc').html(json['success']).fadeIn();
905
+
906
  if(redirect.length > 0 && !pagelayer_empty(redirect.val())){
907
  window.location.href = redirect.val();
908
  }
909
+ }else{
910
+ par.find(".pagelayer-message-"+msg_pos).addClass('pagelayer-cf-msg-err').html(json['failed']).fadeIn();
911
+ }
912
+ },
913
+ error:function(result){
914
+ par.find(".pagelayer-message-"+msg_pos).addClass('pagelayer-cf-msg-err').html(json['failed']).fadeIn();
915
  }
916
  });
917
  jEle.reset();
js/properties.js CHANGED
@@ -243,7 +243,7 @@ function pagelayer_elpd_open(jEle){
243
  //pagelayer_elpd.css('left', pagelayer_elpd_pos[0]);
244
  //pagelayer_elpd.css('top', pagelayer_elpd_pos[1]);
245
  pagelayer_leftbar_tab('pagelayer-elpd');
246
- pagelayer.$$('.pagelayer-elpd-tabs').show();
247
  pagelayer.$$('.pagelayer-elpd-header').show();
248
  pagelayer.$$('.pagelayer-logo').hide();
249
 
243
  //pagelayer_elpd.css('left', pagelayer_elpd_pos[0]);
244
  //pagelayer_elpd.css('top', pagelayer_elpd_pos[1]);
245
  pagelayer_leftbar_tab('pagelayer-elpd');
246
+ pagelayer.$$('[pagelayer-elpd-tab=settings]').show();
247
  pagelayer.$$('.pagelayer-elpd-header').show();
248
  pagelayer.$$('.pagelayer-logo').hide();
249
 
languages/en.json CHANGED
@@ -270,6 +270,8 @@
270
  "stretch_button_label": "Stretch Button to full width",
271
  "redirect_url": "Redirect URL",
272
  "redirect_urllabel": "Choose the Redirect URL",
 
 
273
  "redirect_urldesc": "User will be redirected to this URL after contact form is submitted",
274
  "alignment": "Alignment",
275
  "default": "Default",
@@ -1829,5 +1831,6 @@
1829
  "disable_title_exp" : "It will disable only if the logo is enabled !",
1830
  "img_paste_conf" : "You have pasted over an existing image. How do you want to use the image ?",
1831
  "custom_profile" : "Profile Name",
1832
- "disable_sep" : "Disable Separator"
 
1833
  }
270
  "stretch_button_label": "Stretch Button to full width",
271
  "redirect_url": "Redirect URL",
272
  "redirect_urllabel": "Choose the Redirect URL",
273
+ "cf_success": "Your message was sent successfully",
274
+ "cf_failed": "Your message could not be sent ! Please try again.",
275
  "redirect_urldesc": "User will be redirected to this URL after contact form is submitted",
276
  "alignment": "Alignment",
277
  "default": "Default",
1831
  "disable_title_exp" : "It will disable only if the logo is enabled !",
1832
  "img_paste_conf" : "You have pasted over an existing image. How do you want to use the image ?",
1833
  "custom_profile" : "Profile Name",
1834
+ "disable_sep" : "Disable Separator",
1835
+ "message_style" : "Message Box"
1836
  }
main/ajax.php CHANGED
@@ -175,6 +175,25 @@ function pagelayer_save_content(){
175
  pagelayer_json_output($msg);
176
  }
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  // Any contact templates ?
179
  if(!empty($_REQUEST['contacts'])){
180
  update_post_meta($postID, 'pagelayer_contact_templates', $_REQUEST['contacts']);
@@ -1052,9 +1071,9 @@ function pagelayer_contact_submit(){
1052
  }
1053
 
1054
  if($r == TRUE){
1055
- $wp['success'] = get_option( 'pagelayer_cf_success' );
1056
  }else{
1057
- $wp['failed'] = get_option( 'pagelayer_cf_failed' );
1058
  }
1059
 
1060
  pagelayer_json_output($wp);
175
  pagelayer_json_output($msg);
176
  }
177
 
178
+ if(!empty($_REQUEST['post_status'])){
179
+
180
+ $post['post_status'] = $_REQUEST['post_status'];
181
+
182
+ if(!empty($post['post_status']) && $post['post_status'] == 'publish'){
183
+
184
+ // Allowed to publish pages ?
185
+ if($_post->post_type == 'page' && !current_user_can('publish_pages')){
186
+ $msg['error'][] = __pl('no_publish_permission');
187
+ pagelayer_json_output($msg);
188
+ }
189
+
190
+ // Allowed to publish posts ?
191
+ if($_post->post_type == 'post' && !current_user_can('publish_posts')){
192
+ $post['post_status'] = 'pending';
193
+ }
194
+ }
195
+ }
196
+
197
  // Any contact templates ?
198
  if(!empty($_REQUEST['contacts'])){
199
  update_post_meta($postID, 'pagelayer_contact_templates', $_REQUEST['contacts']);
1071
  }
1072
 
1073
  if($r == TRUE){
1074
+ $wp['success'] = pagelayer_get_option( 'pagelayer_cf_success' );
1075
  }else{
1076
+ $wp['failed'] = pagelayer_get_option( 'pagelayer_cf_failed' );
1077
  }
1078
 
1079
  pagelayer_json_output($wp);
main/functions.php CHANGED
@@ -2242,7 +2242,9 @@ function pagelayer_get_option($opt){
2242
  $opts = array('pagelayer-address' => '1, My Address, My Street, New York City, NY, USA',
2243
  'pagelayer-phone' => '+1234567890',
2244
  'pagelayer-copyright' => '© '.date('Y').' '.get_option('blogname'),
2245
- 'pagelayer_cf_to_email' => 'contact@domain.com');
 
 
2246
 
2247
  if(empty($ret)){
2248
  return $opts[$opt];
2242
  $opts = array('pagelayer-address' => '1, My Address, My Street, New York City, NY, USA',
2243
  'pagelayer-phone' => '+1234567890',
2244
  'pagelayer-copyright' => '© '.date('Y').' '.get_option('blogname'),
2245
+ 'pagelayer_cf_to_email' => 'contact@domain.com',
2246
+ 'pagelayer_cf_success' => __pl('cf_success'),
2247
+ 'pagelayer_cf_failed' => __pl('cf_failed'));
2248
 
2249
  if(empty($ret)){
2250
  return $opts[$opt];
main/post_metas.php CHANGED
@@ -302,6 +302,7 @@ border: #398439 1px solid;
302
  color: #fff;
303
  background: #449d44;
304
  padding: 5px 10px;
 
305
  }
306
 
307
  .pagelayer-block{
@@ -360,10 +361,14 @@ function pagelayer_open_body_props(){
360
 
361
  setting.attr('pagelayer-modal-none', 1);
362
  setting.click();
363
- doc.find('.pagelayer-elpd-tabs').hide();
364
  doc.find('.pagelayer-props-modal').click();
365
- doc.find('[pagelayer-elpd-tab="options"]').click();
 
366
  setting.removeAttr('pagelayer-modal-none');
 
 
 
367
 
368
  }
369
  </script>
302
  color: #fff;
303
  background: #449d44;
304
  padding: 5px 10px;
305
+ cursor: pointer;
306
  }
307
 
308
  .pagelayer-block{
361
 
362
  setting.attr('pagelayer-modal-none', 1);
363
  setting.click();
364
+ doc.find('[pagelayer-elpd-tab=settings]').hide();
365
  doc.find('.pagelayer-props-modal').click();
366
+ var opt = doc.find('[pagelayer-elpd-tab="options"]');
367
+ opt.click().addClass("highlight");
368
  setting.removeAttr('pagelayer-modal-none');
369
+ setTimeout(function(){
370
+ opt.removeClass("highlight")
371
+ }, 5000);
372
 
373
  }
374
  </script>
main/shortcodes.php CHANGED
@@ -5253,6 +5253,11 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_social', array(
5253
  'type' => 'link',
5254
  'label' => __pl('social_url_label'),
5255
  'default' => get_option('pagelayer-facebook-url'),
 
 
 
 
 
5256
  )
5257
  )
5258
  )
5253
  'type' => 'link',
5254
  'label' => __pl('social_url_label'),
5255
  'default' => get_option('pagelayer-facebook-url'),
5256
+ ),
5257
+ 'target' => array(
5258
+ 'type' => 'checkbox',
5259
+ 'label' => __pl('open_link_in_new_window'),
5260
+ 'addAttr' => ['{{element}} a' => 'target="_blank"']
5261
  )
5262
  )
5263
  )
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.3.3
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.3.4
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.5
6
  Requires PHP: 5.5
7
- Stable tag: 1.3.3
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
@@ -109,6 +109,12 @@ Do you have questions related to PageLayer ? Use the following links :
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
112
  = 1.3.3 (November 2, 2020) =
113
  * [Bug-Fix] The last version of Pagelayer was causing a set_current_screen conflict with WooCommerce. This is fixed.
114
 
4
  Requires at least: 4.7
5
  Tested up to: 5.5
6
  Requires PHP: 5.5
7
+ Stable tag: 1.3.4
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.3.4 (November 4, 2020) =
113
+ * [Added] Added option for the top / bottom position for the contact form success / failed message.
114
+ * [Added] Added "Open link in new window (tab)" option to the social widget.
115
+ * [Bug-Fix] After submitting the contact form the default success/failed message was not shown if the message was not set from the setting. This is fixed.
116
+ * [Bug-Fix] The post content widget was not working properly for the password protected posts. This is fixed.
117
+
118
  = 1.3.3 (November 2, 2020) =
119
  * [Bug-Fix] The last version of Pagelayer was causing a set_current_screen conflict with WooCommerce. This is fixed.
120