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

Version Description

(July 23, 2020) = * [Improvement] Mobile and tablet preview on the editor has been improved. Now the width of the preview will be determined according to the values set in the Website Settings of Pagelayer. * [Improvement] The element hide media query has been improved for Desktops, Tablets and Mobiles. * [Improvement] The table widget has been further improved. Now users can edit a table cell content in the live editor rather than using the left panel to set the values. * [Task] The website settings are now available in the free version of Pagelayer. * [Task] Added width option for the Facebook page widget. * [Task] The post title widget has been improved. * [Bug-Fix] Text editor undo and redo icons were not correct. This is fixed. * [Bug-Fix] In the certain cases, while editing the Splash widget the modal was hidden. This is fixed. * [Bug-Fix] While using the product archives widget on a pagelayer template, the products list was not shown. This is fixed.

Download this release

Release Info

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

Code changes from version 1.1.9 to 1.2.0

css/pagelayer-editor-frontend.css CHANGED
@@ -215,37 +215,6 @@ cursor:pointer;
215
  background:#EF4D4D;
216
  }
217
 
218
- @media (min-width: 769px){
219
- .pagelayer-hide-desktop{
220
- display:initial;
221
- filter:blur(3px);
222
- }
223
- .pagelayer-hide-desktop *{
224
- filter:blur(2px);
225
- }
226
- }
227
-
228
- @media (max-width: 768px) and (min-width: 361px){
229
- .pagelayer-hide-tablet{
230
- display:initial;
231
- filter:blur(3px);
232
- }
233
- .pagelayer-hide-tablet *{
234
- filter:blur(2px);
235
- }
236
- }
237
-
238
- @media (max-width: 360px){
239
- .pagelayer-hide-mobile{
240
- display:initial;
241
- filter:blur(3px);
242
- }
243
-
244
- .pagelayer-hide-mobile *{
245
- filter:blur(2px);
246
- }
247
- }
248
-
249
  /* Pagelayer add section area */
250
 
251
  .pagelayer-add-widget-area{
215
  background:#EF4D4D;
216
  }
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  /* Pagelayer add section area */
219
 
220
  .pagelayer-add-widget-area{
css/pagelayer-editor.css CHANGED
@@ -394,7 +394,6 @@ left: 0px !important;
394
  }
395
 
396
  .pagelayer-screen-tablet{
397
- width:768px;
398
  height:900px;
399
  margin:20px auto;
400
  border: solid #444;
@@ -403,7 +402,6 @@ border-radius: 10px;
403
  }
404
 
405
  .pagelayer-screen-mobile{
406
- width:360px;
407
  height:540px;
408
  margin:20px auto;
409
  border: solid #444;
394
  }
395
 
396
  .pagelayer-screen-tablet{
 
397
  height:900px;
398
  margin:20px auto;
399
  border: solid #444;
402
  }
403
 
404
  .pagelayer-screen-mobile{
 
405
  height:540px;
406
  margin:20px auto;
407
  border: solid #444;
css/pagelayer-frontend.css CHANGED
@@ -2,24 +2,6 @@
2
  PageLayer Frontend Framework
3
  */
4
 
5
- @media (min-width: 769px){
6
- .pagelayer-hide-desktop{
7
- display:none;
8
- }
9
- }
10
-
11
- @media (max-width: 768px) and (min-width: 361px){
12
- .pagelayer-hide-tablet{
13
- display:none;
14
- }
15
- }
16
-
17
- @media (max-width: 360px){
18
- .pagelayer-hide-mobile{
19
- display:none;
20
- }
21
- }
22
-
23
  [pagelayer-id]{
24
  transition:0.5s;
25
  }
@@ -55,8 +37,6 @@ align-content: flex-start;
55
  width: 100%;
56
  }
57
 
58
-
59
-
60
  .pagelayer-row.pagelayer-auto .pagelayer-col {
61
  flex-grow: 1; }
62
 
@@ -204,28 +184,12 @@ flex-grow: 1; }
204
  .pagelayer-gutters > .pagelayer-offset-12 {
205
  margin-left: calc(100% + 2%) !important; }
206
 
207
- @media (max-width: 768px) {
208
- [class^='pagelayer-offset-'],
209
- [class*=' pagelayer-offset-'] {
210
- margin-left: 0; } }
211
-
212
  .pagelayer-first {
213
  order: -1; }
214
 
215
  .pagelayer-last {
216
  order: 1; }
217
 
218
- @media (max-width: 768px) {
219
- .pagelayer-row .pagelayer-col {
220
- margin-left: 0;
221
- width: 100%; }
222
- .pagelayer-row.pagelayer-gutters .pagelayer-col {
223
- margin-bottom: 16px; }
224
- .pagelayer-first-sm {
225
- order: -1; }
226
- .pagelayer-last-sm {
227
- order: 1; } }
228
-
229
  /**************My Style for front-end *********/
230
 
231
  .pagelayer-img{
@@ -877,6 +841,7 @@ border-radius: 6px;
877
  position: absolute;
878
  z-index: 1;
879
  padding:5px;
 
880
  }
881
 
882
  .pagelayer-tooltip-icon{
@@ -2202,6 +2167,11 @@ font-size: 70px;
2202
  top: 0;
2203
  }
2204
 
 
 
 
 
 
2205
  /* Quote end */
2206
 
2207
  .pagelayer-call-icon-section,
