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

Version Description

(September 27, 2019) = * [Feature] Added the option to resize columns by dragging the divider between the 2 columns. * [Feature] Images can now be pasted from the Clip Board in the Pagelayer Editor. These images will be uploaded and saved. * [Feature] You can now copy Pagelayer Elements from one editor tab into another editor tab. * [Feature] Image and Icon Box's can now have a link for the whole box. * [Feature] Added rotate option to Icon Widget. * [Task] Added the option to remove the color from a color setting to reset to default. * [Task] Improved the Image filter options setting in Pagelayer editor. * [Task] Removed the empty space of the Admin Bar in Pagelayer editor. * [Task] Added Screen options for a number of Widget Settings. * [Bug Fix] On the blog page if the first post was not a Pagelayer post, the other posts were not rendered. This is fixed. * [Bug Fix] On some servers the pagelayer editor JS used to fail to load because of the URL having base64 as a file name. * [Bug Fix] If a Page / Post did not have a title, Pagelayer Live Editor used to fail. This is fixed. * [Bug Fix] The Color Picker had a z-index lower than the rich text editor. This is fixed. * [Bug Fix] The Divider widget had extra spacing which is now fixed.

Download this release

Release Info

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

Code changes from version 0.9.9 to 1.0.0

css/pagelayer-editor-frontend.css CHANGED
@@ -263,3 +263,53 @@ width: 1px;
263
height: 100% !important;
264
}
265
263
height: 100% !important;
264
}
265
266
+ /* Column resize handler icon */
267
+ .pagelayer-resize-handler{
268
+ position:absolute;
269
+ top:50%;
270
+ left:100%;
271
+ transform: translate(-43%, -50%);
272
+ color: #fff;
273
+ font-size: 11px;
274
+ z-index: 99;
275
+ cursor:ew-resize;
276
+ display:none;
277
+ pointer-events: all;
278
+ }
279
+
280
+ .pagelayer-resize-icon{
281
+ background-color: #905101;
282
+ padding: 3px;
283
+ border-radius: 4px;
284
+ height:30px;
285
+ display:inline-block;
286
+ }
287
+
288
+ .pagelayer-resize-handler:before{
289
+ content:attr(pre-width);
290
+ background: #4f4f4f;
291
+ position: absolute;
292
+ right: 120%;
293
+ top: 50%;
294
+ transform: translateY(-50%);
295
+ padding: 0 6px;
296
+ border-radius:100%;
297
+ }
298
+
299
+ .pagelayer-resize-handler:after{
300
+ content:attr(next-width);
301
+ background: #4f4f4f;
302
+ position: absolute;
303
+ left: 120%;
304
+ top: 50%;
305
+ transform: translateY(-50%);
306
+ padding: 0 6px;
307
+ border-radius:100%;
308
+ }
309
+
310
+ /* Hide resize handler icon from last child*/
311
+ .pagelayer-wrap-col:not(:last-child):hover .pagelayer-ele-hover .pagelayer-resize-handler{
312
+ display:block;
313
+ }
314
+
315
+ /* Column resize handler icon end */
css/pagelayer-editor.css CHANGED
@@ -734,6 +734,12 @@ vertical-align: middle;
734
.pagelayer-elp-color-preview{
735
height: 93%;
736
border: solid 1px #d1d1d1;
737
}
738
739
.picker_arrow {
@@ -760,6 +766,30 @@ background: #fff !important;
760
box-shadow: 0 3px 5px rgba(0,0,0,0.2) !important;
761
}
762
763
.pagelayer-elp-icon-div{
764
cursor: pointer;
765
padding: 6px;
@@ -909,7 +939,7 @@ input.pagelayer-elp-slider{
909
width: 75%;
910
height: 10px;
911
border-radius: 5px;
912
- background: #d3d3d3 !important;
913
outline: none;
914
opacity: 0.7;
915
-webkit-transition: .2s;
@@ -1294,6 +1324,39 @@ font-size:13px;
1294
text-align: right;
1295
}
1296
1297
.pagelayer-elp-typo .pagelayer-elp-label{
1298
font-weight: 600;
1299
font-size: 11px;
734
.pagelayer-elp-color-preview{
735
height: 93%;
736
border: solid 1px #d1d1d1;
737
+ background-size: cover !important;
738
+ }
739
+
740
+ .pagelayer-blank-preview{
741
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgBAMAAAB54XoeAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC1QTFRFAAAAAQEBBQUFDAwM9PT0+vr6/////v7+BAQE+/v7AgIC/f39AwMDDQ0N8/Pzb6ggJQAAAZ5JREFUeJztlr1twzAQhU+tK7ELDDdBNsgO2SAznAr3JAJXWSJp49YLuPAW2cJbhEdSQZBCEMRHgMVj5U80HnkSfz4Ra06eXjSoTvr6HKGGU94o8vBpqPr2LjLUcAr8ikNEnLx6jT93VZxneBn1Zg9uOlxsxO0suTkXfJywTsG5Ok5x9hK0NKM6bhEosh+nq+HJD+c6TmvG2r8RtrMb9g4aOKY3CA0ElyyHcbAHIXNw5Q9bWeLG2aUH80ItU97K8ihlhmmIUFb+dpZvOceNE7fOnz/UsNztHAMEzSwf6idEqTOLHv0R8THc7/o72Qzrl8vMwAVdmreDFhloLxQcCC65QSC45AYfBV0yfGGjtx78cLjrVaHHF/yAhV8B8EsKfo3CL/pRHFZFnIBlCa5z9EP6If1wBdMPe5QleMkNAumHuZ9+SD9cYPphjzpHP6Qf0g9XMP2wR1mCl9wgkH6Y++mH9MMFph/2qHP0Q/oh/XAF0w97lCV4yQ0C6Ye5n35IP1xg+mGPOkc/pB/SD1cw/bBHWYKX3CCQfpj76Yfr+QfwnsxmcLvdhQAAAABJRU5ErkJggg==') !important;
742
+ background-size: cover !important;
743
}
744
745
.picker_arrow {
766
box-shadow: 0 3px 5px rgba(0,0,0,0.2) !important;
767
}
768
769
+ .picker_wrapper{
770
+ z-index:12 !important;
771
+ }
772
+
773
+ .pagelayer-prop-action{
774
+ height: 15px;
775
+ width: 15px;
776
+ background-color:#616161;
777
+ position: absolute;
778
+ top: 0;
779
+ right: 0;
780
+ z-index:1;
781
+ box-shadow: 0 0 3px #333;
782
+ }
783
+
784
+ .pagelayer-prop-action .fa{
785
+ color: #fff;
786
+ font-size: 12px;
787
+ position:absolute;
788
+ top:50%;
789
+ left:50%;
790
+ transform: translate(-50%, -50%);
791
+ }
792
+
793
.pagelayer-elp-icon-div{
794
cursor: pointer;
795
padding: 6px;
939
width: 75%;
940
height: 10px;
941
border-radius: 5px;
942
+ background-color: #d3d3d3 !important;
943
outline: none;
944
opacity: 0.7;
945
-webkit-transition: .2s;
1324
text-align: right;
1325
}
1326
1327
+ .pagelayer-elp-filter-input{
1328
+ background-position: center center !important;
1329
+ background-size: cover !important;
1330
+ }
1331
+
1332
+ .pagelayer-elp-filter-blur .pagelayer-elp-filter-input{
1333
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAAAKCAIAAAC2Wq7lAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAABq9JREFUeJyVlmtvHGcZhnfOszs7u+s9ENtrI9eqHbWJKSSIlBz4QD/mFxQpUvlSviTKb4nyC4qI/0HkCCgijapQQJBDUe04uPEh69re887OeXa43l2wjNsK+toejd/Dc7if+7nfUTMnhiRJGxsbS0tLk3/TNL1+/fra2hrzvPO8c+fOzZs3eZlsuHv37u3btydL5XL5xo0bv/rwwzeXl9Ikff16b+3Bg3v3fvPs6bMwiqbPTF/92ZX33//FpUvvFoulfq/7ycOHH/36o4d//MRxBpZlrays/PKDD35y6d36XN31gid//9tvf/+7x59+2mg0dF1fXlq6cuXylWvXzp07Z1mFXrfz4MHaxx//YfPFJsZnpqdXfnD+xxcvnHv7fC6fazVbX6x/8fTpsxebm439fU2RL1648NPLl996620rb3W73a1/bj198qTf7w+HQ1mWK5XqwsLC4uIbc3PzZGGYpnoSFNI7hdHJ+cnzePLUkpSRcCBl+M2MmMiMt6X8iCOSzIIcR3E6GmVGYrBDVbSJH1lRVE1jb5ImSRJHYRDFIYYUVcWmooi/NMPxxHN9TdWTUYJFlaEpo1Ey9ithM0wiY5TESYJ5JnVVsy0rCAMiGKWjGMsRxiN84F04HdtniLNh6HpD3cV4pE7yPAXHdx0AJSsydoAjEYOcE/AAJwInYk3TFUmJRUj8BmEYEAd14xSR6brBIALf87udnuP0Qz9UJNk09FwuB1N0zQBkTkErUPA8V1Uk3dBY5bhh6rgOwngwcMjQ9704jgEym8vaUUHxXFCnHr7rEtbQdclfkSRN1UamqcgCGvY7w2Gn3QY2w/hvpvzP8Y3YaZqmKEo2m6V6QeA3j5ps6/UHVCyXs6q1ipRK5UpFMwzHcZuHRy7+3SGh66o+NTWVy+aKpSIjDMJWu+UMnTiISF5RlalyGWRVTS8UberW7fb2Gw3o7flelMRWLletVuM4sW2bzFzPPTo88L3hYIBxn5DsQkFVVDvOg6rn+c1WS9XUoQMsrgLfMikuqCTPKI4H/T5wD5wh7FOXl5dPpkoPZ/7TI8yXSiUkZqIazERRtLm5ebwK5Kx+f34eOArFAqX7/PN/sEYvhUHgDoeLiwv1+kwmIxMWiR8eHv75r3+hG8DLGQyKUyWEAmJTq0ql0h/0Xmxs0gppOgr8APq8sbBQn63Td1SPIn/1VaPdbkEB2if0Pdsu6JrOvGgjVe11up7r8g5RAUXT1XKplNgFyKtrGgoSBPRRZiTaM6JzsZOKSDOQKwrDbg+GOmO+y+r6+vpJFM6ePUvaxxjdv39/dXX1mCbIKiAer966dQthfvnyJe8k/OjRo9XVewHM1xTKuLi4ePXqtWKhQBsBEHB/+erVZ5/9icY2dL1aq62snH/vvZ+riuIF/u727s7Oq3bnS/BCROx8ng1z9Xo2myNJ+gISbW/vuq4DNci8YNsz0zPWzKysSHgE4k67gyiQHt1ocz6fL+RtpIoeBqz2mIMoGq2IzaxpGYomKRJZoTXoTuQQVyhUD5RPCufXxeXU6td7h0nIIgTCsh4/fry9s7O7vaPq2vSZM3VIMjMDymw6OjwcOA6RPX/+nILYBfvijy5C/nfe+aGZNTutdhxGGxvrW1tbFBnI5ufnZ2frXAe1ahV67uy9braahwcHjf0GG/JWntU3l5bn6rOarnGh+J4HF/YPGv3+oFCwOVgqTnHNWfm8Zuh7O7ugtvd6j7zptVqtlsvm6XpVVwGFvsNFr99z+gPXE3r03TTl24agnCbwTeKYhleiwPeLIGUY+qThCRo+kw+hkwMt44d+LitqZuWsJIooLPVAjziezZrgpQpRsCu1KlrT6XSoFaU+ah6hCHE5LpWn2MbT0HTuG2jv+m6r2ez1+3RfrfY9lAKbpakSXg729yFjt9MlAHhB37GHypkml1WC7KOvQ8dpddqD3iCMwtOgfCMd/g9QRGdK8r9Pi9tnNLm/meTuU4SkISVQfzxgKfCNnbEuIaW6afDmieEyzU6eKJGhm7xABzkViuaLdS/MR5mxwIML9xo/7EEsh8gpIwjxgDvDFIhTDFzgjoWh5xqmkaRxmqGPVNM0Y24iWVznrDoDB0wxoPK/NB6Zb7lcjsfxd8rJbccaLGUmZmTesUnSkw8YMS+WBGbEmo4H6bFH3Nniw0boP1o4/npJyI1bQHzfjIGGAjIfInQ/oScjUBWWU1IyIKAi8YcEKSIqnEZjGyPxoYJZ7hGuv3gUTeJEnpMoGX8riY8n4skqemRIqixAoAxQBtCHvvcv+qJRH7fzah8AAAAASUVORK5CYII=') !important;
1334
+ }
1335
+
1336
+ .pagelayer-elp-filter-contrast input{
1337
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAKCAMAAAAU2ikOAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAklQTFRFAAAAAgICAwMDBAQEBgYGCAgICwsLAQEBISEhJSUlKioqLy8vNDQ0WFhYXl5eZWVla2trcXFxmpqaoKCgpqamra2ts7OzJiYm1dXV2dnZ3t7e4uLi5ubm2tra+/v7/Pz8/f39/v7+////BQUFBwcHGhoaHh4eIyMjJycnLCwsTk5OVFRUWlpaYWFhaGhoj4+PlpaWnZ2do6Ojqqqqzc3N0tLS19fX3Nzc4ODg9/f3+vr6FBQUGBgYHBwcICAgRUVFS0tLUVFRV1dXhYWFjIyMkpKSmZmZn5+fxMTEysrKz8/P1NTU9PT09vb2+fn5Dw8PEhISFhYWPDw8QUFBSEhIe3t7goKCiIiIu7u7wcHBx8fHzMzM0dHR7+/v8vLy9fX1CgoKDQ0NEBAQFxcXOTk5Pj4+SkpKd3d3fn5+i4uLsrKyuLi4vr6+ycnJ6urq7e3t8PDw8/PzBQYHBQUGBAQFAwMEAgMDFRUVGRkZHR0dIiIiR0dHTU1NYGBglZWVm5uboqKixsbG1tbW29vbBgcIBAUGAwQFExMTGxsbHx8fREREUFBQVlZWhISEkZGRmJiYvb29w8PDzs7O09PT+Pj4AAABDAwMDg4OERERNTU1Ozs7RkZGTExMdHR0enp6gICAjo6OJCQktLS0urq6wMDAy8vL6+vr7u7uAQECLS0tMjIyODg4Q0NDaWlpcHBwdnZ2fX19q6ursbGxt7e35eXl6enpCQkJKysrMDAwX19fbGxsc3NzeXl5oaGhqKiorq6u39/f4+Pj5+fnrIREkAAAAeZJREFUeJxd0Pk/FHEcx/Hv7OLblrvD1S675cjKolJLOVJSIVKtctOKStaQIyKZEuWqJEI50h0lkXT5yzLvT4N2fpnnYx6Pz+vxmQ9jK4+gUjs4OgmMM2GDZuMmZ8jF1c3dQyXLc/OWrdu8ZHn7+Ppth7Q6/wA9yWAwQBxieLig2rGTywgMCg7ZBYUaw3aHQ6aIyKg9Gll790XvPwBpzTG6AJKcWRP7V+QqNRB78FCcBopPSDzsCiUdOZp8DB9Tjp846QNpU9PSY0j2Qa4sidepjMzAIOh01plQI3T2nMUUgeHs8xdycimTl19gXg0a1sQEzinKUS4sKo4tgZwvWuNLIY9LZUnlGLl85WpKBQ1fq7RV/b8hiYnVNddr+eolobr6hhshUGOTMewmZDE1t9zCXGtO7u02KhSY03V2VSaJ4p27TDkl/Xdxe8m9DsjaWXr/AVTWVd7dg5HevoqHjyhjq0p7bPffTJIksRrqZ8pBnww8rauHBoeyng1DI6PPLS/GZI1PTLa+hNqmXuWnkuTgmBKUROg1VxZ1XLlkO/Tm7Tvre+jDx+mZLuzw6fNsbx/t9WWu0kbSr99QkpCqFXg/BdUOX50G8M1rfmFwCPrmtvh9CSM/fv4an6DM7z/LUyR/vZ5u+BdDtnhZvafUoAAAAABJRU5ErkJggg==') !important;
1338
+ }
1339
+
1340
+ .pagelayer-elp-filter-brightness input{
1341
+ background-image: linear-gradient(90deg,#000,#fff);
1342
+ }
1343
+
1344
+ .pagelayer-elp-filter-grayscale input{
1345
+ background-image: linear-gradient(90deg, rgba(203,20,106,1) 0%, rgba(88,88,88,1) 56%);
1346
+ }
1347
+
1348
+ .pagelayer-elp-filter-hue input{
1349
+ background-image: linear-gradient(90deg,red,orange,#ff0,#adff2f,#32cd32,#00bfff,blue,#9400d3 95%);
1350
+ }
1351
+
1352
+ .pagelayer-elp-filter-saturate input{
1353
+ background-image: linear-gradient(90deg,gray,red);
1354
+ }
1355
+
1356
+ .pagelayer-elp-filter-opacity input{
1357
+ background-image: linear-gradient(90deg,#fff,#000);
1358
+ }
1359
+
1360
.pagelayer-elp-typo .pagelayer-elp-label{
1361
font-weight: 600;
1362
font-size: 11px;
css/pagelayer-frontend.css CHANGED
@@ -317,7 +317,8 @@ align-items: flex-start;
317
}
318
319
.pagelayer-service-image{
320
- line-height:0;
321
}
322
323
.pagelayer-service-image img{
@@ -442,6 +443,14 @@ display: block;
442
line-height:1;
443
}
444
445
/* Icon widget */
446
447
.pagelayer-icon-mini{
@@ -2837,6 +2846,10 @@ line-height:1.5;
2837
/* Tabs style end */
2838
2839
/* Divider start */
2840
.pagelayer-divider-seperator{
2841
display: inline-block;
2842
}
317
}
318
319
.pagelayer-service-image{
320
+ line-height:0;
321
+ overflow:hidden;
322
}
323
324
.pagelayer-service-image img{
443
line-height:1;
444
}
445
446
+ .pagelayer-box-link{
447
+ position: absolute;
448
+ top: 0;
449
+ left: 0;
450
+ width: 100%;
451
+ height: 100%;
452
+ }
453
+
454
/* Icon widget */
455
456
.pagelayer-icon-mini{
2846
/* Tabs style end */
2847
2848
/* Divider start */
2849
+ .pagelayer-divider-holder{
2850
+ line-height: 0;
2851
+ font-size: 0;
2852
+ }
2853
.pagelayer-divider-seperator{
2854
display: inline-block;
2855
}
init.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
6
define('PAGELAYER_BASE', plugin_basename(__FILE__));
7
define('PAGELAYER_FILE', __FILE__);
8
- define('PAGELAYER_VERSION', '0.9.9');
9
define('PAGELAYER_DIR', WP_PLUGIN_DIR.'/'.basename(dirname(PAGELAYER_FILE)));
10
define('PAGELAYER_SLUG', 'pagelayer');
11
define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
@@ -104,7 +104,7 @@ function pagelayer_load_plugin(){
104
'interval' => 30,// In days
105
//'pro_url' => 'https://pagelayer.com/themes/wordpress/corporate/Bizworx_Pro',
106
'rating' => 'https://wordpress.org/plugins/pagelayer/#reviews',
107
- 'twitter' => 'https://twitter.com/pagelayer?status='.rawurlencode('I love #PageLayer Site Builder by @pagelayer team for my #WordPress site - '.home_url()),
108
'facebook' => 'https://www.facebook.com/pagelayer',
109
'website' => '//pagelayer.com',
110
'image' => PAGELAYER_URL.'/images/pagelayer-logo-256.png'
@@ -128,10 +128,10 @@ function pagelayer_admin_menu() {
128
$capability = 'activate_plugins';// TODO : Capability for accessing this page
129
130
// Add the menu page
131
- add_menu_page(__('PageLayer Editor'), __('Pagelayer'), $capability, 'pagelayer', 'pagelayer_page_handler', PAGELAYER_URL.'/images/pagelayer-logo-19.png');
132
133
// Settings Page
134
- add_submenu_page('pagelayer', __('PageLayer Editor'), __('Settings'), $capability, 'pagelayer', 'pagelayer_page_handler');
135
136
// Its premium
137
if(defined('PAGELAYER_PREMIUM')){
@@ -148,17 +148,20 @@ function pagelayer_admin_menu() {
148
// Add new template
149
add_submenu_page('pagelayer', __('Add New Template'), __('Add New Template'), $capability, 'pagelayer_template_wizard', 'pagelayer_builder_template_wizard');
150
151
// Its free
152
}else{
153
154
// Go Pro link
155
- add_submenu_page('pagelayer', __('PageLayer Go Pro'), __('Go Pro'), $capability, PAGELAYER_PRO_URL);
156
157
}
158
159
}
160
161
- // This function will handle the pages in Pages in PageLayer
162
function pagelayer_page_handler(){
163
164
global $wp_version, $pagelayer;
@@ -218,9 +221,26 @@ function pagelayer_enqueue_frontend($force = false){
218
if(empty($post->ID)){
219
return;
220
}
221
222
// Enqueue the FRONTEND CSS
223
- if(get_post_meta($post->ID , 'pagelayer-data') || $force){
224
225
// We dont need the auto <p> and <br> as they interfere with us
226
remove_filter('the_content', 'wpautop');
@@ -239,9 +259,12 @@ function pagelayer_enqueue_frontend($force = false){
239
if(defined('PAGELAYER_PREMIUM')){
240
$premium_js = ',chart.min.js,slick.min.js,premium-frontend.js';
241
$premium_css = ',slick.css,slick-theme.css,premium-frontend.css';
242
// Load this For audio widget
243
- wp_enqueue_script('wp-mediaelement');
244
- wp_enqueue_style( 'wp-mediaelement' );
245
}
246
247
// Enqueue our Editor's Frontend JS
@@ -307,7 +330,7 @@ function pagelayer_global_styles(){
307
308
$width = get_option('pagelayer_content_width', '1170');
309
310
- $styles .= '.pagelayer-row-stretch-auto .pagelayer-row-holder{ max-width: '.$width.'px; margin-left: auto; margin-right: auto;}';
311
312
$styles .= '</style>';
313
@@ -367,7 +390,7 @@ function pagelayer_after_title(){
367
echo '
368
<div id="pagelayer-editor-button-row" style="margin-top:15px; display:inline-block;">
369
<a id="pagelayer-editor-button" href="'.$link.'" class="button button-primary button-large" style="height:auto; padding:6px; font-size:18px;">
370
- <img src="'.PAGELAYER_URL.'/images/pagelayer-logo-40.png" align="top" width="24" /> <span>'.__('Edit with PageLayer').'</span>
371
</a>
372
</div>';
373
@@ -382,7 +405,7 @@ function pagelayer_gutenberg_after_title(){
382
echo '
383
<div id="pagelayer-editor-button-row" style="margin-left:15px; display:none">
384
<a id="pagelayer-editor-button" href="'.$link.'" class="button button-primary button-large" style="height:auto; padding:6px; font-size:18px;">
385
- <img src="'.PAGELAYER_URL.'/images/pagelayer-logo-40.png" align="top" width="24" /> <span>'.__('Edit with PageLayer').'</span>
386
</a>
387
</div>
388
@@ -413,7 +436,7 @@ add_filter( 'page_row_actions', 'pagelayer_quick_link', 10, 2 );
413
function pagelayer_quick_link($actions, $post){
414
$link = pagelayer_shortlink($post->ID).'&pagelayer-live=1';
415
416
- $actions['pagelayer'] = '<a href="'.esc_url( $link ).'">'.__( 'Edit using PageLayer', 'pagelayer') .'</a>';
417
418
return $actions;
419
}
5
6
define('PAGELAYER_BASE', plugin_basename(__FILE__));
7
define('PAGELAYER_FILE', __FILE__);
8
+ define('PAGELAYER_VERSION', '1.0.0');
9
define('PAGELAYER_DIR', WP_PLUGIN_DIR.'/'.basename(dirname(PAGELAYER_FILE)));
10
define('PAGELAYER_SLUG', 'pagelayer');
11
define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
104
'interval' => 30,// In days
105
//'pro_url' => 'https://pagelayer.com/themes/wordpress/corporate/Bizworx_Pro',
106
'rating' => 'https://wordpress.org/plugins/pagelayer/#reviews',
107
+ 'twitter' => 'https://twitter.com/pagelayer?status='.rawurlencode('I love #Pagelayer Site Builder by @pagelayer team for my #WordPress site - '.home_url()),
108
'facebook' => 'https://www.facebook.com/pagelayer',
109
'website' => '//pagelayer.com',
110
'image' => PAGELAYER_URL.'/images/pagelayer-logo-256.png'
128
$capability = 'activate_plugins';// TODO : Capability for accessing this page
129
130
// Add the menu page
131
+ add_menu_page(__('Pagelayer Editor'), __('Pagelayer'), $capability, 'pagelayer', 'pagelayer_page_handler', PAGELAYER_URL.'/images/pagelayer-logo-19.png');
132
133
// Settings Page
134
+ add_submenu_page('pagelayer', __('Pagelayer Editor'), __('Settings'), $capability, 'pagelayer', 'pagelayer_page_handler');
135
136
// Its premium
137
if(defined('PAGELAYER_PREMIUM')){
148
// Add new template
149
add_submenu_page('pagelayer', __('Add New Template'), __('Add New Template'), $capability, 'pagelayer_template_wizard', 'pagelayer_builder_template_wizard');
150
151
+ // Export Template Wizard
152
+ add_submenu_page('pagelayer', __('Export Templates into a Theme'), __('Export Templates'), $capability, 'pagelayer_template_export', 'pagelayer_builder_export');
153
+
154
// Its free
155
}else{
156
157
// Go Pro link
158
+ add_submenu_page('pagelayer', __('Pagelayer Go Pro'), __('Go Pro'), $capability, PAGELAYER_PRO_URL);
159
160
}
161
162
}
163
164
+ // This function will handle the Settings Pages in PageLayer
165
function pagelayer_page_handler(){
166
167
global $wp_version, $pagelayer;
221
if(empty($post->ID)){
222
return;
223
}
224
+
225
+ $is_pagelayer = false;
226
+ $is_audio = false;
227
+
228
+ // This IF is for Archives mainly as $post->ID is only the first post in the archive
229
+ // and we need to make sure that other posts are pagelayer or not
230
+ if(!empty($GLOBALS['wp_query']->posts) && is_array($GLOBALS['wp_query']->posts)){
231
+ foreach($GLOBALS['wp_query']->posts as $v){
232
+ if(get_post_meta($v->ID , 'pagelayer-data')){
233
+ $is_pagelayer = true;
234
+ }
235
+
236
+ if(preg_match('/\[pl_audio/is', $v->post_content)){
237
+ $is_audio = true;
238
+ }
239
+ }
240
+ }
241
242
// Enqueue the FRONTEND CSS
243
+ if(get_post_meta($post->ID , 'pagelayer-data') || $is_pagelayer || $force){
244
245
// We dont need the auto <p> and <br> as they interfere with us
246
remove_filter('the_content', 'wpautop');
259
if(defined('PAGELAYER_PREMIUM')){
260
$premium_js = ',chart.min.js,slick.min.js,premium-frontend.js';
261
$premium_css = ',slick.css,slick-theme.css,premium-frontend.css';
262
+
263
// Load this For audio widget
264
+ if($is_audio || pagelayer_is_live_iframe()){
265
+ wp_enqueue_script('wp-mediaelement');
266
+ wp_enqueue_style( 'wp-mediaelement' );
267
+ }
268
}
269
270
// Enqueue our Editor's Frontend JS
330
331
$width = get_option('pagelayer_content_width', '1170');
332
333
+ $styles .= '.pagelayer-row-stretch-auto .pagelayer-row-holder, .pagelayer-row-stretch-full .pagelayer-row-holder.pagelayer-width-auto{ max-width: '.$width.'px; margin-left: auto; margin-right: auto;}';
334
335
$styles .= '</style>';
336
390
echo '
391
<div id="pagelayer-editor-button-row" style="margin-top:15px; display:inline-block;">
392
<a id="pagelayer-editor-button" href="'.$link.'" class="button button-primary button-large" style="height:auto; padding:6px; font-size:18px;">
393
+ <img src="'.PAGELAYER_URL.'/images/pagelayer-logo-40.png" align="top" width="24" /> <span>'.__('Edit with Pagelayer').'</span>
394
</a>
395
</div>';
396
405
echo '
406
<div id="pagelayer-editor-button-row" style="margin-left:15px; display:none">
407
<a id="pagelayer-editor-button" href="'.$link.'" class="button button-primary button-large" style="height:auto; padding:6px; font-size:18px;">
408
+ <img src="'.PAGELAYER_URL.'/images/pagelayer-logo-40.png" align="top" width="24" /> <span>'.__('Edit with Pagelayer').'</span>
409
</a>
410
</div>
411
436
function pagelayer_quick_link($actions, $post){
437
$link = pagelayer_shortlink($post->ID).'&pagelayer-live=1';
438
439
+ $actions['pagelayer'] = '<a href="'.esc_url( $link ).'">'.__( 'Edit using Pagelayer', 'pagelayer') .'</a>';
440
441
return $actions;
442
}
js/{base64.js → base-64.js} RENAMED
File without changes
js/givejs.php CHANGED
@@ -29,7 +29,7 @@ $files = array(
29
'widgets.js',
30
'premium.js',
31
'properties.js',
32
- 'base64.js',
33
'slimscroll.js',
34
'vanilla-picker.min.js',
35
'trumbowyg.min.js',
29
'widgets.js',
30
'premium.js',
31
'properties.js',
32
+ 'base-64.js',
33
'slimscroll.js',
34
'vanilla-picker.min.js',
35
'trumbowyg.min.js',
js/pagelayer-editor.js CHANGED
@@ -21,7 +21,7 @@ var pagelayer_history_obj = {}, pagelayer_revision_obj = {};
21
jQuery(document).ready(function(){
22
23
// Set the title of the parent window
24
- pagelayer.$('head').append(pagelayer.$('title')[0].outerHTML);
25
26
pagelayer.blank_img = pagelayer_url+'/images/default-image.png';
27
@@ -57,7 +57,7 @@ jQuery(document).ready(function(){
57
pagelayer_left_click();
58
pagelayer_right_click();
59
60
- // Setup pagelayer history
61
pagelayer_history_obj['action_data'] = [];
62
pagelayer_history_setup(true);
63
@@ -249,6 +249,24 @@ function pagelayer_setup_drag(){
249
return false;
250
}
251
252
// Get the ID
253
var onId = onWrap.attr('pagelayer-wrap-id');
254
var onEle = onWrap.children('.pagelayer-ele');
@@ -600,13 +618,95 @@ function pagelayer_renumber_col(selector){
600
}
601
}
602
jEle.addClass('pagelayer-col-'+cols);
603
Ele.addClass('pagelayer-col-'+cols);
604
-
605
// Set the att
606
pagelayer_set_atts(Ele, obj);
607
});
608
}
609
610
// Handle addition of elements from the left
611
// NOTE : At this point the addition is FINALIZED
612
// The add element cannot be prevented !
@@ -675,7 +775,7 @@ function pagelayer_element_added(jEle){
675
'title' : pagelayer_shortcodes[sc]['name'],
676
'action' : 'Added',
677
'pl_id' : id,
678
- 'html' : html[0].outerHTML,
679
'cEle' : cEle
680
});
681
@@ -918,6 +1018,9 @@ function pagelayer_element_setup(selector, render){
918
919
// Is it an empty col ?
920
pagelayer_empty_col(jEle.children('.pagelayer-col-holder'));
921
922
}else{
923
@@ -1124,27 +1227,115 @@ jQuery(document).keydown(function(event){
1124
if(event.keyCode == 89 && event.ctrlKey){
1125
pagelayer_do_history('redo');
1126
}
1127
1128
- // ctrl+c handle
1129
- if(event.keyCode == 67 && event.ctrlKey){
1130
1131
- // Check the active element
1132
- if(pagelayer_active.el && pagelayer_active.el.id){
1133
- pagelayer_copy_select("[pagelayer-id='"+pagelayer_active.el.id+"']");
1134
}
1135
1136
}
1137
1138
- // ctrl+v handle
1139
- if(event.keyCode == 86 && event.ctrlKey){
1140
1141
// Check the active element
1142
if(pagelayer_active.el && pagelayer_active.el.id){
1143
1144
var jEle = jQuery("[pagelayer-id='"+pagelayer_active.el.id+"']");
1145
1146
// Check if the any element is copied
1147
- if(!pagelayer_empty(pagelayer.copy_selected) && pagelayer_can_copy_to(jEle)){
1148
pagelayer_paste_element("[pagelayer-id='"+pagelayer_active.el.id+"']");
1149
}
1150
@@ -3236,3 +3427,120 @@ function pagelayer_add_widget(){
3236
add_sc(tag);
3237
});
3238
}
21
jQuery(document).ready(function(){
22
23
// Set the title of the parent window
24
+ try{ pagelayer.$('head').append(pagelayer.$('title')[0].outerHTML); }catch(e){};
25
26
pagelayer.blank_img = pagelayer_url+'/images/default-image.png';
27
57
pagelayer_left_click();
58
pagelayer_right_click();
59
60
+ // Setup pagelayer history handle
61
pagelayer_history_obj['action_data'] = [];
62
pagelayer_history_setup(true);
63
249
return false;
250
}
251
252
+ /*// If the columns more than 12 inside the row then return - As of now not enabled the below code
253
+ if(tag == 'pl_col'){
254
+ var _onTag = pagelayer_tag(onWrap);
255
+ var colEles;
256
+
257
+ // Is on col
258
+ if(_onTag == 'pl_col'){
259
+ colEles = onWrap.closest('.pagelayer-row-holder').children('.pagelayer-ele-wrap');
260
+ }else{
261
+ colEles = onWrap.find('.pagelayer-row-holder').first().children('.pagelayer-ele-wrap');
262
+ }
263
+
264
+ // If the columns more than 12
265
+ if(colEles.length >= 12){
266
+ return false;
267
+ }
268
+ }*/
269
+
270
// Get the ID
271
var onId = onWrap.attr('pagelayer-wrap-id');
272
var onEle = onWrap.children('.pagelayer-ele');
618
}
619
}
620
jEle.addClass('pagelayer-col-'+cols);
621
+ jEle.css({'width': ''});
622
Ele.addClass('pagelayer-col-'+cols);
623
+ Ele.css({'width': ''});
624
+
625
// Set the att
626
pagelayer_set_atts(Ele, obj);
627
});
628
}
629
630
+ // Make column resizable handler
631
+ function pagelayer_col_make_resizable(wrap){
632
+
633
+ // Resize handler element
634
+ var rHandler = jQuery('<div class="pagelayer-resize-handler"><div class="pagelayer-resize-icon"></div></div>');
635
+
636
+ if( wrap.is(":last-child") ){
637
+ wrap = wrap.prev();
638
+ }
639
+
640
+ var pResize = wrap.children('.pagelayer-ele-overlay').find('.pagelayer-resize-handler');
641
+
642
+ if(pResize.length > 0){
643
+ return;
644
+ }
645
+
646
+ // Append it
647
+ wrap.children('.pagelayer-ele-overlay').append(rHandler);
648
+
649
+ // Resize start
650
+ rHandler.on('mousedown', function(e) {
651
+ e.preventDefault();
652
+
653
+ var next_ele = wrap.next();
654
+ var rHolder_width = wrap.closest('.pagelayer-row-holder').width();
655
+ var new_width, nEle_new_width;
656
+
657
+ // Original width
658
+ var original_width = wrap.width();
659
+ var original_mouse_x = e.pageX;
660
+
661
+ // Add the element width and next element width
662
+ both_width = (original_width / rHolder_width *100) + (next_ele.width() / rHolder_width *100);
663
+
664
+ if(both_width > 100){
665
+ return false;
666
+ }
667
+
668
+ jQuery('body').css({'cursor': 'ew-resize'});
669
+ rHandler.show();
670
+
671
+ var r_mousemove = function(e){
672
+ var width = original_width + (e.pageX - original_mouse_x);
673
+
674
+ // Covert width in percentage
675
+ new_width = (width / rHolder_width *100).toFixed(2);
676
+
677
+ if(both_width > new_width && new_width > 0){
678
+ nEle_new_width = (both_width - new_width).toFixed(2);
679
+ wrap.css({'width': new_width+'%'});
680
+ next_ele.css({'width': nEle_new_width+'%'});
681
+
682
+ rHandler.attr({'pre-width': new_width+'%', 'next-width': nEle_new_width+'%'});
683
+ }
684
+
685
+ };
686
+
687
+ var r_mouseup = function(e){
688
+
689
+ jQuery(document).off('mousemove', r_mousemove);
690
+ jQuery('body').css({'cursor': ''});
691
+ rHandler.removeAttr('style pre-width next-width');
692
+
693
+ // find real element and next real element
694
+ var jEle = wrap.find('>.pagelayer-ele');
695
+ var nEle = next_ele.find('>.pagelayer-ele');
696
+
697
+ // Set the element attrs
698
+ jEle.attr({'pagelayer-a-col_width': new_width, 'pagelayer-a-col': ''});
699
+ nEle.attr({'pagelayer-a-col_width': nEle_new_width, 'pagelayer-a-col': ''});
700
+ jQuery(document).off('mouseup', r_mouseup);
701
+
702
+ };
703
+
704
+ // Resize start
705
+ jQuery(document).on('mousemove', r_mousemove);
706
+ jQuery(document).on('mouseup', r_mouseup);
707
+ });
708
+ }
709
+
710
// Handle addition of elements from the left
711
// NOTE : At this point the addition is FINALIZED
712
// The add element cannot be prevented !
775
'title' : pagelayer_shortcodes[sc]['name'],
776
'action' : 'Added',
777
'pl_id' : id,
778
+ 'html' : jQuery("[pagelayer-id="+id+"]"),
779
'cEle' : cEle
780
});
781
1018
1019
// Is it an empty col ?
1020
pagelayer_empty_col(jEle.children('.pagelayer-col-holder'));
1021
+
1022
+ // Make col resizable
1023
+ pagelayer_col_make_resizable(wrap);
1024
1025
}else{
1026
1227
if(event.keyCode == 89 && event.ctrlKey){
1228
pagelayer_do_history('redo');
1229
}
1230
+ });
1231
+
1232
+ // Handle Copy of content
1233
+ jQuery(document).on('copy', function(copyEvent){
1234
1235
+ // Check the active element
1236
+ if(pagelayer_active.el && pagelayer_active.el.id){
1237
1238
+ copyEvent.preventDefault();
1239
+
1240
+ var eHtml = jQuery("[pagelayer-id='"+pagelayer_active.el.id+"']")[0].outerHTML;
1241
+
1242
+ // We need to do Empty clipboard
1243
+ (copyEvent.originalEvent || copyEvent).clipboardData.setData('pagelayer_ele', eHtml);
1244
+
1245
+ // Save the active element id
1246
+ //pagelayer_copy_select("[pagelayer-id='"+pagelayer_active.el.id+"']");
1247
+
1248
+ }
1249
+
1250
+ });
1251
+
1252
+ // Handle Paste in the editor
1253
+ jQuery(document).on('paste', function(pasteEvent){
1254
+
1255
+ var pEle_target = jQuery((pasteEvent.originalEvent || pasteEvent).target);
1256
+ var pagelayer_ajax_func = {};
1257
+ var contenteditable = false;
1258
+
1259
+ if(pEle_target.closest('[contenteditable]').length > 0){
1260
+ pEle_target = pEle_target.closest('[contenteditable]');
1261
+ contenteditable = true;
1262
+ }
1263
+
1264
+ // This function for ajax before send call back
1265
+ pagelayer_ajax_func['beforeSend'] = function(xhr){
1266
+
1267
+ // If target is not content editable
1268
+ if( pagelayer_empty(contenteditable) ){
1269
+
1270
+ // If we dont have an active element then return false and stop ajax
1271
+ if( !(pagelayer_active.el && pagelayer_active.el.id) ){
1272
+ return false;
1273
+ }
1274
+
1275
+ pagelayer.copy_selected = jQuery('<div pagelayer-tag="pl_image"></div>');
1276
+
1277
+ // Is it to be pastable
1278
+ if(!pagelayer_can_copy_to('[pagelayer-id="'+pagelayer_active.el.id+'"]')){
1279
+ pagelayer.copy_selected = '';
1280
+ return false;
1281
+ }
1282
}
1283
1284
+ pEle_target.css({'opacity': '0.33' , 'transition' : '0.1s'});
1285
+ }
1286
+
1287
+ // This function for ajax success call back
1288
+ pagelayer_ajax_func['success'] = function(obj){
1289
+
1290
+ // Successfully Uploaded
1291
+ if(obj['success']){
1292
+
1293
+ // For content editable e.g. Rich Text
1294
+ if( !pagelayer_empty(contenteditable) ){
1295
+ document.execCommand('insertImage', false, obj['data']['url']);
1296
+
1297
+ // For our widgets
1298
+ }else{
1299
+ var fTo = pagelayer_can_copy_to('[pagelayer-id="'+pagelayer_active.el.id+'"]');
1300
+ // We need to empty pagelayer.copy_selected
1301
+ pagelayer.copy_selected = '';
1302
+
1303
+ // Create image html
1304
+ var html = jQuery( pagelayer_create_sc('pl_image') );
1305
+ html.attr('pagelayer-a-id', obj['data']['id']);
1306
+ html.attr('pagelayer-tmp-id-url', obj['data']['url']);
1307
+
1308
+ // Copy the element
1309
+ var id = pagelayer_copy_element(html, fTo);
1310
+ jQuery('[pagelayer-id="'+id+'"]').click();
1311
+ }
1312
+
1313
+ // Some error occured
1314
+ }else{
1315
+ alert(obj['data']['message']);
1316
+ }
1317
+ }
1318
+
1319
+ // This function for ajax complete call back
1320
+ pagelayer_ajax_func['complete'] = function(xhr){
1321
+ //console.log(xhr);
1322
+ pEle_target.css({'opacity': '1' , 'transition' : '0.1s'});
1323
}
1324
1325
+ var findImg = pagelayer_editable_paste_handler(pasteEvent, pagelayer_ajax_func);
1326
+
1327
+ if(pagelayer_empty(findImg)){
1328
1329
// Check the active element
1330
if(pagelayer_active.el && pagelayer_active.el.id){
1331
1332
var jEle = jQuery("[pagelayer-id='"+pagelayer_active.el.id+"']");
1333
1334
+ var copy_ele = jQuery((pasteEvent.originalEvent || pasteEvent).clipboardData.getData('pagelayer_ele'));
1335
+
1336
// Check if the any element is copied
1337
+ if(copy_ele.length > 0 && pagelayer_can_copy_to(jEle)){
1338
+ pagelayer.copy_selected = copy_ele;
1339
pagelayer_paste_element("[pagelayer-id='"+pagelayer_active.el.id+"']");
1340
}
1341
3427
add_sc(tag);
3428
});
3429
}
3430
+
3431
+ // On editable area image paste handler
3432
+ function pagelayer_editable_paste_handler(pasteEvent, pagelayer_ajax_func){
3433
+
3434
+ try {
3435
+ var items = (pasteEvent.originalEvent || pasteEvent).clipboardData.items,
3436
+ mustPreventDefault = false,
3437
+ reader;
3438
+
3439
+ for (var i = items.length - 1; i >= 0; i -= 1) {
3440
+
3441
+ if (items[i].type.match(/^image\//)) {
3442
+
3443
+ reader = new FileReader();
3444
+ /* jshint -W083 */
3445
+ reader.onloadend = function (event) {
3446
+
3447
+ var src = event.target.result;
3448
+
3449
+ if( src.indexOf('data:image') === 0 ) {
3450
+
3451
+ var block = src.split(";");
3452
+ var contentType = block[0].split(":")[1];
3453
+ var realData = block[1].split(",")[1];
3454
+ var fileName = "image."+contentType.split("/")[1];
3455
+
3456
+ // Convert it to a blob to upload
3457
+ var blob = pagelayer_b64toBlob(realData, contentType);
3458
+
3459
+ var formData = new FormData();
3460
+ formData.append('action', 'upload-attachment');
3461
+ formData.append('_ajax_nonce', pagelayer_media_ajax_nonce);
3462
+ formData.append('async-upload', blob, fileName);
3463
+
3464
+ $.ajax({
3465
+ url:pagelayer_ajax_url,
3466
+ data: formData,// the formData function is available in almost all new browsers.
3467
+ type:"post",
3468
+ contentType:false,
3469
+ processData:false,
3470
+ cache:false,
3471
+ beforeSend: function( xhr ) {
3472
+ if(typeof pagelayer_ajax_func.beforeSend == 'function'){
3473
+ pagelayer_ajax_func.beforeSend(xhr);
3474
+ }
3475
+ },
3476
+ error:function(err){
3477
+ //console.error(err);
3478
+ alert("Unable to upload image for some reason.");
3479
+ },
3480
+ success:function(response){
3481
+ var obj = jQuery.parseJSON(response);
3482
+ if(typeof pagelayer_ajax_func.success == 'function'){
3483
+ pagelayer_ajax_func.success(obj);
3484
+ }
3485
+ },
3486
+ complete:function(xhr){
3487
+ if(typeof pagelayer_ajax_func.complete == 'function'){
3488
+ pagelayer_ajax_func.complete(xhr);
3489
+ }
3490
+ }
3491
+ });
3492
+
3493
+ }
3494
+
3495
+ };
3496
+ /* jshint +W083 */
3497
+ reader.readAsDataURL(items[i].getAsFile());
3498
+ mustPreventDefault = true;
3499
+ }
3500
+ }
3501
+
3502
+ if(mustPreventDefault){
3503
+ pasteEvent.stopPropagation();
3504
+ pasteEvent.preventDefault();
3505
+ }
3506
+
3507
+ }catch(err){}
3508
+
3509
+ return mustPreventDefault;
3510
+
3511
+ }
3512
+
3513
+ // Convert base64 to Blob
3514
+ function pagelayer_b64toBlob(b64Data, contentType, sliceSize) {
3515
+ contentType = contentType || '';
3516
+ sliceSize = sliceSize || 512;
3517
+
3518
+ var byteCharacters = atob(b64Data);
3519
+ var byteArrays = [];
3520
+
3521
+ for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
3522
+ var slice = byteCharacters.slice(offset, offset + sliceSize);
3523
+
3524
+ var byteNumbers = new Array(slice.length);
3525
+ for (var i = 0; i < slice.length; i++) {
3526
+ byteNumbers[i] = slice.charCodeAt(i);
3527
+ }
3528
+
3529
+ var byteArray = new Uint8Array(byteNumbers);
3530
+
3531
+ byteArrays.push(byteArray);
3532
+ }
3533
+
3534
+ var blob = new Blob(byteArrays, {type: contentType});
3535
+ return blob;
3536
+ }
3537
+
3538
+ // Function to check if the URL is external
3539
+ function pagelayer_parse_theme_vars(img_url){
3540
+
3541
+ for(x in pagelayer_theme_vars){
3542
+ img_url = img_url.replace(x, pagelayer_theme_vars[x]);
3543
+ }
3544
+
3545
+ return img_url;
3546
+ };
js/properties.js CHANGED
@@ -1063,7 +1063,7 @@ function pagelayer_elp_image(row, prop){
1063
// External URL
1064
if('props' in state){
1065
1066
- id = url = state.props.attributes.url;
1067
1068
// Internal from gallery
1069
}else{
@@ -1294,7 +1294,7 @@ function pagelayer_elp_video(row, prop){
1294
// External URL
1295
if('props' in state){
1296
1297
- id = url = state.props.attributes.url;
1298
1299
// Internal from gallery
1300
}else{
@@ -1369,7 +1369,7 @@ function pagelayer_elp_audio(row, prop){
1369
// External URL
1370
if('props' in state){
1371
1372
- id = url = state.props.attributes.url;
1373
1374
// Internal from gallery
1375
}else{
@@ -1442,7 +1442,7 @@ function pagelayer_elp_media(row, prop){
1442
// External URL
1443
if('props' in state){
1444
1445
- id = url = state.props.attributes.url;
1446
1447
// Internal from gallery
1448
}else{
@@ -1791,6 +1791,7 @@ function pagelayer_elp_color(row, prop){
1791
1792
var div = '<div class="pagelayer-elp-color-div">'+
1793
'<div class="pagelayer-elp-color-preview"></div>'+
1794
'</div>';
1795
1796
row.append(div);
@@ -1806,10 +1807,20 @@ function pagelayer_elp_color(row, prop){
1806
1807
// Handle selected color
1808
picker.onChange = function(color) {
1809
- row.find('.pagelayer-elp-color-preview').css('background', color.rgbaString);
1810
_pagelayer_set_atts(row, color.hex);// Save and Render
1811
};
1812
1813
}
1814
1815
// The Spinner property
1063
// External URL
1064
if('props' in state){
1065
1066
+ id = url = pagelayer_parse_theme_vars(state.props.attributes.url);
1067
1068
// Internal from gallery
1069
}else{
1294
// External URL
1295
if('props' in state){
1296
1297
+ id = url = pagelayer_parse_theme_vars(state.props.attributes.url);
1298
1299
// Internal from gallery
1300
}else{
1369
// External URL
1370
if('props' in state){
1371
1372
+ id = url = pagelayer_parse_theme_vars(state.props.attributes.url);
1373
1374
// Internal from gallery
1375
}else{
1442
// External URL
1443
if('props' in state){
1444
1445
+ id = url = pagelayer_parse_theme_vars(state.props.attributes.url);
1446
1447
// Internal from gallery
1448
}else{
1791
1792
var div = '<div class="pagelayer-elp-color-div">'+
1793
'<div class="pagelayer-elp-color-preview"></div>'+
1794
+ '<span class="pagelayer-elp-remove-color pagelayer-prop-action"><i class="fa fa-times" /></span>'+
1795
'</div>';
1796
1797
row.append(div);
1807
1808
// Handle selected color
1809
picker.onChange = function(color) {
1810
+
1811
+ row.find('.pagelayer-elp-color-preview').removeClass('pagelayer-blank-preview').css('background', color.rgbaString);
1812
_pagelayer_set_atts(row, color.hex);// Save and Render
1813
};
1814
1815
+ picker.onOpen = picker.onChange;
1816
+
1817
+ row.find('.pagelayer-elp-remove-color').on('click', function(event){
1818
+ event.stopPropagation();
1819
+ picker.setColor(prop.default, true);
1820
+ row.find('.pagelayer-elp-color-preview').addClass('pagelayer-blank-preview');
1821
+ _pagelayer_set_atts(row, ' ');// Save and Render
1822
+ })
1823
+
1824
}
1825
1826
// The Spinner property
js/trumbowyg-pagelayer.js CHANGED
@@ -1,67 +1,67 @@
1
(function ($) {
2
- 'use strict';
3
- // jshint camelcase:true
4
-
5
-
6
- function hex(x) {
7
- return ('0' + parseInt(x).toString(16)).slice(-2);
8
- }
9
-
10
- function colorToHex(rgb) {
11
- if (rgb.search('rgb') === -1) {
12
- return rgb.replace('#', '');
13
- } else if (rgb === 'rgba(0, 0, 0, 0)') {
14
- return 'transparent';
15
- } else {
16
- rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)#x2F;);
17
- return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
18
- }
19
- }
20
-
21
- function colorTagHandler(element, trumbowyg) {
22
- var tags = [];
23
-
24
- if (!element.style) {
25
- return tags;
26
- }
27
-
28
- // background color
29
- if (element.style.backgroundColor !== '') {
30
- var backColor = colorToHex(element.style.backgroundColor);
31
- if (trumbowyg.o.plugins.colors.colorList.indexOf(backColor) >= 0) {
32
- tags.push('backColor' + backColor);
33
- } else {
34
- tags.push('backColorFree');
35
- }
36
- }
37
-
38
- // text color
39
- var foreColor;
40
- if (element.style.color !== '') {
41
- foreColor = colorToHex(element.style.color);
42
- } else if (element.hasAttribute('color')) {
43
- foreColor = colorToHex(element.getAttribute('color'));
44
- }
45
- if (foreColor) {
46
- if (trumbowyg.o.plugins.colors.colorList.indexOf(foreColor) >= 0) {
47
- tags.push('foreColor' + foreColor);
48
- } else {
49
- tags.push('foreColorFree');
50
- }
51
- }
52
-
53
- return tags;
54
- }
55
-
56
- var defaultOptions = {
57
- colorList: ['ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646', 'ffff00', 'f2f2f2', '7f7f7f', 'ddd9c3', 'c6d9f0', 'dbe5f1', 'f2dcdb', 'ebf1dd', 'e5e0ec', 'dbeef3', 'fdeada', 'fff2ca', 'd8d8d8', '595959', 'c4bd97', '8db3e2', 'b8cce4', 'e5b9b7', 'd7e3bc', 'ccc1d9', 'b7dde8', 'fbd5b5', 'ffe694', 'bfbfbf', '3f3f3f', '938953', '548dd4', '95b3d7', 'd99694', 'c3d69b', 'b2a2c7', 'b7dde8', 'fac08f', 'f2c314', 'a5a5a5', '262626', '494429', '17365d', '366092', '953734', '76923c', '5f497a', '92cddc', 'e36c09', 'c09100', '7f7f7f', '0c0c0c', '1d1b10', '0f243e', '244061', '632423', '4f6128', '3f3151', '31859b', '974806', '7f6000']
58
- };
59
60
- // If WP media is a button
61
- function openwpmediaDef(trumbowyg) {
62
- return {
63
- fn: function() {
64
- // WP media button logic
65
66
var func_media = window['pagelayer_select_frame'];
67
@@ -111,108 +111,139 @@
111
112
}
113
114
- },
115
ico: 'insert-image'
116
117
- }
118
- }
119
-
120
- $.extend(true, $.trumbowyg, {
121
- // Add some translations
122
- langs: {
123
- en: {
124
- wpmedia: 'Insert Image',
125
foreColor: 'Text color',
126
- backColor: 'Background color'
127
- }
128
- },
129
- // Add our plugin to Trumbowyg registred plugins
130
- plugins: {
131
- wpmedia: {
132
- init: function(trumbowyg) {
133
var t = $(this);
134
- // Fill current Trumbowyg instance with WP media default options
135
- trumbowyg.o.plugins.wpmedia = $.extend(true, {},
136
- defaultOptions,
137
- trumbowyg.o.plugins.wpmedia || {}
138
- );
139
140
- // If WP media is a
141
- trumbowyg.addBtnDef('wpmedia', openwpmediaDef(trumbowyg));
142
143
- },
144
- },
145
color: {
146
- init: function (trumbowyg) {
147
- trumbowyg.o.plugins.colors = trumbowyg.o.plugins.colors || defaultOptions;
148
- var foreColorBtnDef = {
149
- dropdown: buildDropdown('foreColor', trumbowyg)
150
- },
151
- backColorBtnDef = {
152
- dropdown: buildDropdown('backColor', trumbowyg)
153
- };
154
-
155
- trumbowyg.addBtnDef('foreColor', foreColorBtnDef);
156
- trumbowyg.addBtnDef('backColor', backColorBtnDef);
157
- },
158
- tagHandler: colorTagHandler
159
- }
160
- }
161
- });
162
-
163
- function buildDropdown(fn, trumbowyg) {
164
- var dropdown = [];
165
-
166
- $.each(trumbowyg.o.plugins.colors.colorList, function (i, color) {
167
- var btn = fn + color,
168
- btnDef = {
169
- fn: fn,
170
- forceCss: true,
171
- param: '#' + color,
172
- style: 'background-color: #' + color + ';'
173
- };
174
- trumbowyg.addBtnDef(btn, btnDef);
175
- dropdown.push(btn);
176
- });
177
-
178
- var removeColorButtonName = fn + 'Remove',
179
- removeColorBtnDef = {
180
- fn: 'removeFormat',
181
- param: fn,
182
- style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
183
- };
184
- trumbowyg.addBtnDef(removeColorButtonName, removeColorBtnDef);
185
- dropdown.push(removeColorButtonName);
186
-
187
- // add free color btn
188
- var freeColorButtonName = fn + 'Free',
189
- freeColorBtnDef = {
190
- fn: function () {
191
- trumbowyg.openModalInsert(trumbowyg.lang[fn],
192
- {
193
- color: {
194
- label: fn,
195
- forceCss: true,
196
- type: 'color',
197
- value: '#FFFFFF'
198
- }
199
- },
200
- // callback
201
- function (values) {
202
- trumbowyg.execCmd(fn, values.color);
203
- return true;
204
- }
205
- );
206
- },
207
- text: '#',
208
- // style adjust for displaying the text
209
- style: 'text-indent: 0;line-height: 20px;padding: 0 5px;'
210
- };
211
- trumbowyg.addBtnDef(freeColorButtonName, freeColorBtnDef);
212
- dropdown.push(freeColorButtonName);
213
-
214
- return dropdown;
215
- }
216
})(jQuery);
217
218
1
(function ($) {
2
+ 'use strict';
3
+ // jshint camelcase:true
4
+
5
+
6
+ function hex(x) {
7
+ return ('0' + parseInt(x).toString(16)).slice(-2);
8
+ }
9
+
10
+ function colorToHex(rgb) {
11
+ if (rgb.search('rgb') === -1) {
12
+ return rgb.replace('#', '');
13
+ } else if (rgb === 'rgba(0, 0, 0, 0)') {
14
+ return 'transparent';
15
+ } else {
16
+ rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)#x2F;);
17
+ return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
18
+ }
19
+ }
20
+
21
+ function colorTagHandler(element, trumbowyg) {
22
+ var tags = [];
23
+
24
+ if (!element.style) {
25
+ return tags;
26
+ }
27
+
28
+ // background color
29
+ if (element.style.backgroundColor !== '') {
30
+ var backColor = colorToHex(element.style.backgroundColor);
31
+ if (trumbowyg.o.plugins.colors.colorList.indexOf(backColor) >= 0) {
32
+ tags.push('backColor' + backColor);
33
+ } else {
34
+ tags.push('backColorFree');
35
+ }
36
+ }
37
+
38
+ // text color
39
+ var foreColor;
40
+ if (element.style.color !== '') {
41
+ foreColor = colorToHex(element.style.color);
42
+ } else if (element.hasAttribute('color')) {
43
+ foreColor = colorToHex(element.getAttribute('color'));
44
+ }
45
+ if (foreColor) {
46
+ if (trumbowyg.o.plugins.colors.colorList.indexOf(foreColor) >= 0) {
47
+ tags.push('foreColor' + foreColor);
48
+ } else {
49
+ tags.push('foreColorFree');
50
+ }
51
+ }
52
+
53
+ return tags;
54
+ }
55
+
56
+ var defaultOptions = {
57
+ colorList: ['ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646', 'ffff00', 'f2f2f2', '7f7f7f', 'ddd9c3', 'c6d9f0', 'dbe5f1', 'f2dcdb', 'ebf1dd', 'e5e0ec', 'dbeef3', 'fdeada', 'fff2ca', 'd8d8d8', '595959', 'c4bd97', '8db3e2', 'b8cce4', 'e5b9b7', 'd7e3bc', 'ccc1d9', 'b7dde8', 'fbd5b5', 'ffe694', 'bfbfbf', '3f3f3f', '938953', '548dd4', '95b3d7', 'd99694', 'c3d69b', 'b2a2c7', 'b7dde8', 'fac08f', 'f2c314', 'a5a5a5', '262626', '494429', '17365d', '366092', '953734', '76923c', '5f497a', '92cddc', 'e36c09', 'c09100', '7f7f7f', '0c0c0c', '1d1b10', '0f243e', '244061', '632423', '4f6128', '3f3151', '31859b', '974806', '7f6000']
58
+ };
59
60
+ // If WP media is a button
61
+ function openwpmediaDef(trumbowyg) {
62
+ return {
63
+ fn: function() {
64
+ // WP media button logic
65
66
var func_media = window['pagelayer_select_frame'];
67
111
112
}
113
114
+ },
115
ico: 'insert-image'
116
117
+ }
118
+ }
119
+
120
+ $.extend(true, $.trumbowyg, {
121
+ // Add some translations
122
+ langs: {
123
+ en: {
124
+ wpmedia: 'Insert Image',
125
foreColor: 'Text color',
126
+ backColor: 'Background color'
127
+ }
128
+ },
129
+ // Add our plugin to Trumbowyg registred plugins
130
+ plugins: {
131
+ wpmedia: {
132
+ init: function(trumbowyg) {
133
var t = $(this);
134
+ // Fill current Trumbowyg instance with WP media default options
135
+ trumbowyg.o.plugins.wpmedia = $.extend(true, {},
136
+ defaultOptions,
137
+ trumbowyg.o.plugins.wpmedia || {}
138
+ );
139
140
+ // If WP media is a
141
+ trumbowyg.addBtnDef('wpmedia', openwpmediaDef(trumbowyg));
142
143
+ },
144
+ },
145
color: {
146
+ init: function (trumbowyg) {
147
+ trumbowyg.o.plugins.colors = trumbowyg.o.plugins.colors || defaultOptions;
148
+ var foreColorBtnDef = {
149
+ dropdown: buildDropdown('foreColor', trumbowyg)
150
+ },
151
+ backColorBtnDef = {
152
+ dropdown: buildDropdown('backColor', trumbowyg)
153
+ };
154
+
155
+ trumbowyg.addBtnDef('foreColor', foreColorBtnDef);
156
+ trumbowyg.addBtnDef('backColor', backColorBtnDef);
157
+ },
158
+ tagHandler: colorTagHandler
159
+ },
160
+ pasteImage: {
161
+ init: function (trumbowyg) {
162
+ trumbowyg.pasteHandlers.push(function (pasteEvent) {
163
+
164
+ var pagelayer_ajax_func = {};
165
+
166
+ // This function for ajax success call back
167
+ pagelayer_ajax_func['success'] = function(obj){
168
+ //alert(obj);
169
+ if(obj['success']){
170
+ trumbowyg.execCmd('insertImage', obj['data']['url'], false, true);
171
+ }else{
172
+ alert(obj['data']['message']);
173
+ }
174
+ }
175
+
176
+ // This function for ajax before send call back
177
+ pagelayer_ajax_func['beforeSend'] = function(xhr){
178
+ trumbowyg.showOverlay();
179
+ }
180
+
181
+ // This function for ajax complete call back
182
+ pagelayer_ajax_func['complete'] = function(xhr){
183
+ trumbowyg.hideOverlay();
184
+ }
185
+
186
+ pagelayer_editable_paste_handler(pasteEvent, pagelayer_ajax_func);
187
+ });
188
+ }
189
+ }
190
+ }
191
+ });
192
+
193
+ function buildDropdown(fn, trumbowyg) {
194
+ var dropdown = [];
195
+
196
+ $.each(trumbowyg.o.plugins.colors.colorList, function (i, color) {
197
+ var btn = fn + color,
198
+ btnDef = {
199
+ fn: fn,
200
+ forceCss: true,
201
+ param: '#' + color,
202
+ style: 'background-color: #' + color + ';'
203
+ };
204
+ trumbowyg.addBtnDef(btn, btnDef);
205
+ dropdown.push(btn);
206
+ });
207
+
208
+ var removeColorButtonName = fn + 'Remove',
209
+ removeColorBtnDef = {
210
+ fn: 'removeFormat',
211
+ param: fn,
212
+ style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
213
+ };
214
+ trumbowyg.addBtnDef(removeColorButtonName, removeColorBtnDef);
215
+ dropdown.push(removeColorButtonName);
216
+
217
+ // add free color btn
218
+ var freeColorButtonName = fn + 'Free',
219
+ freeColorBtnDef = {
220
+ fn: function () {
221
+ trumbowyg.openModalInsert(trumbowyg.lang[fn],
222
+ {
223
+ color: {
224
+ label: fn,
225
+ forceCss: true,
226
+ type: 'color',
227
+ value: '#FFFFFF'
228
+ }
229
+ },
230
+ // callback
231
+ function (values) {
232
+ trumbowyg.execCmd(fn, values.color);
233
+ return true;
234
+ }
235
+ );
236
+ },
237
+ text: '#',
238
+ // style adjust for displaying the text
239
+ style: 'text-indent: 0;line-height: 20px;padding: 0 5px;'
240
+ };
241
+ trumbowyg.addBtnDef(freeColorButtonName, freeColorBtnDef);
242
+ dropdown.push(freeColorButtonName);
243
+
244
+ return dropdown;
245
+ }
246
+
247
})(jQuery);
248
249
js/widgets.js CHANGED
@@ -44,6 +44,7 @@ function pagelayer_render_pl_col(el){
44
}
45
46
el.$.parent().addClass('pagelayer-col-'+el.atts['col']);
47
}
48
49
if(el.atts['col_width']){
44
}
45
46
el.$.parent().addClass('pagelayer-col-'+el.atts['col']);
47
+ el.$.parent().css('width', '');
48
}
49
50
if(el.atts['col_width']){
languages/en.json CHANGED
@@ -1583,5 +1583,7 @@
1583
"container_position" : "Container Position",
1584
"fixed_right" : "Fixed On Right",
1585
"fixed_left" : "Fixed On Left",
1586
- "container_style" : "Container Style"
1587
}
1583
"container_position" : "Container Position",
1584
"fixed_right" : "Fixed On Right",
1585
"fixed_left" : "Fixed On Left",
1586
+ "container_style" : "Container Style",
1587
+ "rotate_icon" : "Rotate Icon",
1588
+ "url" : "URL"
1589
}
main/ajax.php CHANGED
@@ -1154,12 +1154,22 @@ function pagelayer_export_template(){
1154
}
1155
1156
// Get the active theme
1157
- $theme_dir = get_template_directory();
1158
$conf = [];
1159
1160
// Write the files
1161
foreach($pagelayer->templates as $k => $v){
1162
- file_put_contents($theme_dir.'/'.$v->post_name.'.pgl', $v->post_content);
1163
$conf[$v->post_name] = [
1164
'type' => get_post_meta($v->ID, 'pagelayer_template_type', true),
1165
'conditions' => get_post_meta($v->ID, 'pagelayer_template_conditions', true),
@@ -1169,6 +1179,42 @@ function pagelayer_export_template(){
1169
// Write the config
1170
file_put_contents($theme_dir.'/pagelayer.conf', json_encode($conf, JSON_PRETTY_PRINT));
1171
1172
$done['success'] = __pl('temp_export_success');
1173
1174
// Output and die
1154
}
1155
1156
// Get the active theme
1157
+ $theme_dir = get_stylesheet_directory();
1158
$conf = [];
1159
1160
+ $pagelayer->export_mode = 1;
1161
+
1162
// Write the files
1163
foreach($pagelayer->templates as $k => $v){
1164
+
1165
+ // Are there specific templates to export
1166
+ if(!empty($_POST['templates'])){
1167
+ if(!isset($_POST['templates'][$v->ID])){
1168
+ continue;
1169
+ }
1170
+ }
1171
+
1172
+ file_put_contents($theme_dir.'/'.$v->post_name.'.pgl', pagelayer_export_content($v->post_content));
1173
$conf[$v->post_name] = [
1174
'type' => get_post_meta($v->ID, 'pagelayer_template_type', true),
1175
'conditions' => get_post_meta($v->ID, 'pagelayer_template_conditions', true),
1179
// Write the config
1180
file_put_contents($theme_dir.'/pagelayer.conf', json_encode($conf, JSON_PRETTY_PRINT));
1181
1182
+ // Any pages to export for users ?
1183
+ if(!empty($_POST['pages'])){
1184
+
1185
+ mkdir($theme_dir.'/data/');
1186
+ mkdir($theme_dir.'/data/page');
1187
+
1188
+ $conf = [];
1189
+
1190
+ // Load the pages
1191
+ $pages_query = new WP_Query(['post_type' => 'page', 'status' => 'publish']);
1192
+ $pages = $pages_query->posts;
1193
+
1194
+ // Write the files
1195
+ foreach($pages as $k => $v){
1196
+
1197
+ if(!isset($_POST['pages'][$v->ID])){
1198
+ continue;
1199
+ }
1200
+
1201
+ file_put_contents($theme_dir.'/data/page/'.$v->post_name, pagelayer_export_content($v->post_content));
1202
+ unset($v->post_content);
1203
+ $conf['page'][$v->post_name] = $v;
1204
+
1205
+ }
1206
+
1207
+ // Write the config
1208
+ file_put_contents($theme_dir.'/pagelayer-data.conf', json_encode($conf, JSON_PRETTY_PRINT));
1209
+
1210
+ }
1211
+
1212
+ // Are we to export any media ?
1213
+ if(!empty($pagelayer->media_to_export)){
1214
+ // TODO
1215
+ //$done['media'] = $pagelayer->media_to_export;
1216
+ }
1217
+
1218
$done['success'] = __pl('temp_export_success');
1219
1220
// Output and die
main/class.php CHANGED
@@ -56,6 +56,9 @@ class PageLayer{
56
57
// Tabs visible in the left panel
58
var $tabs = ['settings', 'options'];
59
60
function __construct() {
61
56
57
// Tabs visible in the left panel
58
var $tabs = ['settings', 'options'];
59
+
60
+ // For exporting templates
61
+ var $media_to_export = array();
62
63
function __construct() {
64
main/functions.php CHANGED
@@ -399,6 +399,11 @@ function pagelayer_shortlink($id){
399
return $link;
400
}
401
402
// Are we in live mode ?
403
function pagelayer_is_live(){
404
@@ -573,7 +578,9 @@ function pagelayer_add_shortcode($tag, $params = array()){
573
574
// Returns the Image values
575
function pagelayer_image($id){
576
-
577
$ret = [];
578
579
// External image ?
@@ -590,6 +597,11 @@ function pagelayer_image($id){
590
591
// Is there an attachment which is an image ?
592
if(!empty($image) && $image->post_type == 'attachment' && wp_attachment_is_image($id)){
593
594
$sizes = get_intermediate_image_sizes();
595
array_unshift($sizes, 'full');
@@ -656,6 +668,11 @@ function pagelayer_attachment($id){
656
657
// Attachment
658
}elseif(!empty($id)){
659
660
$ret['url'] = wp_get_attachment_url($id);
661
@@ -875,7 +892,7 @@ color: red;
875
}
876
877
echo '
878
- <p style="font-size:13px">We are glad you like <a href="'.$opts['website'].'"><b>PageLayer</b></a> and have been using it since the past few days. It is time to take the next step !</p>
879
<p>
880
'.(empty($opts['rating']) ? '' : '<a class="pagelayer_promo_button pagelayer_promo_button2" target="_blank" href="'.$opts['rating'].'">Rate it 5★\'s</a>').'
881
'.(empty($opts['facebook']) ? '' : '<a class="pagelayer_promo_button pagelayer_promo_button3" target="_blank" href="'.$opts['facebook'].'"><span class="dashicons dashicons-thumbs-up"></span> Facebook</a>').'
@@ -1432,3 +1449,16 @@ function pagelayer_shortcode_current_query($query_args, $atts, $type){
1432
1433
return $query_args;
1434
}
399
return $link;
400
}
401
402
+ // Pagelayer live link
403
+ function pagelayer_livelink($id){
404
+ return pagelayer_shortlink($id).'&pagelayer-live=1';
405
+ }
406
+
407
// Are we in live mode ?
408
function pagelayer_is_live(){
409
578
579
// Returns the Image values
580
function pagelayer_image($id){
581
+
582
+ global $pagelayer;
583
+
584
$ret = [];
585
586
// External image ?
597
598
// Is there an attachment which is an image ?
599
if(!empty($image) && $image->post_type == 'attachment' && wp_attachment_is_image($id)){
600
+
601
+ // Need to export necessary media
602
+ if(!empty($pagelayer->export_mode)){
603
+ $pagelayer->media_to_export[] = $id;
604
+ }
605
606
$sizes = get_intermediate_image_sizes();
607
array_unshift($sizes, 'full');
668
669
// Attachment
670
}elseif(!empty($id)){
671
+
672
+ // Need to export necessary media
673
+ if(!empty($pagelayer->export_mode)){
674
+ $pagelayer->media_to_export[] = $id;
675
+ }
676
677
$ret['url'] = wp_get_attachment_url($id);
678
892
}
893
894
echo '
895
+ <p style="font-size:13px">We are glad you like <a href="'.$opts['website'].'"><b>Pagelayer</b></a> and have been using it since the past few days. It is time to take the next step !</p>
896
<p>
897
'.(empty($opts['rating']) ? '' : '<a class="pagelayer_promo_button pagelayer_promo_button2" target="_blank" href="'.$opts['rating'].'">Rate it 5★\'s</a>').'
898
'.(empty($opts['facebook']) ? '' : '<a class="pagelayer_promo_button pagelayer_promo_button3" target="_blank" href="'.$opts['facebook'].'"><span class="dashicons dashicons-thumbs-up"></span> Facebook</a>').'
1449
1450
return $query_args;
1451
}
1452
+
1453
+ function pagelayer_export_content($content){
1454
+
1455
+ // Just call do_shortcode so we can get list of media files to export
1456
+ //do_shortcode($content);
1457
+
1458
+ $theme_url = preg_replace('/http(s?):\/\//is', '', get_stylesheet_directory_uri());
1459
+
1460
+ $content = preg_replace('/http(s?):\/\/'.preg_quote($theme_url, '/').'/is', '{{theme_url}}', $content);
1461
+
1462
+ return $content;
1463
+
1464
+ }
main/live.php CHANGED
@@ -48,7 +48,7 @@ class PageLayer_LiveEditor{
48
add_filter('the_content', array($this, 'the_content'));
49
50
// Enqueue our Editor's JS
51
- wp_register_script('pagelayer-editor', PAGELAYER_JS.'/givejs.php?give=pagelayer-editor.js,widgets.js,'.(defined('PAGELAYER_PREMIUM') ? 'premium.js,' : '').'properties.js,base64.js,slimscroll.js,vanilla-picker.min.js,trumbowyg.js,trumbowyg.fontfamily.js,trumbowyg-pagelayer.js,trumbowyg.fontsize.min.js,pen.js', array('jquery'), PAGELAYER_VERSION);
52
wp_enqueue_script('pagelayer-editor');
53
54
// Enqueue the Editor's CSS
@@ -69,6 +69,7 @@ class PageLayer_LiveEditor{
69
70
// Hide Admin Bar
71
show_admin_bar(false);
72
73
// Load custom widgets
74
do_action('pagelayer_custom_editor_enqueue');
@@ -98,12 +99,14 @@ pagelayer_styles = '.json_encode($pagelayer->styles).';
98
pagelayer_groups = '.json_encode($pagelayer->groups).';
99
pagelayer_ajax_url = "'.admin_url( 'admin-ajax.php' ).'?";
100
pagelayer_ajax_nonce = "'.wp_create_nonce('pagelayer_ajax').'";
101
pagelayer_url = "'.PAGELAYER_URL.'";
102
pagelayer_postID = "'.$post->ID.'";
103
pagelayer_post_permalink = "'.get_permalink($post->ID).'";
104
pagelayer_tabs = '.json_encode($pagelayer->tabs).';
105
pagelayer_isDirty = false;
106
pagelayer_returnURL = "'.$returnURL.'";
107
pagelayer_revision_obj = '.json_encode( pagelayer_get_post_revision_by_id( $post->ID ) ).';
108
pagelayer_author = '.json_encode(pagelayer_author_data($post->ID)).';
109
pagelayer_site_logo = '.json_encode(pagelayer_site_logo()).';
48
add_filter('the_content', array($this, 'the_content'));
49
50
// Enqueue our Editor's JS
51
+ wp_register_script('pagelayer-editor', PAGELAYER_JS.'/givejs.php?give=pagelayer-editor.js,widgets.js,'.(defined('PAGELAYER_PREMIUM') ? 'premium.js,' : '').'properties.js,base-64.js,slimscroll.js,vanilla-picker.min.js,trumbowyg.js,trumbowyg.fontfamily.js,trumbowyg-pagelayer.js,trumbowyg.fontsize.min.js,pen.js', array('jquery'), PAGELAYER_VERSION);
52
wp_enqueue_script('pagelayer-editor');
53
54
// Enqueue the Editor's CSS
69
70
// Hide Admin Bar
71
show_admin_bar(false);
72
+ remove_action('wp_head', '_admin_bar_bump_cb');
73
74
// Load custom widgets
75
do_action('pagelayer_custom_editor_enqueue');
99
pagelayer_groups = '.json_encode($pagelayer->groups).';
100
pagelayer_ajax_url = "'.admin_url( 'admin-ajax.php' ).'?";
101
pagelayer_ajax_nonce = "'.wp_create_nonce('pagelayer_ajax').'";
102
+ pagelayer_media_ajax_nonce = "'.wp_create_nonce('media-form').'";
103
pagelayer_url = "'.PAGELAYER_URL.'";
104
pagelayer_postID = "'.$post->ID.'";
105
pagelayer_post_permalink = "'.get_permalink($post->ID).'";
106
pagelayer_tabs = '.json_encode($pagelayer->tabs).';
107
pagelayer_isDirty = false;
108
pagelayer_returnURL = "'.$returnURL.'";
109
+ pagelayer_theme_vars = '.json_encode( pagelayer_template_vars() ).';
110
pagelayer_revision_obj = '.json_encode( pagelayer_get_post_revision_by_id( $post->ID ) ).';
111
pagelayer_author = '.json_encode(pagelayer_author_data($post->ID)).';
112
pagelayer_site_logo = '.json_encode(pagelayer_site_logo()).';
main/settings.php CHANGED
@@ -209,8 +209,8 @@ if(!defined('PAGELAYER_VERSION')) {
209
}
210
?>
211
<form class="pagelayer-setting-form" method="post" action="">
212
- <h1>PageLayer Editor</h1>
213
- <p>Welcome To PageLayer</p>
214
<div class="tabs-wrapper">
215
<h2 class="nav-tab-wrapper pagelayer-wrapper">
216
<a href="#general" class="nav-tab">General</a>
@@ -342,7 +342,7 @@ if(!defined('PAGELAYER_VERSION')) {
342
<?php } ?>
343
<div class="pagelayer-tab-panel" id="support">
344
<h2>Support</h2>
345
- <h3>You can contact the PageLayer Group via email. Our email address is <a href="mailto:support@pagelayer.com">support@pagelayer.com</a>. We will get back to you as soon as possible!</h3>
346
347
348
</div>
@@ -351,7 +351,7 @@ if(!defined('PAGELAYER_VERSION')) {
351
<div class="pagelayer-acc-wrapper">
352
<span class="nav-tab pagelayer-acc-tab">1: Why choose us</span>
353
<div class="pagelayer-acc-panel">
354
- <p>PageLayer is best live editor and easy to use and we will keep improving it !</P>
355
</div>
356
357
<span class="nav-tab pagelayer-acc-tab">2: Support</span>
209
}
210
?>
211
<form class="pagelayer-setting-form" method="post" action="">
212
+ <h1>Pagelayer Settings</h1>
213
+ <p>Welcome To Pagelayer</p>
214
<div class="tabs-wrapper">
215
<h2 class="nav-tab-wrapper pagelayer-wrapper">
216
<a href="#general" class="nav-tab">General</a>
342
<?php } ?>
343
<div class="pagelayer-tab-panel" id="support">
344
<h2>Support</h2>
345
+ <h3>You can contact the Pagelayer Team via email. Our email address is <a href="mailto:support@pagelayer.com">support@pagelayer.com</a>. We will get back to you as soon as possible!</h3>
346
347
348
</div>
351
<div class="pagelayer-acc-wrapper">
352
<span class="nav-tab pagelayer-acc-tab">1: Why choose us</span>
353
<div class="pagelayer-acc-panel">
354
+ <p>Pagelayer is best live editor and easy to use and we will keep improving it !</P>
355
</div>
356
357
<span class="nav-tab pagelayer-acc-tab">2: Support</span>
main/shortcodes.php CHANGED
@@ -610,7 +610,7 @@ $pagelayer->styles['ele_styles'] = [
610
'ele_zindex' => [
611
'type' => 'slider',
612
'label' => __pl('z-index'),
613
- 'css' => 'z-index: {{val}}',
614
],
615
'ele_shadow' => [
616
'type' => 'shadow',
@@ -633,6 +633,7 @@ $pagelayer->styles['border_styles'] = [
633
'border_type' => [
634
'type' => 'select',
635
'label' => __pl('border_type'),
636
'list' => [
637
'' => __pl('none'),
638
'solid' => __pl('solid'),
@@ -649,6 +650,7 @@ $pagelayer->styles['border_styles'] = [
649
'label' => __pl('border_width'),
650
'default' => '1,1,1,1',
651
'units' => ['px', 'em'],
652
'show' => [
653
'border_hover' => ''
654
],
@@ -661,6 +663,7 @@ $pagelayer->styles['border_styles'] = [
661
'type' => 'color',
662
'label' => __pl('border_color'),
663
'default' => '#CCC',
664
'show' => [
665
'border_hover' => ''
666
],
@@ -673,6 +676,7 @@ $pagelayer->styles['border_styles'] = [
673
'type' => 'padding',
674
'label' => __pl('border_radius'),
675
'units' => ['px', 'em'],
676
'show' => ['border_hover' => ''],
677
'css' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};',
678
],
@@ -685,6 +689,7 @@ $pagelayer->styles['border_styles'] = [
685
'border_type_hover' => [
686
'type' => 'select',
687
'label' => __pl('border_type'),
688
'list' => [
689
'' => __pl('none'),
690
'solid' => __pl('solid'),
@@ -700,6 +705,7 @@ $pagelayer->styles['border_styles'] = [
700
'type' => 'padding',
701
'label' => __pl('border_width'),
702
'units' => ['px', 'em'],
703
'show' => [
704
'border_hover' => 'hover'
705
],
@@ -711,6 +717,7 @@ $pagelayer->styles['border_styles'] = [
711
'border_color_hover' => [
712
'type' => 'color',
713
'label' => __pl('border_color'),
714
'show' => [
715
'border_hover' => 'hover'
716
],
@@ -722,6 +729,7 @@ $pagelayer->styles['border_styles'] = [
722
'border_radius_hover' => [
723
'type' => 'padding',
724
'label' => __pl('border_radius'),
725
'units' => ['px', 'em'],
726
'show' => ['border_hover' => 'hover'],
727
'css' => ['{{element}}:hover' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
@@ -828,7 +836,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_row', array(
828
</div>
829
</div>
830
<div if="{{overlay_type}}" class="pagelayer-background-overlay"></div>
831
- <div class="pagelayer-row-holder pagelayer-row pagelayer-auto"></div>',
832
'holder' => '.pagelayer-row-holder',
833
'params' => array(
834
'stretch' => array(
@@ -2307,6 +2315,20 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_icon', array(
2307
'icon_hover' => ''
2308
),
2309
),
2310
'bg_color' => array(
2311
'type' => 'color',
2312
'label' => __pl('service_box_icon_background_color_label'),
@@ -2327,7 +2349,8 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_icon', array(
2327
'max' => 5000,
2328
'default' => 400,
2329
'screen' => 1,
2330
- 'css' => ['{{element}} i' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
2331
'show' => array(
2332
'icon_hover' => 'hover'
2333
),
@@ -2405,6 +2428,20 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_icon', array(
2405
'show' => array(
2406
'icon_hover' => 'hover'
2407
),
2408
),
2409
'bg_color_hover' => array(
2410
'type' => 'color',
@@ -4261,10 +4298,13 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4261
<img class="pagelayer-img pagelayer-animation-{{anim_hover}}" src="{{func_image}}">
4262
</div>
4263
<div class="pagelayer-service-details">
4264
- <div if={{service_heading}} class="pagelayer-service-heading">{{service_heading}}</div>
4265
<div if={{service_text}} class="pagelayer-service-text">{{service_text}}</div>
4266
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn {{service_button_type}} pagelayer-ele-link pagelayer-button {{service_button_size}}">{{service_button_text}}</a>
4267
</div>
4268
</div>',
4269
'params' => [
4270
'service_image' => array(
@@ -4294,6 +4334,10 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4294
'service_image_size' => 'custom',
4295
)
4296
),
4297
'anim_hover' => array(
4298
'type' => 'select',
4299
'label' => __pl('icon_animation'),
@@ -4350,10 +4394,21 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4350
),
4351
'req' => ['!service_alignment' => 'top']
4352
),
4353
'service_image_spacing' => array(
4354
'type' => 'padding',
4355
'label' => __pl('service_image_spacing'),
4356
- 'css' => ['{{element}} .pagelayer-service-image img' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
4357
),
4358
'img_bor_state' => array(
4359
'type' => 'radio',
@@ -4364,6 +4419,13 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4364
'hover' => __pl('Hover'),
4365
),
4366
),
4367
'img_border_type' => array(
4368
'type' => 'select',
4369
'label' => __pl('icon_border_type'),
@@ -4419,6 +4481,13 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4419
'css' => ['{{element}} .pagelayer-service-image img' =>'-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
4420
'show' => ['img_bor_state' => 'hover'],
4421
),
4422
'img_border_type_hover' => array(
4423
'type' => 'select',
4424
'label' => __pl('icon_border_type_hover'),
@@ -4472,14 +4541,17 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4472
'default' => 'This is an Image Box',
4473
'text' => __pl('open_in_wpeditor'),
4474
),
4475
- 'service_heading_spacing' => array(
4476
- 'type' => 'slider',
4477
- 'label' => __pl('service_heading_spacing'),
4478
- 'min' => '0',
4479
- 'max' => '200',
4480
- 'default' => '10',
4481
'screen' => 1,
4482
- 'css' => ['{{element}} .pagelayer-service-heading' => 'margin-bottom: {{val}}px !important;'],
4483
),
4484
'heading_state' => array(
4485
'type' => 'radio',
@@ -4544,6 +4616,12 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4544
),
4545
'css' => ['{{element}} .pagelayer-service-details' => 'text-align:{{val}};'],
4546
),
4547
'service_text' => array(
4548
'type' => 'editor',
4549
'label' => __pl('service_box_text_label'),
@@ -4588,12 +4666,23 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4588
'pagelayer-btn-large' => __pl('large'),
4589
'pagelayer-btn-extra-large' => __pl('extra_large'),
4590
'pagelayer-btn-double-large' => __pl('double_large'),
4591
- //'pagelayer-btn-custom' => __pl('custom'),
4592
),
4593
'req' => array(
4594
'service_button' => 'true'
4595
)
4596
),
4597
'service_button_url' => array(
4598
'type' => 'link',
4599
'label' => __pl('service_btn_url_label'),
@@ -4609,14 +4698,16 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
4609
'service_button' => 'true'
4610
),
4611
),
4612
- 'service_btn_spacing' => array(
4613
- 'type' => 'slider',
4614
- 'label' => __pl('service_btn_spacing'),
4615
- 'min' => '0',
4616
- 'max' => '200',
4617
- 'default' => '10',
4618
'screen' => 1,
4619
- 'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top: {{val}}px;'],
4620
'req' => [
4621
'service_button' => 'true',
4622
]
@@ -4713,12 +4804,15 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
4713
<i class="fa fa-{{service_icon}} pagelayer-icon-{{service_icon_shape_type}} pagelayer-animation-{{anim_hover}}" aria-hidden="true"></i>
4714
</div>
4715
<div class="pagelayer-service-details">
4716
- <div if="{{service_heading}}" class="pagelayer-service-heading">{{service_heading}}</div>
4717
<div if="{{service_text}}" class="pagelayer-service-text">{{service_text}}</div>
4718
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn pagelayer-button pagelayer-ele-link {{iconbox_button_type}} {{service_button_size}}">
4719
<span if="{{service_button_text}}">{{service_button_text}}</span>
4720
</a>
4721
</div>
4722
</div>',
4723
'params' => array(
4724
'service_icon' => array(
@@ -4749,6 +4843,21 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
4749
'!service_alignment' => 'top'
4750
)
4751
),
4752
),
4753
// icon style
4754
'service_icon_style' => [
@@ -5016,14 +5125,17 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
5016
'default' => 'This is Icon Box',
5017
'text' => __pl('open_in_wpeditor'),
5018
),
5019
- 'service_heading_spacing' => array(
5020
- 'type' => 'slider',
5021
- 'label' => __pl('service_heading_spacing'),
5022
- 'min' => '0',
5023
- 'max' => '200',
5024
- 'default' => '10',
5025
'screen' => 1,
5026
- 'css' => ['{{element}} .pagelayer-service-heading' => 'margin-bottom: {{val}}px;'],
5027
),
5028
'heading_state' => array(
5029
'type' => 'radio',
@@ -5088,6 +5200,11 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
5088
),
5089
'css' => ['{{element}} .pagelayer-service-details' => 'text-align:{{val}};'],
5090
),
5091
'service_text' => array(
5092
'type' => 'editor',
5093
'label' => __pl('iconbox_box_text_label'),
@@ -5132,12 +5249,23 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
5132
'pagelayer-btn-large' => __pl('large'),
5133
'pagelayer-btn-extra-large' => __pl('extra_large'),
5134
'pagelayer-btn-double-large' => __pl('double_large'),
5135
- //'pagelayer-btn-custom' => __pl('custom'),
5136
),
5137
'req' => array(
5138
'service_button' => 'true'
5139
)
5140
),
5141
'service_button_url' => array(
5142
'type' => 'link',
5143
'label' => __pl('iconbox_btn_url_label'),
@@ -5153,14 +5281,16 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
5153
'service_button' => 'true'
5154
),
5155
),
5156
- 'service_btn_spacing' => array(
5157
- 'type' => 'slider',
5158
- 'label' => __pl('service_btn_spacing'),
5159
- 'min' => '0',
5160
- 'max' => '200',
5161
- 'default' => '10',
5162
'screen' => 1,
5163
- 'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top: {{val}}px;'],
5164
'req' => [
5165
'service_button' => 'true',
5166
]
610
'ele_zindex' => [
611
'type' => 'slider',
612
'label' => __pl('z-index'),
613
+ 'css' => 'z-index: {{val}}; position: relative;',
614
],
615
'ele_shadow' => [
616
'type' => 'shadow',
633
'border_type' => [
634
'type' => 'select',
635
'label' => __pl('border_type'),
636
+ 'screen' => 1,
637
'list' => [
638
'' => __pl('none'),
639
'solid' => __pl('solid'),
650
'label' => __pl('border_width'),
651
'default' => '1,1,1,1',
652
'units' => ['px', 'em'],
653
+ 'screen' => 1,
654
'show' => [
655
'border_hover' => ''
656
],
663
'type' => 'color',
664
'label' => __pl('border_color'),
665
'default' => '#CCC',
666
+ 'screen' => 1,
667
'show' => [
668
'border_hover' => ''
669
],
676
'type' => 'padding',
677
'label' => __pl('border_radius'),
678
'units' => ['px', 'em'],
679
+ 'screen' => 1,
680
'show' => ['border_hover' => ''],
681
'css' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};',
682
],
689
'border_type_hover' => [
690
'type' => 'select',
691
'label' => __pl('border_type'),
692
+ 'screen' => 1,
693
'list' => [
694
'' => __pl('none'),
695
'solid' => __pl('solid'),
705
'type' => 'padding',
706
'label' => __pl('border_width'),
707
'units' => ['px', 'em'],
708
+ 'screen' => 1,
709
'show' => [
710
'border_hover' => 'hover'
711
],
717
'border_color_hover' => [
718
'type' => 'color',
719
'label' => __pl('border_color'),
720
+ 'screen' => 1,
721
'show' => [
722
'border_hover' => 'hover'
723
],
729
'border_radius_hover' => [
730
'type' => 'padding',
731
'label' => __pl('border_radius'),
732
+ 'screen' => 1,
733
'units' => ['px', 'em'],
734
'show' => ['border_hover' => 'hover'],
735
'css' => ['{{element}}:hover' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
836
</div>
837
</div>
838
<div if="{{overlay_type}}" class="pagelayer-background-overlay"></div>
839
+ <div class="pagelayer-row-holder pagelayer-row pagelayer-auto pagelayer-width-{{width_content}}"></div>',
840
'holder' => '.pagelayer-row-holder',
841
'params' => array(
842
'stretch' => array(
2315
'icon_hover' => ''
2316
),
2317
),
2318
+ 'icon_bg_rotate' => array(
2319
+ 'type' => 'spinner',
2320
+ 'label' => __pl('rotate_icon'),
2321
+ 'default' => 0,
2322
+ 'css' => ['{{element}} i:before' => 'transform: translate(-50%, -50%) rotate({{val}}deg)'],
2323
+ 'min' => 0,
2324
+ 'max' => 360,
2325
+ 'step' => 1,
2326
+ 'screen' => 1,
2327
+ 'show' => array(
2328
+ 'icon_hover' => ''
2329
+ ),
2330
+ 'req' => [ '!bg_shape' => '']
2331
+ ),
2332
'bg_color' => array(
2333
'type' => 'color',
2334
'label' => __pl('service_box_icon_background_color_label'),
2349
'max' => 5000,
2350
'default' => 400,
2351
'screen' => 1,
2352
+ 'css' => ['{{element}} i' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;',
2353
+ '{{element}} i:hover:before' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
2354
'show' => array(
2355
'icon_hover' => 'hover'
2356
),
2428
'show' => array(
2429
'icon_hover' => 'hover'
2430
),
2431
+ 'req' => [ '!bg_shape' => '']
2432
+ ),
2433
+ 'icon_bg_rotate_hover' => array(
2434
+ 'type' => 'spinner',
2435
+ 'label' => __pl('rotate_icon'),
2436
+ 'default' => 0,
2437
+ 'css' => ['{{element}} i:hover:before' => 'transform: translate(-50%, -50%) rotate({{val}}deg)'],
2438
+ 'min' => 0,
2439
+ 'max' => 360,
2440
+ 'step' => 1,
2441
+ 'screen' => 1,
2442
+ 'show' => array(
2443
+ 'icon_hover' => 'hover'
2444
+ ),
2445
),
2446
'bg_color_hover' => array(
2447
'type' => 'color',
4298
<img class="pagelayer-img pagelayer-animation-{{anim_hover}}" src="{{func_image}}">
4299
</div>
4300
<div class="pagelayer-service-details">
4301
+ <a if-ext={{heading_url}} href="{{heading_url}}" class="pagelayer-ele-link">
4302
+ <div if={{service_heading}} class="pagelayer-service-heading">{{service_heading}}</div>
4303
+ </a>
4304
<div if={{service_text}} class="pagelayer-service-text">{{service_text}}</div>
4305
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn {{service_button_type}} pagelayer-ele-link pagelayer-button {{service_button_size}}">{{service_button_text}}</a>
4306
</div>
4307
+ <a if-ext={{box_url}} href="{{box_url}}" class="pagelayer-ele-link pagelayer-box-link"> </a>
4308
</div>',
4309
'params' => [
4310
'service_image' => array(
4334
'service_image_size' => 'custom',
4335
)
4336
),
4337
+ 'box_url' => array(
4338
+ 'type' => 'link',
4339
+ 'label' => __pl('url'),
4340
+ ),
4341
'anim_hover' => array(
4342
'type' => 'select',
4343
'label' => __pl('icon_animation'),
4394
),
4395
'req' => ['!service_alignment' => 'top']
4396
),
4397
+ 'service_img_alignment' => array(
4398
+ 'type' => 'radio',
4399
+ 'label' => __pl('horizontal_pos'),
4400
+ 'css' => ['{{element}} .pagelayer-service-image' => 'text-align: {{val}};,'],
4401
+ 'list' => array(
4402
+ 'left' => __pl('left'),
4403
+ 'center' => __pl('center'),
4404
+ 'right' => __pl('right'),
4405
+ ),
4406
+ 'req' => ['service_alignment' => 'top']
4407
+ ),
4408
'service_image_spacing' => array(
4409
'type' => 'padding',
4410
'label' => __pl('service_image_spacing'),
4411
+ 'css' => ['{{element}} .pagelayer-service-image' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
4412
),
4413
'img_bor_state' => array(
4414
'type' => 'radio',
4419
'hover' => __pl('Hover'),
4420
),
4421
),
4422
+ 'img_filter' => array(
4423
+ 'type' => 'filter',
4424
+ 'label' => __pl('filter'),
4425
+ 'default' => '0,100,100,0,0,100,100',
4426
+ 'css' => ['{{element}} img' => 'filter: blur({{val[0]}}px) brightness({{val[1]}}%) contrast({{val[2]}}%) grayscale({{val[3]}}%) hue-rotate({{val[4]}}deg) opacity({{val[5]}}%) saturate({{val[6]}}%)'],
4427
+ 'show' => ['img_bor_state' => 'normal'],
4428
+ ),
4429
'img_border_type' => array(
4430
'type' => 'select',
4431
'label' => __pl('icon_border_type'),
4481
'css' => ['{{element}} .pagelayer-service-image img' =>'-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
4482
'show' => ['img_bor_state' => 'hover'],
4483
),
4484
+ 'img_filter_hover' => array(
4485
+ 'type' => 'filter',
4486
+ 'label' => __pl('filter'),
4487
+ 'default' => '0,100,100,0,0,100,100',
4488
+ 'css' => ['{{element}}:hover img' => 'filter: blur({{val[0]}}px) brightness({{val[1]}}%) contrast({{val[2]}}%) grayscale({{val[3]}}%) hue-rotate({{val[4]}}deg) opacity({{val[5]}}%) saturate({{val[6]}}%)'],
4489
+ 'show' => ['img_bor_state' => 'hover'],
4490
+ ),
4491
'img_border_type_hover' => array(
4492
'type' => 'select',
4493
'label' => __pl('icon_border_type_hover'),
4541
'default' => 'This is an Image Box',
4542
'text' => __pl('open_in_wpeditor'),
4543
),
4544
+ 'heading_url' => array(
4545
+ 'type' => 'link',
4546
+ 'label' => __pl('url'),
4547
+ 'req' => ['!service_heading' => '']
4548
+ ),
4549
+ 'service_title_spacing' => array(
4550
+ 'type' => 'padding',
4551
+ 'label' => __pl('spacing'),
4552
'screen' => 1,
4553
+ 'default' => ',,10,',
4554
+ 'css' => ['{{element}} .pagelayer-service-heading' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;']
4555
),
4556
'heading_state' => array(
4557
'type' => 'radio',
4616
),
4617
'css' => ['{{element}} .pagelayer-service-details' => 'text-align:{{val}};'],
4618
),
4619
+ 'service_content_spacing' => array(
4620
+ 'type' => 'padding',
4621
+ 'label' => __pl('spacing'),
4622
+ 'screen' => 1,
4623
+ 'css' => ['{{element}} .pagelayer-service-text' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
4624
+ ),
4625
'service_text' => array(
4626
'type' => 'editor',
4627
'label' => __pl('service_box_text_label'),
4666
'pagelayer-btn-large' => __pl('large'),
4667
'pagelayer-btn-extra-large' => __pl('extra_large'),
4668
'pagelayer-btn-double-large' => __pl('double_large'),
4669
+ 'pagelayer-btn-custom' => __pl('custom'),
4670
),
4671
'req' => array(
4672
'service_button' => 'true'
4673
)
4674
),
4675
+ 'service_btn_dim' => array(
4676
+ 'type' => 'dimension',
4677
+ 'label' => __pl('service_btn_dim'),
4678
+ 'default' => '10,15',
4679
+ 'screen' => 1,
4680
+ 'css' => ['{{element}} .pagelayer-service-btn' => 'padding-top:{{val[0]}}px;padding-right:{{val[1]}}px;padding-bottom:{{val[0]}}px;padding-left:{{val[1]}}px;'],
4681
+ 'req' => [
4682
+ 'service_button' => 'true',
4683
+ 'service_button_size' => 'pagelayer-btn-custom',
4684
+ ]
4685
+ ),
4686
'service_button_url' => array(
4687
'type' => 'link',
4688
'label' => __pl('service_btn_url_label'),
4698
'service_button' => 'true'
4699
),
4700
),
4701
+ 'service_button_typo' => array(
4702
+ 'type' => 'typography',
4703
+ 'label' => __pl('typography'),
4704
'screen' => 1,
4705
+ 'css' => ['{{element}} .pagelayer-service-btn' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
4706
+ ),
4707
+ 'service_btn_spacing' => array(
4708
+ 'type' => 'padding',
4709
+ 'label' => __pl('spacing'),
4710
+ 'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top:{{val[0]}}px; margin-right:{{val[1]}}px; margin-bottom:{{val[2]}}px; margin-left:{{val[3]}}px;'],
4711
'req' => [
4712
'service_button' => 'true',
4713
]
4804
<i class="fa fa-{{service_icon}} pagelayer-icon-{{service_icon_shape_type}} pagelayer-animation-{{anim_hover}}" aria-hidden="true"></i>
4805
</div>
4806
<div class="pagelayer-service-details">
4807
+ <a if-ext={{heading_url}} href="{{heading_url}}" class="pagelayer-ele-link">
4808
+ <div if="{{service_heading}}" class="pagelayer-service-heading">{{service_heading}}</div>
4809
+ </a>
4810
<div if="{{service_text}}" class="pagelayer-service-text">{{service_text}}</div>
4811
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn pagelayer-button pagelayer-ele-link {{iconbox_button_type}} {{service_button_size}}">
4812
<span if="{{service_button_text}}">{{service_button_text}}</span>
4813
</a>
4814
</div>
4815
+ <a if-ext={{box_url}} href="{{box_url}}" class="pagelayer-ele-link pagelayer-box-link"> </a>
4816
</div>',
4817
'params' => array(
4818
'service_icon' => array(
4843
'!service_alignment' => 'top'
4844
)
4845
),
4846
+ 'service_icon_alignment' => array(
4847
+ 'type' => 'radio',
4848
+ 'label' => __pl('horizontal_pos'),
4849
+ 'css' => ['{{element}} .pagelayer-service-icon' => 'text-align: {{val}};,'],
4850
+ 'list' => array(
4851
+ 'left' => __pl('left'),
4852
+ 'center' => __pl('center'),
4853
+ 'right' => __pl('right'),
4854
+ ),
4855
+ 'req' => ['service_alignment' => 'top']
4856
+ ),
4857
+ 'box_url' => array(
4858
+ 'type' => 'link',
4859
+ 'label' => __pl('url'),
4860
+ ),
4861
),
4862
// icon style
4863
'service_icon_style' => [
5125
'default' => 'This is Icon Box',
5126
'text' => __pl('open_in_wpeditor'),
5127
),
5128
+ 'heading_url' => array(
5129
+ 'type' => 'link',
5130
+ 'label' => __pl('url'),
5131
+ 'req' => ['!service_heading' => '']
5132
+ ),
5133
+ 'service_title_spacing' => array(
5134
+ 'type' => 'padding',
5135
+ 'label' => __pl('spacing'),
5136
'screen' => 1,
5137
+ 'default' => ',,10,',
5138
+ 'css' => ['{{element}} .pagelayer-service-heading' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;']
5139
),
5140
'heading_state' => array(
5141
'type' => 'radio',
5200
),
5201
'css' => ['{{element}} .pagelayer-service-details' => 'text-align:{{val}};'],
5202
),
5203
+ 'service_content_spacing' => array(
5204
+ 'type' => 'padding',
5205
+ 'label' => __pl('spacing'),
5206
+ 'css' => ['{{element}} .pagelayer-service-text' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
5207
+ ),
5208
'service_text' => array(
5209
'type' => 'editor',
5210
'label' => __pl('iconbox_box_text_label'),
5249
'pagelayer-btn-large' => __pl('large'),
5250
'pagelayer-btn-extra-large' => __pl('extra_large'),
5251
'pagelayer-btn-double-large' => __pl('double_large'),
5252
+ 'pagelayer-btn-custom' => __pl('custom'),
5253
),
5254
'req' => array(
5255
'service_button' => 'true'
5256
)
5257
),
5258
+ 'service_btn_dim' => array(
5259
+ 'type' => 'dimension',
5260
+ 'label' => __pl('service_btn_dim'),
5261
+ 'default' => '10,15',
5262
+ 'screen' => 1,
5263
+ 'css' => ['{{element}} .pagelayer-service-btn' => 'padding-top:{{val[0]}}px;padding-right:{{val[1]}}px;padding-bottom:{{val[0]}}px;padding-left:{{val[1]}}px;'],
5264
+ 'req' => [
5265
+ 'service_button' => 'true',
5266
+ 'service_button_size' => 'pagelayer-btn-custom',
5267
+ ]
5268
+ ),
5269
'service_button_url' => array(
5270
'type' => 'link',
5271
'label' => __pl('iconbox_btn_url_label'),
5281
'service_button' => 'true'
5282
),
5283
),
5284
+ 'service_button_typo' => array(
5285
+ 'type' => 'typography',
5286
+ 'label' => __pl('typography'),
5287
'screen' => 1,
5288
+ 'css' => ['{{element}} .pagelayer-service-btn' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
5289
+ ),
5290
+ 'service_btn_spacing' => array(
5291
+ 'type' => 'padding',
5292
+ 'label' => __pl('spacing'),
5293
+ 'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top:{{val[0]}}px; margin-right:{{val[1]}}px; margin-bottom:{{val[2]}}px; margin-left:{{val[3]}}px;'],
5294
'req' => [
5295
'service_button' => 'true',
5296
]
main/template.php CHANGED
@@ -479,4 +479,16 @@ function pagelayer_get_post_content($id){
479
480
return $content;
481
482
}
479
480
return $content;
481
482
+ }
483
+
484
+ // Vars that can be used in template files
485
+ function pagelayer_template_vars(){
486
+
487
+ $replacers['{{theme_url}}'] = get_stylesheet_directory_uri();
488
+ $replacers['{{theme_images}}'] = get_stylesheet_directory_uri().'/images/';
489
+ $replacers['{{themes_dir}}'] = dirname(get_stylesheet_directory_uri());
490
+ $replacers['{{pl_site_url}}'] = home_url();
491
+
492
+ return $replacers;
493
+
494
}
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: 0.9.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.0.0
7
Author: Pagelayer Team
8
Author URI: https://pagelayer.com/
9
License: LGPL v2.1
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
=== Page Builder: PageLayer - Drag and Drop website builder ===
2
Contributors: pagelayer
3
- Tags: page builder, editor, landing page, drag-and-drop, pagelayer, softaculous, visual editor, wysiwyg, design, maintenance mode, coming soon, under construction, website builder, landing page builder, front-end builder
4
Requires at least: 4.7
5
Tested up to: 5.2
6
Requires PHP: 5.2.4
7
- Stable tag: 0.9.9
8
License: LGPL v2.1
9
License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
@@ -113,6 +113,22 @@ Do you have questions related to PageLayer ? Use the following links :
113
114
== Changelog ==
115
116
= 0.9.9 (September 10, 2019) =
117
* [Feature] Added inline editing so you can now edit text / headers in the editor itself.
118
* [Task] Editor Font Size has been introduced.
1
=== Page Builder: PageLayer - Drag and Drop website builder ===
2
Contributors: pagelayer
3
+ Tags: page builder, editor, landing page, drag-and-drop, pagelayer, softaculous, visual editor, wysiwyg, design, maintenance mode, coming soon, under construction, website builder, landing page builder, front-end builder, site-builder
4
Requires at least: 4.7
5
Tested up to: 5.2
6
Requires PHP: 5.2.4
7
+ Stable tag: 1.0.0
8
License: LGPL v2.1
9
License URI: http://www.gnu.org/licenses/lgpl-2.1.html
10
113
114
== Changelog ==
115
116
+ = 1.0.0 (September 27, 2019) =
117
+ * [Feature] Added the option to resize columns by dragging the divider between the 2 columns.
118
+ * [Feature] Images can now be pasted from the Clip Board in the Pagelayer Editor. These images will be uploaded and saved.
119
+ * [Feature] You can now copy Pagelayer Elements from one editor tab into another editor tab.
120
+ * [Feature] Image and Icon Box's can now have a link for the whole box.
121
+ * [Feature] Added rotate option to Icon Widget.
122
+ * [Task] Added the option to remove the color from a color setting to reset to default.
123
+ * [Task] Improved the Image filter options setting in Pagelayer editor.
124
+ * [Task] Removed the empty space of the Admin Bar in Pagelayer editor.
125
+ * [Task] Added Screen options for a number of Widget Settings.
126
+ * [Bug Fix] On the blog page if the first post was not a Pagelayer post, the other posts were not rendered. This is fixed.
127
+ * [Bug Fix] On some servers the pagelayer editor JS used to fail to load because of the URL having base64 as a file name.
128
+ * [Bug Fix] If a Page / Post did not have a title, Pagelayer Live Editor used to fail. This is fixed.
129
+ * [Bug Fix] The Color Picker had a z-index lower than the rich text editor. This is fixed.
130
+ * [Bug Fix] The Divider widget had extra spacing which is now fixed.
131
+
132
= 0.9.9 (September 10, 2019) =
133
* [Feature] Added inline editing so you can now edit text / headers in the editor itself.
134
* [Task] Editor Font Size has been introduced.