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

Version Description

(Feb 21, 2022) = * [Task] The Pagelayer pen editor UX has been further improved. * [Bug-Fix] In some cases, the font-family and other css of icons were not applied correctly after the previous version. This is fixed. * [Bug-Fix] In some cases, Pagelayer import was not working properly. This is fixed. * [Bug-Fix] In some cases, Youtube video autoplay was not working. This is fixed.

Download this release

Release Info

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

Code changes from version 1.6.4 to 1.6.5

css/pagelayer-editor-frontend.css CHANGED
@@ -519,3 +519,15 @@ color: #fff;
519
  .pagelayer-shortcode-plus:hover .fas{
520
  background: #0069d9;
521
  }
 
 
 
 
 
 
 
 
 
 
 
 
519
  .pagelayer-shortcode-plus:hover .fas{
520
  background: #0069d9;
521
  }
522
+
523
+ [data-placeholder-text]::after{
524
+ display:inline-block;
525
+ content: attr(data-placeholder-text);
526
+ position:absolute;
527
+ top: 50%;
528
+ transform: translateY(-50%);
529
+ left:3px;
530
+ pointer-events:none;
531
+ opacity:0.6;
532
+ user-select:none;
533
+ }
css/pagelayer-editor.css CHANGED
@@ -4105,6 +4105,7 @@ border: 2px solid;
4105
 
4106
  .pagelayer-widget-tooltip .pagelayer-shortcode-holder{
4107
  width: 70px !important;
 
4108
  }
4109
 
4110
  .pagelayer-widget-list-tooltip{
@@ -4147,6 +4148,10 @@ height: auto;
4147
  width: 22px;
4148
  }
4149
 
 
 
 
 
4150
  /* Pagelayer widget list tooltip end*/
4151
  /* Menu start */
4152
  .pagelayer-elp-menu-items-holder{
4105
 
4106
  .pagelayer-widget-tooltip .pagelayer-shortcode-holder{
4107
  width: 70px !important;
4108
+ border: 1px solid transparent;
4109
  }
4110
 
4111
  .pagelayer-widget-list-tooltip{
4148
  width: 22px;
4149
  }
4150
 
4151
+ .pagelayer-shortcode-holder.pagelayer-list-widget-active{
4152
+ border: 1px solid rgb(0, 128, 0);
4153
+ }
4154
+
4155
  /* Pagelayer widget list tooltip end*/
4156
  /* Menu start */
4157
  .pagelayer-elp-menu-items-holder{
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.6.4');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
@@ -1238,6 +1238,12 @@ function pagelayer_add_custom_footer(){
1238
  wp_enqueue_script( 'pagelayer-localScript');
1239
  }
1240
 
 
 
 
 
 
 
1241
  $global_code = wp_unslash( get_option('pagelayer_footer_code') );
1242
 
1243
  if(!empty($post)){
@@ -1252,6 +1258,7 @@ function pagelayer_add_custom_footer(){
1252
  echo $footer_code."\n";
1253
  }
1254
 
 
1255
  }
1256
 
1257
  // Handle Logout Redirect here
5
 
6
  define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
7
  define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
8
+ define('PAGELAYER_VERSION', '1.6.5');
9
  define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
10
  define('PAGELAYER_SLUG', 'pagelayer');
11
  define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
1238
  wp_enqueue_script( 'pagelayer-localScript');
1239
  }
1240
 
1241
+ if($pagelayer->append_yt_api){
1242
+ wp_register_script('pagelayer-youtube-script',"https://www.youtube.com/iframe_api", array(), PAGELAYER_VERSION, true);
1243
+ wp_enqueue_script('pagelayer-youtube-script');
1244
+
1245
+ }
1246
+
1247
  $global_code = wp_unslash( get_option('pagelayer_footer_code') );
1248
 
1249
  if(!empty($post)){
1258
  echo $footer_code."\n";
1259
  }
1260
 
1261
+
1262
  }
1263
 
1264
  // Handle Logout Redirect here