2
  PageLayer Frontend Framework
3
  */
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  [pagelayer-id]{
6
  transition:0.5s;
7
  }
37
  width: 100%;
38
  }
39
 
 
 
40
  .pagelayer-row.pagelayer-auto .pagelayer-col {
41
  flex-grow: 1; }
42
 
184
  .pagelayer-gutters > .pagelayer-offset-12 {
185
  margin-left: calc(100% + 2%) !important; }
186
 
 
 
 
 
 
187
  .pagelayer-first {
188
  order: -1; }
189
 
190
  .pagelayer-last {
191
  order: 1; }
192
 
 
 
 
 
 
 
 
 
 
 
 
193
  /**************My Style for front-end *********/
194
 
195
  .pagelayer-img{
841
  position: absolute;
842
  z-index: 1;
843
  padding:5px;
844
+ word-break:break-word;
845
  }
846
 
847
  .pagelayer-tooltip-icon{
2167
  top: 0;
2168
  }
2169
 
2170
+ .pagelayer-quote-content .fa-quote-right{
2171
+ display: inline-block;
2172
+ vertical-align: top;
2173
+ }
2174
+
2175
  /* Quote end */
2176
 
2177
  .pagelayer-call-icon-section,
css/pagelayer-icons.css CHANGED
@@ -309,11 +309,11 @@ content: "\e914";
309
  }
310
  .pli-arrow-forward-outline:before,
311
  .trumbowyg-undo-button:before{
312
- content: "\e904";
313
  }
314
  .pli-arrow-back-outline:before,
315
  .trumbowyg-redo-button:before{
316
- content: "\e903";
317
  }
318
  .pli-message-typing:before,
319
  .pagelayer-pl_review_slider:before{
309
  }
310
  .pli-arrow-forward-outline:before,
311
  .trumbowyg-undo-button:before{
312
+ content: "\e905";
313
  }
314
  .pli-arrow-back-outline:before,
315
  .trumbowyg-redo-button:before{
316
+ content: "\e904";
317
  }
318
  .pli-message-typing:before,
319
  .pagelayer-pl_review_slider:before{
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.9');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
@@ -114,6 +114,7 @@ function pagelayer_load_plugin(){
114
  $pagelayer->settings['h5'] = get_option('pagelayer_h5_typography');
115
  $pagelayer->settings['h6'] = get_option('pagelayer_h6_typography');
116
  $pagelayer->settings['color'] = get_option('pagelayer_color');
 
117
 
118
  // To make things backward compatible
119
  if(!empty($pagelayer->settings['body_font'])){
@@ -197,12 +198,12 @@ function pagelayer_admin_menu() {
197
  // Settings Page
198
  add_submenu_page('pagelayer', __('Pagelayer Editor'), __('Settings'), $capability, 'pagelayer', 'pagelayer_page_handler');
199
 
 
 
 
200
  // Its premium
201
  if(defined('PAGELAYER_PREMIUM')){
202
 
203
- // UI Settings
204
- add_submenu_page('pagelayer', __('Website Settings'), __('Website Settings'), $capability, 'pagelayer_website_settings', 'pagelayer_website_page');
205
-
206
  // Add new template
207
  add_submenu_page('pagelayer', __('Theme Templates'), __('Theme Templates'), $capability, 'edit.php?post_type=pagelayer-template');
208
 
@@ -446,6 +447,7 @@ function pagelayer_global_js(){
446
  var pagelayer_ajaxurl = "'.admin_url( 'admin-ajax.php' ).'?";
447
  var pagelayer_global_nonce = "'.wp_create_nonce('pagelayer_global').'";
448
  var pagelayer_server_time = '.time().';
 
449
  var pagelayer_facebook_id = "'.get_option('pagelayer-fbapp-id').'";
450
  var pagelayer_settings = '.json_encode($pagelayer->settings).';
451
  var pagelayer_recaptch_lang = "'.(!empty($pagelayer_recaptch_lang) ? $pagelayer_recaptch_lang : '').'";
@@ -463,6 +465,42 @@ function pagelayer_global_styles(){
463
  // Style for only child row holder
464
  $styles .= '.pagelayer-row-stretch-auto > .pagelayer-row-holder, .pagelayer-row-stretch-full > .pagelayer-row-holder.pagelayer-width-auto{ max-width: '.$pagelayer->settings['max_width'].'px; margin-left: auto; margin-right: auto;}'.PHP_EOL;
465
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  // Colors
467
  if(!empty($pagelayer->settings['color']['background'])){
468
  $pagelayer->settings['body']['background-color'] = $pagelayer->settings['color']['background'];
5
 
6
  define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7
  define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
8
+ define('PAGELAYER_VERSION', '1.2.0');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
114
  $pagelayer->settings['h5'] = get_option('pagelayer_h5_typography');
115
  $pagelayer->settings['h6'] = get_option('pagelayer_h6_typography');
116
  $pagelayer->settings['color'] = get_option('pagelayer_color');
117
+ $pagelayer->settings['sidebar'] = get_option('pagelayer_sidebar');
118
 
119
  // To make things backward compatible
120
  if(!empty($pagelayer->settings['body_font'])){
198
  // Settings Page
199
  add_submenu_page('pagelayer', __('Pagelayer Editor'), __('Settings'), $capability, 'pagelayer', 'pagelayer_page_handler');
200
 
201
+ // UI Settings
202
+ add_submenu_page('pagelayer', __('Website Settings'), __('Website Settings'), $capability, 'pagelayer_website_settings', 'pagelayer_website_page');
203
+
204
  // Its premium
205
  if(defined('PAGELAYER_PREMIUM')){
206
 
 
 
 
207
  // Add new template
208
  add_submenu_page('pagelayer', __('Theme Templates'), __('Theme Templates'), $capability, 'edit.php?post_type=pagelayer-template');
209
 
447
  var pagelayer_ajaxurl = "'.admin_url( 'admin-ajax.php' ).'?";
448
  var pagelayer_global_nonce = "'.wp_create_nonce('pagelayer_global').'";
449
  var pagelayer_server_time = '.time().';
450
+ var pagelayer_is_live = "'.pagelayer_is_live().'";
451
  var pagelayer_facebook_id = "'.get_option('pagelayer-fbapp-id').'";
452
  var pagelayer_settings = '.json_encode($pagelayer->settings).';
453
  var pagelayer_recaptch_lang = "'.(!empty($pagelayer_recaptch_lang) ? $pagelayer_recaptch_lang : '').'";
465
  // Style for only child row holder
466
  $styles .= '.pagelayer-row-stretch-auto > .pagelayer-row-holder, .pagelayer-row-stretch-full > .pagelayer-row-holder.pagelayer-width-auto{ max-width: '.$pagelayer->settings['max_width'].'px; margin-left: auto; margin-right: auto;}'.PHP_EOL;
467
 
468
+ // Set responsive value
469
+ $styles .= '@media (min-width: '.($pagelayer->settings['tablet_breakpoint'] + 1).'px){
470
+ .pagelayer-hide-desktop{
471
+ display:none;
472
+ }
473
+ }
474
+
475
+ @media (max-width: '.$pagelayer->settings['tablet_breakpoint'].'px) and (min-width: '.($pagelayer->settings['mobile_breakpoint'] + 1).'px){
476
+ .pagelayer-hide-tablet{
477
+ display:none;
478
+ }
479
+ }
480
+
481
+ @media (max-width: '.$pagelayer->settings['tablet_breakpoint'].'px){
482
+ [class^="pagelayer-offset-"],
483
+ [class*=" pagelayer-offset-"] {
484
+ margin-left: 0;
485
+ }
486
+
487
+ .pagelayer-row .pagelayer-col {
488
+ margin-left: 0;
489
+ width: 100%; }
490
+ .pagelayer-row.pagelayer-gutters .pagelayer-col {
491
+ margin-bottom: 16px; }
492
+ .pagelayer-first-sm {
493
+ order: -1; }
494
+ .pagelayer-last-sm {
495
+ order: 1; }
496
+ }
497
+
498
+ @media (max-width: '.$pagelayer->settings['mobile_breakpoint'].'px){
499
+ .pagelayer-hide-mobile{
500
+ display:none;
501
+ }
502
+ }'.PHP_EOL;
503
+
504
  // Colors
505
  if(!empty($pagelayer->settings['color']['background'])){
506
  $pagelayer->settings['body']['background-color'] = $pagelayer->settings['color']['background'];
js/pagelayer-editor.js CHANGED
@@ -2828,6 +2828,13 @@ function pagelayer_sc_render(jEle){
2828
 
2829
  // If there is an HTML, then process it
2830
  if('html' in pagelayer_shortcodes[el.tag]){
 
 
 
 
 
 
 
2831
 
2832
  el.iHTML = jQuery('<div>'+pagelayer_shortcodes[el.tag]['html']+'</div>');
2833
 
@@ -2858,13 +2865,6 @@ function pagelayer_sc_render(jEle){
2858
  }
2859
 
2860
  });
2861
-
2862
- // Is there a function to render ?
2863
- var fn = window['pagelayer_render_'+jEle.attr('pagelayer-tag')];
2864
-
2865
- if(typeof fn == 'function'){
2866
- fn(el);
2867
- }
2868
 
2869
  //console.log(el.atts);
2870
 
2828
 
2829
  // If there is an HTML, then process it
2830
  if('html' in pagelayer_shortcodes[el.tag]){
2831
+
2832
+ // Is there a function to render ?
2833
+ var fn = window['pagelayer_render_'+jEle.attr('pagelayer-tag')];
2834
+
2835
+ if(typeof fn == 'function'){
2836
+ fn(el);
2837
+ }
2838
 
2839
  el.iHTML = jQuery('<div>'+pagelayer_shortcodes[el.tag]['html']+'</div>');
2840
 
2865
  }
2866
 
2867
  });
 
 
 
 
 
 
 
2868
 
2869
  //console.log(el.atts);
2870
 
js/properties.js CHANGED
@@ -1987,7 +1987,14 @@ function pagelayer_clear_editable(dontDestroy){
1987
  function pagelayer_make_editable(jEle, e){
1988
 
1989
  // The parent element
1990
- var pEle = jEle.closest('.pagelayer-ele');
 
 
 
 
 
 
 
1991
  var prop = jEle.attr('pagelayer-editable');
1992
  var eId = pagelayer_id(pEle)+'|'+jEle.attr('pagelayer-editable');// Editing ID
1993
 
1987
  function pagelayer_make_editable(jEle, e){
1988
 
1989
  // The parent element
1990
+ var pEle = jEle.closest('.pagelayer-ele, [pagelayer-ref-id]');
1991
+
1992
+ // Mainly for editing table cells as pagelayer-ref-id is used by them
1993
+ if(!pEle.hasClass('pagelayer-ele')){
1994
+ var refID = pEle.attr('pagelayer-ref-id');
1995
+ pEle = jQuery('[pagelayer-id="'+refID+'"]');
1996
+ }
1997
+
1998
  var prop = jEle.attr('pagelayer-editable');
1999
  var eId = pagelayer_id(pEle)+'|'+jEle.attr('pagelayer-editable');// Editing ID
2000
 
js/widgets.js CHANGED
@@ -255,7 +255,7 @@ function pagelayer_render_pl_image(el){
255
 
256
  // Custom url
257
  if(el.atts['link_type'] == 'custom_url'){
258
- el.atts['func_link'] = el.tmp['link'];
259
  }
260
 
261
  // Link to the media file itself
255
 
256
  // Custom url
257
  if(el.atts['link_type'] == 'custom_url'){
258
+ el.atts['func_link'] = el.tmp['link'] || '';
259
  }
260
 
261
  // Link to the media file itself
languages/en.json CHANGED
@@ -1753,5 +1753,7 @@
1753
  "usr_field_desc" : "You can use a field name with a prefix $ to print your field value e.g. if the field name is <b>fieldname</b> then use the variable <b>$fieldname</b>",
1754
  "xss_found" : "Following not allowed content found : ",
1755
  "fallback_color" : "Fallback background color if image fails to load",
1756
- "site_desc" : "Site Description"
 
 
1757
  }
1753
  "usr_field_desc" : "You can use a field name with a prefix $ to print your field value e.g. if the field name is <b>fieldname</b> then use the variable <b>$fieldname</b>",
1754
  "xss_found" : "Following not allowed content found : ",
1755
  "fallback_color" : "Fallback background color if image fails to load",
1756
+ "site_desc" : "Site Description",
1757
+ "private" : "Private",
1758
+ "splash_title_content_default" : "Splash Title"
1759
  }
main/ajax.php CHANGED
@@ -1416,36 +1416,14 @@ function pagelayer_product_archives(){
1416
  // Some AJAX security
1417
  check_ajax_referer('pagelayer_ajax', 'pagelayer_nonce');
1418
 
1419
- if ( WC()->session ) {
1420
- wc_print_notices();
1421
- }
1422
-
1423
- $atts['paginate'] = true;
1424
- $atts['cache'] = false;
1425
- $no_found = $_POST['atts']['no_found'];
1426
-
1427
- if( empty($_POST['atts']['allow_order']) ){
1428
- remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
1429
- }
1430
- if( empty($_POST['atts']['show_result']) ){
1431
- remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
1432
- }
1433
-
1434
- $type = 'pagelayer_current_query';
1435
-
1436
- // Set the current query
1437
- add_action( 'woocommerce_shortcode_products_query', 'pagelayer_shortcode_current_query', 10, 10);
1438
-
1439
- // If product not found
1440
- add_action( "woocommerce_shortcode_{$type}_loop_no_results", function ($attributes) use ($no_found){
1441
- echo '<div class="pagelayer-product-no-found">'.$no_found.'</div>';
1442
- } );
1443
 
1444
- // Get the products list
1445
- $shortcode = new WC_Shortcode_Products( $atts, $type );
1446
 
1447
- echo $shortcode->get_content();
1448
-
1449
  wp_die();
1450
  }
1451
 
@@ -1654,7 +1632,7 @@ function pagelayer_export_template(){
1654
  }
1655
 
1656
  // Export the settings
1657
- $settings = ['pagelayer_content_width', 'pagelayer_body_font', 'pagelayer_tablet_breakpoint', 'pagelayer_mobile_breakpoint', 'pagelayer_body_typography', 'pagelayer_h1_typography', 'pagelayer_h2_typography', 'pagelayer_h3_typography', 'pagelayer_h4_typography', 'pagelayer_h5_typography', 'pagelayer_h6_typography', 'pagelayer_color', 'pagelayer_header_code', 'pagelayer_footer_code'];
1658
 
1659
  foreach($settings as $v){
1660
 
1416
  // Some AJAX security
1417
  check_ajax_referer('pagelayer_ajax', 'pagelayer_nonce');
1418
 
1419
+ // Load Shortcodes
1420
+ pagelayer_load_shortcodes();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1421
 
1422
+ // Call the function
1423
+ pagelayer_sc_product_archives($_POST);
1424
 
1425
+ echo $_POST['atts']['product_archives'];
1426
+
1427
  wp_die();
1428
  }
1429
 
1632
  }
1633
 
1634
  // Export the settings
1635
+ $settings = ['pagelayer_content_width', 'pagelayer_body_font', 'pagelayer_tablet_breakpoint', 'pagelayer_mobile_breakpoint', 'pagelayer_body_typography', 'pagelayer_h1_typography', 'pagelayer_h2_typography', 'pagelayer_h3_typography', 'pagelayer_h4_typography', 'pagelayer_h5_typography', 'pagelayer_h6_typography', 'pagelayer_color', 'pagelayer_header_code', 'pagelayer_footer_code', 'pagelayer_sidebar'];
1636
 
1637
  foreach($settings as $v){
1638
 
main/functions.php CHANGED
@@ -214,7 +214,7 @@ function pagelayer_is_checked($post){
214
  return false;
215
  }
216
 
217
- // Reoort an error
218
  function pagelayer_report_error($error = array()){
219
 
220
  if(empty($error)){
@@ -559,12 +559,6 @@ function pagelayer_load_shortcodes(){
559
  // We have loaded
560
  $pagelayer->shortcode_loaded = 1;
561
 
562
- include_once(PAGELAYER_DIR.'/main/shortcode_functions.php');
563
- if(defined('PAGELAYER_PREMIUM')){
564
- include_once(PAGELAYER_DIR.'/main/premium_functions.php');
565
- }
566
- include_once(PAGELAYER_DIR.'/main/shortcodes.php');
567
-
568
  // pQuery
569
  include_once(PAGELAYER_DIR.'/lib/pquery/IQuery.php');
570
  include_once(PAGELAYER_DIR.'/lib/pquery/gan_formatter.php');
@@ -574,6 +568,12 @@ function pagelayer_load_shortcodes(){
574
  include_once(PAGELAYER_DIR.'/lib/pquery/gan_selector_html.php');
575
  include_once(PAGELAYER_DIR.'/lib/pquery/gan_xml2array.php');
576
  include_once(PAGELAYER_DIR.'/lib/pquery/pQuery.php');
 
 
 
 
 
 
577
 
578
  // Apply filter to load custom widgets
579
  do_action('pagelayer_load_custom_widgets');
214
  return false;
215
  }
216
 
217
+ // Report an error
218
  function pagelayer_report_error($error = array()){
219
 
220
  if(empty($error)){
559
  // We have loaded
560
  $pagelayer->shortcode_loaded = 1;
561
 
 
 
 
 
 
 
562
  // pQuery
563
  include_once(PAGELAYER_DIR.'/lib/pquery/IQuery.php');
564
  include_once(PAGELAYER_DIR.'/lib/pquery/gan_formatter.php');
568
  include_once(PAGELAYER_DIR.'/lib/pquery/gan_selector_html.php');
569
  include_once(PAGELAYER_DIR.'/lib/pquery/gan_xml2array.php');
570
  include_once(PAGELAYER_DIR.'/lib/pquery/pQuery.php');
571
+
572
+ include_once(PAGELAYER_DIR.'/main/shortcode_functions.php');
573
+ if(defined('PAGELAYER_PREMIUM')){
574
+ include_once(PAGELAYER_DIR.'/main/premium_functions.php');
575
+ }
576
+ include_once(PAGELAYER_DIR.'/main/shortcodes.php');
577
 
578
  // Apply filter to load custom widgets
579
  do_action('pagelayer_load_custom_widgets');
main/live-body.php CHANGED
@@ -50,6 +50,15 @@ global $post, $pagelayer;
50
  $brand = str_split($brand);
51
 
52
  echo '
 
 
 
 
 
 
 
 
 
53
  </head>
54
 
55
  <body class="pagelayer-normalize pagelayer-body">
50
  $brand = str_split($brand);
51
 
52
  echo '
53
+ <style>
54
+ /*Set responsive variables*/
55
+ .pagelayer-screen-tablet{
56
+ width: '. $pagelayer->settings['tablet_breakpoint'] .'px;
57
+ }
58
+ .pagelayer-screen-mobile{
59
+ width: '. $pagelayer->settings['mobile_breakpoint'] .'px;
60
+ }
61
+ </style>
62
  </head>
63
 
64
  <body class="pagelayer-normalize pagelayer-body">
main/live.php CHANGED
@@ -141,7 +141,38 @@ pagelayer_saved_sections = '.json_encode($pagelayer->saved_sections).';
141
  pagelayer_global_sections = '.json_encode($pagelayer->global_sections).';
142
  </script>';
143
 
144
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  do_action('pagelayer_editor_wp_head');
146
 
147
  }
141
  pagelayer_global_sections = '.json_encode($pagelayer->global_sections).';
142
  </script>';
143
 
144
+ echo '<style>
145
+ @media (min-width: '.($pagelayer->settings['tablet_breakpoint'] + 1).'px){
146
+ .pagelayer-hide-desktop{
147
+ display:initial;
148
+ filter:blur(3px);
149
+ }
150
+ .pagelayer-hide-desktop *{
151
+ filter:blur(2px);
152
+ }
153
+ }
154
+
155
+ @media (max-width: '.$pagelayer->settings['tablet_breakpoint'].'px) and (min-width: '.($pagelayer->settings['mobile_breakpoint'] + 1).'px){
156
+ .pagelayer-hide-tablet{
157
+ display:initial;
158
+ filter:blur(3px);
159
+ }
160
+ .pagelayer-hide-tablet *{
161
+ filter:blur(2px);
162
+ }
163
+ }
164
+
165
+ @media (max-width: '.$pagelayer->settings['mobile_breakpoint'].'px){
166
+ .pagelayer-hide-mobile{
167
+ display:initial;
168
+ filter:blur(3px);
169
+ }
170
+
171
+ .pagelayer-hide-mobile *{
172
+ filter:blur(2px);
173
+ }
174
+ }
175
+ </style>';
176
  do_action('pagelayer_editor_wp_head');
177
 
178
  }
main/shortcodes.php CHANGED
@@ -6711,7 +6711,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
6711
  'heading_url' => array(
6712
  'type' => 'link',
6713
  'label' => __pl('url'),
6714
- 'req' => ['!service_heading' => '']
6715
  ),
6716
  'heading_alignment' => array(
6717
  'type' => 'radio',
@@ -8923,7 +8923,8 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_post_props', array(
8923
  'label' => __pl('post_status'),
8924
  'list' => [
8925
  'publish' => __pl('Published'),
8926
- 'draft' => __pl('Draft'),
 
8927
  ],
8928
  ),
8929
  'featured_image' => array(
6711
  'heading_url' => array(
6712
  'type' => 'link',
6713
  'label' => __pl('url'),
6714
+ 'req' => ['!service_heading' => '', 'box_url' => '']
6715
  ),
6716
  'heading_alignment' => array(
6717
  'type' => 'radio',
8923
  'label' => __pl('post_status'),
8924
  'list' => [
8925
  'publish' => __pl('Published'),
8926
+ 'private' => __pl('private'),
8927
+ 'draft' => __pl('Draft')
8928
  ],
8929
  ),
8930
  'featured_image' => array(
main/template.php CHANGED
@@ -123,6 +123,9 @@ function pagelayer_template_include($template){
123
  add_action('get_footer', 'pagelayer_get_footer');
124
  }
125
 
 
 
 
126
  // If we do have Popup templates, then append it in body
127
  if(!empty($pagelayer->template_popup_ids) && empty($pagelayer->template_editor)){
128
  $pagelayer_enqueue_frontend = true;
@@ -142,11 +145,17 @@ function pagelayer_template_include($template){
142
 
143
  // Its our template OR are we editing a pagelayer-template, then render it
144
  if(pathinfo($template, PATHINFO_EXTENSION) == 'pgl' || !empty($pagelayer->template_post) || !empty($pagelayer->template_editor)){
145
-
 
 
 
146
  get_header();
147
  echo '<div class="pagelayer-content">';
148
  pagelayer_template_render($template);
149
  echo '</div>';
 
 
 
150
  get_footer();
151
 
152
  return false;
@@ -394,7 +403,6 @@ function pagelayer_get_footer($name) {
394
 
395
  // Avoid running wp_footer hooks again
396
  remove_all_actions( 'wp_footer' );
397
-
398
 
399
  $templates = [];
400
  $name = (string) $name;
@@ -405,7 +413,7 @@ function pagelayer_get_footer($name) {
405
  $templates[] = 'footer.php';
406
 
407
  // Since, we already outputted our footer, we need to do a locate_template for the existing theme
408
- // This is because, locate_template has the 3rd param as require once, so in the get_header
409
  // the footer.php will not load again
410
  ob_start();
411
  locate_template( $templates, true );
@@ -414,10 +422,28 @@ function pagelayer_get_footer($name) {
414
  }
415
 
416
  // Any sidebar to load ?
417
- function pagelayer_get_sidebar($name) {
418
 
419
  global $pagelayer;
420
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  // Output our content
422
  if(!empty($pagelayer->template_sidebar)){
423
  pagelayer_template_render($pagelayer->template_sidebar);
@@ -432,12 +458,64 @@ function pagelayer_get_sidebar($name) {
432
  $templates[] = 'sidebar.php';
433
 
434
  // Since, we already outputted our sidebar, we need to do a locate_template for the existing theme
435
- // This is because, locate_template has the 3rd param as require once, so in the get_header
436
  // the sidebar.php will not load again
437
  ob_start();
438
  locate_template( $templates, true );
439
- ob_get_clean();
 
 
 
 
 
 
 
440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  }
442
 
443
  // Get the custom post content by id
123
  add_action('get_footer', 'pagelayer_get_footer');
124
  }
125
 
126
+ // Handle the sidebar settings !
127
+ //add_action('get_sidebar', 'pagelayer_get_sidebar');
128
+
129
  // If we do have Popup templates, then append it in body
130
  if(!empty($pagelayer->template_popup_ids) && empty($pagelayer->template_editor)){
131
  $pagelayer_enqueue_frontend = true;
145
 
146
  // Its our template OR are we editing a pagelayer-template, then render it
147
  if(pathinfo($template, PATHINFO_EXTENSION) == 'pgl' || !empty($pagelayer->template_post) || !empty($pagelayer->template_editor)){
148
+
149
+ // We rendered from header to footer
150
+ $pagelayer->from_header_to_footer = true;
151
+
152
  get_header();
153
  echo '<div class="pagelayer-content">';
154
  pagelayer_template_render($template);
155
  echo '</div>';
156
+ /*if(!empty($pagelayer->template_header) || !empty($pagelayer->template_footer)){
157
+ get_sidebar();
158
+ }*/
159
  get_footer();
160
 
161
  return false;
403
 
404
  // Avoid running wp_footer hooks again
405
  remove_all_actions( 'wp_footer' );
 
406
 
407
  $templates = [];
408
  $name = (string) $name;
413
  $templates[] = 'footer.php';
414
 
415
  // Since, we already outputted our footer, we need to do a locate_template for the existing theme
416
+ // This is because, locate_template has the 3rd param as require once, so in the get_footer
417
  // the footer.php will not load again
418
  ob_start();
419
  locate_template( $templates, true );
422
  }
423
 
424
  // Any sidebar to load ?
425
+ function pagelayer_get_sidebar($name = '') {
426
 
427
  global $pagelayer;
428
 
429
+ // If any of our setting has been set, then only we apply. Otherwise we return !
430
+ if(is_customize_preview()){
431
+ $pagelayer->settings['sidebar'] = get_option('pagelayer_sidebar');
432
+ }
433
+
434
+ if(is_array($pagelayer->settings['sidebar'])){
435
+ foreach($pagelayer->settings['sidebar'] as $k => $v){
436
+ $set = 1;
437
+ break;
438
+ }
439
+ }
440
+
441
+ // If no settings were saved for pagelayer, let the default persist
442
+ // BUT if we are from_header_to_footer then we want default as no header and hence, we will render ours !
443
+ if(empty($set) && empty($pagelayer->from_header_to_footer)){
444
+ return;
445
+ }
446
+
447
  // Output our content
448
  if(!empty($pagelayer->template_sidebar)){
449
  pagelayer_template_render($pagelayer->template_sidebar);
458
  $templates[] = 'sidebar.php';
459
 
460
  // Since, we already outputted our sidebar, we need to do a locate_template for the existing theme
461
+ // This is because, locate_template has the 3rd param as require once, so in the get_sidebar
462
  // the sidebar.php will not load again
463
  ob_start();
464
  locate_template( $templates, true );
465
+ $sidebar = ob_get_clean();
466
+
467
+ // Lets see what are settings are ?
468
+ $set = !empty($pagelayer->settings['sidebar']) ? $pagelayer->settings['sidebar'] : [];
469
+
470
+ // For page
471
+ if(is_page()){
472
+ $enabled = isset($set['page']) ? $set['page'] : 'default';
473
 
474
+ // For post
475
+ }elseif(is_single()){
476
+ $enabled = isset($set['post']) ? $set['post'] : 'default';
477
+
478
+ // For Archives
479
+ }elseif(is_archive() || is_home()){
480
+ $enabled = isset($set['archives']) ? $set['archives'] : 'default';
481
+ }
482
+
483
+ // Load the default
484
+ if(@$enabled == 'default' || is_front_page()){
485
+ $enabled = @$set['default'];
486
+ }
487
+
488
+ // If its not right or left, then its disabled. Disabled values can be stored as "no" or "0"
489
+ if(!in_array($enabled, ['left', 'right'])){
490
+ return;
491
+ }
492
+
493
+ $width = (int) (empty($set['width']) ? 20 : $set['width']);
494
+
495
+ if(empty($sidebar)){
496
+ return;
497
+ }
498
+
499
+ echo $sidebar;
500
+
501
+ ?><style>
502
+ aside, #sidebar {
503
+ width: <?php echo $width;?>%;
504
+ float: <?php echo $enabled;?>;
505
+ }
506
+
507
+ main, .pagelayer-content{
508
+ width: <?php echo round(99 - $width);?>% !important;
509
+ display: inline-block;
510
+ }
511
+
512
+ #wp-calendar{
513
+ min-width: 100%;
514
+ }
515
+ </style>
516
+
517
+ <?php
518
+
519
  }
520
 
521
  // Get the custom post content by id
main/website.php CHANGED
@@ -37,7 +37,7 @@ function pagelayer_website_settings(){
37
 
38
  check_admin_referer('pagelayer-options');
39
 
40
- $font_settings = ['body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pagelayer_color' => 'color'];
41
 
42
  foreach($font_settings as $setting => $key){
43
 
@@ -49,6 +49,11 @@ function pagelayer_website_settings(){
49
  }
50
  }
51
 
 
 
 
 
 
52
  $setting = is_numeric($setting) ? 'pagelayer_'.$key.'_typography' : $setting;
53
 
54
  // Are we to save ?
@@ -134,6 +139,7 @@ function pagelayer_website_settings_T(){
134
  <a href="#headings" class="nav-tab ">Headings</a>
135
  <a href="#colors" class="nav-tab ">Colors</a>
136
  <a href="#website_container" class="nav-tab">Container</a>
 
137
  <a href="#hf" class="nav-tab ">Header and Footer</a>
138
  </h2>
139
 
@@ -232,6 +238,50 @@ function pagelayer_website_settings_T(){
232
  </table>
233
 
234
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
 
236
  <div class="pagelayer-tab-panel" id="hf">
237
  <?php if(!defined('PAGELAYER_PREMIUM')){
@@ -474,6 +524,26 @@ function pagelayer_website_font_settings($prefix){
474
 
475
  </table>
476
 
477
- <?php
 
 
 
 
 
 
 
 
 
478
 
 
 
 
 
 
 
 
 
 
 
 
479
  }
37
 
38
  check_admin_referer('pagelayer-options');
39
 
40
+ $font_settings = ['body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pagelayer_color' => 'color', 'pagelayer_sidebar' => 'sidebar'];
41
 
42
  foreach($font_settings as $setting => $key){
43
 
49
  }
50
  }
51
 
52
+ // For sidebar, width default should not be saved
53
+ if($key == 'sidebar' && $k == 'width' && $v == 20){
54
+ unset($_POST[$key][$k]);
55
+ }
56
+
57
  $setting = is_numeric($setting) ? 'pagelayer_'.$key.'_typography' : $setting;
58
 
59
  // Are we to save ?
139
  <a href="#headings" class="nav-tab ">Headings</a>
140
  <a href="#colors" class="nav-tab ">Colors</a>
141
  <a href="#website_container" class="nav-tab">Container</a>
142
+ <!--<a href="#pagelayer-sidebar" class="nav-tab">Sidebar</a>-->
143
  <a href="#hf" class="nav-tab ">Header and Footer</a>
144
  </h2>
145
 
238
  </table>
239
 
240
  </div>
241
+
242
+ <div class="pagelayer-tab-panel" id="pagelayer-sidebar">
243
+
244
+ <table width="100%">
245
+ <tr>
246
+ <td colspan="2">
247
+ <b><?php echo __('Sidebar Preferences');?> :</b>
248
+ <p><?php echo __('By default, the themes sidebar will be shown. But you can customize the settings here as per your preference. Note : This will work only if your theme uses the get_sidebar() function. Also the main content element and sidebar element should be siblings. If they are not siblings, then only the <b>No Sidebar</b> option will be usable.');?></p>
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <th valign="top"><?php echo __('Default');?> : </th>
253
+ <td>
254
+ <?php pagelayer_sidebar_select('default');?>
255
+ <p> <?php echo __('Default layout for the Sidebar throughout the site', 'pagelayer') ?> </p>
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <th valign="top"><?php echo __('For Pages');?> : </th>
260
+ <td>
261
+ <?php pagelayer_sidebar_select('page');?>
262
+ </td>
263
+ </tr>
264
+ <tr>
265
+ <th valign="top"><?php echo __('For Posts');?> : </th>
266
+ <td>
267
+ <?php pagelayer_sidebar_select('post');?>
268
+ </td>
269
+ </tr>
270
+ <tr>
271
+ <th valign="top"><?php echo __('For Archives');?> : </th>
272
+ <td>
273
+ <?php pagelayer_sidebar_select('archives');?>
274
+ </td>
275
+ </tr>
276
+ <tr>
277
+ <th valign="top"><?php echo __('Width');?> : </th>
278
+ <td>
279
+ <input type="number" name="sidebar[width]" min="1" step="1" value="<?php echo (!empty($_POST) ? $_POST['sidebar']['width'] : (!empty($pagelayer->settings['sidebar']['width']) ? $pagelayer->settings['sidebar']['width'] : '20') );?>" /><span>%</span>
280
+ </td>
281
+ </tr>
282
+ </table>
283
+
284
+ </div>
285
 
286
  <div class="pagelayer-tab-panel" id="hf">
287
  <?php if(!defined('PAGELAYER_PREMIUM')){
524
 
525
  </table>
526
 
527
+ <?php
528
+
529
+ }
530
+
531
+ function pagelayer_sidebar_select($name){
532
+
533
+ global $pagelayer;
534
+
535
+ $val = isset($pagelayer->settings['sidebar'][$name]) ? $pagelayer->settings['sidebar'][$name] : 'default';
536
+ $val = !empty($_POST) ? @$_POST['sidebar'][$name] : $val;
537
 
538
+ // We dont save the value "Default" (note case sensitivity), but the theme customizer saves "default"
539
+ // We need to keep all values blank if user is submitting values as Default
540
+
541
+ echo '
542
+ <select class="pagelayer-show-custom" name="sidebar['.$name.']">
543
+ <option value="Default" '.($val == 'default' ? 'selected="seleted"' : '').'>Default</option>
544
+ <option value="no" '.($val == 'no' ? 'selected="seleted"' : '').'>No Sidebar</option>
545
+ <option value="left" '.($val == 'left' ? 'selected="seleted"' : '').'>Left Sidebar</option>
546
+ <option value="right" '.($val == 'right' ? 'selected="seleted"' : '').'>Right Sidebar</option>
547
+ </select>
548
+ ';
549
  }
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.9
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.2.0
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.9
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
@@ -109,6 +109,17 @@ Do you have questions related to PageLayer ? Use the following links :
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
 
 
 
 
 
112
  = 1.1.9 (July 14, 2020) =
113
  * [Feature] Added Website settings to set global font styles and colors.
114
  * [Improvement] We have improved the Link property and you can now search posts/pages links in your WordPress site. Those links will automatically be updated if the target URL changes.
4
  Requires at least: 4.7
5
  Tested up to: 5.4
6
  Requires PHP: 5.5
7
+ Stable tag: 1.2.0
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.2.0 (July 23, 2020) =
113
+ * [Improvement] Mobile and tablet preview on the editor has been improved. Now the width of the preview will be determined according to the values set in the Website Settings of Pagelayer.
114
+ * [Improvement] The element hide media query has been improved for Desktops, Tablets and Mobiles.
115
+ * [Improvement] The table widget has been further improved. Now users can edit a table cell content in the live editor rather than using the left panel to set the values.
116
+ * [Task] The website settings are now available in the free version of Pagelayer.
117
+ * [Task] Added width option for the Facebook page widget.
118
+ * [Task] The post title widget has been improved.
119
+ * [Bug-Fix] Text editor undo and redo icons were not correct. This is fixed.
120
+ * [Bug-Fix] In the certain cases, while editing the Splash widget the modal was hidden. This is fixed.
121
+ * [Bug-Fix] While using the product archives widget on a pagelayer template, the products list was not shown. This is fixed.
122
+
123
  = 1.1.9 (July 14, 2020) =
124
  * [Feature] Added Website settings to set global font styles and colors.
125
  * [Improvement] We have improved the Link property and you can now search posts/pages links in your WordPress site. Those links will automatically be updated if the target URL changes.