js/combined.js CHANGED
@@ -97,6 +97,10 @@ jQuery(document).ready(function(){
97
  jQuery('.pagelayer-infinite-posts').each(function(){
98
  pagelayer_infinite_posts(jQuery(this));
99
  });
 
 
 
 
100
 
101
  // We need to call the is visible thing to show the widgets loading effect
102
  if(jQuery('.pagelayer-counter-content,.pagelayer-progress-container').length > 0){
@@ -205,9 +209,65 @@ function pagelayer_pl_row_video(jEle){
205
  }
206
 
207
  vEle.children().css({'width':frame_width+'px','height':frame_height+'px'});
208
-
 
 
 
 
209
  vEle.attr('pagelayer-setup', 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  }
212
 
213
  // Row background parallax
97
  jQuery('.pagelayer-infinite-posts').each(function(){
98
  pagelayer_infinite_posts(jQuery(this));
99
  });
100
+
101
+ jQuery('.pagelayer-youtube-video').each(function(){
102
+ pagelayer_create_yt_player(jQuery(this));
103
+ });
104
 
105
  // We need to call the is visible thing to show the widgets loading effect
106
  if(jQuery('.pagelayer-counter-content,.pagelayer-progress-container').length > 0){
209
  }
210
 
211
  vEle.children().css({'width':frame_width+'px','height':frame_height+'px'});
212
+
213
+ if(vEle.find('.pagelayer-youtube-video').length > 0){
214
+ pagelayer_create_yt_player(vEle.find('.pagelayer-youtube-video'));
215
+ }
216
+
217
  vEle.attr('pagelayer-setup', 1);
218
+
219
+ }
220
+
221
+ function pagelayer_create_yt_player(jEle){
222
+
223
+ var pEle = jEle.parent(),
224
+ aspectRatioSetting = '16:9',
225
+ containerWidth = pEle.outerWidth(),
226
+ containerHeight = pEle.outerHeight(),
227
+ aspectRatioArray = aspectRatioSetting.split(':'),
228
+ aspectRatio = aspectRatioArray[0] / aspectRatioArray[1],
229
+ isWidthFixed = containerWidth / containerHeight > aspectRatio,
230
+ width= isWidthFixed ? containerWidth : containerHeight * aspectRatio,
231
+ height= isWidthFixed ? containerWidth / aspectRatio : containerHeight;
232
+
233
+ var yt_api_interval = setInterval(function(){
234
+
235
+ if(!(window.YT && YT.loaded)){
236
+ return
237
+ }
238
 
239
+ clearInterval(yt_api_interval);
240
+
241
+ var settings ={};
242
+ settings.loop = jEle.attr('data-loop');
243
+ settings.videoid = jEle.attr('data-videoid');
244
+ settings.mute = jEle.attr('data-mute');
245
+
246
+ var player;
247
+
248
+ var onPlayerReady = function(event) {
249
+ event.target.playVideo();
250
+ }
251
+
252
+ player = new YT.Player(jEle[0], {
253
+ width: width,
254
+ height: height,
255
+ videoId: settings.videoid,
256
+ playerVars: {
257
+ controls: 0,
258
+ rel: 0,
259
+ loop: settings.loop,
260
+ mute:settings.mute,
261
+ playsinline: 1,
262
+ playlist: settings.videoid,
263
+ },
264
+ events: {
265
+ 'onReady': onPlayerReady,
266
+ }
267
+ });
268
+
269
+ }, 500);
270
+
271
  }
272
 
273
  // Row background parallax
js/pagelayer-editor.js CHANGED
@@ -195,6 +195,12 @@ function pagelayer_start(){
195
 
196
  // Open post props and Make elements editable to edit post props data
197
  pagelayer_setup_props_editable();
 
 
 
 
 
 
198
 
199
  // Hide the loader
200
  pagelayer_loader_hide();
@@ -1641,9 +1647,6 @@ function pagelayer_element_clicked(selector, e){
1641
  jEle.find('[pagelayer-editable]').each(function (){
1642
  pagelayer_make_editable(jQuery(this), e);
1643
  });
1644
-
1645
- // Use text widget for search widget
1646
- pagelayer_search_widgets(jEle);
1647
 
1648
  // Show left bar
1649
  pagelayer.$$('.pagelayer-leftbar-table').removeClass('pagelayer-leftbar-hidden pagelayer-leftbar-minimize');
@@ -1664,28 +1667,47 @@ function pagelayer_element_clicked(selector, e){
1664
  }
1665
 
1666
  // Use text widget for search widget
1667
- function pagelayer_search_widgets(jEle){
1668
 
1669
- var tag = pagelayer_tag(jEle);
1670
-
1671
- if(tag !='pl_heading'){
1672
- return;
1673
- }
1674
 
1675
- jEle.find('[pagelayer-editable="text"]').off('input.search_widgets');
1676
- jEle.find('[pagelayer-editable="text"]').on('input.search_widgets', function(){
1677
 
1678
- var tEle = jQuery(this);
1679
- var val = tEle.text();
1680
 
1681
- if(val.charAt(0) == "/"){
1682
- val = val.replace('/', '');
1683
- pagelayer_show_widget_list(tEle, val);
1684
- }else if(pagelayer.$$('.pagelayer-widget-tooltip').is(':visible')){
1685
- // Hide Widget list
1686
- pagelayer.gDocument.trigger('mousedown.pagelayer_wdlist');
 
 
 
1687
  }
1688
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1689
  });
1690
 
1691
  }
@@ -3905,7 +3927,7 @@ function pagelayer_sc_render(jEle){
3905
  var prop = elCSS.edit[c]['prop'];
3906
  var tSel = elCSS.edit[c]['sel'];
3907
  var node = tSel.length < 1 ? jEle : jEle.find(tSel);
3908
- node.attr('pagelayer-editable', prop);
3909
  }
3910
 
3911
  }
@@ -4272,7 +4294,7 @@ function pagelayer_save(){
4272
  // Update data or meta of the post
4273
  pagelayer_update_post_data();
4274
 
4275
- // Update Customizer Settings
4276
  pagelayer_update_customizer_settings();
4277
 
4278
  // Update nav menu
@@ -4753,6 +4775,9 @@ function pagelayer_leftbar(){
4753
  }else{
4754
  cEle.closest('#pagelayer-shortcodes').find('.pagelayer-shortcodes-widget').removeClass('pagelayer-hidden');
4755
  cEle.closest('#pagelayer-shortcodes').find('.pagelayer-global-widget').addClass('pagelayer-hidden');
 
 
 
4756
  }
4757
  });
4758
 
@@ -5812,6 +5837,8 @@ function pagelayer_video_url(src, no_url){
5812
  src : '//youtube.com/embed/'+videoId[1],
5813
  id : videoId[1]
5814
  };
 
 
5815
 
5816
  break;
5817
 
@@ -5848,6 +5875,17 @@ function pagelayer_video_url(src, no_url){
5848
  return vid_params;
5849
  };
5850
 
 
 
 
 
 
 
 
 
 
 
 
5851
  // Add widget section
5852
  function pagelayer_add_widget(){
5853
 
195
 
196
  // Open post props and Make elements editable to edit post props data
197
  pagelayer_setup_props_editable();
198
+
199
+ // Make elements editable
200
+ jQuery(pagelayer_editable + ' [pagelayer-editable]').attr('contenteditable', 'true');
201
+
202
+ // Use text widget for search widget
203
+ pagelayer_search_widgets();
204
 
205
  // Hide the loader
206
  pagelayer_loader_hide();
1647
  jEle.find('[pagelayer-editable]').each(function (){
1648
  pagelayer_make_editable(jQuery(this), e);
1649
  });
 
 
 
1650
 
1651
  // Show left bar
1652
  pagelayer.$$('.pagelayer-leftbar-table').removeClass('pagelayer-leftbar-hidden pagelayer-leftbar-minimize');
1667
  }
1668
 
1669
  // Use text widget for search widget
1670
+ function pagelayer_search_widgets(hEle){
1671
 
1672
+ hEle = hEle || jQuery(pagelayer_editable +' .pagelayer-heading');
 
 
 
 
1673
 
1674
+ hEle.each(function(){
 
1675
 
1676
+ var jEle = jQuery(this);
1677
+ var tEle = jEle.find('[pagelayer-editable="text"]');
1678
 
1679
+ var addPlaceholder = function(ele){
1680
+
1681
+ var tVal = ele.text();
1682
+
1683
+ if(pagelayer_empty(tVal)){
1684
+ ele.attr('data-placeholder-text', 'Type / to open widget list');
1685
+ }else if(ele.attr('data-placeholder-text')){
1686
+ ele.removeAttr('data-placeholder-text');
1687
+ }
1688
  }
1689
 
1690
+ // Add placeholder text
1691
+ addPlaceholder(tEle);
1692
+
1693
+ tEle.off('input.search_widgets');
1694
+ tEle.on('input.search_widgets', function(){
1695
+
1696
+ var val = tEle.text();
1697
+
1698
+ // Add placeholder text
1699
+ addPlaceholder(tEle);
1700
+
1701
+ if(val.charAt(0) == "/"){
1702
+ val = val.replace('/', '');
1703
+ pagelayer_show_widget_list(tEle, val);
1704
+ }else if(pagelayer.$$('.pagelayer-widget-tooltip').is(':visible')){
1705
+ // Hide Widget list
1706
+ pagelayer.gDocument.trigger('mousedown.pagelayer_wdlist');
1707
+ }
1708
+
1709
+ });
1710
+
1711
  });
1712
 
1713
  }
3927
  var prop = elCSS.edit[c]['prop'];
3928
  var tSel = elCSS.edit[c]['sel'];
3929
  var node = tSel.length < 1 ? jEle : jEle.find(tSel);
3930
+ node.attr({'pagelayer-editable': prop, 'contenteditable' : 'true'});
3931
  }
3932
 
3933
  }
4294
  // Update data or meta of the post
4295
  pagelayer_update_post_data();
4296
 
4297
+ // Update Customizer Settings
4298
  pagelayer_update_customizer_settings();
4299
 
4300
  // Update nav menu
4775
  }else{
4776
  cEle.closest('#pagelayer-shortcodes').find('.pagelayer-shortcodes-widget').removeClass('pagelayer-hidden');
4777
  cEle.closest('#pagelayer-shortcodes').find('.pagelayer-global-widget').addClass('pagelayer-hidden');
4778
+
4779
+ // Set focus to search
4780
+ pagelayer.$$('.pagelayer-search-field').focus().select();
4781
  }
4782
  });
4783
 
5837
  src : '//youtube.com/embed/'+videoId[1],
5838
  id : videoId[1]
5839
  };
5840
+
5841
+ pagelayer_yt_api_register();
5842
 
5843
  break;
5844
 
5875
  return vid_params;
5876
  };
5877
 
5878
+ // Youtube API Register
5879
+ function pagelayer_yt_api_register(){
5880
+
5881
+ if(jQuery('#pagelayer-youtube-script-js').length > 0){
5882
+ return;
5883
+ }
5884
+
5885
+ jQuery('body').append('<script src="https://www.youtube.com/iframe_api" id="pagelayer-youtube-script-js"></script>');
5886
+
5887
+ }
5888
+
5889
  // Add widget section
5890
  function pagelayer_add_widget(){
5891
 
js/pagelayer-frontend.js CHANGED
@@ -97,6 +97,10 @@ jQuery(document).ready(function(){
97
  jQuery('.pagelayer-infinite-posts').each(function(){
98
  pagelayer_infinite_posts(jQuery(this));
99
  });
 
 
 
 
100
 
101
  // We need to call the is visible thing to show the widgets loading effect
102
  if(jQuery('.pagelayer-counter-content,.pagelayer-progress-container').length > 0){
@@ -205,9 +209,65 @@ function pagelayer_pl_row_video(jEle){
205
  }
206
 
207
  vEle.children().css({'width':frame_width+'px','height':frame_height+'px'});
208
-
 
 
 
 
209
  vEle.attr('pagelayer-setup', 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  }
212
 
213
  // Row background parallax
97
  jQuery('.pagelayer-infinite-posts').each(function(){
98
  pagelayer_infinite_posts(jQuery(this));
99
  });
100
+
101
+ jQuery('.pagelayer-youtube-video').each(function(){
102
+ pagelayer_create_yt_player(jQuery(this));
103
+ });
104
 
105
  // We need to call the is visible thing to show the widgets loading effect
106
  if(jQuery('.pagelayer-counter-content,.pagelayer-progress-container').length > 0){
209
  }
210
 
211
  vEle.children().css({'width':frame_width+'px','height':frame_height+'px'});
212
+
213
+ if(vEle.find('.pagelayer-youtube-video').length > 0){
214
+ pagelayer_create_yt_player(vEle.find('.pagelayer-youtube-video'));
215
+ }
216
+
217
  vEle.attr('pagelayer-setup', 1);
218
+
219
+ }
220
+
221
+ function pagelayer_create_yt_player(jEle){
222
+
223
+ var pEle = jEle.parent(),
224
+ aspectRatioSetting = '16:9',
225
+ containerWidth = pEle.outerWidth(),
226
+ containerHeight = pEle.outerHeight(),
227
+ aspectRatioArray = aspectRatioSetting.split(':'),
228
+ aspectRatio = aspectRatioArray[0] / aspectRatioArray[1],
229
+ isWidthFixed = containerWidth / containerHeight > aspectRatio,
230
+ width= isWidthFixed ? containerWidth : containerHeight * aspectRatio,
231
+ height= isWidthFixed ? containerWidth / aspectRatio : containerHeight;
232
+
233
+ var yt_api_interval = setInterval(function(){
234
+
235
+ if(!(window.YT && YT.loaded)){
236
+ return
237
+ }
238
 
239
+ clearInterval(yt_api_interval);
240
+
241
+ var settings ={};
242
+ settings.loop = jEle.attr('data-loop');
243
+ settings.videoid = jEle.attr('data-videoid');
244
+ settings.mute = jEle.attr('data-mute');
245
+
246
+ var player;
247
+
248
+ var onPlayerReady = function(event) {
249
+ event.target.playVideo();
250
+ }
251
+
252
+ player = new YT.Player(jEle[0], {
253
+ width: width,
254
+ height: height,
255
+ videoId: settings.videoid,
256
+ playerVars: {
257
+ controls: 0,
258
+ rel: 0,
259
+ loop: settings.loop,
260
+ mute:settings.mute,
261
+ playsinline: 1,
262
+ playlist: settings.videoid,
263
+ },
264
+ events: {
265
+ 'onReady': onPlayerReady,
266
+ }
267
+ });
268
+
269
+ }, 500);
270
+
271
  }
272
 
273
  // Row background parallax
js/pagelayer-pen.js CHANGED
@@ -849,7 +849,7 @@ class PagelayerPen{
849
  // Set focus on editor
850
  editor.on('click', function(e){
851
 
852
- if(t.editor.attr('contenteditable') == 'true'){
853
  return;
854
  }
855
 
@@ -874,7 +874,7 @@ class PagelayerPen{
874
 
875
  destroy(){
876
  var t = this;
877
- t.editor.attr('contenteditable', '');
878
  t.penHolder.hide();
879
  // Removing event listeners
880
  jQuery(document).unbind('mousemove.penToobar');
849
  // Set focus on editor
850
  editor.on('click', function(e){
851
 
852
+ if(t.editor.hasClass('pagelayer-pen-focused')){
853
  return;
854
  }
855
 
874
 
875
  destroy(){
876
  var t = this;
877
+ //t.editor.attr('contenteditable', '');
878
  t.penHolder.hide();
879
  // Removing event listeners
880
  jQuery(document).unbind('mousemove.penToobar');
js/properties.js CHANGED
@@ -2622,7 +2622,7 @@ function pagelayer_make_editable(jEle, e){
2622
  // Are we the clicked object, then set the focus
2623
  if(e){
2624
  var target = jQuery(e.target);
2625
- if(target.is(jEle).length || jEle.find(target).length){
2626
  jEle.focus();
2627
  }
2628
  }
2622
  // Are we the clicked object, then set the focus
2623
  if(e){
2624
  var target = jQuery(e.target);
2625
+ if(target.is(jEle) || jEle.find(target).length > 0){
2626
  jEle.focus();
2627
  }
2628
  }
js/widgets.js CHANGED
@@ -117,9 +117,10 @@ function pagelayer_bg_video(el){
117
 
118
  if (iframe_atts['type'] == 'youtube') {
119
 
120
- //console.log(frame_height);
121
- el.atts['vid_src'] = '<iframe src="'+iframe_atts['src']+'&autoplay=1&controls=0&showinfo=0&rel=0&autohide=1&&playlist='+iframe_atts['id']+'" allowfullscreen="1" webkitallowfullscreen="1" mozallowfullscreen="1" frameborder="0"></iframe>';
122
 
 
 
123
  } else if (iframe_atts['type'] == 'vimeo') {
124
 
125
  el.atts['vid_src'] = '<iframe src="'+iframe_atts['src']+'&background=1&autoplay=1&byline=0&title=0" allowfullscreen="1" webkitallowfullscreen="1" mozallowfullscreen="1" frameborder="0"></iframe>';
@@ -488,8 +489,7 @@ function pagelayer_render_pl_image_slider(el){
488
  function pagelayer_render_end_pl_image_slider(el){
489
  pagelayer_owl_destroy(el.$, '.pagelayer-image-slider-ul');
490
  pagelayer_pl_image_slider(el.$);
491
- };
492
-
493
 
494
  // Render the grid gallery
495
  function pagelayer_render_pl_grid_gallery(el){
@@ -1401,6 +1401,10 @@ function pagelayer_render_end_pl_contact(el){
1401
 
1402
  }
1403
 
 
 
 
 
1404
  // Render the contact form
1405
  function pagelayer_render_pl_contact_item(el){
1406
  var html = '';
117
 
118
  if (iframe_atts['type'] == 'youtube') {
119
 
120
+ var settings = 'data-loop="'+(!pagelayer_empty(el['atts']['stop_loop']) ? 1 : 0)+'" data-mute="'+ (!pagelayer_empty(el['atts']['mute']) ? 1 : 0)+'" data-videoid="'+(iframe_atts['id'].split('&')[0])+'"';
 
121
 
122
+ el.atts['vid_src'] = '<div class = "pagelayer-youtube-video" '+ settings +'></div>';
123
+
124
  } else if (iframe_atts['type'] == 'vimeo') {
125
 
126
  el.atts['vid_src'] = '<iframe src="'+iframe_atts['src']+'&background=1&autoplay=1&byline=0&title=0" allowfullscreen="1" webkitallowfullscreen="1" mozallowfullscreen="1" frameborder="0"></iframe>';
489
  function pagelayer_render_end_pl_image_slider(el){
490
  pagelayer_owl_destroy(el.$, '.pagelayer-image-slider-ul');
491
  pagelayer_pl_image_slider(el.$);
492
+ }
 
493
 
494
  // Render the grid gallery
495
  function pagelayer_render_pl_grid_gallery(el){
1401
 
1402
  }
1403
 
1404
+ function pagelayer_render_end_pl_heading(el) {
1405
+ pagelayer_search_widgets(el.$);
1406
+ }
1407
+
1408
  // Render the contact form
1409
  function pagelayer_render_pl_contact_item(el){
1410
  var html = '';
main/class.php CHANGED
@@ -79,6 +79,9 @@ class PageLayer{
79
 
80
  // For saved default params
81
  var $default_params = array();
 
 
 
82
 
83
  var $css = array();
84
  var $css_settings = array();
@@ -120,7 +123,7 @@ class PageLayer{
120
  'h5' => ['name' => 'H5', 'key' => 'pagelayer_h5_typography'],
121
  'h6' => ['name' => 'H6', 'key' => 'pagelayer_h6_typography'],
122
  'b' => ['name' => 'Bold', 'sel' => 'strong, body.pagelayer-body b'],
123
- 'i' => ['name' => 'Italics', 'sel' => 'em, body.pagelayer-body i'],
124
  ];
125
 
126
  $this->system_fonts = ['Arial', 'Arial Black', 'Courier', 'Georgia', 'Helvetica', 'impact', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana'];
79
 
80
  // For saved default params
81
  var $default_params = array();
82
+
83
+ // Youtube API
84
+ var $append_yt_api = false;
85
 
86
  var $css = array();
87
  var $css_settings = array();
123
  'h5' => ['name' => 'H5', 'key' => 'pagelayer_h5_typography'],
124
  'h6' => ['name' => 'H6', 'key' => 'pagelayer_h6_typography'],
125
  'b' => ['name' => 'Bold', 'sel' => 'strong, body.pagelayer-body b'],
126
+ 'i' => ['name' => 'Italics', 'sel' => 'em, body.pagelayer-body i:not(.fa, .fas, .far, .fab)'],
127
  ];
128
 
129
  $this->system_fonts = ['Arial', 'Arial Black', 'Courier', 'Georgia', 'Helvetica', 'impact', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana'];
main/functions.php CHANGED
@@ -1009,6 +1009,8 @@ function pagelayer_attachment($id){
1009
  // Todo : Check
1010
  function pagelayer_video_url($source, $no_url = false){
1011
 
 
 
1012
  if (!empty($source)) {
1013
 
1014
  $source = esc_url( $source );
@@ -1029,6 +1031,8 @@ function pagelayer_video_url($source, $no_url = false){
1029
  switch ($videoSite) {
1030
  case 'youtube':
1031
 
 
 
1032
  if (preg_match('/youtube\.com/is', $source)) {
1033
 
1034
  if (preg_match('/watch/is', $source)) {
@@ -2660,8 +2664,11 @@ function pagelayer_upload_media($filename, $blob){
2660
  update_post_meta($attach_id, 'pagelayer_image_md5', $md5);
2661
 
2662
  $lib = ABSPATH . 'site-admin/includes/image.php';
 
 
2663
  $lib = file_exists($lib) ? $lib : ABSPATH . 'wp-admin/includes/image.php';
2664
 
 
2665
  require_once($lib);
2666
 
2667
  $attach_data = wp_generate_attachment_metadata( $attach_id, $file_path );
1009
  // Todo : Check
1010
  function pagelayer_video_url($source, $no_url = false){
1011
 
1012
+ global $pagelayer;
1013
+
1014
  if (!empty($source)) {
1015
 
1016
  $source = esc_url( $source );
1031
  switch ($videoSite) {
1032
  case 'youtube':
1033
 
1034
+ $pagelayer->append_yt_api = true;
1035
+
1036
  if (preg_match('/youtube\.com/is', $source)) {
1037
 
1038
  if (preg_match('/watch/is', $source)) {
2664
  update_post_meta($attach_id, 'pagelayer_image_md5', $md5);
2665
 
2666
  $lib = ABSPATH . 'site-admin/includes/image.php';
2667
+ $media = ABSPATH . 'site-admin/includes/media.php';
2668
+ $media = file_exists($media) ? $media : ABSPATH . 'wp-admin/includes/media.php';
2669
  $lib = file_exists($lib) ? $lib : ABSPATH . 'wp-admin/includes/image.php';
2670
 
2671
+ require_once($media);
2672
  require_once($lib);
2673
 
2674
  $attach_data = wp_generate_attachment_metadata( $attach_id, $file_path );
main/shortcode_functions.php CHANGED
@@ -1038,8 +1038,10 @@ function pagelayer_bg_video(&$el){
1038
  if (!empty($source)) {
1039
 
1040
  if ($iframe_atts['type'] == 'youtube') {
1041
-
1042
- $el['atts']['vid_src'] = '<iframe src="'.$iframe_atts['src'].'&autoplay=1&controls=0&showinfo=0&rel=0&autohide=1&playlist='.$iframe_atts['id'].'" allowfullscreen="1" webkitallowfullscreen="1" mozallowfullscreen="1" frameborder="0"></iframe>';
 
 
1043
 
1044
  } else if ($iframe_atts['type'] == 'vimeo') {
1045
 
1038
  if (!empty($source)) {
1039
 
1040
  if ($iframe_atts['type'] == 'youtube') {
1041
+
1042
+ $settings = ' data-loop="'.( !empty($el['atts']['stop_loop']) ? 1 : 0 ).'" data-mute="'.( !empty($el['atts']['mute']) ? 1 : 0 ).'" data-videoid = "'.( $iframe_atts['id'] ).'"';
1043
+
1044
+ $el['atts']['vid_src'] = '<div class = "pagelayer-youtube-video" '. $settings .'></div>';
1045
 
1046
  } else if ($iframe_atts['type'] == 'vimeo') {
1047
 
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.6.4
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.6.5
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, form builder, landing page, responsiv
4
  Requires at least: 4.7
5
  Tested up to: 5.9
6
  Requires PHP: 5.5
7
- Stable tag: 1.6.4
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
@@ -127,6 +127,12 @@ Do you have questions related to Pagelayer? Use the following links :
127
 
128
  == Changelog ==
129
 
 
 
 
 
 
 
130
  = 1.6.4 (Feb 11, 2022) =
131
  * [Task] WordPress 5.9 adds support for capability queries in WP_User_Query. We have tested and made required changes.
132
  * [Bug-Fix] In certain cases, some style was not applied properly in the editor. This is fixed.
4
  Requires at least: 4.7
5
  Tested up to: 5.9
6
  Requires PHP: 5.5
7
+ Stable tag: 1.6.5
8
  License: LGPL v2.1
9
  License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
 
127
 
128
  == Changelog ==
129
 
130
+ = 1.6.5 (Feb 21, 2022) =
131
+ * [Task] The Pagelayer pen editor UX has been further improved.
132
+ * [Bug-Fix] In some cases, the font-family and other css of icons were not applied correctly after the previous version. This is fixed.
133
+ * [Bug-Fix] In some cases, Pagelayer import was not working properly. This is fixed.
134
+ * [Bug-Fix] In some cases, Youtube video autoplay was not working. This is fixed.
135
+
136
  = 1.6.4 (Feb 11, 2022) =
137
  * [Task] WordPress 5.9 adds support for capability queries in WP_User_Query. We have tested and made required changes.
138
  * [Bug-Fix] In certain cases, some style was not applied properly in the editor. This is fixed.