Version Description
(July 14, 2020) = * [Feature] Added Website settings to set global font styles and colors. * [Improvement] We have improved the Link property and you can now search posts/pages links in your WordPress site. Those links will automatically be updated if the target URL changes. * [Improvement] The image dropzone has further been improved. It will not show drop options if the dragged object is not an image. * [Improvement] We have improved the export wizard. Now users can export posts by its type and also export the media. * [Task] Added "playsinline" attribute in the background video in rows and columns. * [Task] The Archive post widget has been improved and so has the all posts widgets. * [Task] Added target option in Social Share widget. * [Task] The post content widget will only show a dummy placeholder while using the post content widget in a Pagelayer Template. This makes it easy to edit and understand the structure of the template. * [Task] Added dummy pagination for the Archive Posts widget while editing within a Pagelayer template. * [Task] The language strings which were hard-coded have been moved to the language pack. * [Task] The typography property has been further improved. * [Task] Added placeholder for featured image widget while editing a Pagelayer Template. * [Bug-Fix] Singular Templates were not showing Media / Attachments properly. This is fixed. * [Bug-Fix] In certain cases, the Hide on Mobile / Tablet was not working properly. This is fixed. * [Bug-Fix] The pQuery class name was conflicting with other plugins. This is fixed. * [Bug-Fix] While editing a pagelayer template, the editable area was not shown in certain cases. This is fixed. * [Bug-Fix] The Archive Title widget was not rendered properly while editing a Pagelayer Template. This is fixed. * [Bug-Fix] The row max-width option was applied on its childrens row / inner row. This is fixed. * [Bug-Fix] In certain cases, the singular/archive templates were not being saved properly and were applied to all the singular/archive pages respectively. This is fixed.
Release Info
Developer | pagelayer |
Plugin | Page Builder: PageLayer – Drag and Drop website builder |
Version | 1.1.9 |
Comparing to | |
See all releases |
Code changes from version 1.1.8 to 1.1.9
- css/pagelayer-admin.css +55 -1
- css/pagelayer-editor-frontend.css +10 -0
- css/pagelayer-editor.css +72 -2
- images/index.php +1 -0
- images/no_screenshot.png +0 -0
- init.php +116 -19
- js/givejs.php +3 -0
- js/pagelayer-admin.js +9 -4
- js/pagelayer-editor.js +26 -8
- js/properties.js +133 -16
- js/vanilla-picker.min.js +1 -1
- js/widgets.js +3 -3
- languages/en.json +3 -1
- lib/pquery/IQuery.php +1 -1
- lib/pquery/gan_formatter.php +1 -1
- lib/pquery/gan_node_html.php +11 -11
- lib/pquery/gan_parser_html.php +2 -2
- lib/pquery/gan_selector_html.php +2 -2
- lib/pquery/gan_tokenizer.php +1 -1
- lib/pquery/gan_xml2array.php +1 -1
- lib/pquery/ganon.php +2 -2
- lib/pquery/pQuery.php +8 -8
- main/ajax.php +87 -106
- main/font-options.php +52 -0
- main/functions.php +136 -7
- main/import.php +4 -0
- main/license.php +5 -28
- main/live.php +1 -1
- main/settings.php +56 -173
- main/shortcode_functions.php +27 -12
- main/shortcodes.php +17 -20
- main/template.php +5 -2
- main/website.php +479 -0
- pagelayer.php +1 -1
- readme.txt +22 -1
@@ -31,9 +31,63 @@ width:350px;
|
|
31 |
.pagelayer-cf table{
|
32 |
width: 80%;
|
33 |
}
|
34 |
-
|
35 |
.pagelayer-cf table label,
|
36 |
.pagelayer-cf table input:not([type="checkbox"]):not([type="radio"]),
|
37 |
.pagelayer-cf table textarea{
|
38 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
31 |
.pagelayer-cf table{
|
32 |
width: 80%;
|
33 |
}
|
|
|
34 |
.pagelayer-cf table label,
|
35 |
.pagelayer-cf table input:not([type="checkbox"]):not([type="radio"]),
|
36 |
.pagelayer-cf table textarea{
|
37 |
width: 100%;
|
38 |
+
}
|
39 |
+
|
40 |
+
.pagelayer-show-vanilla{
|
41 |
+
border: 1px solid #0495ce;
|
42 |
+
display: block;
|
43 |
+
padding: 4px;
|
44 |
+
text-decoration: none;
|
45 |
+
position: relative;
|
46 |
+
}
|
47 |
+
|
48 |
+
.pagelayer-show-vanilla .dashicons{
|
49 |
+
position: absolute;
|
50 |
+
right:0px;
|
51 |
+
top: 0px;
|
52 |
+
font-size: 14px;
|
53 |
+
background: #686868;
|
54 |
+
color: #fff;
|
55 |
+
width: 16px;
|
56 |
+
height: 16px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.pagelayer-color-div{
|
60 |
+
width: 40px;
|
61 |
+
height: 25px;
|
62 |
+
display: inline-block;
|
63 |
+
vertical-align: middle;
|
64 |
+
}
|
65 |
+
|
66 |
+
.pagelayer-color-none{
|
67 |
+
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;
|
68 |
+
background-size: cover !important;
|
69 |
+
}
|
70 |
+
|
71 |
+
.pagelayer-heading-tab-panel{
|
72 |
+
display:none;
|
73 |
+
}
|
74 |
+
|
75 |
+
.pagelayer-heading-tab{
|
76 |
+
background: #fff !important;
|
77 |
+
width: 98px;
|
78 |
+
}
|
79 |
+
|
80 |
+
.pagelayer-heading-wrapper{
|
81 |
+
margin-right: 20px;
|
82 |
+
border-bottom: unset;
|
83 |
+
}
|
84 |
+
|
85 |
+
.pagelayer-notice{
|
86 |
+
padding: 10px;
|
87 |
+
background-color: #fff;
|
88 |
+
border: 1px solid #ccc;
|
89 |
+
}
|
90 |
+
|
91 |
+
.pagelayer-notice-info{
|
92 |
+
border-left: 5px solid #00a0d2 !important;
|
93 |
}
|
@@ -220,6 +220,9 @@ background:#EF4D4D;
|
|
220 |
display:initial;
|
221 |
filter:blur(3px);
|
222 |
}
|
|
|
|
|
|
|
223 |
}
|
224 |
|
225 |
@media (max-width: 768px) and (min-width: 361px){
|
@@ -227,6 +230,9 @@ background:#EF4D4D;
|
|
227 |
display:initial;
|
228 |
filter:blur(3px);
|
229 |
}
|
|
|
|
|
|
|
230 |
}
|
231 |
|
232 |
@media (max-width: 360px){
|
@@ -234,6 +240,10 @@ background:#EF4D4D;
|
|
234 |
display:initial;
|
235 |
filter:blur(3px);
|
236 |
}
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
|
239 |
/* Pagelayer add section area */
|
220 |
display:initial;
|
221 |
filter:blur(3px);
|
222 |
}
|
223 |
+
.pagelayer-hide-desktop *{
|
224 |
+
filter:blur(2px);
|
225 |
+
}
|
226 |
}
|
227 |
|
228 |
@media (max-width: 768px) and (min-width: 361px){
|
230 |
display:initial;
|
231 |
filter:blur(3px);
|
232 |
}
|
233 |
+
.pagelayer-hide-tablet *{
|
234 |
+
filter:blur(2px);
|
235 |
+
}
|
236 |
}
|
237 |
|
238 |
@media (max-width: 360px){
|
240 |
display:initial;
|
241 |
filter:blur(3px);
|
242 |
}
|
243 |
+
|
244 |
+
.pagelayer-hide-mobile *{
|
245 |
+
filter:blur(2px);
|
246 |
+
}
|
247 |
}
|
248 |
|
249 |
/* Pagelayer add section area */
|
@@ -1228,7 +1228,8 @@ z-index: 10;
|
|
1228 |
}
|
1229 |
|
1230 |
.pagelayer-elp-icon-selector,
|
1231 |
-
.pagelayer-ele-type-sec
|
|
|
1232 |
position: absolute;
|
1233 |
z-index: 1000;
|
1234 |
border: 1px solid rgba(0,0,0,0.2) !important;
|
@@ -3283,4 +3284,73 @@ color: #555;
|
|
3283 |
padding: 5px 20px 10px;
|
3284 |
}
|
3285 |
|
3286 |
-
/* Property modal end*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
}
|
1229 |
|
1230 |
.pagelayer-elp-icon-selector,
|
1231 |
+
.pagelayer-ele-type-sec,
|
1232 |
+
.pagelayer-elp-link-list{
|
1233 |
position: absolute;
|
1234 |
z-index: 1000;
|
1235 |
border: 1px solid rgba(0,0,0,0.2) !important;
|
3284 |
padding: 5px 20px 10px;
|
3285 |
}
|
3286 |
|
3287 |
+
/* Property modal end*/
|
3288 |
+
/* Property link start*/
|
3289 |
+
|
3290 |
+
.pagelayer-elp-link-list{
|
3291 |
+
max-height:250px;
|
3292 |
+
overflow:auto;
|
3293 |
+
width: 99%;
|
3294 |
+
top: 35px;
|
3295 |
+
right: 4px;
|
3296 |
+
}
|
3297 |
+
|
3298 |
+
.pagelayer-elp-link-list .pagelayer-elp-link-search{
|
3299 |
+
width:100%;
|
3300 |
+
}
|
3301 |
+
|
3302 |
+
.pagelayer-elp-link-item{
|
3303 |
+
display: flex;
|
3304 |
+
font-size: 13px;
|
3305 |
+
padding: 7px 2px;
|
3306 |
+
margin: 2px 0;
|
3307 |
+
cursor: pointer;
|
3308 |
+
align-items:center;
|
3309 |
+
}
|
3310 |
+
|
3311 |
+
.pagelayer-elp-link-item:hover{
|
3312 |
+
box-shadow: inset 0 0 0 1px #555d66, inset 0 0 0 2px #fff;
|
3313 |
+
border-radius: 4px;
|
3314 |
+
}
|
3315 |
+
|
3316 |
+
.pagelayer-elp-link-item span{
|
3317 |
+
text-overflow: ellipsis;
|
3318 |
+
display: inline-block;
|
3319 |
+
overflow: hidden;
|
3320 |
+
white-space: nowrap;
|
3321 |
+
width: 100%;
|
3322 |
+
padding:3px;
|
3323 |
+
}
|
3324 |
+
|
3325 |
+
.pagelayer-elp-link-item-title{
|
3326 |
+
font-weight:bold;
|
3327 |
+
}
|
3328 |
+
|
3329 |
+
.pagelayer-elp-link-item-perma{
|
3330 |
+
color:#999;
|
3331 |
+
}
|
3332 |
+
|
3333 |
+
.pagelayer-elp-link-title{
|
3334 |
+
width: 73%;
|
3335 |
+
margin-right:2%;
|
3336 |
+
}
|
3337 |
+
|
3338 |
+
.pagelayer-elp-link-info{
|
3339 |
+
width: 20%;
|
3340 |
+
background-color: #ededed;
|
3341 |
+
padding: 2px;
|
3342 |
+
font-size:11px;
|
3343 |
+
}
|
3344 |
+
|
3345 |
+
.pagelayer-elp-link-id{
|
3346 |
+
background-color: #ededed;
|
3347 |
+
padding: 2px 6px;
|
3348 |
+
font-size:12px;
|
3349 |
+
margin-left:5px;
|
3350 |
+
}
|
3351 |
+
|
3352 |
+
.pagelayer-elp-link-info span{
|
3353 |
+
padding: 4px;
|
3354 |
+
}
|
3355 |
+
/* Property link end*/
|
3356 |
+
|
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php //prevent directory listing
|
Binary file
|
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
|
|
5 |
|
6 |
define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
|
7 |
define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
|
8 |
-
define('PAGELAYER_VERSION', '1.1.
|
9 |
define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
|
10 |
define('PAGELAYER_SLUG', 'pagelayer');
|
11 |
define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
|
@@ -100,12 +100,25 @@ function pagelayer_load_plugin(){
|
|
100 |
// Is there any ACTION set ?
|
101 |
$pagelayer->action = pagelayer_optreq('pagelayer-action');
|
102 |
|
103 |
-
// Load settings
|
104 |
-
$options = get_option('pagelayer_options');
|
105 |
$pagelayer->settings['post_types'] = empty(get_option('pl_support_ept')) ? ['post', 'page'] : get_option('pl_support_ept');
|
106 |
$pagelayer->settings['max_width'] = (int) (empty(get_option('pagelayer_content_width')) ? 1170 : get_option('pagelayer_content_width'));
|
107 |
$pagelayer->settings['tablet_breakpoint'] = (int) (empty(get_option('pagelayer_tablet_breakpoint')) ? 768 : get_option('pagelayer_tablet_breakpoint'));
|
108 |
$pagelayer->settings['mobile_breakpoint'] = (int) (empty(get_option('pagelayer_mobile_breakpoint')) ? 360 : get_option('pagelayer_mobile_breakpoint'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
// Load the language
|
111 |
load_plugin_textdomain('pagelayer', false, PAGELAYER_SLUG.'/languages/');
|
@@ -187,8 +200,8 @@ function pagelayer_admin_menu() {
|
|
187 |
// Its premium
|
188 |
if(defined('PAGELAYER_PREMIUM')){
|
189 |
|
190 |
-
//
|
191 |
-
add_submenu_page('pagelayer', __('
|
192 |
|
193 |
// Add new template
|
194 |
add_submenu_page('pagelayer', __('Theme Templates'), __('Theme Templates'), $capability, 'edit.php?post_type=pagelayer-template');
|
@@ -218,6 +231,17 @@ function pagelayer_admin_menu() {
|
|
218 |
|
219 |
}
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
// This function will handle the Settings Pages in PageLayer
|
222 |
function pagelayer_page_handler(){
|
223 |
|
@@ -359,6 +383,7 @@ function pagelayer_enqueue_frontend($force = false){
|
|
359 |
|
360 |
// Load the global styles
|
361 |
add_action('wp_head', 'pagelayer_global_styles', 5);
|
|
|
362 |
|
363 |
// Load custom widgets
|
364 |
do_action('pagelayer_custom_frontend_enqueue');
|
@@ -377,21 +402,36 @@ function pagelayer_enqueue_fonts(){
|
|
377 |
return;
|
378 |
}
|
379 |
|
380 |
-
$url =
|
381 |
-
|
|
|
|
|
382 |
|
383 |
-
foreach($
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
}
|
386 |
|
387 |
-
|
388 |
-
|
389 |
-
$url .= '|'.get_option('pagelayer_body_font').':100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i';
|
390 |
}
|
391 |
|
392 |
-
//
|
|
|
|
|
|
|
393 |
|
394 |
-
wp_register_style('pagelayer-google-font', 'https://fonts.googleapis.com/css?family='.rawurlencode($url), array(), PAGELAYER_VERSION);
|
395 |
wp_enqueue_style('pagelayer-google-font');
|
396 |
|
397 |
}
|
@@ -418,20 +458,77 @@ function pagelayer_global_styles(){
|
|
418 |
|
419 |
global $pagelayer;
|
420 |
|
421 |
-
$styles = '<style id="pagelayer-global-styles" type="text/css">';
|
422 |
|
423 |
// Style for only child row holder
|
424 |
-
$styles .= '.pagelayer-row-stretch-auto > .pagelayer-row-holder, .pagelayer-row-stretch-full > .pagelayer-row-holder.pagelayer-width-auto{ max-width: '.$pagelayer->settings['max_width'].'px; margin-left: auto; margin-right: auto;}';
|
425 |
|
426 |
-
|
427 |
-
|
|
|
428 |
}
|
429 |
|
430 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
|
432 |
echo $styles;
|
433 |
}
|
434 |
|
|
|
|
|
|
|
|
|
|
|
435 |
// Load the live editor if needed
|
436 |
add_action('wp_enqueue_scripts', 'pagelayer_load_live', 9999);
|
437 |
|
5 |
|
6 |
define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE));
|
7 |
define('PAGELAYER_PRO_BASE', 'pagelayer-pro/pagelayer-pro.php');
|
8 |
+
define('PAGELAYER_VERSION', '1.1.9');
|
9 |
define('PAGELAYER_DIR', dirname(PAGELAYER_FILE));
|
10 |
define('PAGELAYER_SLUG', 'pagelayer');
|
11 |
define('PAGELAYER_URL', plugins_url('', PAGELAYER_FILE));
|
100 |
// Is there any ACTION set ?
|
101 |
$pagelayer->action = pagelayer_optreq('pagelayer-action');
|
102 |
|
103 |
+
// Load settings
|
|
|
104 |
$pagelayer->settings['post_types'] = empty(get_option('pl_support_ept')) ? ['post', 'page'] : get_option('pl_support_ept');
|
105 |
$pagelayer->settings['max_width'] = (int) (empty(get_option('pagelayer_content_width')) ? 1170 : get_option('pagelayer_content_width'));
|
106 |
$pagelayer->settings['tablet_breakpoint'] = (int) (empty(get_option('pagelayer_tablet_breakpoint')) ? 768 : get_option('pagelayer_tablet_breakpoint'));
|
107 |
$pagelayer->settings['mobile_breakpoint'] = (int) (empty(get_option('pagelayer_mobile_breakpoint')) ? 360 : get_option('pagelayer_mobile_breakpoint'));
|
108 |
+
$pagelayer->settings['body_font'] = get_option('pagelayer_body_font');
|
109 |
+
$pagelayer->settings['body'] = get_option('pagelayer_body_typography');
|
110 |
+
$pagelayer->settings['h1'] = get_option('pagelayer_h1_typography');
|
111 |
+
$pagelayer->settings['h2'] = get_option('pagelayer_h2_typography');
|
112 |
+
$pagelayer->settings['h3'] = get_option('pagelayer_h3_typography');
|
113 |
+
$pagelayer->settings['h4'] = get_option('pagelayer_h4_typography');
|
114 |
+
$pagelayer->settings['h5'] = get_option('pagelayer_h5_typography');
|
115 |
+
$pagelayer->settings['h6'] = get_option('pagelayer_h6_typography');
|
116 |
+
$pagelayer->settings['color'] = get_option('pagelayer_color');
|
117 |
+
|
118 |
+
// To make things backward compatible
|
119 |
+
if(!empty($pagelayer->settings['body_font'])){
|
120 |
+
$pagelayer->settings['body']['font-family'] = $pagelayer->settings['body_font'];
|
121 |
+
}
|
122 |
|
123 |
// Load the language
|
124 |
load_plugin_textdomain('pagelayer', false, PAGELAYER_SLUG.'/languages/');
|
200 |
// Its premium
|
201 |
if(defined('PAGELAYER_PREMIUM')){
|
202 |
|
203 |
+
// UI Settings
|
204 |
+
add_submenu_page('pagelayer', __('Website Settings'), __('Website Settings'), $capability, 'pagelayer_website_settings', 'pagelayer_website_page');
|
205 |
|
206 |
// Add new template
|
207 |
add_submenu_page('pagelayer', __('Theme Templates'), __('Theme Templates'), $capability, 'edit.php?post_type=pagelayer-template');
|
231 |
|
232 |
}
|
233 |
|
234 |
+
// This function will handle the Settings Pages in PageLayer
|
235 |
+
function pagelayer_website_page(){
|
236 |
+
|
237 |
+
global $wp_version, $pagelayer;
|
238 |
+
|
239 |
+
include_once(PAGELAYER_DIR.'/main/website.php');
|
240 |
+
|
241 |
+
pagelayer_website_settings();
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
// This function will handle the Settings Pages in PageLayer
|
246 |
function pagelayer_page_handler(){
|
247 |
|
383 |
|
384 |
// Load the global styles
|
385 |
add_action('wp_head', 'pagelayer_global_styles', 5);
|
386 |
+
add_filter('body_class', 'pagelayer_body_class', 10, 2);
|
387 |
|
388 |
// Load custom widgets
|
389 |
do_action('pagelayer_custom_frontend_enqueue');
|
402 |
return;
|
403 |
}
|
404 |
|
405 |
+
$url = [];
|
406 |
+
|
407 |
+
// Global CSS settings
|
408 |
+
$css_settings = ['body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
409 |
|
410 |
+
foreach($css_settings as $set){
|
411 |
+
|
412 |
+
// Fetch body font if given
|
413 |
+
if(!empty($pagelayer->settings[$set]['font-family'])){
|
414 |
+
|
415 |
+
$val = $pagelayer->settings[$set]['font-family'];
|
416 |
+
$font_weight = empty($pagelayer->settings[$set]['font-weight']) ? 400 : $pagelayer->settings[$set]['font-weight'];
|
417 |
+
$font_style = empty($pagelayer->settings[$set]['font-style']) ? 'normal' : $pagelayer->settings[$set]['font-style'];$font_style = in_array($font_style, ['italic', 'oblique']) ? 'i' : '';
|
418 |
+
|
419 |
+
$pagelayer->runtime_fonts[$val][$font_weight.$font_style] = $font_weight.$font_style;
|
420 |
+
|
421 |
+
}
|
422 |
+
|
423 |
}
|
424 |
|
425 |
+
foreach($pagelayer->runtime_fonts as $font => $weights){
|
426 |
+
$url[] = $font.':'.implode(',', $weights);
|
|
|
427 |
}
|
428 |
|
429 |
+
// If no fonts are to be set, then we dont set
|
430 |
+
if(empty($url)){
|
431 |
+
return false;
|
432 |
+
}
|
433 |
|
434 |
+
wp_register_style('pagelayer-google-font', 'https://fonts.googleapis.com/css?family='.rawurlencode(implode('|', $url)), array(), PAGELAYER_VERSION);
|
435 |
wp_enqueue_style('pagelayer-google-font');
|
436 |
|
437 |
}
|
458 |
|
459 |
global $pagelayer;
|
460 |
|
461 |
+
$styles = '<style id="pagelayer-global-styles" type="text/css">'.PHP_EOL;
|
462 |
|
463 |
// Style for only child row holder
|
464 |
+
$styles .= '.pagelayer-row-stretch-auto > .pagelayer-row-holder, .pagelayer-row-stretch-full > .pagelayer-row-holder.pagelayer-width-auto{ max-width: '.$pagelayer->settings['max_width'].'px; margin-left: auto; margin-right: auto;}'.PHP_EOL;
|
465 |
|
466 |
+
// Colors
|
467 |
+
if(!empty($pagelayer->settings['color']['background'])){
|
468 |
+
$pagelayer->settings['body']['background-color'] = $pagelayer->settings['color']['background'];
|
469 |
}
|
470 |
|
471 |
+
if(!empty($pagelayer->settings['color']['text'])){
|
472 |
+
$pagelayer->settings['body']['color'] = $pagelayer->settings['color']['text'];
|
473 |
+
}
|
474 |
+
|
475 |
+
// Global CSS settings
|
476 |
+
$css_settings = ['body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
477 |
+
|
478 |
+
// PX suffix
|
479 |
+
$pxs = ['font-size', 'letter-spacing', 'word-spacing'];
|
480 |
+
|
481 |
+
foreach($css_settings as $k => $v){
|
482 |
+
|
483 |
+
$key = is_numeric($k) ? $v : $k;
|
484 |
+
$r = [];
|
485 |
+
|
486 |
+
if(empty($pagelayer->settings[$key])){
|
487 |
+
continue;
|
488 |
+
}
|
489 |
+
|
490 |
+
foreach($pagelayer->settings[$key] as $kk => $vv){
|
491 |
+
|
492 |
+
if(empty($vv)){
|
493 |
+
continue;
|
494 |
+
}
|
495 |
+
|
496 |
+
$r[] = $kk.':'.$vv.(in_array($kk, $pxs) ? 'px' : '');
|
497 |
+
|
498 |
+
}
|
499 |
+
|
500 |
+
if(empty($r)){
|
501 |
+
continue;
|
502 |
+
}
|
503 |
+
|
504 |
+
$styles .= 'body.pagelayer-body '.($v == 'body' ? '' : $v).'{'.implode(';', $r)."}\n";
|
505 |
+
}
|
506 |
+
|
507 |
+
// Link Color
|
508 |
+
if(!empty($pagelayer->settings['color']['link'])){
|
509 |
+
$styles .= 'body.pagelayer-body a{color: '.$pagelayer->settings['color']['link'].'}'.PHP_EOL;
|
510 |
+
}
|
511 |
+
|
512 |
+
// Link Hover Color
|
513 |
+
if(!empty($pagelayer->settings['color']['link-hover'])){
|
514 |
+
$styles .= 'body.pagelayer-body a:hover{color: '.$pagelayer->settings['color']['link-hover'].'}'.PHP_EOL;
|
515 |
+
}
|
516 |
+
|
517 |
+
// Link Hover Color
|
518 |
+
if(!empty($pagelayer->settings['color']['heading'])){
|
519 |
+
$styles .= 'body.pagelayer-body h1,h2,h3,h4,h5,h6{color: '.$pagelayer->settings['color']['heading'].'}'.PHP_EOL;
|
520 |
+
}
|
521 |
+
|
522 |
+
$styles .= PHP_EOL.'</style>';
|
523 |
|
524 |
echo $styles;
|
525 |
}
|
526 |
|
527 |
+
function pagelayer_body_class($classes, $class){
|
528 |
+
$classes[] = 'pagelayer-body';
|
529 |
+
return $classes;
|
530 |
+
}
|
531 |
+
|
532 |
// Load the live editor if needed
|
533 |
add_action('wp_enqueue_scripts', 'pagelayer_load_live', 9999);
|
534 |
|
@@ -105,6 +105,9 @@ if(!empty($matches[1])){
|
|
105 |
}
|
106 |
}
|
107 |
|
|
|
|
|
|
|
108 |
// And lang string ?
|
109 |
if(!empty($export_langs)){
|
110 |
$data .= 'pagelayer_lang = '.json_encode($export_langs).';'."\n\n";
|
105 |
}
|
106 |
}
|
107 |
|
108 |
+
// Also add the fonts
|
109 |
+
$export_langs['google_fonts_list'] = $pagelayer->fonts;
|
110 |
+
|
111 |
// And lang string ?
|
112 |
if(!empty($export_langs)){
|
113 |
$data .= 'pagelayer_lang = '.json_encode($export_langs).';'."\n\n";
|
@@ -1,18 +1,22 @@
|
|
1 |
// Lets start
|
2 |
jQuery(document).ready(function(){
|
3 |
|
4 |
-
var pl_admin_tabs = function(){
|
5 |
jQuery('.nav-tab-wrapper a').click(function(){
|
6 |
|
7 |
var tEle = jQuery(this);
|
8 |
|
|
|
|
|
9 |
// Limit effect to the container element.
|
10 |
-
var context = tEle.closest('.nav-tab-wrapper
|
11 |
context.find('.nav-tab-wrapper a').removeClass('nav-tab-active');
|
12 |
tEle.addClass('nav-tab-active');
|
13 |
-
context.find('.
|
14 |
context.find(tEle.attr('href')).show();
|
15 |
|
|
|
|
|
16 |
});
|
17 |
|
18 |
// Make setting nav-tab-active optional.
|
@@ -27,7 +31,8 @@ jQuery(document).ready(function(){
|
|
27 |
active_tab_ele.click();
|
28 |
}
|
29 |
}else{
|
30 |
-
jEle.find('a').first()
|
|
|
31 |
}
|
32 |
|
33 |
});
|
1 |
// Lets start
|
2 |
jQuery(document).ready(function(){
|
3 |
|
4 |
+
var pl_admin_tabs = function(sel){
|
5 |
jQuery('.nav-tab-wrapper a').click(function(){
|
6 |
|
7 |
var tEle = jQuery(this);
|
8 |
|
9 |
+
var sel = tEle.attr('tab-class') || 'pagelayer-tab-panel';
|
10 |
+
|
11 |
// Limit effect to the container element.
|
12 |
+
var context = tEle.closest('.nav-tab-wrapper').parent().parent();
|
13 |
context.find('.nav-tab-wrapper a').removeClass('nav-tab-active');
|
14 |
tEle.addClass('nav-tab-active');
|
15 |
+
context.find('.'+sel).hide();
|
16 |
context.find(tEle.attr('href')).show();
|
17 |
|
18 |
+
return false;
|
19 |
+
|
20 |
});
|
21 |
|
22 |
// Make setting nav-tab-active optional.
|
31 |
active_tab_ele.click();
|
32 |
}
|
33 |
}else{
|
34 |
+
var first = jEle.find('a').first();
|
35 |
+
first.click();
|
36 |
}
|
37 |
|
38 |
});
|
@@ -9,6 +9,7 @@ pagelayer = {
|
|
9 |
$$ : function(select){
|
10 |
return jQuery(select, window.parent.document);
|
11 |
},
|
|
|
12 |
p : this,
|
13 |
copy_selected: '',
|
14 |
mouse: {x: -1, y: -1},
|
@@ -83,6 +84,9 @@ jQuery(document).ready(function(){
|
|
83 |
// Set to desktop
|
84 |
pagelayer_set_screen_mode('desktop');
|
85 |
|
|
|
|
|
|
|
86 |
// Set up right click
|
87 |
pagelayer_left_click();
|
88 |
pagelayer_right_click();
|
@@ -247,7 +251,6 @@ function pagelayer_make_leftbar_movable(){
|
|
247 |
|
248 |
// The variable needs to be empty.
|
249 |
var newMethod = '',
|
250 |
-
par_doc = jQuery(window.parent.document).add(document),
|
251 |
change = true;
|
252 |
|
253 |
var leftbar_mousemove = function(e){
|
@@ -302,8 +305,8 @@ function pagelayer_make_leftbar_movable(){
|
|
302 |
var leftbar_mouseup = function(e){
|
303 |
|
304 |
// Remove events
|
305 |
-
|
306 |
-
|
307 |
|
308 |
// Remove class to leftbar
|
309 |
pagelayer.$$('.pagelayer-leftbar-move').remove();
|
@@ -328,8 +331,8 @@ function pagelayer_make_leftbar_movable(){
|
|
328 |
change = true;
|
329 |
};
|
330 |
|
331 |
-
|
332 |
-
|
333 |
|
334 |
});
|
335 |
|
@@ -1621,7 +1624,7 @@ function pagelayer_get_screen_mode(){
|
|
1621 |
}
|
1622 |
|
1623 |
// Handle key press events
|
1624 |
-
|
1625 |
//alert(String.fromCharCode(event.which));
|
1626 |
|
1627 |
var tEle = jQuery(event.target);
|
@@ -2376,8 +2379,23 @@ function pagelayer_set_atts(jEle, atts, val){
|
|
2376 |
no_val[x] = 1;
|
2377 |
}
|
2378 |
|
2379 |
-
if('req' in props[x] || 'show' in props[x]){
|
2380 |
var show = 'req' in props[x] ? props[x]['req'] : props[x]['show'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2381 |
for(var showParam in show){
|
2382 |
var val = show[showParam];
|
2383 |
var except = showParam.substr(0, 1) == '!' ? true : false;
|
@@ -3111,7 +3129,7 @@ function pagelayer_get_contact_templates(){
|
|
3111 |
function pagelayer_save(){
|
3112 |
|
3113 |
// hiding and showing loading animation
|
3114 |
-
|
3115 |
pagelayer.$$('.pagelayer-update-loader').show();
|
3116 |
|
3117 |
pagelayer_trigger_action('pagelayer_save');
|
9 |
$$ : function(select){
|
10 |
return jQuery(select, window.parent.document);
|
11 |
},
|
12 |
+
gDocument : jQuery(window.parent.document).add(document),
|
13 |
p : this,
|
14 |
copy_selected: '',
|
15 |
mouse: {x: -1, y: -1},
|
84 |
// Set to desktop
|
85 |
pagelayer_set_screen_mode('desktop');
|
86 |
|
87 |
+
// Create list of fonts
|
88 |
+
pagelayer_fonts = pagelayer_l('google_fonts_list');
|
89 |
+
|
90 |
// Set up right click
|
91 |
pagelayer_left_click();
|
92 |
pagelayer_right_click();
|
251 |
|
252 |
// The variable needs to be empty.
|
253 |
var newMethod = '',
|
|
|
254 |
change = true;
|
255 |
|
256 |
var leftbar_mousemove = function(e){
|
305 |
var leftbar_mouseup = function(e){
|
306 |
|
307 |
// Remove events
|
308 |
+
pagelayer.gDocument.off('mousemove', leftbar_mousemove);
|
309 |
+
pagelayer.gDocument.off('mouseup', leftbar_mouseup);
|
310 |
|
311 |
// Remove class to leftbar
|
312 |
pagelayer.$$('.pagelayer-leftbar-move').remove();
|
331 |
change = true;
|
332 |
};
|
333 |
|
334 |
+
pagelayer.gDocument.on('mouseup', leftbar_mouseup);
|
335 |
+
pagelayer.gDocument.on('mousemove', leftbar_mousemove);
|
336 |
|
337 |
});
|
338 |
|
1624 |
}
|
1625 |
|
1626 |
// Handle key press events
|
1627 |
+
pagelayer.gDocument.keydown(function(event){
|
1628 |
//alert(String.fromCharCode(event.which));
|
1629 |
|
1630 |
var tEle = jQuery(event.target);
|
2379 |
no_val[x] = 1;
|
2380 |
}
|
2381 |
|
2382 |
+
if('req' in props[x] || 'show' in props[x]){
|
2383 |
var show = 'req' in props[x] ? props[x]['req'] : props[x]['show'];
|
2384 |
+
|
2385 |
+
// We have both req and show, so lets just combine the values and then show
|
2386 |
+
// NOTE : We need to make an array and not just merge the 2 as they are references
|
2387 |
+
if('req' in props[x] && 'show' in props[x]){
|
2388 |
+
|
2389 |
+
// Add the req values
|
2390 |
+
show = JSON.parse(JSON.stringify(props[x]['req']));
|
2391 |
+
|
2392 |
+
// Now the show values need to be looped
|
2393 |
+
for(var t in props[x]['show']){
|
2394 |
+
show[t] = props[x]['show'][t];
|
2395 |
+
}
|
2396 |
+
|
2397 |
+
}
|
2398 |
+
|
2399 |
for(var showParam in show){
|
2400 |
var val = show[showParam];
|
2401 |
var except = showParam.substr(0, 1) == '!' ? true : false;
|
3129 |
function pagelayer_save(){
|
3130 |
|
3131 |
// hiding and showing loading animation
|
3132 |
+
pagelayer.$$('.pagelayer-update-text').hide();
|
3133 |
pagelayer.$$('.pagelayer-update-loader').show();
|
3134 |
|
3135 |
pagelayer_trigger_action('pagelayer_save');
|
@@ -758,7 +758,7 @@ function _pagelayer_set_atts(row, val, no_default){
|
|
758 |
function _pagelayer_set_tmp_atts(row, suffix, val){
|
759 |
var id = row.closest('[pagelayer-element-id]').attr('pagelayer-element-id');
|
760 |
var jEle = jQuery('[pagelayer-id='+id+']');
|
761 |
-
pagelayer_set_tmp_atts(jEle, row.attr('pagelayer-elp-name')+'-'+suffix, val);
|
762 |
};
|
763 |
|
764 |
// Will clear the attribute but not render
|
@@ -1234,8 +1234,10 @@ function pagelayer_img_dragAndDrop(dropzoneParent, dropZone, jEle, row){
|
|
1234 |
// Checking that the dragged element is a file or not
|
1235 |
var dt = e.originalEvent.dataTransfer;
|
1236 |
if(dt.types && (dt.types.indexOf ? dt.types.indexOf('Files') != -1 : dt.types.contains('Files'))){
|
1237 |
-
|
1238 |
-
|
|
|
|
|
1239 |
}
|
1240 |
});
|
1241 |
|
@@ -1818,19 +1820,135 @@ function pagelayer_elp_editor(row, prop){
|
|
1818 |
// The Link proprety
|
1819 |
function pagelayer_elp_link(row, prop){
|
1820 |
|
1821 |
-
|
|
|
|
|
|
|
1822 |
var div = '<div class="pagelayer-elp-link-div pagelayer-elp-input-icon">'+
|
1823 |
-
'<input class="pagelayer-elp-link" type="text" value="'+
|
1824 |
'<i class="pli pli-link pagelayer-elp-link-icon" />'+
|
|
|
|
|
1825 |
'</div>';
|
1826 |
|
1827 |
row.append(div);
|
1828 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1829 |
// Set a Link
|
1830 |
row.find('.pagelayer-elp-link').on('change', function(){
|
1831 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1832 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1833 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1834 |
}
|
1835 |
|
1836 |
// The Textarea property
|
@@ -2226,7 +2344,7 @@ function pagelayer_elp_color(row, prop){
|
|
2226 |
|
2227 |
row.find('.pagelayer-elp-color-preview').css('background', prop.c['val']);
|
2228 |
|
2229 |
-
var picker = new
|
2230 |
parent : row.find('.pagelayer-elp-color-div')[0],
|
2231 |
popup : 'left',
|
2232 |
color : prop.c['val'],
|
@@ -2613,7 +2731,7 @@ function pagelayer_elp_shadow(row, prop){
|
|
2613 |
var preview = row.find('.pagelayer-elp-color-preview');
|
2614 |
preview.css('background', val[3]);
|
2615 |
|
2616 |
-
var picker = new
|
2617 |
parent : row.find('.pagelayer-elp-color-div')[0],
|
2618 |
popup : 'left',
|
2619 |
color : val[3],
|
@@ -2720,7 +2838,7 @@ function pagelayer_elp_box_shadow(row, prop){
|
|
2720 |
var preview = row.find('.pagelayer-elp-color-preview');
|
2721 |
preview.css('background', val[3]);
|
2722 |
|
2723 |
-
var picker = new
|
2724 |
parent : row.find('.pagelayer-elp-color-div')[0],
|
2725 |
popup : 'left',
|
2726 |
color : val[3],
|
@@ -2873,7 +2991,7 @@ function pagelayer_elp_gradient(row, prop){
|
|
2873 |
i = i+2;
|
2874 |
});
|
2875 |
|
2876 |
-
var picker1 = new
|
2877 |
parent : row.find('.pagelayer-elp-gradient-color1')[0],
|
2878 |
popup : 'left',
|
2879 |
color : val[1],
|
@@ -2887,7 +3005,7 @@ function pagelayer_elp_gradient(row, prop){
|
|
2887 |
_pagelayer_set_atts(row, val);
|
2888 |
};
|
2889 |
|
2890 |
-
var picker2 = new
|
2891 |
parent : row.find('.pagelayer-elp-gradient-color2')[0],
|
2892 |
popup : 'left',
|
2893 |
color : val[3],
|
@@ -2901,7 +3019,7 @@ function pagelayer_elp_gradient(row, prop){
|
|
2901 |
_pagelayer_set_atts(row, val);
|
2902 |
};
|
2903 |
|
2904 |
-
var picker3 = new
|
2905 |
parent : row.find('.pagelayer-elp-gradient-color3')[0],
|
2906 |
popup : 'left',
|
2907 |
color : val[5],
|
@@ -2927,8 +3045,6 @@ function pagelayer_elp_gradient(row, prop){
|
|
2927 |
|
2928 |
}
|
2929 |
|
2930 |
-
var pagelayer_fonts = ['', 'ABeeZee', 'Abel', 'Abhaya Libre', 'Abril Fatface', 'Aclonica', 'Acme', 'Actor', 'Adamina', 'Advent Pro', 'Aguafina Script', 'Akronim', 'Aladin', 'Aldrich', 'Alef', 'Alegreya', 'Alegreya SC', 'Alegreya Sans', 'Alegreya Sans SC', 'Aleo', 'Alex Brush', 'Alfa Slab One', 'Alice', 'Alike', 'Alike Angular', 'Allan', 'Allerta', 'Allerta Stencil', 'Allura', 'Almendra', 'Almendra Display', 'Almendra SC', 'Amarante', 'Amaranth', 'Amatic SC', 'Amethysta', 'Amiko', 'Amiri', 'Amita', 'Anaheim', 'Andada', 'Andika', 'Angkor', 'Annie Use Your Telescope', 'Anonymous Pro', 'Antic', 'Antic Didone', 'Antic Slab', 'Anton', 'Arapey', 'Arbutus', 'Arbutus Slab', 'Architects Daughter', 'Archivo', 'Archivo Black', 'Archivo Narrow', 'Aref Ruqaa', 'Arima Madurai', 'Arimo', 'Arizonia', 'Armata', 'Arsenal', 'Artifika', 'Arvo', 'Arya', 'Asap', 'Asap Condensed', 'Asar', 'Asset', 'Assistant', 'Astloch', 'Asul', 'Athiti', 'Atma', 'Atomic Age', 'Aubrey', 'Audiowide', 'Autour One', 'Average', 'Average Sans', 'Averia Gruesa Libre', 'Averia Libre', 'Averia Sans Libre', 'Averia Serif Libre', 'B612', 'B612 Mono', 'Bad Script', 'Bahiana', 'Bai Jamjuree', 'Baloo', 'Baloo Bhai', 'Baloo Bhaijaan', 'Baloo Bhaina', 'Baloo Chettan', 'Baloo Da', 'Baloo Paaji', 'Baloo Tamma', 'Baloo Tammudu', 'Baloo Thambi', 'Balthazar', 'Bangers', 'Barlow', 'Barlow Condensed', 'Barlow Semi Condensed', 'Barrio', 'Basic', 'Battambang', 'Baumans', 'Bayon', 'Belgrano', 'Bellefair', 'Belleza', 'Bellota', 'BenchNine', 'Bentham', 'Berkshire Swash', 'Bevan', 'Bigelow Rules', 'Bigshot One', 'Bilbo', 'Bilbo Swash Caps', 'BioRhyme', 'BioRhyme Expanded', 'Biryani', 'Bitter', 'Black And White Picture', 'Black Han Sans', 'Black Ops One', 'Bokor', 'Bonbon', 'Boogaloo', 'Bowlby One', 'Bowlby One SC', 'Brawler', 'Bree Serif', 'Bubblegum Sans', 'Bubbler One', 'Buda', 'Buenard', 'Bungee', 'Bungee Hairline', 'Bungee Inline', 'Bungee Outline', 'Bungee Shade', 'Butcherman', 'Butterfly Kids', 'Cabin', 'Cabin Condensed', 'Cabin Sketch', 'Caesar Dressing', 'Cagliostro', 'Cairo', 'Calligraffitti', 'Cambay', 'Cambo', 'Candal', 'Cantarell', 'Cantata One', 'Cantora One', 'Capriola', 'Cardo', 'Carme', 'Carrois Gothic', 'Carrois Gothic SC', 'Carter One', 'Catamaran', 'Caudex', 'Caveat', 'Caveat Brush', 'Cedarville Cursive', 'Ceviche One', 'Chakra Petch', 'Changa', 'Changa One', 'Chango', 'Charm', 'Charmonman', 'Chathura', 'Chau Philomene One', 'Chela One', 'Chelsea Market', 'Chenla', 'Cherry Cream Soda', 'Cherry Swash', 'Chewy', 'Chicle', 'Chivo', 'Chonburi', 'Cinzel', 'Cinzel Decorative', 'Clicker Script', 'Coda', 'Coda Caption', 'Codystar', 'Coiny', 'Combo', 'Comfortaa', 'Coming Soon', 'Concert One', 'Condiment', 'Content', 'Contrail One', 'Convergence', 'Cookie', 'Copse', 'Corben', 'Cormorant', 'Cormorant Garamond', 'Cormorant Infant', 'Cormorant SC', 'Cormorant Unicase', 'Cormorant Upright', 'Courgette', 'Cousine', 'Coustard', 'Covered By Your Grace', 'Crafty Girls', 'Creepster', 'Crete Round', 'Crimson Text', 'Croissant One', 'Crushed', 'Cuprum', 'Cute Font', 'Cutive', 'Cutive Mono', 'Damion', 'Dancing Script', 'Dangrek', 'David Libre', 'Dawning of a New Day', 'Days One', 'Dekko', 'Delius', 'Delius Swash Caps', 'Delius Unicase', 'Della Respira', 'Denk One', 'Devonshire', 'Dhurjati', 'Didact Gothic', 'Diplomata', 'Diplomata SC', 'Do Hyeon', 'Dokdo', 'Domine', 'Donegal One', 'Doppio One', 'Dorsa', 'Dosis', 'Dr Sugiyama', 'Duru Sans', 'Dynalight', 'EB Garamond', 'Eagle Lake', 'East Sea Dokdo', 'Eater', 'Economica', 'Eczar', 'El Messiri', 'Electrolize', 'Elsie', 'Elsie Swash Caps', 'Emblema One', 'Emilys Candy', 'Encode Sans', 'Encode Sans Condensed', 'Encode Sans Expanded', 'Encode Sans Semi Condensed', 'Encode Sans Semi Expanded', 'Engagement', 'Englebert', 'Enriqueta', 'Erica One', 'Esteban', 'Euphoria Script', 'Ewert', 'Exo', 'Exo 2', 'Expletus Sans', 'Fahkwang', 'Fanwood Text', 'Farsan', 'Fascinate', 'Fascinate Inline', 'Faster One', 'Fasthand', 'Fauna One', 'Faustina', 'Federant', 'Federo', 'Felipa', 'Fenix', 'Finger Paint', 'Fira Mono', 'Fira Sans', 'Fira Sans Condensed', 'Fira Sans Extra Condensed', 'Fjalla One', 'Fjord One', 'Flamenco', 'Flavors', 'Fondamento', 'Fontdiner Swanky', 'Forum', 'Francois One', 'Frank Ruhl Libre', 'Freckle Face', 'Fredericka the Great', 'Fredoka One', 'Freehand', 'Fresca', 'Frijole', 'Fruktur', 'Fugaz One', 'GFS Didot', 'GFS Neohellenic', 'Gabriela', 'Gaegu', 'Gafata', 'Galada', 'Galdeano', 'Galindo', 'Gamja Flower', 'Gentium Basic', 'Gentium Book Basic', 'Geo', 'Geostar', 'Geostar Fill', 'Germania One', 'Gidugu', 'Gilda Display', 'Give You Glory', 'Glass Antiqua', 'Glegoo', 'Gloria Hallelujah', 'Goblin One', 'Gochi Hand', 'Gorditas', 'Gothic A1', 'Goudy Bookletter 1911', 'Graduate', 'Grand Hotel', 'Gravitas One', 'Great Vibes', 'Griffy', 'Gruppo', 'Gudea', 'Gugi', 'Gurajada', 'Habibi', 'Halant', 'Hammersmith One', 'Hanalei', 'Hanalei Fill', 'Handlee', 'Hanuman', 'Happy Monkey', 'Harmattan', 'Headland One', 'Heebo', 'Henny Penny', 'Herr Von Muellerhoff', 'Hi Melody', 'Hind', 'Hind Guntur', 'Hind Madurai', 'Hind Siliguri', 'Hind Vadodara', 'Holtwood One SC', 'Homemade Apple', 'Homenaje', 'IBM Plex Mono', 'IBM Plex Sans', 'IBM Plex Sans Condensed', 'IBM Plex Serif', 'IM Fell DW Pica', 'IM Fell DW Pica SC', 'IM Fell Double Pica', 'IM Fell Double Pica SC', 'IM Fell English', 'IM Fell English SC', 'IM Fell French Canon', 'IM Fell French Canon SC', 'IM Fell Great Primer', 'IM Fell Great Primer SC', 'Iceberg', 'Iceland', 'Imprima', 'Inconsolata', 'Inder', 'Indie Flower', 'Inika', 'Inknut Antiqua', 'Irish Grover', 'Istok Web', 'Italiana', 'Italianno', 'Itim', 'Jacques Francois', 'Jacques Francois Shadow', 'Jaldi', 'Jim Nightshade', 'Jockey One', 'Jolly Lodger', 'Jomhuria', 'Josefin Sans', 'Josefin Slab', 'Joti One', 'Jua', 'Judson', 'Julee', 'Julius Sans One', 'Junge', 'Jura', 'Just Another Hand', 'Just Me Again Down Here', 'K2D', 'Kadwa', 'Kalam', 'Kameron', 'Kanit', 'Kantumruy', 'Karla', 'Karma', 'Katibeh', 'Kaushan Script', 'Kavivanar', 'Kavoon', 'Kdam Thmor', 'Keania One', 'Kelly Slab', 'Kenia', 'Khand', 'Khmer', 'Khula', 'Kirang Haerang', 'Kite One', 'Knewave', 'KoHo', 'Kodchasan', 'Kosugi', 'Kosugi Maru', 'Kotta One', 'Koulen', 'Kranky', 'Kreon', 'Kristi', 'Krona One', 'Krub', 'Kumar One', 'Kumar One Outline', 'Kurale', 'La Belle Aurore', 'Laila', 'Lakki Reddy', 'Lalezar', 'Lancelot', 'Lateef', 'Lato', 'League Script', 'Leckerli One', 'Ledger', 'Lekton', 'Lemon', 'Lemonada', 'Libre Barcode 128', 'Libre Barcode 128 Text', 'Libre Barcode 39', 'Libre Barcode 39 Extended', 'Libre Barcode 39 Extended Text', 'Libre Barcode 39 Text', 'Libre Baskerville', 'Libre Franklin', 'Life Savers', 'Lilita One', 'Lily Script One', 'Limelight', 'Linden Hill', 'Lobster', 'Lobster Two', 'Londrina Outline', 'Londrina Shadow', 'Londrina Sketch', 'Londrina Solid', 'Lora', 'Love Ya Like A Sister', 'Loved by the King', 'Lovers Quarrel', 'Luckiest Guy', 'Lusitana', 'Lustria', 'M PLUS 1p', 'M PLUS Rounded 1c', 'Macondo', 'Macondo Swash Caps', 'Mada', 'Magra', 'Maiden Orange', 'Maitree', 'Major Mono Display', 'Mako', 'Mali', 'Mallanna', 'Mandali', 'Manuale', 'Marcellus', 'Marcellus SC', 'Marck Script', 'Margarine', 'Markazi Text', 'Marko One', 'Marmelad', 'Martel', 'Martel Sans', 'Marvel', 'Mate', 'Mate SC', 'Maven Pro', 'McLaren', 'Meddon', 'MedievalSharp', 'Medula One', 'Meera Inimai', 'Megrim', 'Meie Script', 'Merienda', 'Merienda One', 'Merriweather', 'Merriweather Sans', 'Metal', 'Metal Mania', 'Metamorphous', 'Metrophobic', 'Michroma', 'Milonga', 'Miltonian', 'Miltonian Tattoo', 'Mina', 'Miniver', 'Miriam Libre', 'Mirza', 'Miss Fajardose', 'Mitr', 'Modak', 'Modern Antiqua', 'Mogra', 'Molengo', 'Molle', 'Monda', 'Monofett', 'Monoton', 'Monsieur La Doulaise', 'Montaga', 'Montez', 'Montserrat', 'Montserrat Alternates', 'Montserrat Subrayada', 'Moul', 'Moulpali', 'Mountains of Christmas', 'Mouse Memoirs', 'Mr Bedfort', 'Mr Dafoe', 'Mr De Haviland', 'Mrs Saint Delafield', 'Mrs Sheppards', 'Mukta', 'Mukta Mahee', 'Mukta Malar', 'Mukta Vaani', 'Muli', 'Mystery Quest', 'NTR', 'Nanum Brush Script', 'Nanum Gothic', 'Nanum Gothic Coding', 'Nanum Myeongjo', 'Nanum Pen Script', 'Neucha', 'Neuton', 'New Rocker', 'News Cycle', 'Niconne', 'Niramit', 'Nixie One', 'Nobile', 'Nokora', 'Norican', 'Nosifer', 'Notable', 'Nothing You Could Do', 'Noticia Text', 'Noto Sans', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Serif', 'Noto Serif JP', 'Noto Serif KR', 'Noto Serif SC', 'Noto Serif TC', 'Nova Cut', 'Nova Flat', 'Nova Mono', 'Nova Oval', 'Nova Round', 'Nova Script', 'Nova Slim', 'Nova Square', 'Numans', 'Nunito', 'Nunito Sans', 'Odor Mean Chey', 'Offside', 'Old Standard TT', 'Oldenburg', 'Oleo Script', 'Oleo Script Swash Caps', 'Open Sans', 'Open Sans Condensed', 'Oranienbaum', 'Orbitron', 'Oregano', 'Orienta', 'Original Surfer', 'Oswald', 'Over the Rainbow', 'Overlock', 'Overlock SC', 'Overpass', 'Overpass Mono', 'Ovo', 'Oxygen', 'Oxygen Mono', 'PT Mono', 'PT Sans', 'PT Sans Caption', 'PT Sans Narrow', 'PT Serif', 'PT Serif Caption', 'Pacifico', 'Padauk', 'Palanquin', 'Palanquin Dark', 'Pangolin', 'Paprika', 'Parisienne', 'Passero One', 'Passion One', 'Pathway Gothic One', 'Patrick Hand', 'Patrick Hand SC', 'Pattaya', 'Patua One', 'Pavanam', 'Paytone One', 'Peddana', 'Peralta', 'Permanent Marker', 'Petit Formal Script', 'Petrona', 'Philosopher', 'Piedra', 'Pinyon Script', 'Pirata One', 'Plaster', 'Play', 'Playball', 'Playfair Display', 'Playfair Display SC', 'Podkova', 'Poiret One', 'Poller One', 'Poly', 'Pompiere', 'Pontano Sans', 'Poor Story', 'Poppins', 'Port Lligat Sans', 'Port Lligat Slab', 'Pragati Narrow', 'Prata', 'Preahvihear', 'Press Start 2P', 'Pridi', 'Princess Sofia', 'Prociono', 'Prompt', 'Prosto One', 'Proza Libre', 'Puritan', 'Purple Purse', 'Quando', 'Quantico', 'Quattrocento', 'Quattrocento Sans', 'Questrial', 'Quicksand', 'Quintessential', 'Qwigley', 'Racing Sans One', 'Radley', 'Rajdhani', 'Rakkas', 'Raleway', 'Raleway Dots', 'Ramabhadra', 'Ramaraja', 'Rambla', 'Rammetto One', 'Ranchers', 'Rancho', 'Ranga', 'Rasa', 'Rationale', 'Ravi Prakash', 'Redressed', 'Reem Kufi', 'Reenie Beanie', 'Revalia', 'Rhodium Libre', 'Ribeye', 'Ribeye Marrow', 'Righteous', 'Risque', 'Roboto', 'Roboto Condensed', 'Roboto Mono', 'Roboto Slab', 'Rochester', 'Rock Salt', 'Rokkitt', 'Romanesco', 'Ropa Sans', 'Rosario', 'Rosarivo', 'Rouge Script', 'Rozha One', 'Rubik', 'Rubik Mono One', 'Ruda', 'Rufina', 'Ruge Boogie', 'Ruluko', 'Rum Raisin', 'Ruslan Display', 'Russo One', 'Ruthie', 'Rye', 'Sacramento', 'Sahitya', 'Sail', 'Saira', 'Saira Condensed', 'Saira Extra Condensed', 'Saira Semi Condensed', 'Salsa', 'Sanchez', 'Sancreek', 'Sansita', 'Sarabun', 'Sarala', 'Sarina', 'Sarpanch', 'Satisfy', 'Sawarabi Gothic', 'Sawarabi Mincho', 'Scada', 'Scheherazade', 'Schoolbell', 'Scope One', 'Seaweed Script', 'Secular One', 'Sedgwick Ave', 'Sedgwick Ave Display', 'Sen', 'Sevillana', 'Seymour One', 'Shadows Into Light', 'Shadows Into Light Two', 'Shanti', 'Share', 'Share Tech', 'Share Tech Mono', 'Shojumaru', 'Short Stack', 'Shrikhand', 'Siemreap', 'Sigmar One', 'Signika', 'Signika Negative', 'Simonetta', 'Sintony', 'Sirin Stencil', 'Six Caps', 'Skranji', 'Slabo 13px', 'Slabo 27px', 'Slackey', 'Smokum', 'Smythe', 'Sniglet', 'Snippet', 'Snowburst One', 'Sofadi One', 'Sofia', 'Song Myung', 'Sonsie One', 'Sorts Mill Goudy', 'Source Code Pro', 'Source Sans Pro', 'Source Serif Pro', 'Space Mono', 'Special Elite', 'Spectral', 'Spectral SC', 'Spicy Rice', 'Spinnaker', 'Spirax', 'Squada One', 'Sree Krushnadevaraya', 'Sriracha', 'Srisakdi', 'Staatliches', 'Stalemate', 'Stalinist One', 'Stardos Stencil', 'Stint Ultra Condensed', 'Stint Ultra Expanded', 'Stoke', 'Strait', 'Stylish', 'Sue Ellen Francisco', 'Suez One', 'Sumana', 'Sunflower', 'Sunshiney', 'Supermercado One', 'Sura', 'Suranna', 'Suravaram', 'Suwannaphum', 'Swanky and Moo Moo', 'Syncopate', 'Tajawal', 'Tangerine', 'Taprom', 'Tauri', 'Taviraj', 'Teko', 'Telex', 'Tenali Ramakrishna', 'Tenor Sans', 'Text Me One', 'Thasadith', 'The Girl Next Door', 'Tienne', 'Tillana', 'Timmana', 'Tinos', 'Titan One', 'Titillium Web', 'Trade Winds', 'Trirong', 'Trocchi', 'Trochut', 'Trykker', 'Tulpen One', 'Ubuntu', 'Ubuntu Condensed', 'Ubuntu Mono', 'Ultra', 'Uncial Antiqua', 'Underdog', 'Unica One', 'UnifrakturCook', 'UnifrakturMaguntia', 'Unkempt', 'Unlock', 'Unna', 'VT323', 'Vampiro One', 'Varela', 'Varela Round', 'Vast Shadow', 'Vesper Libre', 'Vibur', 'Vidaloka', 'Viga', 'Voces', 'Volkhov', 'Vollkorn', 'Vollkorn SC', 'Voltaire', 'Waiting for the Sunrise', 'Wallpoet', 'Walter Turncoat', 'Warnes', 'Wellfleet', 'Wendy One', 'Wire One', 'Work Sans', 'Yanone Kaffeesatz', 'Yantramanav', 'Yatra One', 'Yellowtail', 'Yeon Sung', 'Yeseva One', 'Yesteryear', 'Yrsa', 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou', 'ZCOOL XiaoWei', 'Zeyada', 'Zilla Slab', 'Zilla Slab Highlight'];
|
2931 |
-
|
2932 |
function pagelayer_elp_font_family(row, prop){
|
2933 |
|
2934 |
var options = '';
|
@@ -3007,7 +3123,7 @@ function pagelayer_elp_typography(row, prop){
|
|
3007 |
var font_option = function(val, setVal){
|
3008 |
var selected = (val != setVal) ? '' : 'selected="selected"';
|
3009 |
var lang = pagelayer_empty(val) ? 'Default' : val;
|
3010 |
-
return '<span
|
3011 |
}
|
3012 |
|
3013 |
var div = '<span class="pagelayer-prop-edit"><i class="pli pli-pencil"></i></span>'+
|
@@ -3022,7 +3138,8 @@ function pagelayer_elp_typography(row, prop){
|
|
3022 |
jQuery.each(select['fonts'],function(key, value){
|
3023 |
div += font_option(value, val[0]);
|
3024 |
});
|
3025 |
-
|
|
|
3026 |
'</div>'+
|
3027 |
'<div class="pagelayer-elp-typo pagelayer-elp-typo-size">'+
|
3028 |
'<label class="pagelayer-elp-label">'+pagelayer_l('font_size')+'</label>'+
|
758 |
function _pagelayer_set_tmp_atts(row, suffix, val){
|
759 |
var id = row.closest('[pagelayer-element-id]').attr('pagelayer-element-id');
|
760 |
var jEle = jQuery('[pagelayer-id='+id+']');
|
761 |
+
pagelayer_set_tmp_atts(jEle, row.attr('pagelayer-elp-name')+(suffix.length > 0 ? '-'+suffix : ''), val);
|
762 |
};
|
763 |
|
764 |
// Will clear the attribute but not render
|
1234 |
// Checking that the dragged element is a file or not
|
1235 |
var dt = e.originalEvent.dataTransfer;
|
1236 |
if(dt.types && (dt.types.indexOf ? dt.types.indexOf('Files') != -1 : dt.types.contains('Files'))){
|
1237 |
+
if(e.originalEvent.dataTransfer.items[0].type.search('image/')!=-1){
|
1238 |
+
dropZone.show();
|
1239 |
+
reset_dragging = true;
|
1240 |
+
}
|
1241 |
}
|
1242 |
});
|
1243 |
|
1820 |
// The Link proprety
|
1821 |
function pagelayer_elp_link(row, prop){
|
1822 |
|
1823 |
+
var tmp = prop.c['name'];
|
1824 |
+
var link = (tmp in prop.el.tmp) ? prop.el.tmp[tmp] : prop.c['val'];
|
1825 |
+
var jEle = jQuery('[pagelayer-id='+prop.el.id+']');
|
1826 |
+
|
1827 |
var div = '<div class="pagelayer-elp-link-div pagelayer-elp-input-icon">'+
|
1828 |
+
'<input class="pagelayer-elp-link" type="text" value="'+link+'" />'+
|
1829 |
'<i class="pli pli-link pagelayer-elp-link-icon" />'+
|
1830 |
+
'<div class="pagelayer-elp-link-list">'+
|
1831 |
+
'</div>'+
|
1832 |
'</div>';
|
1833 |
|
1834 |
row.append(div);
|
1835 |
|
1836 |
+
var listWrap = row.find('.pagelayer-elp-link-list');
|
1837 |
+
var time = null;
|
1838 |
+
|
1839 |
+
//Add ID
|
1840 |
+
var addID = function(permaID){
|
1841 |
+
permaID = permaID || false;
|
1842 |
+
|
1843 |
+
var lDiv = row.closest('[pagelayer-elp-name]').find('.pagelayer-elp-label-div');
|
1844 |
+
if(permaID){
|
1845 |
+
lDiv.append('<span class="pagelayer-elp-link-id">ID : '+permaID+'</span>');
|
1846 |
+
}else{
|
1847 |
+
lDiv.find('.pagelayer-elp-link-id').remove();
|
1848 |
+
}
|
1849 |
+
};
|
1850 |
+
|
1851 |
+
if(!isNaN(prop.c['val'])){
|
1852 |
+
addID(prop.c['val']);
|
1853 |
+
}
|
1854 |
+
|
1855 |
// Set a Link
|
1856 |
row.find('.pagelayer-elp-link').on('change', function(){
|
1857 |
+
|
1858 |
+
// Save and Render
|
1859 |
+
_pagelayer_set_tmp_atts(row, '', jQuery(this).val());
|
1860 |
+
_pagelayer_set_atts(row, jQuery(this).val());
|
1861 |
+
|
1862 |
+
// Remove ID Holder
|
1863 |
+
addID();
|
1864 |
+
|
1865 |
});
|
1866 |
+
|
1867 |
+
// Set a Link
|
1868 |
+
row.find('.pagelayer-elp-link').on('input click', function(e){
|
1869 |
+
e.stopPropagation();
|
1870 |
+
|
1871 |
+
if(!listWrap.is(':visible')){
|
1872 |
+
listWrap.show();
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
var val = jQuery(this).val();
|
1876 |
+
|
1877 |
+
clearTimeout(time);
|
1878 |
+
time = setTimeout(function(){
|
1879 |
|
1880 |
+
jQuery.ajax({
|
1881 |
+
url: pagelayer_ajax_url,
|
1882 |
+
type: 'post',
|
1883 |
+
data:{
|
1884 |
+
'action' : 'wp-link-ajax',
|
1885 |
+
'_ajax_linking_nonce' : pagelayer_internal_linking_nonce,
|
1886 |
+
'search' : val,
|
1887 |
+
},
|
1888 |
+
success: function(response) {
|
1889 |
+
|
1890 |
+
var data = jQuery.parseJSON(response);
|
1891 |
+
var html = '';
|
1892 |
+
//console.log('Link Data');console.log(response);
|
1893 |
+
|
1894 |
+
if(pagelayer_empty(data)){
|
1895 |
+
html = pagelayer_l('custom_url');
|
1896 |
+
// Remove ID Holder
|
1897 |
+
addID();
|
1898 |
+
}else if(typeof data === 'object'){
|
1899 |
+
|
1900 |
+
for(var key in data){
|
1901 |
+
var vals = data[key];
|
1902 |
+
html += '<div class="pagelayer-elp-link-item" data-id="'+vals['ID']+'" data-permalink="'+vals['permalink']+'">'+
|
1903 |
+
'<div class="pagelayer-elp-link-title">'+
|
1904 |
+
'<span class="pagelayer-elp-link-item-title" title="'+vals['title']+'">'+vals['title']+'</span>'+
|
1905 |
+
'<span class="pagelayer-elp-link-item-perma" title="'+vals['permalink']+'">'+vals['permalink']+'</span>'+
|
1906 |
+
'</div>'+
|
1907 |
+
'<div class="pagelayer-elp-link-info">'+
|
1908 |
+
'<span title="'+vals['info']+'">'+vals['info']+'</span>'+
|
1909 |
+
'</div>'+
|
1910 |
+
'</div>';
|
1911 |
+
}
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
listWrap.html(html);
|
1915 |
+
},
|
1916 |
+
fail: function(data) {
|
1917 |
+
listWrap.html('Some error occured in getting the link data');
|
1918 |
+
}
|
1919 |
+
});
|
1920 |
+
|
1921 |
+
}, 200);
|
1922 |
+
|
1923 |
+
});
|
1924 |
+
|
1925 |
+
listWrap.on('click', function(e){
|
1926 |
+
e.stopPropagation();
|
1927 |
+
|
1928 |
+
var lEle = jQuery(e.target).closest('.pagelayer-elp-link-item');
|
1929 |
+
|
1930 |
+
// IF item not found
|
1931 |
+
if(lEle.length < 1){
|
1932 |
+
return;
|
1933 |
+
}
|
1934 |
+
|
1935 |
+
var perma = lEle.attr('data-permalink');
|
1936 |
+
var ID = lEle.attr('data-id');
|
1937 |
+
|
1938 |
+
// Save and Render
|
1939 |
+
row.find('.pagelayer-elp-link').val(perma);
|
1940 |
+
_pagelayer_set_tmp_atts(row, '', perma);
|
1941 |
+
_pagelayer_set_atts(row, ID);
|
1942 |
+
listWrap.hide();
|
1943 |
+
|
1944 |
+
// Show ID
|
1945 |
+
addID(ID);
|
1946 |
+
});
|
1947 |
+
|
1948 |
+
pagelayer.gDocument.on('click', function(e){
|
1949 |
+
listWrap.hide();
|
1950 |
+
});
|
1951 |
+
|
1952 |
}
|
1953 |
|
1954 |
// The Textarea property
|
2344 |
|
2345 |
row.find('.pagelayer-elp-color-preview').css('background', prop.c['val']);
|
2346 |
|
2347 |
+
var picker = new pagelayer_Picker({
|
2348 |
parent : row.find('.pagelayer-elp-color-div')[0],
|
2349 |
popup : 'left',
|
2350 |
color : prop.c['val'],
|
2731 |
var preview = row.find('.pagelayer-elp-color-preview');
|
2732 |
preview.css('background', val[3]);
|
2733 |
|
2734 |
+
var picker = new pagelayer_Picker({
|
2735 |
parent : row.find('.pagelayer-elp-color-div')[0],
|
2736 |
popup : 'left',
|
2737 |
color : val[3],
|
2838 |
var preview = row.find('.pagelayer-elp-color-preview');
|
2839 |
preview.css('background', val[3]);
|
2840 |
|
2841 |
+
var picker = new pagelayer_Picker({
|
2842 |
parent : row.find('.pagelayer-elp-color-div')[0],
|
2843 |
popup : 'left',
|
2844 |
color : val[3],
|
2991 |
i = i+2;
|
2992 |
});
|
2993 |
|
2994 |
+
var picker1 = new pagelayer_Picker({
|
2995 |
parent : row.find('.pagelayer-elp-gradient-color1')[0],
|
2996 |
popup : 'left',
|
2997 |
color : val[1],
|
3005 |
_pagelayer_set_atts(row, val);
|
3006 |
};
|
3007 |
|
3008 |
+
var picker2 = new pagelayer_Picker({
|
3009 |
parent : row.find('.pagelayer-elp-gradient-color2')[0],
|
3010 |
popup : 'left',
|
3011 |
color : val[3],
|
3019 |
_pagelayer_set_atts(row, val);
|
3020 |
};
|
3021 |
|
3022 |
+
var picker3 = new pagelayer_Picker({
|
3023 |
parent : row.find('.pagelayer-elp-gradient-color3')[0],
|
3024 |
popup : 'left',
|
3025 |
color : val[5],
|
3045 |
|
3046 |
}
|
3047 |
|
|
|
|
|
3048 |
function pagelayer_elp_font_family(row, prop){
|
3049 |
|
3050 |
var options = '';
|
3123 |
var font_option = function(val, setVal){
|
3124 |
var selected = (val != setVal) ? '' : 'selected="selected"';
|
3125 |
var lang = pagelayer_empty(val) ? 'Default' : val;
|
3126 |
+
return '<span value="'+val+'" '+selected+'>'+ lang +'</span>';
|
3127 |
}
|
3128 |
|
3129 |
var div = '<span class="pagelayer-prop-edit"><i class="pli pli-pencil"></i></span>'+
|
3138 |
jQuery.each(select['fonts'],function(key, value){
|
3139 |
div += font_option(value, val[0]);
|
3140 |
});
|
3141 |
+
|
3142 |
+
div +='</div></div>'+
|
3143 |
'</div>'+
|
3144 |
'<div class="pagelayer-elp-typo pagelayer-elp-typo-size">'+
|
3145 |
'<label class="pagelayer-elp-label">'+pagelayer_l('font_size')+'</label>'+
|
@@ -6,4 +6,4 @@
|
|
6 |
* Released under the ISC license.
|
7 |
*/
|
8 |
|
9 |
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Picker=t()}(this,function(){"use strict";var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),g=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,o=!1,n=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,n=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw n}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var r=this;r.length<e;)r=t+r;return r};var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return(0<t?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var a=function(){function h(e,t,r,i){n(this,h);var d=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var o=e&&""+e;o&&function(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),r=g(t,4),i=r[0],o=r[1],n=r[2],a=r[3];void 0===a&&(a=1),i/=360,o/=100,n/=100,d.hsla=[i,o,n,a]}else if(e.startsWith("rgb")){var s=e.match(/([\-\d\.e]+)/g).map(Number),l=g(s,4),p=l[0],c=l[1],f=l[2],u=l[3];void 0===u&&(u=1),d.rgba=[p,c,f,u]}else e.startsWith("#")?d.rgba=h.hexToRgb(e):d.rgba=h.nameToRgb(e)||h.hexToRgb(e)}(o.toLowerCase())}else this.rgba=[e,t,r,void 0===i?1:i]}return e(h,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map(function(e,t){return o(e,3===t?3:0)});return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var r=[360,100,100,1],i=["","%","%",""],t=(e?this.hsla:this.hsla.slice(0,3)).map(function(e,t){return o(e*r[t],3===t?3:1)+i[t]});return e?"hsla("+t+")":"hsl("+t+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=h.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=h.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map(function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)}).map(function(e){return e.padStart(2,"0")}).join("")},set:function(e){this.rgba=h.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var r=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e){return parseInt(e,16)});return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(e){var t=r[e];if(t)return h.hexToRgb(t)}},{key:"rgbToHsl",value:function(e){var t=g(e,4),r=t[0],i=t[1],o=t[2],n=t[3];r/=255,i/=255,o/=255;var a=Math.max(r,i,o),s=Math.min(r,i,o),l=void 0,p=void 0,c=(a+s)/2;if(a===s)l=p=0;else{var f=a-s;switch(p=.5<c?f/(2-a-s):f/(a+s),a){case r:l=(i-o)/f+(i<o?6:0);break;case i:l=(o-r)/f+2;break;case o:l=(r-i)/f+4}l/=6}return[l,p,c,n]}},{key:"hslToRgb",value:function(e){var t=g(e,4),r=t[0],i=t[1],o=t[2],n=t[3],a=void 0,s=void 0,l=void 0;if(0===i)a=s=l=o;else{var p=function(e,t,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},c=o<.5?o*(1+i):o+i-o*i,f=2*o-c;a=p(f,c,r+1/3),s=p(f,c,r),l=p(f,c,r-1/3)}var u=[255*a,255*s,255*l].map(Math.round);return u[3]=n,u}}]),h}();window;function s(e){var t=Element.prototype;t.matches||(t.matches=t.msMatchesSelector||t.webkitMatchesSelector),t.closest||(t.closest=function(e){var t=this;do{if(t.matches(e))return t;t="svg"===t.tagName?t.parentNode:t.parentElement}while(t);return null});var l=(e=e||{}).container||e.doc.documentElement,o=e.selector,i=e.callback||console.log,n=e.callbackDragStart,a=e.callbackDragEnd,s=e.callbackClick,r=e.propagateEvents,p=!1!==e.roundCoords,c=!1!==e.dragOutside,f=e.handleOffset||!1!==e.handleOffset,u=null;switch(f){case"center":u=!0;break;case"topleft":case"top-left":u=!1}var d=void 0;function h(e,t,r,i){var o=e.clientX,n=e.clientY;function a(e,t,r){return Math.max(t,Math.min(e,r))}if(t){var s=t.getBoundingClientRect();if(o-=s.left,n-=s.top,r&&(o-=r[0],n-=r[1]),i&&(o=a(o,0,s.width),n=a(n,0,s.height)),t!==l)(null!==u?u:"circle"===t.nodeName||"ellipse"===t.nodeName)&&(o-=s.width/2,n-=s.height/2)}return p?[Math.round(o),Math.round(n)]:[o,n]}function g(e){e.preventDefault(),r||e.stopPropagation()}function b(e){var t=void 0;if(t=o?o instanceof Element?o.contains(e.target)?o:null:e.target.closest(o):{}){g(e);var r=o&&f?h(e,t):[0,0],i=h(e,l,r);d={target:t,mouseOffset:r,startPos:i,actuallyDragged:!1},n&&n(t,i)}}function m(e){if(d){g(e);var t=d.startPos,r=h(e,l,d.mouseOffset,!c);d.actuallyDragged=d.actuallyDragged||t[0]!==r[0]||t[1]!==r[1],i(d.target,r,t)}}function k(e,t){if(d){if(a||s){var r=!d.actuallyDragged,i=r?d.startPos:h(e,l,d.mouseOffset,!c);s&&r&&!t&&s(d.target,i),a&&a(d.target,i,d.startPos,t||r&&s)}d=null}}function v(e,t){k(x(e),t)}function w(e,t,r){e.addEventListener(t,r)}function _(e){return void 0!==e.buttons?1===e.buttons:1===e.which}function y(e,t){1===e.touches.length?t(x(e)):k(e,!0)}function x(e){var t=e.targetTouches[0];return t||(t=e.changedTouches[0]),t.preventDefault=e.preventDefault.bind(e),t.stopPropagation=e.stopPropagation.bind(e),t}w(l,"mousedown",function(e){_(e)?b(e):k(e,!0)}),w(l,"touchstart",function(e){return y(e,b)}),w(l,"mousemove",function(e){d&&(_(e)?m(e):k(e))}),w(l,"touchmove",function(e){return y(e,m)}),w(l,"mouseup",function(e){d&&!_(e)&&k(e)}),w(l,"touchend",function(e){return v(e)}),w(l,"touchcancel",function(e){return v(e,!0)})}var l="keydown",p="mousedown",c="focusin";function w(e,t){return(t||document).querySelector(e)}function f(e,t,r){e.addEventListener(t,r,!1)}function u(e){e.preventDefault(),e.stopPropagation()}function d(e,t,r,i){f(e,l,function(e){0<=t.indexOf(e.key)&&(i&&u(e),r(e))})}return function(){function r(e){var t=this;n(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex"},this._openProxy=function(e){return t.openHandler(e)},this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,function(e){if(!e.querySelector("#vanilla-picker-style")){var t=document.createElement("style");t.id="vanilla-picker-style",e.documentElement.firstElementChild.appendChild(t).textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.layout_default.picker_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_done{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.picker_wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:#f2f2f2;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;-webkit-box-shadow:0 0 3px 1px #67b9ff;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_sl{position:relative;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,0.4);box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;-webkit-box-shadow:none;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}"}}(e.doc),this.setOptions(e)}return e(r,[{key:"setOptions",value:function(e){if(e){var t=this.settings;if(e instanceof HTMLElement)t.parent=e;else{t.parent&&e.parent&&t.parent!==e.parent&&(t.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(e,t,r){for(var i in e)r&&0<=r.indexOf(i)||(t[i]=e[i])}(e,t),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var r=e.color||e.colour;r&&this._setColor(r)}var i=t.parent;i&&t.popup&&!this._popupInited?(f(i,"click",this._openProxy),d(i,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):e.parent&&!t.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===l?this._domEdit:this.domElement;setTimeout(function(){return t.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,r=!1;e?t===p||t===c?this.domElement.contains(e.target)||(r=!0):(u(e),r=!0):r=!0,r&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==p&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var r=void 0;try{r=new a(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,r,i,o=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div></div>',n=(t=o,r=this.settings.doc,(i=r.createElement("div")).innerHTML=t,i.firstElementChild);return this.domElement=n,this._domH=w(".picker_hue",n),this._domSL=w(".picker_sl",n),this._domA=w(".picker_alpha",n),this._domEdit=w(".picker_editor input",n),this._domSample=w(".picker_sample",n),this._domOkay=w(".picker_done button",n),n.classList.add("layout_"+this.settings.layout),this.settings.alpha||n.classList.add("no_alpha"),this.settings.editor||n.classList.add("no_editor"),this._ifPopup(function(){return n.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"_bindEvents",value:function(){var t=this,r=this,e=this.domElement;function i(o,n){function e(e,t){var r=t[0]/o.clientWidth,i=t[1]/o.clientHeight;n(r,i)}return{container:o,dragOutside:!1,callback:e,callbackDragStart:e,propagateEvents:!0}}f(e,"click",function(e){return e.preventDefault()}),s(i(this._domH,function(e,t){return r._setHSLA(e)})),s(i(this._domSL,function(e,t){return r._setHSLA(null,e,1-t)})),this.settings.alpha&&s(i(this._domA,function(e,t){return r._setHSLA(null,null,null,1-t)}));var o=this._domEdit;f(o,"input",function(e){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),f(o,"focus",function(e){this.selectionStart===this.selectionEnd&&this.select()});var n=function(e){t._ifPopup(function(){return t.closeHandler(e)})},a=function(e){t._ifPopup(function(){return t.closeHandler(e)}),t.onDone&&t.onDone(t.colour)};f(this.settings.doc,p,n),f(this.settings.doc,c,n),d(e,["Esc","Escape"],n),f(this._domOkay,"click",a),d(e,["Enter"],a)}},{key:"_setPosition",value:function(){var r=this.settings.parent,i=this.domElement;r!==i.parentNode&&r.appendChild(i),this._ifPopup(function(e){"static"===getComputedStyle(r).position&&(r.style.position="relative");var t=!0===e?"popup_right":"popup_"+e;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(e){e===t?i.classList.add(e):i.classList.remove(e)}),i.classList.add(t)})}},{key:"_setHSLA",value:function(e,t,r,i,o){o=o||{};var n=this.colour,a=n.hsla;[e,t,r,i].forEach(function(e,t){(e||0===e)&&(a[t]=e)}),n.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(n)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,r=t.hsla,i="hsl("+360*r[0]+", 100%, 50%)",o=t.hslString,n=t.hslaString,a=this._domH,s=this._domSL,l=this._domA,p=w(".picker_selector",a),c=w(".picker_selector",s),f=w(".picker_selector",l);k(0,p,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,k(0,c,r[1]),v(0,c,1-r[2]),s.style.color=o,v(0,f,1-r[3]);var u=o,d=u.replace("hsl","hsla").replace(")",", 0)"),h="linear-gradient("+[u,d]+")";if(this._domA.style.backgroundImage=h+", url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!e.fromEditor){var g=this.settings.editorFormat,b=this.settings.alpha,m=void 0;switch(g){case"rgb":m=t.printRGB(b);break;case"hsl":m=t.printHSL(b);break;default:m=t.printHex(b)}this._domEdit.value=m}this._domSample.style.color=n}function k(e,t,r){t.style.left=100*r+"%"}function v(e,t,r){t.style.top=100*r+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var r=e?"":"none",i=t.style.display!==r;return i&&(t.style.display=r),i}}]),r}()});
|
6 |
* Released under the ISC license.
|
7 |
*/
|
8 |
|
9 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.pagelayer_Picker=t()}(this,function(){"use strict";var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e=function(){function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}(),g=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,o=!1,n=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,n=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw n}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var r=this;r.length<e;)r=t+r;return r};var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return(0<t?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var a=function(){function h(e,t,r,i){n(this,h);var d=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var o=e&&""+e;o&&function(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),r=g(t,4),i=r[0],o=r[1],n=r[2],a=r[3];void 0===a&&(a=1),i/=360,o/=100,n/=100,d.hsla=[i,o,n,a]}else if(e.startsWith("rgb")){var s=e.match(/([\-\d\.e]+)/g).map(Number),l=g(s,4),p=l[0],c=l[1],f=l[2],u=l[3];void 0===u&&(u=1),d.rgba=[p,c,f,u]}else e.startsWith("#")?d.rgba=h.hexToRgb(e):d.rgba=h.nameToRgb(e)||h.hexToRgb(e)}(o.toLowerCase())}else this.rgba=[e,t,r,void 0===i?1:i]}return e(h,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map(function(e,t){return o(e,3===t?3:0)});return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var r=[360,100,100,1],i=["","%","%",""],t=(e?this.hsla:this.hsla.slice(0,3)).map(function(e,t){return o(e*r[t],3===t?3:1)+i[t]});return e?"hsla("+t+")":"hsl("+t+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=h.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=h.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map(function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)}).map(function(e){return e.padStart(2,"0")}).join("")},set:function(e){this.rgba=h.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var r=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e){return parseInt(e,16)});return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(e){var t=r[e];if(t)return h.hexToRgb(t)}},{key:"rgbToHsl",value:function(e){var t=g(e,4),r=t[0],i=t[1],o=t[2],n=t[3];r/=255,i/=255,o/=255;var a=Math.max(r,i,o),s=Math.min(r,i,o),l=void 0,p=void 0,c=(a+s)/2;if(a===s)l=p=0;else{var f=a-s;switch(p=.5<c?f/(2-a-s):f/(a+s),a){case r:l=(i-o)/f+(i<o?6:0);break;case i:l=(o-r)/f+2;break;case o:l=(r-i)/f+4}l/=6}return[l,p,c,n]}},{key:"hslToRgb",value:function(e){var t=g(e,4),r=t[0],i=t[1],o=t[2],n=t[3],a=void 0,s=void 0,l=void 0;if(0===i)a=s=l=o;else{var p=function(e,t,r){return r<0&&(r+=1),1<r&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},c=o<.5?o*(1+i):o+i-o*i,f=2*o-c;a=p(f,c,r+1/3),s=p(f,c,r),l=p(f,c,r-1/3)}var u=[255*a,255*s,255*l].map(Math.round);return u[3]=n,u}}]),h}();window;function s(e){var t=Element.prototype;t.matches||(t.matches=t.msMatchesSelector||t.webkitMatchesSelector),t.closest||(t.closest=function(e){var t=this;do{if(t.matches(e))return t;t="svg"===t.tagName?t.parentNode:t.parentElement}while(t);return null});var l=(e=e||{}).container||e.doc.documentElement,o=e.selector,i=e.callback||console.log,n=e.callbackDragStart,a=e.callbackDragEnd,s=e.callbackClick,r=e.propagateEvents,p=!1!==e.roundCoords,c=!1!==e.dragOutside,f=e.handleOffset||!1!==e.handleOffset,u=null;switch(f){case"center":u=!0;break;case"topleft":case"top-left":u=!1}var d=void 0;function h(e,t,r,i){var o=e.clientX,n=e.clientY;function a(e,t,r){return Math.max(t,Math.min(e,r))}if(t){var s=t.getBoundingClientRect();if(o-=s.left,n-=s.top,r&&(o-=r[0],n-=r[1]),i&&(o=a(o,0,s.width),n=a(n,0,s.height)),t!==l)(null!==u?u:"circle"===t.nodeName||"ellipse"===t.nodeName)&&(o-=s.width/2,n-=s.height/2)}return p?[Math.round(o),Math.round(n)]:[o,n]}function g(e){e.preventDefault(),r||e.stopPropagation()}function b(e){var t=void 0;if(t=o?o instanceof Element?o.contains(e.target)?o:null:e.target.closest(o):{}){g(e);var r=o&&f?h(e,t):[0,0],i=h(e,l,r);d={target:t,mouseOffset:r,startPos:i,actuallyDragged:!1},n&&n(t,i)}}function m(e){if(d){g(e);var t=d.startPos,r=h(e,l,d.mouseOffset,!c);d.actuallyDragged=d.actuallyDragged||t[0]!==r[0]||t[1]!==r[1],i(d.target,r,t)}}function k(e,t){if(d){if(a||s){var r=!d.actuallyDragged,i=r?d.startPos:h(e,l,d.mouseOffset,!c);s&&r&&!t&&s(d.target,i),a&&a(d.target,i,d.startPos,t||r&&s)}d=null}}function v(e,t){k(x(e),t)}function w(e,t,r){e.addEventListener(t,r)}function _(e){return void 0!==e.buttons?1===e.buttons:1===e.which}function y(e,t){1===e.touches.length?t(x(e)):k(e,!0)}function x(e){var t=e.targetTouches[0];return t||(t=e.changedTouches[0]),t.preventDefault=e.preventDefault.bind(e),t.stopPropagation=e.stopPropagation.bind(e),t}w(l,"mousedown",function(e){_(e)?b(e):k(e,!0)}),w(l,"touchstart",function(e){return y(e,b)}),w(l,"mousemove",function(e){d&&(_(e)?m(e):k(e))}),w(l,"touchmove",function(e){return y(e,m)}),w(l,"mouseup",function(e){d&&!_(e)&&k(e)}),w(l,"touchend",function(e){return v(e)}),w(l,"touchcancel",function(e){return v(e,!0)})}var l="keydown",p="mousedown",c="focusin";function w(e,t){return(t||document).querySelector(e)}function f(e,t,r){e.addEventListener(t,r,!1)}function u(e){e.preventDefault(),e.stopPropagation()}function d(e,t,r,i){f(e,l,function(e){0<=t.indexOf(e.key)&&(i&&u(e),r(e))})}return function(){function r(e){var t=this;n(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex"},this._openProxy=function(e){return t.openHandler(e)},this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,function(e){if(!e.querySelector("#vanilla-picker-style")){var t=document.createElement("style");t.id="vanilla-picker-style",e.documentElement.firstElementChild.appendChild(t).textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.layout_default.picker_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_done{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.picker_wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:#f2f2f2;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;-webkit-box-shadow:0 0 3px 1px #67b9ff;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_sl{position:relative;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,0.4);box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;-webkit-box-shadow:none;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}"}}(e.doc),this.setOptions(e)}return e(r,[{key:"setOptions",value:function(e){if(e){var t=this.settings;if(e instanceof HTMLElement)t.parent=e;else{t.parent&&e.parent&&t.parent!==e.parent&&(t.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(e,t,r){for(var i in e)r&&0<=r.indexOf(i)||(t[i]=e[i])}(e,t),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var r=e.color||e.colour;r&&this._setColor(r)}var i=t.parent;i&&t.popup&&!this._popupInited?(f(i,"click",this._openProxy),d(i,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):e.parent&&!t.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===l?this._domEdit:this.domElement;setTimeout(function(){return t.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,r=!1;e?t===p||t===c?this.domElement.contains(e.target)||(r=!0):(u(e),r=!0):r=!0,r&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==p&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var r=void 0;try{r=new a(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,r,i,o=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div></div>',n=(t=o,r=this.settings.doc,(i=r.createElement("div")).innerHTML=t,i.firstElementChild);return this.domElement=n,this._domH=w(".picker_hue",n),this._domSL=w(".picker_sl",n),this._domA=w(".picker_alpha",n),this._domEdit=w(".picker_editor input",n),this._domSample=w(".picker_sample",n),this._domOkay=w(".picker_done button",n),n.classList.add("layout_"+this.settings.layout),this.settings.alpha||n.classList.add("no_alpha"),this.settings.editor||n.classList.add("no_editor"),this._ifPopup(function(){return n.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"_bindEvents",value:function(){var t=this,r=this,e=this.domElement;function i(o,n){function e(e,t){var r=t[0]/o.clientWidth,i=t[1]/o.clientHeight;n(r,i)}return{container:o,dragOutside:!1,callback:e,callbackDragStart:e,propagateEvents:!0}}f(e,"click",function(e){return e.preventDefault()}),s(i(this._domH,function(e,t){return r._setHSLA(e)})),s(i(this._domSL,function(e,t){return r._setHSLA(null,e,1-t)})),this.settings.alpha&&s(i(this._domA,function(e,t){return r._setHSLA(null,null,null,1-t)}));var o=this._domEdit;f(o,"input",function(e){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),f(o,"focus",function(e){this.selectionStart===this.selectionEnd&&this.select()});var n=function(e){t._ifPopup(function(){return t.closeHandler(e)})},a=function(e){t._ifPopup(function(){return t.closeHandler(e)}),t.onDone&&t.onDone(t.colour)};f(this.settings.doc,p,n),f(this.settings.doc,c,n),d(e,["Esc","Escape"],n),f(this._domOkay,"click",a),d(e,["Enter"],a)}},{key:"_setPosition",value:function(){var r=this.settings.parent,i=this.domElement;r!==i.parentNode&&r.appendChild(i),this._ifPopup(function(e){"static"===getComputedStyle(r).position&&(r.style.position="relative");var t=!0===e?"popup_right":"popup_"+e;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(e){e===t?i.classList.add(e):i.classList.remove(e)}),i.classList.add(t)})}},{key:"_setHSLA",value:function(e,t,r,i,o){o=o||{};var n=this.colour,a=n.hsla;[e,t,r,i].forEach(function(e,t){(e||0===e)&&(a[t]=e)}),n.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(n)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,r=t.hsla,i="hsl("+360*r[0]+", 100%, 50%)",o=t.hslString,n=t.hslaString,a=this._domH,s=this._domSL,l=this._domA,p=w(".picker_selector",a),c=w(".picker_selector",s),f=w(".picker_selector",l);k(0,p,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,k(0,c,r[1]),v(0,c,1-r[2]),s.style.color=o,v(0,f,1-r[3]);var u=o,d=u.replace("hsl","hsla").replace(")",", 0)"),h="linear-gradient("+[u,d]+")";if(this._domA.style.backgroundImage=h+", url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!e.fromEditor){var g=this.settings.editorFormat,b=this.settings.alpha,m=void 0;switch(g){case"rgb":m=t.printRGB(b);break;case"hsl":m=t.printHSL(b);break;default:m=t.printHex(b)}this._domEdit.value=m}this._domSample.style.color=n}function k(e,t,r){t.style.left=100*r+"%"}function v(e,t,r){t.style.top=100*r+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var r=e?"":"none",i=t.style.display!==r;return i&&(t.style.display=r),i}}]),r}()});
|
@@ -135,7 +135,7 @@ function pagelayer_bg_video(el){
|
|
135 |
|
136 |
}else{
|
137 |
|
138 |
-
el.atts['vid_src'] = '<video autoplay '+el.atts['mute']+el.atts['stop_loop']+'>'+
|
139 |
'<source src="'+iframe_src+'" type="video/mp4">'+
|
140 |
'</video>';
|
141 |
|
@@ -255,7 +255,7 @@ function pagelayer_render_pl_image(el){
|
|
255 |
|
256 |
// Custom url
|
257 |
if(el.atts['link_type'] == 'custom_url'){
|
258 |
-
el.atts['func_link'] = el.
|
259 |
}
|
260 |
|
261 |
// Link to the media file itself
|
@@ -439,7 +439,7 @@ function pagelayer_render_pl_image_slider(el){
|
|
439 |
ul += '<li class="pagelayer-slider-item">';
|
440 |
|
441 |
if(is_link){
|
442 |
-
var link = (el.atts['link_type'] == 'media_file' ? url : (el.
|
443 |
ul += '<a href="'+link+'">';
|
444 |
}
|
445 |
|
135 |
|
136 |
}else{
|
137 |
|
138 |
+
el.atts['vid_src'] = '<video autoplay playsinline '+el.atts['mute']+el.atts['stop_loop']+'>'+
|
139 |
'<source src="'+iframe_src+'" type="video/mp4">'+
|
140 |
'</video>';
|
141 |
|
255 |
|
256 |
// Custom url
|
257 |
if(el.atts['link_type'] == 'custom_url'){
|
258 |
+
el.atts['func_link'] = el.tmp['link'];
|
259 |
}
|
260 |
|
261 |
// Link to the media file itself
|
439 |
ul += '<li class="pagelayer-slider-item">';
|
440 |
|
441 |
if(is_link){
|
442 |
+
var link = (el.atts['link_type'] == 'media_file' ? url : (el.tmp['link'] || ''))
|
443 |
ul += '<a href="'+link+'">';
|
444 |
}
|
445 |
|
@@ -1751,5 +1751,7 @@
|
|
1751 |
"popup_load_desc" : "Show popup till the page has loaded",
|
1752 |
"stop_loop" : "Stop Looping",
|
1753 |
"usr_field_desc" : "You can use a field name with a prefix $ to print your field value e.g. if the field name is <b>fieldname</b> then use the variable <b>$fieldname</b>",
|
1754 |
-
"xss_found" : "Following not allowed content found : "
|
|
|
|
|
1755 |
}
|
1751 |
"popup_load_desc" : "Show popup till the page has loaded",
|
1752 |
"stop_loop" : "Stop Looping",
|
1753 |
"usr_field_desc" : "You can use a field name with a prefix $ to print your field value e.g. if the field name is <b>fieldname</b> then use the variable <b>$fieldname</b>",
|
1754 |
+
"xss_found" : "Following not allowed content found : ",
|
1755 |
+
"fallback_color" : "Fallback background color if image fails to load",
|
1756 |
+
"site_desc" : "Site Description"
|
1757 |
}
|
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace
|
4 |
|
5 |
interface IQuery extends \Countable {
|
6 |
/// Methods ///
|
1 |
<?php
|
2 |
|
3 |
+
namespace pagelayerQuery;
|
4 |
|
5 |
interface IQuery extends \Countable {
|
6 |
/// Methods ///
|
@@ -7,7 +7,7 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
namespace
|
11 |
|
12 |
/**
|
13 |
* Indents text
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
namespace pagelayerQuery;
|
11 |
|
12 |
/**
|
13 |
* Indents text
|
@@ -7,7 +7,7 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
namespace
|
11 |
|
12 |
/**
|
13 |
* Holds (x)html/xml tag information like tag name, attributes,
|
@@ -65,14 +65,14 @@ class DomNode implements IQuery {
|
|
65 |
* @var string
|
66 |
* @see select()
|
67 |
*/
|
68 |
-
var $selectClass = '
|
69 |
/**
|
70 |
* Name of the parser class
|
71 |
* @var string
|
72 |
* @see setOuterText()
|
73 |
* @see setInnerText()
|
74 |
*/
|
75 |
-
var $parserClass = '
|
76 |
|
77 |
/**
|
78 |
* Name of the class used for {@link addChild()}
|
@@ -83,37 +83,37 @@ class DomNode implements IQuery {
|
|
83 |
* Name of the class used for {@link addText()}
|
84 |
* @var string
|
85 |
*/
|
86 |
-
var $childClass_Text = '
|
87 |
/**
|
88 |
* Name of the class used for {@link addComment()}
|
89 |
* @var string
|
90 |
*/
|
91 |
-
var $childClass_Comment = '
|
92 |
/**
|
93 |
* Name of the class used for {@link addContional()}
|
94 |
* @var string
|
95 |
*/
|
96 |
-
var $childClass_Conditional = '
|
97 |
/**
|
98 |
* Name of the class used for {@link addCDATA()}
|
99 |
* @var string
|
100 |
*/
|
101 |
-
var $childClass_CDATA = '
|
102 |
/**
|
103 |
* Name of the class used for {@link addDoctype()}
|
104 |
* @var string
|
105 |
*/
|
106 |
-
var $childClass_Doctype = '
|
107 |
/**
|
108 |
* Name of the class used for {@link addXML()}
|
109 |
* @var string
|
110 |
*/
|
111 |
-
var $childClass_XML = '
|
112 |
/**
|
113 |
* Name of the class used for {@link addASP()}
|
114 |
* @var string
|
115 |
*/
|
116 |
-
var $childClass_ASP = '
|
117 |
|
118 |
/**
|
119 |
* Parent node, null if none
|
@@ -1923,7 +1923,7 @@ class DomNode implements IQuery {
|
|
1923 |
*/
|
1924 |
public function query($query = '*') {
|
1925 |
$select = $this->select($query);
|
1926 |
-
$result = new \
|
1927 |
return $result;
|
1928 |
}
|
1929 |
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
namespace pagelayerQuery;
|
11 |
|
12 |
/**
|
13 |
* Holds (x)html/xml tag information like tag name, attributes,
|
65 |
* @var string
|
66 |
* @see select()
|
67 |
*/
|
68 |
+
var $selectClass = 'pagelayerQuery\\HtmlSelector';
|
69 |
/**
|
70 |
* Name of the parser class
|
71 |
* @var string
|
72 |
* @see setOuterText()
|
73 |
* @see setInnerText()
|
74 |
*/
|
75 |
+
var $parserClass = 'pagelayerQuery\\Html5Parser';
|
76 |
|
77 |
/**
|
78 |
* Name of the class used for {@link addChild()}
|
83 |
* Name of the class used for {@link addText()}
|
84 |
* @var string
|
85 |
*/
|
86 |
+
var $childClass_Text = 'pagelayerQuery\\TextNode';
|
87 |
/**
|
88 |
* Name of the class used for {@link addComment()}
|
89 |
* @var string
|
90 |
*/
|
91 |
+
var $childClass_Comment = 'pagelayerQuery\\CommentNode';
|
92 |
/**
|
93 |
* Name of the class used for {@link addContional()}
|
94 |
* @var string
|
95 |
*/
|
96 |
+
var $childClass_Conditional = 'pagelayerQuery\\ConditionalTagNode';
|
97 |
/**
|
98 |
* Name of the class used for {@link addCDATA()}
|
99 |
* @var string
|
100 |
*/
|
101 |
+
var $childClass_CDATA = 'pagelayerQuery\\CdataNode';
|
102 |
/**
|
103 |
* Name of the class used for {@link addDoctype()}
|
104 |
* @var string
|
105 |
*/
|
106 |
+
var $childClass_Doctype = 'pagelayerQuery\\DoctypeNode';
|
107 |
/**
|
108 |
* Name of the class used for {@link addXML()}
|
109 |
* @var string
|
110 |
*/
|
111 |
+
var $childClass_XML = 'pagelayerQuery\\XmlNode';
|
112 |
/**
|
113 |
* Name of the class used for {@link addASP()}
|
114 |
* @var string
|
115 |
*/
|
116 |
+
var $childClass_ASP = 'pagelayerQuery\\AspEmbeddedNode';
|
117 |
|
118 |
/**
|
119 |
* Parent node, null if none
|
1923 |
*/
|
1924 |
public function query($query = '*') {
|
1925 |
$select = $this->select($query);
|
1926 |
+
$result = new \pagelayerQuery((array)$select);
|
1927 |
return $result;
|
1928 |
}
|
1929 |
|
@@ -7,7 +7,7 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
namespace
|
11 |
|
12 |
/**
|
13 |
* Parses a HTML document
|
@@ -488,7 +488,7 @@ class HtmlParser extends HtmlParserBase {
|
|
488 |
* @internal If string, then it will create a new instance as root
|
489 |
* @var DomNode
|
490 |
*/
|
491 |
-
var $root = '
|
492 |
|
493 |
/**
|
494 |
* Current parsing hierarchy
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
namespace pagelayerQuery;
|
11 |
|
12 |
/**
|
13 |
* Parses a HTML document
|
488 |
* @internal If string, then it will create a new instance as root
|
489 |
* @var DomNode
|
490 |
*/
|
491 |
+
var $root = 'pagelayerQuery\\DomNode';
|
492 |
|
493 |
/**
|
494 |
* Current parsing hierarchy
|
@@ -7,7 +7,7 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
namespace
|
11 |
|
12 |
/**
|
13 |
* Tokenizes a css selector query
|
@@ -281,7 +281,7 @@ class HtmlSelector {
|
|
281 |
* @internal If string, then it will create a new instance as parser
|
282 |
* @var CSSQueryTokenizer
|
283 |
*/
|
284 |
-
var $parser = '
|
285 |
|
286 |
/**
|
287 |
* Target of queries
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
namespace pagelayerQuery;
|
11 |
|
12 |
/**
|
13 |
* Tokenizes a css selector query
|
281 |
* @internal If string, then it will create a new instance as parser
|
282 |
* @var CSSQueryTokenizer
|
283 |
*/
|
284 |
+
var $parser = 'pagelayerQuery\\CSSQueryTokenizer';
|
285 |
|
286 |
/**
|
287 |
* Target of queries
|
@@ -7,7 +7,7 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
namespace
|
11 |
|
12 |
/**
|
13 |
* Converts a document into tokens
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
namespace pagelayerQuery;
|
11 |
|
12 |
/**
|
13 |
* Converts a document into tokens
|
@@ -7,7 +7,7 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
namespace
|
11 |
|
12 |
/**
|
13 |
* Converts a XML document to an array
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
namespace pagelayerQuery;
|
11 |
|
12 |
/**
|
13 |
* Converts a XML document to an array
|
@@ -7,8 +7,8 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
use
|
11 |
-
use
|
12 |
|
13 |
/**
|
14 |
* Returns HTML DOM from string
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
use pagelayerQuery\Html5Parser;
|
11 |
+
use pagelayerQuery\HtmlFormatter;
|
12 |
|
13 |
/**
|
14 |
* Returns HTML DOM from string
|
@@ -7,12 +7,12 @@
|
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
-
use
|
11 |
|
12 |
/**
|
13 |
* A jQuery-like object for php.
|
14 |
*/
|
15 |
-
class
|
16 |
/// Properties ///
|
17 |
|
18 |
/**
|
@@ -85,12 +85,12 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
|
|
85 |
/**
|
86 |
* Format/beautify a DOM.
|
87 |
*
|
88 |
-
* @param
|
89 |
-
* @param array $options Extra formatting options. See {@link
|
90 |
* @return bool Returns `true` on sucess and `false` on failure.
|
91 |
*/
|
92 |
// public static function format($dom, $options = array()) {
|
93 |
-
// $formatter = new
|
94 |
// return $formatter->format($dom);
|
95 |
// }
|
96 |
|
@@ -147,7 +147,7 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
|
|
147 |
*
|
148 |
* @param string $path The path to the url.
|
149 |
* @param resource $context A context suitable to be passed into {@link file_get_contents}
|
150 |
-
* @return
|
151 |
*/
|
152 |
public static function parseFile($path, $context = null) {
|
153 |
$html_str = file_get_contents($path, false, $context);
|
@@ -158,10 +158,10 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
|
|
158 |
* Query a string of html.
|
159 |
*
|
160 |
* @param string $html
|
161 |
-
* @return
|
162 |
*/
|
163 |
public static function parseStr($html) {
|
164 |
-
$parser = new
|
165 |
return $parser->root;
|
166 |
}
|
167 |
|
7 |
* @package pQuery
|
8 |
*/
|
9 |
|
10 |
+
use pagelayerQuery\IQuery;
|
11 |
|
12 |
/**
|
13 |
* A jQuery-like object for php.
|
14 |
*/
|
15 |
+
class pagelayerQuery implements ArrayAccess, IteratorAggregate, IQuery {
|
16 |
/// Properties ///
|
17 |
|
18 |
/**
|
85 |
/**
|
86 |
* Format/beautify a DOM.
|
87 |
*
|
88 |
+
* @param pagelayerQuery\DomNode $dom The dom to format.
|
89 |
+
* @param array $options Extra formatting options. See {@link pagelayerQuery\HtmlFormatter::$options}.
|
90 |
* @return bool Returns `true` on sucess and `false` on failure.
|
91 |
*/
|
92 |
// public static function format($dom, $options = array()) {
|
93 |
+
// $formatter = new pagelayerQuery\HtmlFormatter($options);
|
94 |
// return $formatter->format($dom);
|
95 |
// }
|
96 |
|
147 |
*
|
148 |
* @param string $path The path to the url.
|
149 |
* @param resource $context A context suitable to be passed into {@link file_get_contents}
|
150 |
+
* @return pagelayerQuery\DomNode Returns the root dom node for the html file.
|
151 |
*/
|
152 |
public static function parseFile($path, $context = null) {
|
153 |
$html_str = file_get_contents($path, false, $context);
|
158 |
* Query a string of html.
|
159 |
*
|
160 |
* @param string $html
|
161 |
+
* @return pagelayerQuery\DomNode Returns the root dom node for the html string.
|
162 |
*/
|
163 |
public static function parseStr($html) {
|
164 |
+
$parser = new pagelayerQuery\Html5Parser($html);
|
165 |
return $parser->root;
|
166 |
}
|
167 |
|
@@ -364,7 +364,7 @@ function pagelayer_do_shortcodes(){
|
|
364 |
$data = do_shortcode($data);
|
365 |
|
366 |
// Create the HTML object
|
367 |
-
$node =
|
368 |
$node->query('.pagelayer-ele')->removeClass('pagelayer-ele');
|
369 |
echo $node->html();
|
370 |
|
@@ -386,7 +386,7 @@ function pagelayer_givejs(){
|
|
386 |
pagelayer_load_shortcodes();
|
387 |
|
388 |
// Load font options
|
389 |
-
|
390 |
|
391 |
// Pagelayer Template Loading Mechanism
|
392 |
include_once(PAGELAYER_DIR.'/js/givejs.php');
|
@@ -633,6 +633,10 @@ function pagelayer_apply_revision(){
|
|
633 |
$parID = wp_get_post_parent_id($revisionID);
|
634 |
$ret = array();
|
635 |
|
|
|
|
|
|
|
|
|
636 |
// Are you allowed to edit ?
|
637 |
if(!pagelayer_user_can_edit($parID)){
|
638 |
$ret['error'][] = __pl('no_permission');
|
@@ -783,13 +787,14 @@ function pagelayer_post_comment() {
|
|
783 |
$GLOBALS['post'] = get_post($_REQUEST['postID']);
|
784 |
$GLOBALS['withcomments'] = true;
|
785 |
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
|
|
793 |
wp_die();
|
794 |
|
795 |
}
|
@@ -810,78 +815,10 @@ function pagelayer_post_info() {
|
|
810 |
|
811 |
$GLOBALS['post'] = get_post($_REQUEST['postID']);
|
812 |
|
813 |
-
|
814 |
-
|
815 |
-
$info_content ='';
|
816 |
-
$avatar_url ='';
|
817 |
|
818 |
-
|
819 |
-
case 'author':
|
820 |
-
|
821 |
-
$link = get_author_posts_url( get_the_author_meta( 'ID' ) );
|
822 |
-
$avatar_url = get_avatar_url( get_the_author_meta( 'ID' ), 96 );
|
823 |
-
$post_info_content = get_the_author_meta( 'display_name', $post->post_author );
|
824 |
-
break;
|
825 |
-
|
826 |
-
case 'date':
|
827 |
-
|
828 |
-
$format = [
|
829 |
-
'default' => 'F j, Y',
|
830 |
-
'0' => 'F j, Y',
|
831 |
-
'1' => 'Y-m-d',
|
832 |
-
'2' => 'm/d/Y',
|
833 |
-
'3' => 'd/m/Y',
|
834 |
-
'custom' => empty( $el['atts']['date_format_custom'] ) ? 'F j, Y' : $el['atts']['date_format_custom'],
|
835 |
-
];
|
836 |
-
|
837 |
-
$post_info_content = get_the_time( $format[ $el['atts']['date_format'] ] );
|
838 |
-
$link = get_day_link( get_post_time( 'Y' ), get_post_time( 'm' ), get_post_time( 'j' ) );
|
839 |
-
|
840 |
-
break;
|
841 |
-
|
842 |
-
case 'time':
|
843 |
-
|
844 |
-
$format = [
|
845 |
-
'default' => 'g:i a',
|
846 |
-
'0' => 'g:i a',
|
847 |
-
'1' => 'g:i A',
|
848 |
-
'2' => 'H:i',
|
849 |
-
'custom' => empty( $el['atts']['time_format_custom'] ) ? 'F j, Y' : $el['atts']['time_format_custom'],
|
850 |
-
];
|
851 |
-
$post_info_content = get_the_time( $format[ $el['atts']['time_format'] ] );
|
852 |
-
|
853 |
-
break;
|
854 |
-
|
855 |
-
case 'comments':
|
856 |
-
|
857 |
-
if (comments_open()) {
|
858 |
-
$post_info_content = (int) get_comments_number();
|
859 |
-
$link = get_comments_link();
|
860 |
-
}
|
861 |
-
|
862 |
-
break;
|
863 |
-
|
864 |
-
case 'terms':
|
865 |
-
|
866 |
-
$taxonomy = $el['atts']['taxonomy'];
|
867 |
-
$terms = wp_get_post_terms( get_the_ID(), $taxonomy );
|
868 |
-
foreach ( $terms as $term ) {
|
869 |
-
$post_info_content .= ' <a if-ext="{{info_link}}" href="'. get_term_link( $term ) .'" class="pagelayer-post-info-list-link"> '. $term->name .' </a>';
|
870 |
-
}
|
871 |
-
|
872 |
-
break;
|
873 |
-
|
874 |
-
case 'custom':
|
875 |
-
|
876 |
-
$post_info_content = $el['atts']['type_custom'];
|
877 |
-
$link = $el['atts']['info_custom_link'];
|
878 |
-
|
879 |
-
break;
|
880 |
-
}
|
881 |
-
|
882 |
-
$el['atts']['post_info_content'] = $post_info_content;
|
883 |
-
$el['atts']['avatar_url'] = $avatar_url;
|
884 |
-
$el['atts']['link'] = $link;
|
885 |
|
886 |
pagelayer_json_output($el['atts']);
|
887 |
|
@@ -936,8 +873,8 @@ function pagelayer_archive_posts_data(){
|
|
936 |
check_ajax_referer('pagelayer_ajax', 'pagelayer_nonce');
|
937 |
|
938 |
// Set excerpt length
|
939 |
-
if($_POST['exc_length']){
|
940 |
-
$exc_length = (int) $
|
941 |
add_filter( 'excerpt_length', function($length) use($exc_length){
|
942 |
return $exc_length;
|
943 |
}, 999 );
|
@@ -945,8 +882,20 @@ function pagelayer_archive_posts_data(){
|
|
945 |
|
946 |
// Load shortcodes
|
947 |
pagelayer_load_shortcodes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
// TODO : Allowed
|
949 |
-
echo
|
950 |
wp_die();
|
951 |
}
|
952 |
|
@@ -1626,6 +1575,9 @@ function pagelayer_export_template(){
|
|
1626 |
pagelayer_json_output($done);
|
1627 |
}
|
1628 |
|
|
|
|
|
|
|
1629 |
// Get the active theme
|
1630 |
$theme_dir = get_stylesheet_directory();
|
1631 |
$conf = [];
|
@@ -1653,41 +1605,70 @@ function pagelayer_export_template(){
|
|
1653 |
|
1654 |
// Write the config
|
1655 |
file_put_contents($theme_dir.'/pagelayer.conf', json_encode($conf, JSON_PRETTY_PRINT));
|
|
|
|
|
1656 |
|
1657 |
-
//
|
1658 |
-
|
1659 |
-
|
1660 |
-
mkdir($theme_dir.'/data/');
|
1661 |
-
mkdir($theme_dir.'/data/page');
|
1662 |
|
1663 |
-
|
1664 |
-
|
1665 |
-
// Load the pages
|
1666 |
-
$pages_query = new WP_Query(['post_type' => 'page', 'status' => 'publish']);
|
1667 |
-
$pages = $pages_query->posts;
|
1668 |
-
|
1669 |
-
// Write the files
|
1670 |
-
foreach($pages as $k => $v){
|
1671 |
|
1672 |
-
|
1673 |
-
|
|
|
|
|
|
|
|
|
|
|
1674 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1675 |
|
1676 |
-
|
1677 |
-
|
1678 |
-
$conf['page'][$v->post_name] = $v;
|
1679 |
|
1680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1681 |
|
1682 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1683 |
|
1684 |
-
if(
|
1685 |
-
$conf['conf'][
|
1686 |
}
|
1687 |
|
1688 |
-
|
|
|
|
|
|
|
1689 |
file_put_contents($theme_dir.'/pagelayer-data.conf', json_encode($conf, JSON_PRETTY_PRINT));
|
1690 |
-
|
1691 |
}
|
1692 |
|
1693 |
// Are we to export any media ?
|
364 |
$data = do_shortcode($data);
|
365 |
|
366 |
// Create the HTML object
|
367 |
+
$node = pagelayerQuery::parseStr($data);
|
368 |
$node->query('.pagelayer-ele')->removeClass('pagelayer-ele');
|
369 |
echo $node->html();
|
370 |
|
386 |
pagelayer_load_shortcodes();
|
387 |
|
388 |
// Load font options
|
389 |
+
pagelayer_load_font_options();
|
390 |
|
391 |
// Pagelayer Template Loading Mechanism
|
392 |
include_once(PAGELAYER_DIR.'/js/givejs.php');
|
633 |
$parID = wp_get_post_parent_id($revisionID);
|
634 |
$ret = array();
|
635 |
|
636 |
+
if(empty($parID)){
|
637 |
+
$parID = $revisionID;
|
638 |
+
}
|
639 |
+
|
640 |
// Are you allowed to edit ?
|
641 |
if(!pagelayer_user_can_edit($parID)){
|
642 |
$ret['error'][] = __pl('no_permission');
|
787 |
$GLOBALS['post'] = get_post($_REQUEST['postID']);
|
788 |
$GLOBALS['withcomments'] = true;
|
789 |
|
790 |
+
// Load shortcodes
|
791 |
+
pagelayer_load_shortcodes();
|
792 |
+
|
793 |
+
$el = [];
|
794 |
+
pagelayer_sc_post_comment($el);
|
795 |
+
|
796 |
+
echo $el['atts']['post_comment'];
|
797 |
+
|
798 |
wp_die();
|
799 |
|
800 |
}
|
815 |
|
816 |
$GLOBALS['post'] = get_post($_REQUEST['postID']);
|
817 |
|
818 |
+
// Load shortcodes
|
819 |
+
pagelayer_load_shortcodes();
|
|
|
|
|
820 |
|
821 |
+
pagelayer_sc_post_info_list($el);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
|
823 |
pagelayer_json_output($el['atts']);
|
824 |
|
873 |
check_ajax_referer('pagelayer_ajax', 'pagelayer_nonce');
|
874 |
|
875 |
// Set excerpt length
|
876 |
+
if(!empty($_POST['atts']['exc_length'])){
|
877 |
+
$exc_length = (int) $_POST['atts']['exc_length'];
|
878 |
add_filter( 'excerpt_length', function($length) use($exc_length){
|
879 |
return $exc_length;
|
880 |
}, 999 );
|
882 |
|
883 |
// Load shortcodes
|
884 |
pagelayer_load_shortcodes();
|
885 |
+
|
886 |
+
foreach($_POST['atts'] as $k => $v){
|
887 |
+
$r[] = $k.'="'.pagelayer_escapeHTML($v).'"';
|
888 |
+
}
|
889 |
+
|
890 |
+
$string = implode(' ', $r);
|
891 |
+
if(preg_match('/\]/is', $string)){
|
892 |
+
die('Hacking Attempt');
|
893 |
+
}
|
894 |
+
|
895 |
+
$sc = '[pl_archive_posts '.$string.'][/pl_archive_posts]';
|
896 |
+
|
897 |
// TODO : Allowed
|
898 |
+
echo do_shortcode($sc);
|
899 |
wp_die();
|
900 |
}
|
901 |
|
1575 |
pagelayer_json_output($done);
|
1576 |
}
|
1577 |
|
1578 |
+
// Load Shortcodes
|
1579 |
+
pagelayer_load_shortcodes();
|
1580 |
+
|
1581 |
// Get the active theme
|
1582 |
$theme_dir = get_stylesheet_directory();
|
1583 |
$conf = [];
|
1605 |
|
1606 |
// Write the config
|
1607 |
file_put_contents($theme_dir.'/pagelayer.conf', json_encode($conf, JSON_PRETTY_PRINT));
|
1608 |
+
|
1609 |
+
$conf = [];
|
1610 |
|
1611 |
+
// Load the other posts
|
1612 |
+
foreach($pagelayer->settings['post_types'] as $type){
|
|
|
|
|
|
|
1613 |
|
1614 |
+
// Anything to export for users ?
|
1615 |
+
if(!empty($_POST[$type]) && is_array($_POST[$type])){
|
|
|
|
|
|
|
|
|
|
|
|
|
1616 |
|
1617 |
+
mkdir($theme_dir.'/data/');
|
1618 |
+
mkdir($theme_dir.'/data/'.$type);
|
1619 |
+
|
1620 |
+
$pids = [];
|
1621 |
+
|
1622 |
+
foreach($_POST[$type] as $k => $v){
|
1623 |
+
$pids[] = (int) $k;
|
1624 |
}
|
1625 |
+
|
1626 |
+
// Load the type
|
1627 |
+
$_query = new WP_Query([
|
1628 |
+
'post_type' => $type,
|
1629 |
+
'status' => 'publish',
|
1630 |
+
'post__in' => $pids
|
1631 |
+
]);
|
1632 |
+
|
1633 |
+
$posts = $_query->posts;
|
1634 |
|
1635 |
+
// Write the files
|
1636 |
+
foreach($posts as $k => $v){
|
|
|
1637 |
|
1638 |
+
file_put_contents($theme_dir.'/data/'.$type.'/'.$v->post_name, pagelayer_export_content($v->post_content));
|
1639 |
+
unset($v->post_content);
|
1640 |
+
|
1641 |
+
$meta = get_post_meta($v->ID);
|
1642 |
+
|
1643 |
+
// Also put the meta
|
1644 |
+
file_put_contents($theme_dir.'/data/'.$type.'/'.$v->post_name.'.meta', json_encode($meta, JSON_PRETTY_PRINT));
|
1645 |
+
|
1646 |
+
$conf[$type][$v->post_name] = $v;
|
1647 |
+
|
1648 |
+
do_action('pagelayer_'.$type.'_exported', $v, $theme_dir);
|
1649 |
+
|
1650 |
+
}
|
1651 |
|
1652 |
}
|
1653 |
+
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
// Export the settings
|
1657 |
+
$settings = ['pagelayer_content_width', 'pagelayer_body_font', 'pagelayer_tablet_breakpoint', 'pagelayer_mobile_breakpoint', 'pagelayer_body_typography', 'pagelayer_h1_typography', 'pagelayer_h2_typography', 'pagelayer_h3_typography', 'pagelayer_h4_typography', 'pagelayer_h5_typography', 'pagelayer_h6_typography', 'pagelayer_color', 'pagelayer_header_code', 'pagelayer_footer_code'];
|
1658 |
+
|
1659 |
+
foreach($settings as $v){
|
1660 |
+
|
1661 |
+
$vv = get_option($v);
|
1662 |
|
1663 |
+
if($vv){
|
1664 |
+
$conf['conf'][$v] = $vv;
|
1665 |
}
|
1666 |
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
// Write the config
|
1670 |
+
if(!empty($conf)){
|
1671 |
file_put_contents($theme_dir.'/pagelayer-data.conf', json_encode($conf, JSON_PRETTY_PRINT));
|
|
|
1672 |
}
|
1673 |
|
1674 |
// Are we to export any media ?
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//////////////////////////////////////////////////////////////
|
4 |
+
//===========================================================
|
5 |
+
// license.php
|
6 |
+
//===========================================================
|
7 |
+
// PAGELAYER
|
8 |
+
// Inspired by the DESIRE to be the BEST OF ALL
|
9 |
+
// ----------------------------------------------------------
|
10 |
+
// Started by: Pulkit Gupta
|
11 |
+
// Date: 23rd Jan 2017
|
12 |
+
// Time: 23:00 hrs
|
13 |
+
// Site: http://pagelayer.com/wordpress (PAGELAYER)
|
14 |
+
// ----------------------------------------------------------
|
15 |
+
// Please Read the Terms of use at http://pagelayer.com/tos
|
16 |
+
// ----------------------------------------------------------
|
17 |
+
//===========================================================
|
18 |
+
// (c)Pagelayer Team
|
19 |
+
//===========================================================
|
20 |
+
//////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
// Are we being accessed directly ?
|
23 |
+
if(!defined('PAGELAYER_VERSION')) {
|
24 |
+
exit('Hacking Attempt !');
|
25 |
+
}
|
26 |
+
|
27 |
+
global $pagelayer, $pl_error;
|
28 |
+
|
29 |
+
// Fonts
|
30 |
+
$pagelayer->fonts = ['', 'ABeeZee', 'Abel', 'Abhaya Libre', 'Abril Fatface', 'Aclonica', 'Acme', 'Actor', 'Adamina', 'Advent Pro', 'Aguafina Script', 'Akronim', 'Aladin', 'Aldrich', 'Alef', 'Alegreya', 'Alegreya SC', 'Alegreya Sans', 'Alegreya Sans SC', 'Aleo', 'Alex Brush', 'Alfa Slab One', 'Alice', 'Alike', 'Alike Angular', 'Allan', 'Allerta', 'Allerta Stencil', 'Allura', 'Almendra', 'Almendra Display', 'Almendra SC', 'Amarante', 'Amaranth', 'Amatic SC', 'Amethysta', 'Amiko', 'Amiri', 'Amita', 'Anaheim', 'Andada', 'Andika', 'Angkor', 'Annie Use Your Telescope', 'Anonymous Pro', 'Antic', 'Antic Didone', 'Antic Slab', 'Anton', 'Arapey', 'Arbutus', 'Arbutus Slab', 'Architects Daughter', 'Archivo', 'Archivo Black', 'Archivo Narrow', 'Aref Ruqaa', 'Arima Madurai', 'Arimo', 'Arizonia', 'Armata', 'Arsenal', 'Artifika', 'Arvo', 'Arya', 'Asap', 'Asap Condensed', 'Asar', 'Asset', 'Assistant', 'Astloch', 'Asul', 'Athiti', 'Atma', 'Atomic Age', 'Aubrey', 'Audiowide', 'Autour One', 'Average', 'Average Sans', 'Averia Gruesa Libre', 'Averia Libre', 'Averia Sans Libre', 'Averia Serif Libre', 'B612', 'B612 Mono', 'Bad Script', 'Bahiana', 'Bai Jamjuree', 'Baloo', 'Baloo Bhai', 'Baloo Bhaijaan', 'Baloo Bhaina', 'Baloo Chettan', 'Baloo Da', 'Baloo Paaji', 'Baloo Tamma', 'Baloo Tammudu', 'Baloo Thambi', 'Balthazar', 'Bangers', 'Barlow', 'Barlow Condensed', 'Barlow Semi Condensed', 'Barrio', 'Basic', 'Battambang', 'Baumans', 'Bayon', 'Belgrano', 'Bellefair', 'Belleza', 'Bellota', 'BenchNine', 'Bentham', 'Berkshire Swash', 'Bevan', 'Bigelow Rules', 'Bigshot One', 'Bilbo', 'Bilbo Swash Caps', 'BioRhyme', 'BioRhyme Expanded', 'Biryani', 'Bitter', 'Black And White Picture', 'Black Han Sans', 'Black Ops One', 'Bokor', 'Bonbon', 'Boogaloo', 'Bowlby One', 'Bowlby One SC', 'Brawler', 'Bree Serif', 'Bubblegum Sans', 'Bubbler One', 'Buda', 'Buenard', 'Bungee', 'Bungee Hairline', 'Bungee Inline', 'Bungee Outline', 'Bungee Shade', 'Butcherman', 'Butterfly Kids', 'Cabin', 'Cabin Condensed', 'Cabin Sketch', 'Caesar Dressing', 'Cagliostro', 'Cairo', 'Calligraffitti', 'Cambay', 'Cambo', 'Candal', 'Cantarell', 'Cantata One', 'Cantora One', 'Capriola', 'Cardo', 'Carme', 'Carrois Gothic', 'Carrois Gothic SC', 'Carter One', 'Catamaran', 'Caudex', 'Caveat', 'Caveat Brush', 'Cedarville Cursive', 'Ceviche One', 'Chakra Petch', 'Changa', 'Changa One', 'Chango', 'Charm', 'Charmonman', 'Chathura', 'Chau Philomene One', 'Chela One', 'Chelsea Market', 'Chenla', 'Cherry Cream Soda', 'Cherry Swash', 'Chewy', 'Chicle', 'Chivo', 'Chonburi', 'Cinzel', 'Cinzel Decorative', 'Clicker Script', 'Coda', 'Coda Caption', 'Codystar', 'Coiny', 'Combo', 'Comfortaa', 'Coming Soon', 'Concert One', 'Condiment', 'Content', 'Contrail One', 'Convergence', 'Cookie', 'Copse', 'Corben', 'Cormorant', 'Cormorant Garamond', 'Cormorant Infant', 'Cormorant SC', 'Cormorant Unicase', 'Cormorant Upright', 'Courgette', 'Cousine', 'Coustard', 'Covered By Your Grace', 'Crafty Girls', 'Creepster', 'Crete Round', 'Crimson Text', 'Croissant One', 'Crushed', 'Cuprum', 'Cute Font', 'Cutive', 'Cutive Mono', 'Damion', 'Dancing Script', 'Dangrek', 'David Libre', 'Dawning of a New Day', 'Days One', 'Dekko', 'Delius', 'Delius Swash Caps', 'Delius Unicase', 'Della Respira', 'Denk One', 'Devonshire', 'Dhurjati', 'Didact Gothic', 'Diplomata', 'Diplomata SC', 'Do Hyeon', 'Dokdo', 'Domine', 'Donegal One', 'Doppio One', 'Dorsa', 'Dosis', 'Dr Sugiyama', 'Duru Sans', 'Dynalight', 'EB Garamond', 'Eagle Lake', 'East Sea Dokdo', 'Eater', 'Economica', 'Eczar', 'El Messiri', 'Electrolize', 'Elsie', 'Elsie Swash Caps', 'Emblema One', 'Emilys Candy', 'Encode Sans', 'Encode Sans Condensed', 'Encode Sans Expanded', 'Encode Sans Semi Condensed', 'Encode Sans Semi Expanded', 'Engagement', 'Englebert', 'Enriqueta', 'Erica One', 'Esteban', 'Euphoria Script', 'Ewert', 'Exo', 'Exo 2', 'Expletus Sans', 'Fahkwang', 'Fanwood Text', 'Farsan', 'Fascinate', 'Fascinate Inline', 'Faster One', 'Fasthand', 'Fauna One', 'Faustina', 'Federant', 'Federo', 'Felipa', 'Fenix', 'Finger Paint', 'Fira Mono', 'Fira Sans', 'Fira Sans Condensed', 'Fira Sans Extra Condensed', 'Fjalla One', 'Fjord One', 'Flamenco', 'Flavors', 'Fondamento', 'Fontdiner Swanky', 'Forum', 'Francois One', 'Frank Ruhl Libre', 'Freckle Face', 'Fredericka the Great', 'Fredoka One', 'Freehand', 'Fresca', 'Frijole', 'Fruktur', 'Fugaz One', 'GFS Didot', 'GFS Neohellenic', 'Gabriela', 'Gaegu', 'Gafata', 'Galada', 'Galdeano', 'Galindo', 'Gamja Flower', 'Gentium Basic', 'Gentium Book Basic', 'Geo', 'Geostar', 'Geostar Fill', 'Germania One', 'Gidugu', 'Gilda Display', 'Give You Glory', 'Glass Antiqua', 'Glegoo', 'Gloria Hallelujah', 'Goblin One', 'Gochi Hand', 'Gorditas', 'Gothic A1', 'Goudy Bookletter 1911', 'Graduate', 'Grand Hotel', 'Gravitas One', 'Great Vibes', 'Griffy', 'Gruppo', 'Gudea', 'Gugi', 'Gurajada', 'Habibi', 'Halant', 'Hammersmith One', 'Hanalei', 'Hanalei Fill', 'Handlee', 'Hanuman', 'Happy Monkey', 'Harmattan', 'Headland One', 'Heebo', 'Henny Penny', 'Herr Von Muellerhoff', 'Hi Melody', 'Hind', 'Hind Guntur', 'Hind Madurai', 'Hind Siliguri', 'Hind Vadodara', 'Holtwood One SC', 'Homemade Apple', 'Homenaje', 'IBM Plex Mono', 'IBM Plex Sans', 'IBM Plex Sans Condensed', 'IBM Plex Serif', 'IM Fell DW Pica', 'IM Fell DW Pica SC', 'IM Fell Double Pica', 'IM Fell Double Pica SC', 'IM Fell English', 'IM Fell English SC', 'IM Fell French Canon', 'IM Fell French Canon SC', 'IM Fell Great Primer', 'IM Fell Great Primer SC', 'Iceberg', 'Iceland', 'Imprima', 'Inconsolata', 'Inder', 'Indie Flower', 'Inika', 'Inknut Antiqua', 'Irish Grover', 'Istok Web', 'Italiana', 'Italianno', 'Itim', 'Jacques Francois', 'Jacques Francois Shadow', 'Jaldi', 'Jim Nightshade', 'Jockey One', 'Jolly Lodger', 'Jomhuria', 'Josefin Sans', 'Josefin Slab', 'Joti One', 'Jua', 'Judson', 'Julee', 'Julius Sans One', 'Junge', 'Jura', 'Just Another Hand', 'Just Me Again Down Here', 'K2D', 'Kadwa', 'Kalam', 'Kameron', 'Kanit', 'Kantumruy', 'Karla', 'Karma', 'Katibeh', 'Kaushan Script', 'Kavivanar', 'Kavoon', 'Kdam Thmor', 'Keania One', 'Kelly Slab', 'Kenia', 'Khand', 'Khmer', 'Khula', 'Kirang Haerang', 'Kite One', 'Knewave', 'KoHo', 'Kodchasan', 'Kosugi', 'Kosugi Maru', 'Kotta One', 'Koulen', 'Kranky', 'Kreon', 'Kristi', 'Krona One', 'Krub', 'Kumar One', 'Kumar One Outline', 'Kurale', 'La Belle Aurore', 'Laila', 'Lakki Reddy', 'Lalezar', 'Lancelot', 'Lateef', 'Lato', 'League Script', 'Leckerli One', 'Ledger', 'Lekton', 'Lemon', 'Lemonada', 'Libre Barcode 128', 'Libre Barcode 128 Text', 'Libre Barcode 39', 'Libre Barcode 39 Extended', 'Libre Barcode 39 Extended Text', 'Libre Barcode 39 Text', 'Libre Baskerville', 'Libre Franklin', 'Life Savers', 'Lilita One', 'Lily Script One', 'Limelight', 'Linden Hill', 'Lobster', 'Lobster Two', 'Londrina Outline', 'Londrina Shadow', 'Londrina Sketch', 'Londrina Solid', 'Lora', 'Love Ya Like A Sister', 'Loved by the King', 'Lovers Quarrel', 'Luckiest Guy', 'Lusitana', 'Lustria', 'M PLUS 1p', 'M PLUS Rounded 1c', 'Macondo', 'Macondo Swash Caps', 'Mada', 'Magra', 'Maiden Orange', 'Maitree', 'Major Mono Display', 'Mako', 'Mali', 'Mallanna', 'Mandali', 'Manuale', 'Marcellus', 'Marcellus SC', 'Marck Script', 'Margarine', 'Markazi Text', 'Marko One', 'Marmelad', 'Martel', 'Martel Sans', 'Marvel', 'Mate', 'Mate SC', 'Maven Pro', 'McLaren', 'Meddon', 'MedievalSharp', 'Medula One', 'Meera Inimai', 'Megrim', 'Meie Script', 'Merienda', 'Merienda One', 'Merriweather', 'Merriweather Sans', 'Metal', 'Metal Mania', 'Metamorphous', 'Metrophobic', 'Michroma', 'Milonga', 'Miltonian', 'Miltonian Tattoo', 'Mina', 'Miniver', 'Miriam Libre', 'Mirza', 'Miss Fajardose', 'Mitr', 'Modak', 'Modern Antiqua', 'Mogra', 'Molengo', 'Molle', 'Monda', 'Monofett', 'Monoton', 'Monsieur La Doulaise', 'Montaga', 'Montez', 'Montserrat', 'Montserrat Alternates', 'Montserrat Subrayada', 'Moul', 'Moulpali', 'Mountains of Christmas', 'Mouse Memoirs', 'Mr Bedfort', 'Mr Dafoe', 'Mr De Haviland', 'Mrs Saint Delafield', 'Mrs Sheppards', 'Mukta', 'Mukta Mahee', 'Mukta Malar', 'Mukta Vaani', 'Muli', 'Mystery Quest', 'NTR', 'Nanum Brush Script', 'Nanum Gothic', 'Nanum Gothic Coding', 'Nanum Myeongjo', 'Nanum Pen Script', 'Neucha', 'Neuton', 'New Rocker', 'News Cycle', 'Niconne', 'Niramit', 'Nixie One', 'Nobile', 'Nokora', 'Norican', 'Nosifer', 'Notable', 'Nothing You Could Do', 'Noticia Text', 'Noto Sans', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Serif', 'Noto Serif JP', 'Noto Serif KR', 'Noto Serif SC', 'Noto Serif TC', 'Nova Cut', 'Nova Flat', 'Nova Mono', 'Nova Oval', 'Nova Round', 'Nova Script', 'Nova Slim', 'Nova Square', 'Numans', 'Nunito', 'Nunito Sans', 'Odor Mean Chey', 'Offside', 'Old Standard TT', 'Oldenburg', 'Oleo Script', 'Oleo Script Swash Caps', 'Open Sans', 'Open Sans Condensed', 'Oranienbaum', 'Orbitron', 'Oregano', 'Orienta', 'Original Surfer', 'Oswald', 'Over the Rainbow', 'Overlock', 'Overlock SC', 'Overpass', 'Overpass Mono', 'Ovo', 'Oxygen', 'Oxygen Mono', 'PT Mono', 'PT Sans', 'PT Sans Caption', 'PT Sans Narrow', 'PT Serif', 'PT Serif Caption', 'Pacifico', 'Padauk', 'Palanquin', 'Palanquin Dark', 'Pangolin', 'Paprika', 'Parisienne', 'Passero One', 'Passion One', 'Pathway Gothic One', 'Patrick Hand', 'Patrick Hand SC', 'Pattaya', 'Patua One', 'Pavanam', 'Paytone One', 'Peddana', 'Peralta', 'Permanent Marker', 'Petit Formal Script', 'Petrona', 'Philosopher', 'Piedra', 'Pinyon Script', 'Pirata One', 'Plaster', 'Play', 'Playball', 'Playfair Display', 'Playfair Display SC', 'Podkova', 'Poiret One', 'Poller One', 'Poly', 'Pompiere', 'Pontano Sans', 'Poor Story', 'Poppins', 'Port Lligat Sans', 'Port Lligat Slab', 'Pragati Narrow', 'Prata', 'Preahvihear', 'Press Start 2P', 'Pridi', 'Princess Sofia', 'Prociono', 'Prompt', 'Prosto One', 'Proza Libre', 'Puritan', 'Purple Purse', 'Quando', 'Quantico', 'Quattrocento', 'Quattrocento Sans', 'Questrial', 'Quicksand', 'Quintessential', 'Qwigley', 'Racing Sans One', 'Radley', 'Rajdhani', 'Rakkas', 'Raleway', 'Raleway Dots', 'Ramabhadra', 'Ramaraja', 'Rambla', 'Rammetto One', 'Ranchers', 'Rancho', 'Ranga', 'Rasa', 'Rationale', 'Ravi Prakash', 'Redressed', 'Reem Kufi', 'Reenie Beanie', 'Revalia', 'Rhodium Libre', 'Ribeye', 'Ribeye Marrow', 'Righteous', 'Risque', 'Roboto', 'Roboto Condensed', 'Roboto Mono', 'Roboto Slab', 'Rochester', 'Rock Salt', 'Rokkitt', 'Romanesco', 'Ropa Sans', 'Rosario', 'Rosarivo', 'Rouge Script', 'Rozha One', 'Rubik', 'Rubik Mono One', 'Ruda', 'Rufina', 'Ruge Boogie', 'Ruluko', 'Rum Raisin', 'Ruslan Display', 'Russo One', 'Ruthie', 'Rye', 'Sacramento', 'Sahitya', 'Sail', 'Saira', 'Saira Condensed', 'Saira Extra Condensed', 'Saira Semi Condensed', 'Salsa', 'Sanchez', 'Sancreek', 'Sansita', 'Sarabun', 'Sarala', 'Sarina', 'Sarpanch', 'Satisfy', 'Sawarabi Gothic', 'Sawarabi Mincho', 'Scada', 'Scheherazade', 'Schoolbell', 'Scope One', 'Seaweed Script', 'Secular One', 'Sedgwick Ave', 'Sedgwick Ave Display', 'Sen', 'Sevillana', 'Seymour One', 'Shadows Into Light', 'Shadows Into Light Two', 'Shanti', 'Share', 'Share Tech', 'Share Tech Mono', 'Shojumaru', 'Short Stack', 'Shrikhand', 'Siemreap', 'Sigmar One', 'Signika', 'Signika Negative', 'Simonetta', 'Sintony', 'Sirin Stencil', 'Six Caps', 'Skranji', 'Slabo 13px', 'Slabo 27px', 'Slackey', 'Smokum', 'Smythe', 'Sniglet', 'Snippet', 'Snowburst One', 'Sofadi One', 'Sofia', 'Song Myung', 'Sonsie One', 'Sorts Mill Goudy', 'Source Code Pro', 'Source Sans Pro', 'Source Serif Pro', 'Space Mono', 'Special Elite', 'Spectral', 'Spectral SC', 'Spicy Rice', 'Spinnaker', 'Spirax', 'Squada One', 'Sree Krushnadevaraya', 'Sriracha', 'Srisakdi', 'Staatliches', 'Stalemate', 'Stalinist One', 'Stardos Stencil', 'Stint Ultra Condensed', 'Stint Ultra Expanded', 'Stoke', 'Strait', 'Stylish', 'Sue Ellen Francisco', 'Suez One', 'Sumana', 'Sunflower', 'Sunshiney', 'Supermercado One', 'Sura', 'Suranna', 'Suravaram', 'Suwannaphum', 'Swanky and Moo Moo', 'Syncopate', 'Tajawal', 'Tangerine', 'Taprom', 'Tauri', 'Taviraj', 'Teko', 'Telex', 'Tenali Ramakrishna', 'Tenor Sans', 'Text Me One', 'Thasadith', 'The Girl Next Door', 'Tienne', 'Tillana', 'Timmana', 'Tinos', 'Titan One', 'Titillium Web', 'Trade Winds', 'Trirong', 'Trocchi', 'Trochut', 'Trykker', 'Tulpen One', 'Ubuntu', 'Ubuntu Condensed', 'Ubuntu Mono', 'Ultra', 'Uncial Antiqua', 'Underdog', 'Unica One', 'UnifrakturCook', 'UnifrakturMaguntia', 'Unkempt', 'Unlock', 'Unna', 'VT323', 'Vampiro One', 'Varela', 'Varela Round', 'Vast Shadow', 'Vesper Libre', 'Vibur', 'Vidaloka', 'Viga', 'Voces', 'Volkhov', 'Vollkorn', 'Vollkorn SC', 'Voltaire', 'Waiting for the Sunrise', 'Wallpoet', 'Walter Turncoat', 'Warnes', 'Wellfleet', 'Wendy One', 'Wire One', 'Work Sans', 'Yanone Kaffeesatz', 'Yantramanav', 'Yatra One', 'Yellowtail', 'Yeon Sung', 'Yeseva One', 'Yesteryear', 'Yrsa', 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou', 'ZCOOL XiaoWei', 'Zeyada', 'Zilla Slab', 'Zilla Slab Highlight'];
|
31 |
+
|
32 |
+
$pagelayer->font_style = ['' => 'Default',
|
33 |
+
'normal' => 'Normal',
|
34 |
+
'italic' => 'Italic',
|
35 |
+
'oblique' => 'Oblique'];
|
36 |
+
|
37 |
+
$pagelayer->text_transform = ['' => 'Default',
|
38 |
+
'none' => 'None',
|
39 |
+
'capitalize' => 'Capitalize',
|
40 |
+
'lowercase' => 'Lowercase',
|
41 |
+
'uppercase' => 'Uppercase'];
|
42 |
+
|
43 |
+
$pagelayer->font_weight = ['' => 'Default',
|
44 |
+
'100' => '100 Thin',
|
45 |
+
'200' => '200 Extra Light',
|
46 |
+
'300' => '300 Light',
|
47 |
+
'400' => '400 Normal',
|
48 |
+
'500' => '500 Medium',
|
49 |
+
'600' => '600 Semi Bold',
|
50 |
+
'700' => '700 Bold',
|
51 |
+
'800' => '800 Extra Bold',
|
52 |
+
'900' => '900 Ultra Bold'];
|
@@ -432,6 +432,26 @@ function pagelayer_is_live_iframe(){
|
|
432 |
|
433 |
}
|
434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
// Can the current user edit the post ?
|
436 |
function pagelayer_user_can_edit($post = NULL){
|
437 |
|
@@ -530,7 +550,14 @@ function pagelayer_memory_limit($mb){
|
|
530 |
function pagelayer_load_shortcodes(){
|
531 |
global $pagelayer;
|
532 |
|
|
|
|
|
|
|
|
|
533 |
pagelayer_memory_limit(128);
|
|
|
|
|
|
|
534 |
|
535 |
include_once(PAGELAYER_DIR.'/main/shortcode_functions.php');
|
536 |
if(defined('PAGELAYER_PREMIUM')){
|
@@ -550,8 +577,10 @@ function pagelayer_load_shortcodes(){
|
|
550 |
|
551 |
// Apply filter to load custom widgets
|
552 |
do_action('pagelayer_load_custom_widgets');
|
|
|
|
|
553 |
if(defined('PAGELAYER_PREMIUM')){
|
554 |
-
|
555 |
// Get global widget templates id by type
|
556 |
$args = [
|
557 |
'post_type' => $pagelayer->builder['name'],
|
@@ -682,6 +711,23 @@ function pagelayer_add_shortcode($tag, $params = array()){
|
|
682 |
|
683 |
}
|
684 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
// Returns the Image values
|
686 |
function pagelayer_image($id){
|
687 |
|
@@ -1319,8 +1365,8 @@ function pagelayer_posts($params, $args = []){
|
|
1319 |
<div class="pagelayer-wposts-featured">';
|
1320 |
$data .= '<a href="'. get_the_permalink() .'">';
|
1321 |
|
1322 |
-
if(!empty($params['show_thumb'])
|
1323 |
-
$data .= '<div class="pagelayer-wposts-thumb"
|
1324 |
}
|
1325 |
/* if($params['show_thumb'] && has_post_thumbnail( $postsquery->ID )){
|
1326 |
$data .= get_the_post_thumbnail_url($postsquery->ID,$params['thumb_size']);
|
@@ -1335,22 +1381,28 @@ function pagelayer_posts($params, $args = []){
|
|
1335 |
$data .= '<div class="pagelayer-wposts-meta">';
|
1336 |
$sep = '';
|
1337 |
if(!empty($params['meta_sep'])){
|
1338 |
-
$sep = '<b class="pagelayer-wposts-sep">'.$params['meta_sep'].'</b>';
|
1339 |
}
|
1340 |
if(!empty($params['author'])){
|
1341 |
$data .= '<span class="pagelayer-wposts-author">By <a class="pagelayer-wposts-author-url" href="'.esc_url(get_author_posts_url(get_the_author_meta('ID'))).'">'.esc_html(get_the_author()).'</a></span>'.$sep;
|
1342 |
}
|
1343 |
if(!empty($params['date'])){
|
1344 |
-
$data .= '<span class="pagelayer-wposts-date"><time class="pagelayer-wposts-entry-date published updated" datetime="'.get_the_date('c').'"><span class="date-d">'.get_the_date('j').'</span
|
1345 |
}
|
|
|
1346 |
if(!empty($params['category'])){
|
1347 |
$category = get_the_category();
|
1348 |
$singlecategory = '';
|
1349 |
foreach( $category as $cat ){
|
1350 |
$singlecategory .= '<a href="' . get_tag_link( $cat->term_id ) . '">'. $cat->name .'</a>';
|
1351 |
}
|
1352 |
-
|
|
|
|
|
|
|
|
|
1353 |
}
|
|
|
1354 |
if(!empty($params['tags'])){
|
1355 |
$tags = get_the_tags();
|
1356 |
$singletag = '';
|
@@ -1365,7 +1417,7 @@ function pagelayer_posts($params, $args = []){
|
|
1365 |
|
1366 |
}
|
1367 |
if(!empty($params['comments'])){
|
1368 |
-
$data .= '<span class="pagelayer-wposts-comments"><
|
1369 |
}
|
1370 |
|
1371 |
$data .= '</div>';
|
@@ -1701,6 +1753,9 @@ function pagelayer_export_content($content){
|
|
1701 |
|
1702 |
$content = preg_replace('/http(s?):\/\/'.preg_quote($theme_url, '/').'/is', '{{theme_url}}', $content);
|
1703 |
|
|
|
|
|
|
|
1704 |
// Apply a filter
|
1705 |
$content = apply_filters('pagelayer_export_content', $content);
|
1706 |
|
@@ -1708,6 +1763,80 @@ function pagelayer_export_content($content){
|
|
1708 |
|
1709 |
}
|
1710 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1711 |
// Insert a post which is a Pagelayer Post
|
1712 |
function pagelayer_insert_content($post, &$ret){
|
1713 |
|
432 |
|
433 |
}
|
434 |
|
435 |
+
// Are we editing a live template
|
436 |
+
function pagelayer_is_live_template($post = []){
|
437 |
+
|
438 |
+
// Are we seeing the post ?
|
439 |
+
if(!pagelayer_is_live()){
|
440 |
+
return false;
|
441 |
+
}
|
442 |
+
|
443 |
+
if(!$post){
|
444 |
+
$post = $GLOBALS['post'];
|
445 |
+
}
|
446 |
+
|
447 |
+
if($post->post_type == 'pagelayer-template'){
|
448 |
+
return true;
|
449 |
+
}
|
450 |
+
|
451 |
+
return false;
|
452 |
+
|
453 |
+
}
|
454 |
+
|
455 |
// Can the current user edit the post ?
|
456 |
function pagelayer_user_can_edit($post = NULL){
|
457 |
|
550 |
function pagelayer_load_shortcodes(){
|
551 |
global $pagelayer;
|
552 |
|
553 |
+
if(!empty($pagelayer->shortcode_loaded)){
|
554 |
+
return;
|
555 |
+
}
|
556 |
+
|
557 |
pagelayer_memory_limit(128);
|
558 |
+
|
559 |
+
// We have loaded
|
560 |
+
$pagelayer->shortcode_loaded = 1;
|
561 |
|
562 |
include_once(PAGELAYER_DIR.'/main/shortcode_functions.php');
|
563 |
if(defined('PAGELAYER_PREMIUM')){
|
577 |
|
578 |
// Apply filter to load custom widgets
|
579 |
do_action('pagelayer_load_custom_widgets');
|
580 |
+
|
581 |
+
// Add global widget data
|
582 |
if(defined('PAGELAYER_PREMIUM')){
|
583 |
+
|
584 |
// Get global widget templates id by type
|
585 |
$args = [
|
586 |
'post_type' => $pagelayer->builder['name'],
|
711 |
|
712 |
}
|
713 |
|
714 |
+
// Returns the permalink values
|
715 |
+
function pagelayer_permalink($id){
|
716 |
+
|
717 |
+
if(is_numeric($id)){
|
718 |
+
$id = (int) @$id;
|
719 |
+
$perma = get_permalink($id);
|
720 |
+
|
721 |
+
if(!empty($perma)){
|
722 |
+
$id = $perma;
|
723 |
+
}
|
724 |
+
}
|
725 |
+
|
726 |
+
$id = apply_filters('pagelayer_permalink', $id);
|
727 |
+
|
728 |
+
return $id;
|
729 |
+
}
|
730 |
+
|
731 |
// Returns the Image values
|
732 |
function pagelayer_image($id){
|
733 |
|
1365 |
<div class="pagelayer-wposts-featured">';
|
1366 |
$data .= '<a href="'. get_the_permalink() .'">';
|
1367 |
|
1368 |
+
if(!empty($params['show_thumb'])){
|
1369 |
+
$data .= '<div class="pagelayer-wposts-thumb" style="background:url('.(has_post_thumbnail($postsquery->ID) ? get_the_post_thumbnail_url($postsquery->ID, $params['thumb_size']) : PAGELAYER_URL.'/images/no_screenshot.png').')"></div>';
|
1370 |
}
|
1371 |
/* if($params['show_thumb'] && has_post_thumbnail( $postsquery->ID )){
|
1372 |
$data .= get_the_post_thumbnail_url($postsquery->ID,$params['thumb_size']);
|
1381 |
$data .= '<div class="pagelayer-wposts-meta">';
|
1382 |
$sep = '';
|
1383 |
if(!empty($params['meta_sep'])){
|
1384 |
+
$sep = ' <b class="pagelayer-wposts-sep">'.$params['meta_sep'].'</b> ';
|
1385 |
}
|
1386 |
if(!empty($params['author'])){
|
1387 |
$data .= '<span class="pagelayer-wposts-author">By <a class="pagelayer-wposts-author-url" href="'.esc_url(get_author_posts_url(get_the_author_meta('ID'))).'">'.esc_html(get_the_author()).'</a></span>'.$sep;
|
1388 |
}
|
1389 |
if(!empty($params['date'])){
|
1390 |
+
$data .= '<span class="pagelayer-wposts-date"><time class="pagelayer-wposts-entry-date published updated" datetime="'.get_the_date('c').'"><span class="date-d">'.get_the_date('j').'</span> <span class="date-my">'.get_the_date('M, y').'</span></time></span>'.$sep;
|
1391 |
}
|
1392 |
+
|
1393 |
if(!empty($params['category'])){
|
1394 |
$category = get_the_category();
|
1395 |
$singlecategory = '';
|
1396 |
foreach( $category as $cat ){
|
1397 |
$singlecategory .= '<a href="' . get_tag_link( $cat->term_id ) . '">'. $cat->name .'</a>';
|
1398 |
}
|
1399 |
+
|
1400 |
+
if(!empty($singlecategory)){
|
1401 |
+
$data .= '<span class="pagelayer-wposts-category">' . $singlecategory . '</span>'.$sep;
|
1402 |
+
}
|
1403 |
+
|
1404 |
}
|
1405 |
+
|
1406 |
if(!empty($params['tags'])){
|
1407 |
$tags = get_the_tags();
|
1408 |
$singletag = '';
|
1417 |
|
1418 |
}
|
1419 |
if(!empty($params['comments'])){
|
1420 |
+
$data .= '<span class="pagelayer-wposts-comments"><a href="' . esc_url( get_permalink() ) . '">' . esc_html(get_comments_number()).' '.__pl('comments').'</a></span>'.$sep;
|
1421 |
}
|
1422 |
|
1423 |
$data .= '</div>';
|
1753 |
|
1754 |
$content = preg_replace('/http(s?):\/\/'.preg_quote($theme_url, '/').'/is', '{{theme_url}}', $content);
|
1755 |
|
1756 |
+
// Export the media as well
|
1757 |
+
$content = pagelayer_export_media($content);
|
1758 |
+
|
1759 |
// Apply a filter
|
1760 |
$content = apply_filters('pagelayer_export_content', $content);
|
1761 |
|
1763 |
|
1764 |
}
|
1765 |
|
1766 |
+
function pagelayer_export_media($content){
|
1767 |
+
|
1768 |
+
global $pagelayer;
|
1769 |
+
|
1770 |
+
$theme_dir = get_stylesheet_directory();
|
1771 |
+
$image_dir = $theme_dir.'/images/';
|
1772 |
+
|
1773 |
+
// Loop thru all shortcodes
|
1774 |
+
foreach($pagelayer->shortcodes as $tag => $vvv){
|
1775 |
+
|
1776 |
+
// Lets create the CSS, Classes, Attr. Also clean the dependent atts
|
1777 |
+
foreach($pagelayer->tabs as $tab){
|
1778 |
+
|
1779 |
+
if(empty($pagelayer->shortcodes[$tag][$tab])){
|
1780 |
+
continue;
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
foreach($pagelayer->shortcodes[$tag][$tab] as $section => $Lsection){
|
1784 |
+
|
1785 |
+
$props = empty($pagelayer->shortcodes[$tag][$section]) ? @$pagelayer->styles[$section] : @$pagelayer->shortcodes[$tag][$section];
|
1786 |
+
|
1787 |
+
//echo $tab.' - '.$section.' - <br>';
|
1788 |
+
|
1789 |
+
if(empty($props)){
|
1790 |
+
continue;
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
// Loop all props
|
1794 |
+
foreach($props as $prop => $param){
|
1795 |
+
|
1796 |
+
// Load any attachment values
|
1797 |
+
if(!in_array($param['type'], ['image', 'video', 'audio', 'media'])){
|
1798 |
+
continue;
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
$pattern = '/\['.$tag.'([^\]]*)'.$prop.'="(\d*)"([^\]]*)\]/is';
|
1802 |
+
|
1803 |
+
// Is there a match ?
|
1804 |
+
if(!preg_match($pattern, $content, $matches)){
|
1805 |
+
continue;
|
1806 |
+
}
|
1807 |
+
|
1808 |
+
//pagelayer_print($matches);die();
|
1809 |
+
|
1810 |
+
// Get the file path
|
1811 |
+
$file = get_attached_file($matches[2]);
|
1812 |
+
|
1813 |
+
if(empty($file) || !file_exists($file)){
|
1814 |
+
continue;
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
// Replace the text
|
1818 |
+
$content = str_replace($matches[0], '['.$tag.$matches[1].$prop.'="{{theme_url}}/images/'.basename($file).'"'.$matches[3].']', $content);
|
1819 |
+
|
1820 |
+
//echo $content;
|
1821 |
+
|
1822 |
+
// Copy the file
|
1823 |
+
copy($file, $image_dir.basename($file));
|
1824 |
+
|
1825 |
+
//pagelayer_print($file);
|
1826 |
+
//die();
|
1827 |
+
|
1828 |
+
}
|
1829 |
+
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
return $content;
|
1837 |
+
|
1838 |
+
}
|
1839 |
+
|
1840 |
// Insert a post which is a Pagelayer Post
|
1841 |
function pagelayer_insert_content($post, &$ret){
|
1842 |
|
@@ -596,6 +596,10 @@ function pagelayer_create_header_menu(){
|
|
596 |
// Insert the Menu
|
597 |
$menu_id = wp_create_nav_menu($menu_name);
|
598 |
|
|
|
|
|
|
|
|
|
599 |
return $menu_id;
|
600 |
|
601 |
}
|
596 |
// Insert the Menu
|
597 |
$menu_id = wp_create_nav_menu($menu_name);
|
598 |
|
599 |
+
if(!is_int($menu_id)){
|
600 |
+
return false;
|
601 |
+
}
|
602 |
+
|
603 |
return $menu_id;
|
604 |
|
605 |
}
|
@@ -35,6 +35,10 @@ function pagelayer_license(){
|
|
35 |
pagelayer_install_pro();
|
36 |
return;
|
37 |
}
|
|
|
|
|
|
|
|
|
38 |
|
39 |
// Is there a license key ?
|
40 |
if(isset($_POST['save_pl_license'])){
|
@@ -88,10 +92,6 @@ function pagelayer_license_T(){
|
|
88 |
global $pagelayer, $pl_error;
|
89 |
|
90 |
pagelayer_page_header('Pagelayer License');
|
91 |
-
|
92 |
-
if(isset($_REQUEST['save_pl_license'])){
|
93 |
-
check_admin_referer('pagelayer-options');
|
94 |
-
}
|
95 |
|
96 |
// Saved ?
|
97 |
if(!empty($GLOBALS['pl_saved'])){
|
@@ -117,7 +117,7 @@ function pagelayer_license_T(){
|
|
117 |
<div class="postbox">
|
118 |
|
119 |
<button class="handlediv button-link" aria-expanded="true" type="button">
|
120 |
-
<span class="screen-reader-text"
|
121 |
<span class="toggle-indicator" aria-hidden="true"></span>
|
122 |
</button>
|
123 |
|
@@ -197,27 +197,4 @@ function pagelayer_license_T(){
|
|
197 |
|
198 |
pagelayer_page_footer();
|
199 |
|
200 |
-
}
|
201 |
-
|
202 |
-
// The Pagelayer Admin Dashbaoard
|
203 |
-
function pagelayer_dashboard_T(){
|
204 |
-
|
205 |
-
global $pl_error;
|
206 |
-
|
207 |
-
pagelayer_page_header('Pagelayer License');
|
208 |
-
|
209 |
-
echo '<script src="'.PAGELAYER_API.(defined('PAGELAYER_PREMIUM') ? 'news_pro.js' : 'news.js').'"></script><br>';
|
210 |
-
|
211 |
-
// Saved ?
|
212 |
-
if(!empty($GLOBALS['pl_saved'])){
|
213 |
-
echo '<div id="message" class="updated"><p>'. __('The settings were saved successfully', 'pagelayer'). '</p></div><br />';
|
214 |
-
}
|
215 |
-
|
216 |
-
// Any errors ?
|
217 |
-
if(!empty($pl_error)){
|
218 |
-
pagelayer_report_error($pl_error);echo '<br />';
|
219 |
-
}
|
220 |
-
|
221 |
-
pagelayer_page_footer();
|
222 |
-
|
223 |
}
|
35 |
pagelayer_install_pro();
|
36 |
return;
|
37 |
}
|
38 |
+
|
39 |
+
if(isset($_REQUEST['save_pl_license'])){
|
40 |
+
check_admin_referer('pagelayer-options');
|
41 |
+
}
|
42 |
|
43 |
// Is there a license key ?
|
44 |
if(isset($_POST['save_pl_license'])){
|
92 |
global $pagelayer, $pl_error;
|
93 |
|
94 |
pagelayer_page_header('Pagelayer License');
|
|
|
|
|
|
|
|
|
95 |
|
96 |
// Saved ?
|
97 |
if(!empty($GLOBALS['pl_saved'])){
|
117 |
<div class="postbox">
|
118 |
|
119 |
<button class="handlediv button-link" aria-expanded="true" type="button">
|
120 |
+
<span class="screen-reader-text"><?php _e('Toggle panel: System Information');?></span>
|
121 |
<span class="toggle-indicator" aria-hidden="true"></span>
|
122 |
</button>
|
123 |
|
197 |
|
198 |
pagelayer_page_footer();
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
}
|
@@ -115,6 +115,7 @@ pagelayer_api_url = "'.PAGELAYER_API.'";
|
|
115 |
pagelayer_ajax_url = "'.admin_url( 'admin-ajax.php' ).'?&";
|
116 |
pagelayer_ajax_nonce = "'.wp_create_nonce('pagelayer_ajax').'";
|
117 |
pagelayer_media_ajax_nonce = "'.wp_create_nonce('media-form').'";
|
|
|
118 |
pagelayer_preview_nonce = "'. wp_create_nonce( 'post_preview_' . $post->ID ).'";
|
119 |
pagelayer_url = "'.PAGELAYER_URL.'";
|
120 |
pagelayer_postID = "'.$post->ID.'";
|
@@ -129,7 +130,6 @@ pagelayer_site_logo = '.json_encode(pagelayer_site_logo()).';
|
|
129 |
pagelayer_support_FI = "'. ( current_theme_supports('post-thumbnails') ) .'";
|
130 |
pagelayer_editable = ".'.(!empty($pagelayer->template_editor) ? $pagelayer->template_editor : 'pagelayer-editable-area').'";
|
131 |
pagelayer_recaptch_site_key = "'.(!empty($pagelayer_recaptch_site_key) ? $pagelayer_recaptch_site_key : '').'";
|
132 |
-
pagelayer_wp_query = '. json_encode($wp_query->query_vars) .';
|
133 |
pagelayer_post = '. @json_encode($_post) .';
|
134 |
pagelayer_loaded_icons = '.json_encode(pagelayer_enabled_icons()).';
|
135 |
pagelayer_social_urls = '.json_encode(pagelayer_get_social_urls()).';
|
115 |
pagelayer_ajax_url = "'.admin_url( 'admin-ajax.php' ).'?&";
|
116 |
pagelayer_ajax_nonce = "'.wp_create_nonce('pagelayer_ajax').'";
|
117 |
pagelayer_media_ajax_nonce = "'.wp_create_nonce('media-form').'";
|
118 |
+
pagelayer_internal_linking_nonce = "'.wp_create_nonce('internal-linking').'";
|
119 |
pagelayer_preview_nonce = "'. wp_create_nonce( 'post_preview_' . $post->ID ).'";
|
120 |
pagelayer_url = "'.PAGELAYER_URL.'";
|
121 |
pagelayer_postID = "'.$post->ID.'";
|
130 |
pagelayer_support_FI = "'. ( current_theme_supports('post-thumbnails') ) .'";
|
131 |
pagelayer_editable = ".'.(!empty($pagelayer->template_editor) ? $pagelayer->template_editor : 'pagelayer-editable-area').'";
|
132 |
pagelayer_recaptch_site_key = "'.(!empty($pagelayer_recaptch_site_key) ? $pagelayer_recaptch_site_key : '').'";
|
|
|
133 |
pagelayer_post = '. @json_encode($_post) .';
|
134 |
pagelayer_loaded_icons = '.json_encode(pagelayer_enabled_icons()).';
|
135 |
pagelayer_social_urls = '.json_encode(pagelayer_get_social_urls()).';
|
@@ -121,7 +121,7 @@ function pagelayer_page_footer(){
|
|
121 |
</table>
|
122 |
<br />';
|
123 |
|
124 |
-
if(
|
125 |
|
126 |
echo '<div style="width:45%;background:#FFF;padding:15px; margin:auto">
|
127 |
<b>Let your followers know that you use Pagelayer to build your website :</b>
|
@@ -202,50 +202,6 @@ function pagelayer_settings_page(){
|
|
202 |
update_option('pagelayer_icons_set', $pagelayer_icons_set);
|
203 |
}
|
204 |
|
205 |
-
|
206 |
-
if(isset($_REQUEST['pagelayer_content_width'])){
|
207 |
-
|
208 |
-
$content_width = $_REQUEST['pagelayer_content_width'];
|
209 |
-
|
210 |
-
// Update it
|
211 |
-
update_option( 'pagelayer_content_width', $content_width );
|
212 |
-
}
|
213 |
-
|
214 |
-
// Tablet breakpoint
|
215 |
-
if(isset($_REQUEST['pagelayer_tablet_breakpoint'])){
|
216 |
-
|
217 |
-
$tablet_breakpoint = $_REQUEST['pagelayer_tablet_breakpoint'];
|
218 |
-
|
219 |
-
update_option( 'pagelayer_tablet_breakpoint', $tablet_breakpoint );
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
// Mobile breakpoint
|
225 |
-
if(isset($_REQUEST['pagelayer_mobile_breakpoint'])){
|
226 |
-
|
227 |
-
$tablet_breakpoint = $_REQUEST['pagelayer_mobile_breakpoint'];
|
228 |
-
|
229 |
-
update_option( 'pagelayer_mobile_breakpoint', $tablet_breakpoint );
|
230 |
-
}
|
231 |
-
|
232 |
-
|
233 |
-
if(isset($_REQUEST['pagelayer_between_widgets'])){
|
234 |
-
|
235 |
-
$space_widgets = $_REQUEST['pagelayer_between_widgets'];
|
236 |
-
|
237 |
-
update_option( 'pagelayer_between_widgets', $space_widgets );
|
238 |
-
}
|
239 |
-
|
240 |
-
|
241 |
-
if(isset($_REQUEST['pagelayer_body_font'])){
|
242 |
-
|
243 |
-
$body_font = $_REQUEST['pagelayer_body_font'];
|
244 |
-
|
245 |
-
update_option( 'pagelayer_body_font', $body_font );
|
246 |
-
|
247 |
-
}
|
248 |
-
|
249 |
$socials = ['pagelayer-facebook-url','pagelayer-twitter-url','pagelayer-instagram-url','pagelayer-linkedin-url','pagelayer-youtube-url','pagelayer-gplus-url','pagelayer-copyright','pagelayer-phone','pagelayer-address'];
|
250 |
|
251 |
foreach( $socials as $social ){
|
@@ -344,16 +300,6 @@ function pagelayer_settings_page(){
|
|
344 |
// Save it
|
345 |
update_option( 'pagelayer-fbapp-id', $fb_app_id );
|
346 |
}
|
347 |
-
|
348 |
-
// Save Header code
|
349 |
-
if(isset($_REQUEST['pagelayer_header_code'])){
|
350 |
-
update_option( 'pagelayer_header_code', wp_unslash($_REQUEST['pagelayer_header_code'] ));
|
351 |
-
}
|
352 |
-
|
353 |
-
// Save Footyer code
|
354 |
-
if(isset($_REQUEST['pagelayer_footer_code'])){
|
355 |
-
update_option( 'pagelayer_footer_code', wp_unslash($_REQUEST['pagelayer_footer_code'] ));
|
356 |
-
}
|
357 |
}
|
358 |
|
359 |
// reCAPTCHA Langs
|
@@ -436,23 +382,31 @@ function pagelayer_settings_page(){
|
|
436 |
<?php wp_nonce_field('pagelayer-options'); ?>
|
437 |
<div class="tabs-wrapper">
|
438 |
<h2 class="nav-tab-wrapper pagelayer-wrapper">
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
|
|
|
|
|
|
443 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
444 |
-
<a href="#integration" class="nav-tab"
|
445 |
-
<a href="#contactform" class="nav-tab "
|
446 |
-
<a href="#captcha" class="nav-tab "
|
447 |
-
<?php
|
448 |
-
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
450 |
</h2>
|
451 |
|
452 |
<div class="pagelayer-tab-panel" id="general">
|
453 |
<table>
|
454 |
<tr>
|
455 |
-
<th scope="row"
|
456 |
<td>
|
457 |
<label>
|
458 |
<?php
|
@@ -465,81 +419,10 @@ function pagelayer_settings_page(){
|
|
465 |
</tr>
|
466 |
</table>
|
467 |
</div>
|
468 |
-
<div class="pagelayer-tab-panel" id="settings">
|
469 |
-
<table>
|
470 |
-
<tr>
|
471 |
-
<th><?php echo __('Content Width') ?></th>
|
472 |
-
<td>
|
473 |
-
<input name="pagelayer_content_width" type="number" step="1" min="320" max="5000" placeholder="1170" <?php if(get_option('pagelayer_content_width')){
|
474 |
-
echo 'value="'.get_option('pagelayer_content_width').'"';
|
475 |
-
}?>>
|
476 |
-
<p><?php echo __('Set the custom width of the content area. The default width set is 1170px.') ?></p>
|
477 |
-
</td>
|
478 |
-
<tr>
|
479 |
-
<tr>
|
480 |
-
<th><?php echo __('Space Between Widgets') ?></th>
|
481 |
-
<td>
|
482 |
-
<input name="pagelayer_between_widgets" type="number" step="1" min="0" max="500" placeholder="15" <?php if(get_option('pagelayer_between_widgets')){
|
483 |
-
echo 'value="'.get_option('pagelayer_between_widgets').'"';
|
484 |
-
}?>>
|
485 |
-
<p><?php echo __('Set the Space Between Widgets. The default Space set is 15px.') ?></p>
|
486 |
-
</td>
|
487 |
-
<tr>
|
488 |
-
<tr>
|
489 |
-
<th><?php echo __('Body Font') ?></th>
|
490 |
-
<td>
|
491 |
-
<input name="pagelayer_body_font" type="text" placeholder="Open Sans" <?php if(get_option('pagelayer_body_font')){
|
492 |
-
echo 'value="'.get_option('pagelayer_body_font').'"';
|
493 |
-
}?>>
|
494 |
-
<p><?php echo __('Please give font name as it appears on Google fonts site. You can check all google fonts here: <a href="https://fonts.google.com" target="_blank">https://fonts.google.com</a>.') ?></p>
|
495 |
-
</td>
|
496 |
-
<tr>
|
497 |
-
<tr>
|
498 |
-
<th><?php echo __('Tablet Breakpoint') ?></th>
|
499 |
-
<td>
|
500 |
-
<input name="pagelayer_tablet_breakpoint" type="number" step="1" min="320" max="5000" placeholder="768" <?php if(get_option('pagelayer_tablet_breakpoint')){
|
501 |
-
echo 'value="'.get_option('pagelayer_tablet_breakpoint').'"';
|
502 |
-
}?>>
|
503 |
-
<p><?php echo __('Set the breakpoint for tablet devices. The default breakpoint for tablet layout is 768px.') ?></p>
|
504 |
-
</td>
|
505 |
-
</tr>
|
506 |
-
<tr>
|
507 |
-
<th><?php echo __('Mobile Breakpoint') ?></th>
|
508 |
-
<td>
|
509 |
-
<input name="pagelayer_mobile_breakpoint" type="number" step="1" min="320" max="5000" placeholder="360" <?php if(get_option('pagelayer_mobile_breakpoint')){
|
510 |
-
echo 'value="'.get_option('pagelayer_mobile_breakpoint').'"';
|
511 |
-
}?>>
|
512 |
-
<p><?php echo __('Set the breakpoint for mobile devices. The default breakpoint for mobile layout is 360px.') ?></p>
|
513 |
-
</td>
|
514 |
-
</tr>
|
515 |
-
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
516 |
-
<tr>
|
517 |
-
<td colspan="2">
|
518 |
-
<b><?php echo __('Header and Footer code :');?></b>
|
519 |
-
<p><?php echo __('You can add custom code like HTML, JavaScript, CSS etc. which will be inserted throughout your site.');?></p>
|
520 |
-
</td>
|
521 |
-
</tr>
|
522 |
-
<tr>
|
523 |
-
<th><?php echo __('Header Code : ');?></th>
|
524 |
-
<td>
|
525 |
-
<textarea name="pagelayer_header_code" style="width:80%;" rows="6"><?php echo get_option( 'pagelayer_header_code' ); ?></textarea>
|
526 |
-
<p> <?php echo __('These Code will be printed in <code><head></code> Section.') ?> </p>
|
527 |
-
</td>
|
528 |
-
</tr>
|
529 |
-
<tr>
|
530 |
-
<th><?php echo __('Footer Code: ');?></th>
|
531 |
-
<td>
|
532 |
-
<textarea name="pagelayer_footer_code" style="width:80%;" rows="6"><?php echo get_option( 'pagelayer_footer_code' ); ?></textarea>
|
533 |
-
<p> <?php echo __('These Code will be printed before closing the <code></body></code> Section.') ?> </p>
|
534 |
-
</td>
|
535 |
-
</tr>
|
536 |
-
<?php } ?>
|
537 |
-
</table>
|
538 |
-
</div>
|
539 |
<div class="pagelayer-tab-panel" id="icons">
|
540 |
<table>
|
541 |
<tr>
|
542 |
-
<th scope="row"
|
543 |
<td>
|
544 |
<label>
|
545 |
<input type="checkbox" name="pagelayer_icons_set[]" value="font-awesome5" <?php if(in_array('font-awesome5',get_option( 'pagelayer_icons_set')) || !get_option( 'pagelayer_icons_set')){echo ' checked';}?> />font-awesome5</br>
|
@@ -552,23 +435,23 @@ function pagelayer_settings_page(){
|
|
552 |
<div class="pagelayer-settings-info" style="display:flex;">
|
553 |
<div style="flex:1">
|
554 |
<div class="pagelayer-title">
|
555 |
-
<h2
|
556 |
</div>
|
557 |
<table>
|
558 |
<tr>
|
559 |
-
<th
|
560 |
<td><textarea name="pagelayer-address"><?php echo pagelayer_get_option('pagelayer-address');?></textarea></td>
|
561 |
</tr>
|
562 |
<tr>
|
563 |
-
<th
|
564 |
<td><input type="tel" name="pagelayer-phone" <?php echo 'value="'.pagelayer_get_option('pagelayer-phone').'"';?> /></td>
|
565 |
</tr>
|
566 |
|
567 |
<tr>
|
568 |
-
<th scope="row"
|
569 |
<td>
|
570 |
<?php if(defined('PAGELAYER_PREMIUM')){
|
571 |
-
echo '<p>You can change your contact email<br> from the Contact Form Settings
|
572 |
}else{
|
573 |
?>
|
574 |
<label>
|
@@ -583,11 +466,11 @@ function pagelayer_settings_page(){
|
|
583 |
</table>
|
584 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
585 |
<div class="pagelayer-title">
|
586 |
-
<h2
|
587 |
</div>
|
588 |
<table>
|
589 |
<tr>
|
590 |
-
<th
|
591 |
<td><textarea name="pagelayer-copyright"><?php echo pagelayer_get_option('pagelayer-copyright'); ?></textarea></td>
|
592 |
</tr>
|
593 |
</table>
|
@@ -596,31 +479,31 @@ function pagelayer_settings_page(){
|
|
596 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
597 |
<div style="flex:1">
|
598 |
<div class="pagelayer-title">
|
599 |
-
<h2
|
600 |
</div>
|
601 |
<table>
|
602 |
<tr>
|
603 |
-
<th
|
604 |
<td><input type="text" name="pagelayer-facebook-url" <?php echo 'value="'.get_option('pagelayer-facebook-url').'"';?>/></td>
|
605 |
</tr>
|
606 |
<tr>
|
607 |
-
<th
|
608 |
<td><input type="text" name="pagelayer-twitter-url" <?php echo 'value="'.get_option('pagelayer-twitter-url').'"';?>/></td>
|
609 |
</tr>
|
610 |
<tr>
|
611 |
-
<th
|
612 |
<td><input type="text" name="pagelayer-instagram-url" <?php echo 'value="'.get_option('pagelayer-instagram-url').'"'; ?>/></td>
|
613 |
</tr>
|
614 |
<tr>
|
615 |
-
<th
|
616 |
<td><input type="text" name="pagelayer-linkedin-url" <?php echo 'value="'.get_option('pagelayer-linkedin-url').'"'; ?>/></td>
|
617 |
</tr>
|
618 |
<tr>
|
619 |
-
<th
|
620 |
<td><input type="text" name="pagelayer-youtube-url" <?php echo 'value="'.get_option('pagelayer-youtube-url').'"'; ?>/></td>
|
621 |
</tr>
|
622 |
<tr>
|
623 |
-
<th
|
624 |
<td><input type="text" name="pagelayer-gplus-url" <?php echo 'value="'.get_option('pagelayer-gplus-url').'"'; ?>/></td>
|
625 |
</tr>
|
626 |
</table>
|
@@ -631,11 +514,11 @@ function pagelayer_settings_page(){
|
|
631 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
632 |
<div class="pagelayer-tab-panel" id="integration">
|
633 |
<div class="pagelayer-title">
|
634 |
-
<h2
|
635 |
</div>
|
636 |
<table>
|
637 |
<tr>
|
638 |
-
<th
|
639 |
<td><input type="text" name="pagelayer-fbapp-id" class="pagelayer-app-id" <?php if(get_option('pagelayer-fbapp-id')){
|
640 |
echo 'value="'.get_option('pagelayer-fbapp-id').'"';
|
641 |
}?>/></td>
|
@@ -646,11 +529,11 @@ function pagelayer_settings_page(){
|
|
646 |
<table>
|
647 |
<tr>
|
648 |
<td colspan="2" style="align:middle;">
|
649 |
-
<p
|
650 |
</td>
|
651 |
</tr>
|
652 |
<tr>
|
653 |
-
<th scope="row"
|
654 |
<td>
|
655 |
<label>
|
656 |
<input name="pagelayer_cf_to_email" type="email" placeholder="email@domain.com" <?php if(get_option('pagelayer_cf_to_email')){
|
@@ -660,7 +543,7 @@ function pagelayer_settings_page(){
|
|
660 |
</td>
|
661 |
</tr>
|
662 |
<tr>
|
663 |
-
<th scope="row"
|
664 |
<td>
|
665 |
<label>
|
666 |
<input name="pagelayer_cf_from_email" type="text" placeholder="My Site <email@domain.com>" <?php
|
@@ -671,7 +554,7 @@ function pagelayer_settings_page(){
|
|
671 |
</td>
|
672 |
</tr>
|
673 |
<tr>
|
674 |
-
<th scope="row"
|
675 |
<td>
|
676 |
<label>
|
677 |
<input name="pagelayer_cf_subject" type="text" placeholder="Subject" <?php if(get_option('pagelayer_cf_subject')){
|
@@ -681,7 +564,7 @@ function pagelayer_settings_page(){
|
|
681 |
</td>
|
682 |
</tr>
|
683 |
<tr>
|
684 |
-
<th scope="row"
|
685 |
<td>
|
686 |
<label>
|
687 |
<textarea rows="3" name="pagelayer_cf_headers"><?php
|
@@ -692,10 +575,10 @@ function pagelayer_settings_page(){
|
|
692 |
</td>
|
693 |
</tr>
|
694 |
<tr>
|
695 |
-
<td colspan="2"><b
|
696 |
</tr>
|
697 |
<tr>
|
698 |
-
<th scope="row"
|
699 |
<td>
|
700 |
<label>
|
701 |
<input name="pagelayer_cf_success" type="text" placeholder="Success" <?php if(get_option('pagelayer_cf_success')){
|
@@ -705,7 +588,7 @@ function pagelayer_settings_page(){
|
|
705 |
</td>
|
706 |
</tr>
|
707 |
<tr>
|
708 |
-
<th scope="row"
|
709 |
<td>
|
710 |
<label>
|
711 |
<input name="pagelayer_cf_failed" type="text" placeholder="Failed" <?php if(get_option('pagelayer_cf_failed')){
|
@@ -715,7 +598,7 @@ function pagelayer_settings_page(){
|
|
715 |
</td>
|
716 |
</tr>
|
717 |
<tr>
|
718 |
-
<th scope="row"
|
719 |
<td>
|
720 |
<label>
|
721 |
<input name="pagelayer_recaptcha_failed" type="text" placeholder="The CAPTCHA verification failed. Please try again." <?php
|
@@ -729,7 +612,7 @@ function pagelayer_settings_page(){
|
|
729 |
<div class="pagelayer-tab-panel" id="captcha">
|
730 |
<table>
|
731 |
<tr>
|
732 |
-
<th scope="row"
|
733 |
<td>
|
734 |
<label>
|
735 |
<input name="pagelayer_google_captcha" type="text" placeholder="Site key" <?php if(get_option('pagelayer_google_captcha')){
|
@@ -739,7 +622,7 @@ function pagelayer_settings_page(){
|
|
739 |
</td>
|
740 |
</tr>
|
741 |
<tr>
|
742 |
-
<th scope="row"
|
743 |
<td>
|
744 |
<label>
|
745 |
<input name="pagelayer_google_captcha_secret" type="text" placeholder="Secret key" <?php if(get_option('pagelayer_google_captcha_secret')){
|
@@ -749,7 +632,7 @@ function pagelayer_settings_page(){
|
|
749 |
</td>
|
750 |
</tr>
|
751 |
<tr>
|
752 |
-
<th scope="row"
|
753 |
<td>
|
754 |
<label>
|
755 |
<select name="pagelayer_google_captcha_lang">
|
@@ -766,20 +649,20 @@ function pagelayer_settings_page(){
|
|
766 |
</div>
|
767 |
<?php } ?>
|
768 |
<div class="pagelayer-tab-panel" id="support">
|
769 |
-
<h2
|
770 |
-
<h3
|
771 |
</div>
|
772 |
<div class="pagelayer-tab-panel" id="faq">
|
773 |
-
<h2
|
774 |
<div class="pagelayer-acc-wrapper">
|
775 |
-
<span class="nav-tab pagelayer-acc-tab"
|
776 |
<div class="pagelayer-acc-panel">
|
777 |
-
<p
|
778 |
</div>
|
779 |
|
780 |
-
<span class="nav-tab pagelayer-acc-tab"
|
781 |
<div class="pagelayer-acc-panel">
|
782 |
-
<p
|
783 |
</div>
|
784 |
</div>
|
785 |
</div>
|
121 |
</table>
|
122 |
<br />';
|
123 |
|
124 |
+
if(!defined('SITEPAD')){
|
125 |
|
126 |
echo '<div style="width:45%;background:#FFF;padding:15px; margin:auto">
|
127 |
<b>Let your followers know that you use Pagelayer to build your website :</b>
|
202 |
update_option('pagelayer_icons_set', $pagelayer_icons_set);
|
203 |
}
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
$socials = ['pagelayer-facebook-url','pagelayer-twitter-url','pagelayer-instagram-url','pagelayer-linkedin-url','pagelayer-youtube-url','pagelayer-gplus-url','pagelayer-copyright','pagelayer-phone','pagelayer-address'];
|
206 |
|
207 |
foreach( $socials as $social ){
|
300 |
// Save it
|
301 |
update_option( 'pagelayer-fbapp-id', $fb_app_id );
|
302 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
|
305 |
// reCAPTCHA Langs
|
382 |
<?php wp_nonce_field('pagelayer-options'); ?>
|
383 |
<div class="tabs-wrapper">
|
384 |
<h2 class="nav-tab-wrapper pagelayer-wrapper">
|
385 |
+
<?php
|
386 |
+
if(!defined('SITEPAD')){
|
387 |
+
echo '<a href="#general" class="nav-tab">'.__('General').'</a>';
|
388 |
+
}
|
389 |
+
?>
|
390 |
+
<a href="#icons" class="nav-tab "><?php _e('Enable Icons');?></a>
|
391 |
+
<a href="#social" class="nav-tab"><?php _e('Information');?></a>
|
392 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
393 |
+
<a href="#integration" class="nav-tab"><?php _e('Integrations');?></a>
|
394 |
+
<a href="#contactform" class="nav-tab "><?php _e('Contact Form');?></a>
|
395 |
+
<a href="#captcha" class="nav-tab "><?php _e('Google Captcha');?></a>
|
396 |
+
<?php
|
397 |
+
}
|
398 |
+
if(!defined('SITEPAD')){
|
399 |
+
echo '
|
400 |
+
<a href="#support" class="nav-tab ">'.__('Support').'</a>
|
401 |
+
<a href="#faq" class="nav-tab ">'.__('FAQ').'</a>';
|
402 |
+
}
|
403 |
+
?>
|
404 |
</h2>
|
405 |
|
406 |
<div class="pagelayer-tab-panel" id="general">
|
407 |
<table>
|
408 |
<tr>
|
409 |
+
<th scope="row"><?php _e('Editor Enables On');?></th>
|
410 |
<td>
|
411 |
<label>
|
412 |
<?php
|
419 |
</tr>
|
420 |
</table>
|
421 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
<div class="pagelayer-tab-panel" id="icons">
|
423 |
<table>
|
424 |
<tr>
|
425 |
+
<th scope="row"><?php _e('Enable Icons');?></th>
|
426 |
<td>
|
427 |
<label>
|
428 |
<input type="checkbox" name="pagelayer_icons_set[]" value="font-awesome5" <?php if(in_array('font-awesome5',get_option( 'pagelayer_icons_set')) || !get_option( 'pagelayer_icons_set')){echo ' checked';}?> />font-awesome5</br>
|
435 |
<div class="pagelayer-settings-info" style="display:flex;">
|
436 |
<div style="flex:1">
|
437 |
<div class="pagelayer-title">
|
438 |
+
<h2><?php _e('Address and Phone Number');?></h2>
|
439 |
</div>
|
440 |
<table>
|
441 |
<tr>
|
442 |
+
<th><?php _e('Address');?></th>
|
443 |
<td><textarea name="pagelayer-address"><?php echo pagelayer_get_option('pagelayer-address');?></textarea></td>
|
444 |
</tr>
|
445 |
<tr>
|
446 |
+
<th><?php _e('Phone Number');?></th>
|
447 |
<td><input type="tel" name="pagelayer-phone" <?php echo 'value="'.pagelayer_get_option('pagelayer-phone').'"';?> /></td>
|
448 |
</tr>
|
449 |
|
450 |
<tr>
|
451 |
+
<th scope="row"><?php _e('Contact Email');?></th>
|
452 |
<td>
|
453 |
<?php if(defined('PAGELAYER_PREMIUM')){
|
454 |
+
echo '<p>'.__('You can change your contact email<br> from the Contact Form Settings.').'</p>';
|
455 |
}else{
|
456 |
?>
|
457 |
<label>
|
466 |
</table>
|
467 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
468 |
<div class="pagelayer-title">
|
469 |
+
<h2><?php _e('Copyright');?></h2>
|
470 |
</div>
|
471 |
<table>
|
472 |
<tr>
|
473 |
+
<th><?php _e('Copyright Text');?></th>
|
474 |
<td><textarea name="pagelayer-copyright"><?php echo pagelayer_get_option('pagelayer-copyright'); ?></textarea></td>
|
475 |
</tr>
|
476 |
</table>
|
479 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
480 |
<div style="flex:1">
|
481 |
<div class="pagelayer-title">
|
482 |
+
<h2><?php _e('Social Profile URLs');?></h2>
|
483 |
</div>
|
484 |
<table>
|
485 |
<tr>
|
486 |
+
<th><?php _e('Facebook');?></th>
|
487 |
<td><input type="text" name="pagelayer-facebook-url" <?php echo 'value="'.get_option('pagelayer-facebook-url').'"';?>/></td>
|
488 |
</tr>
|
489 |
<tr>
|
490 |
+
<th><?php _e('Twitter');?></th>
|
491 |
<td><input type="text" name="pagelayer-twitter-url" <?php echo 'value="'.get_option('pagelayer-twitter-url').'"';?>/></td>
|
492 |
</tr>
|
493 |
<tr>
|
494 |
+
<th><?php _e('Instagram');?></th>
|
495 |
<td><input type="text" name="pagelayer-instagram-url" <?php echo 'value="'.get_option('pagelayer-instagram-url').'"'; ?>/></td>
|
496 |
</tr>
|
497 |
<tr>
|
498 |
+
<th><?php _e('LinkedIn');?></th>
|
499 |
<td><input type="text" name="pagelayer-linkedin-url" <?php echo 'value="'.get_option('pagelayer-linkedin-url').'"'; ?>/></td>
|
500 |
</tr>
|
501 |
<tr>
|
502 |
+
<th><?php _e('YouTube');?></th>
|
503 |
<td><input type="text" name="pagelayer-youtube-url" <?php echo 'value="'.get_option('pagelayer-youtube-url').'"'; ?>/></td>
|
504 |
</tr>
|
505 |
<tr>
|
506 |
+
<th><?php _e('Google+');?></th>
|
507 |
<td><input type="text" name="pagelayer-gplus-url" <?php echo 'value="'.get_option('pagelayer-gplus-url').'"'; ?>/></td>
|
508 |
</tr>
|
509 |
</table>
|
514 |
<?php if(defined('PAGELAYER_PREMIUM')){ ?>
|
515 |
<div class="pagelayer-tab-panel" id="integration">
|
516 |
<div class="pagelayer-title">
|
517 |
+
<h2><?php _e('Facebook SDK Details');?></h2>
|
518 |
</div>
|
519 |
<table>
|
520 |
<tr>
|
521 |
+
<th><?php _e('App ID');?></th>
|
522 |
<td><input type="text" name="pagelayer-fbapp-id" class="pagelayer-app-id" <?php if(get_option('pagelayer-fbapp-id')){
|
523 |
echo 'value="'.get_option('pagelayer-fbapp-id').'"';
|
524 |
}?>/></td>
|
529 |
<table>
|
530 |
<tr>
|
531 |
<td colspan="2" style="align:middle;">
|
532 |
+
<p><?php _e('You can use a field name with a prefix $ to print your field value e.g. if the field name is <b>fieldname</b> then use the variable <b>$fieldname</b>');?></p>
|
533 |
</td>
|
534 |
</tr>
|
535 |
<tr>
|
536 |
+
<th scope="row"><?php _e('To Email');?>:</th>
|
537 |
<td>
|
538 |
<label>
|
539 |
<input name="pagelayer_cf_to_email" type="email" placeholder="email@domain.com" <?php if(get_option('pagelayer_cf_to_email')){
|
543 |
</td>
|
544 |
</tr>
|
545 |
<tr>
|
546 |
+
<th scope="row"><?php _e('From Email');?>:</th>
|
547 |
<td>
|
548 |
<label>
|
549 |
<input name="pagelayer_cf_from_email" type="text" placeholder="My Site <email@domain.com>" <?php
|
554 |
</td>
|
555 |
</tr>
|
556 |
<tr>
|
557 |
+
<th scope="row"><?php _e('Subject');?>:</th>
|
558 |
<td>
|
559 |
<label>
|
560 |
<input name="pagelayer_cf_subject" type="text" placeholder="Subject" <?php if(get_option('pagelayer_cf_subject')){
|
564 |
</td>
|
565 |
</tr>
|
566 |
<tr>
|
567 |
+
<th scope="row"><?php _e('Additional Headers');?>: </th>
|
568 |
<td>
|
569 |
<label>
|
570 |
<textarea rows="3" name="pagelayer_cf_headers"><?php
|
575 |
</td>
|
576 |
</tr>
|
577 |
<tr>
|
578 |
+
<td colspan="2"><b><?php echo __('Messages').' : </b><p>'.__('You can edit messages used for information of your form here.');?></p></td>
|
579 |
</tr>
|
580 |
<tr>
|
581 |
+
<th scope="row"><?php _e('Success Message');?> :</th>
|
582 |
<td>
|
583 |
<label>
|
584 |
<input name="pagelayer_cf_success" type="text" placeholder="Success" <?php if(get_option('pagelayer_cf_success')){
|
588 |
</td>
|
589 |
</tr>
|
590 |
<tr>
|
591 |
+
<th scope="row"><?php _e('Failed Message');?> :</th>
|
592 |
<td>
|
593 |
<label>
|
594 |
<input name="pagelayer_cf_failed" type="text" placeholder="Failed" <?php if(get_option('pagelayer_cf_failed')){
|
598 |
</td>
|
599 |
</tr>
|
600 |
<tr>
|
601 |
+
<th scope="row"><?php _e('reCaptcha Failed Message');?> : </th>
|
602 |
<td>
|
603 |
<label>
|
604 |
<input name="pagelayer_recaptcha_failed" type="text" placeholder="The CAPTCHA verification failed. Please try again." <?php
|
612 |
<div class="pagelayer-tab-panel" id="captcha">
|
613 |
<table>
|
614 |
<tr>
|
615 |
+
<th scope="row"><?php _e('reCaptcha Site Key');?></th>
|
616 |
<td>
|
617 |
<label>
|
618 |
<input name="pagelayer_google_captcha" type="text" placeholder="Site key" <?php if(get_option('pagelayer_google_captcha')){
|
622 |
</td>
|
623 |
</tr>
|
624 |
<tr>
|
625 |
+
<th scope="row"><?php _e('reCaptcha Secret Key');?></th>
|
626 |
<td>
|
627 |
<label>
|
628 |
<input name="pagelayer_google_captcha_secret" type="text" placeholder="Secret key" <?php if(get_option('pagelayer_google_captcha_secret')){
|
632 |
</td>
|
633 |
</tr>
|
634 |
<tr>
|
635 |
+
<th scope="row"><?php _e('reCaptcha Language');?> </th>
|
636 |
<td>
|
637 |
<label>
|
638 |
<select name="pagelayer_google_captcha_lang">
|
649 |
</div>
|
650 |
<?php } ?>
|
651 |
<div class="pagelayer-tab-panel" id="support">
|
652 |
+
<h2><?php _e('Support');?></h2>
|
653 |
+
<h3><?php _e('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>
|
654 |
</div>
|
655 |
<div class="pagelayer-tab-panel" id="faq">
|
656 |
+
<h2><?php _e('FAQ');?></h2>
|
657 |
<div class="pagelayer-acc-wrapper">
|
658 |
+
<span class="nav-tab pagelayer-acc-tab"><?php _e('1: Why choose us');?></span>
|
659 |
<div class="pagelayer-acc-panel">
|
660 |
+
<p><?php _e('Pagelayer is best live editor and easy to use and we will keep improving it !');?></P>
|
661 |
</div>
|
662 |
|
663 |
+
<span class="nav-tab pagelayer-acc-tab"><?php _e('2: Support');?></span>
|
664 |
<div class="pagelayer-acc-panel">
|
665 |
+
<p><?php _e('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!');?></p>
|
666 |
</div>
|
667 |
</div>
|
668 |
</div>
|
@@ -220,6 +220,11 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
|
|
220 |
|
221 |
}
|
222 |
|
|
|
|
|
|
|
|
|
|
|
223 |
// Handle the AddClasses
|
224 |
if(!empty($param['addClass']) && !empty($el['atts'][$prop])){
|
225 |
|
@@ -253,8 +258,8 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
|
|
253 |
}
|
254 |
|
255 |
$modes = [
|
256 |
-
'desktop' => '',
|
257 |
-
'tablet' => '_tablet',
|
258 |
'mobile' => '_mobile'
|
259 |
];
|
260 |
|
@@ -314,16 +319,26 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
|
|
314 |
if($param['type'] == 'typography' && !empty($el['atts'][$M_prop])){
|
315 |
$val = explode(',', $el['atts'][$M_prop]);
|
316 |
|
317 |
-
if(!empty($val[0])
|
318 |
-
$
|
|
|
|
|
319 |
//pagelayer_print($pagelayer->runtime_fonts);
|
320 |
}
|
321 |
}
|
322 |
|
323 |
-
if($
|
324 |
$val = $el['atts'][$M_prop];
|
325 |
-
if(!empty($val)
|
326 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
}
|
328 |
}
|
329 |
}
|
@@ -354,7 +369,7 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
|
|
354 |
if(!empty($pagelayer->shortcodes[$tag]['html'])){
|
355 |
|
356 |
// Create the HTML object
|
357 |
-
$node =
|
358 |
|
359 |
// Remove the if-ext
|
360 |
foreach($node('[if-ext]') as $v){
|
@@ -431,7 +446,7 @@ function pagelayer_render_shortcode($atts, $content = '', $tag = ''){
|
|
431 |
if(!empty($el['classes']) || !empty($el['attr']) || !empty($el['atts']['ele_attributes'])){
|
432 |
|
433 |
// Create the HTML object
|
434 |
-
$node =
|
435 |
|
436 |
// Add the editable values
|
437 |
if(!empty($el['edit']) && pagelayer_is_live()){
|
@@ -823,7 +838,7 @@ function pagelayer_bg_video(&$el){
|
|
823 |
|
824 |
}else{
|
825 |
|
826 |
-
$el['atts']['vid_src'] = '<video autoplay '.$el['atts']['mute'].$el['atts']['stop_loop'].'>'.
|
827 |
'<source src="'.$iframe_src.'" type="video/mp4">'.
|
828 |
'</video>';
|
829 |
|
@@ -850,7 +865,7 @@ function pagelayer_sc_image(&$el){
|
|
850 |
|
851 |
// Custom url
|
852 |
if($el['atts']['link_type'] == 'custom_url'){
|
853 |
-
$el['atts']['func_link'] =
|
854 |
}
|
855 |
|
856 |
// Link to the media file itself
|
@@ -903,7 +918,7 @@ function pagelayer_sc_image_slider(&$el){
|
|
903 |
|
904 |
// Any Link ?
|
905 |
if(!empty($el['atts']['link_type'])){
|
906 |
-
$link = ($el['atts']['link_type'] == 'media_file' ? $final_urls[$v] : @$el['
|
907 |
$li .= '<a href="'.$link.'">';
|
908 |
}
|
909 |
|
220 |
|
221 |
}
|
222 |
|
223 |
+
// Load permalink values
|
224 |
+
if($param['type'] == 'link'){
|
225 |
+
$el['tmp'][$prop] = pagelayer_permalink($el['atts'][$prop]);
|
226 |
+
}
|
227 |
+
|
228 |
// Handle the AddClasses
|
229 |
if(!empty($param['addClass']) && !empty($el['atts'][$prop])){
|
230 |
|
258 |
}
|
259 |
|
260 |
$modes = [
|
261 |
+
'desktop' => '',
|
262 |
+
'tablet' => '_tablet',
|
263 |
'mobile' => '_mobile'
|
264 |
];
|
265 |
|
319 |
if($param['type'] == 'typography' && !empty($el['atts'][$M_prop])){
|
320 |
$val = explode(',', $el['atts'][$M_prop]);
|
321 |
|
322 |
+
if(!empty($val[0])){
|
323 |
+
$font_weight = empty($val[3]) ? 400 : $val[3];
|
324 |
+
$font_style = !empty($val[2]) && in_array($val[2], ['italic', 'oblique']) ? 'i' : '';
|
325 |
+
$pagelayer->runtime_fonts[$val[0]][$font_weight.$font_style] = $font_weight.$font_style;
|
326 |
//pagelayer_print($pagelayer->runtime_fonts);
|
327 |
}
|
328 |
}
|
329 |
|
330 |
+
if($prop == 'font_family' && !empty($el['atts'][$M_prop])){
|
331 |
$val = $el['atts'][$M_prop];
|
332 |
+
if(!empty($val)){
|
333 |
+
$font_weight = empty($el['atts']['font_weight'.$mv]) ? @$el['atts']['font_weight'] : $el['atts']['font_weight'.$mv];
|
334 |
+
$font_weight = empty($font_weight) ? 400 : $font_weight;
|
335 |
+
|
336 |
+
$font_style = empty($el['atts']['font_style'.$mv]) ? @$el['atts']['font_style'] : $el['atts']['font_style'.$mv];
|
337 |
+
$font_style = empty($font_style) ? 'normal' : $font_style;
|
338 |
+
$font_style = in_array($font_style, ['italic', 'oblique']) ? 'i' : '';
|
339 |
+
|
340 |
+
$pagelayer->runtime_fonts[$val][$font_weight.$font_style] = $font_weight.$font_style;
|
341 |
+
|
342 |
}
|
343 |
}
|
344 |
}
|
369 |
if(!empty($pagelayer->shortcodes[$tag]['html'])){
|
370 |
|
371 |
// Create the HTML object
|
372 |
+
$node = pagelayerQuery::parseStr($pagelayer->shortcodes[$tag]['html']);
|
373 |
|
374 |
// Remove the if-ext
|
375 |
foreach($node('[if-ext]') as $v){
|
446 |
if(!empty($el['classes']) || !empty($el['attr']) || !empty($el['atts']['ele_attributes'])){
|
447 |
|
448 |
// Create the HTML object
|
449 |
+
$node = pagelayerQuery::parseStr($div);
|
450 |
|
451 |
// Add the editable values
|
452 |
if(!empty($el['edit']) && pagelayer_is_live()){
|
838 |
|
839 |
}else{
|
840 |
|
841 |
+
$el['atts']['vid_src'] = '<video autoplay playsinline '.$el['atts']['mute'].$el['atts']['stop_loop'].'>'.
|
842 |
'<source src="'.$iframe_src.'" type="video/mp4">'.
|
843 |
'</video>';
|
844 |
|
865 |
|
866 |
// Custom url
|
867 |
if($el['atts']['link_type'] == 'custom_url'){
|
868 |
+
$el['atts']['func_link'] = @$el['tmp']['link'];
|
869 |
}
|
870 |
|
871 |
// Link to the media file itself
|
918 |
|
919 |
// Any Link ?
|
920 |
if(!empty($el['atts']['link_type'])){
|
921 |
+
$link = ($el['atts']['link_type'] == 'media_file' ? $final_urls[$v] : @$el['tmp']['link']);
|
922 |
$li .= '<a href="'.$link.'">';
|
923 |
}
|
924 |
|
@@ -425,7 +425,7 @@ $pagelayer->styles['ele_bg_styles'] = [
|
|
425 |
'type' => 'color',
|
426 |
'label' => __pl('color'),
|
427 |
'default' => '',
|
428 |
-
'desc' => __pl('
|
429 |
'css' => 'background-color: {{val}};',
|
430 |
'show' => ['ele_bg_hover' => ''],
|
431 |
'req' => ['ele_bg_type' => 'image']
|
@@ -1922,7 +1922,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_row', array(
|
|
1922 |
'max' => 3000,
|
1923 |
'screen' => 1,
|
1924 |
'units' => [ 'px', '%', 'vw' ],
|
1925 |
-
'css' => ['{{element}}
|
1926 |
'req' => array(
|
1927 |
'width_content' => 'fixed'
|
1928 |
)
|
@@ -2770,7 +2770,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_heading', array(
|
|
2770 |
'group' => 'text',
|
2771 |
'func' => 'pagelayer_sc_heading',
|
2772 |
'innerHTML' => 'text',
|
2773 |
-
'html' => '<a if-ext="{{link}}" href="{{link}}">
|
2774 |
<div if={{text}} class="pagelayer-heading-holder">{{text}}</div>
|
2775 |
</a>',
|
2776 |
'params' => array(
|
@@ -2820,7 +2820,6 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_heading', array(
|
|
2820 |
'color' => array(
|
2821 |
'type' => 'color',
|
2822 |
'label' => __pl('color'),
|
2823 |
-
'default' => '#111111',
|
2824 |
'css' => ['{{element}} .pagelayer-heading-holder *' => 'color:{{val}}', '{{element}} .pagelayer-heading-holder' => 'color:{{val}}'],
|
2825 |
'show' => ['heading_state' => 'normal']
|
2826 |
),
|
@@ -2897,7 +2896,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_quote', array(
|
|
2897 |
<i if="{{double_indent}}" class="fa fa-quote-right"></i>
|
2898 |
</div>
|
2899 |
<div if="{{cite}}" class="pagelayer-quote-cite">
|
2900 |
-
<a if-ext="{{cite_url}}" href="{{cite_url}}">
|
2901 |
<span class="pagelayer-cite-holder">{{cite}}</span>
|
2902 |
</a>
|
2903 |
</div>
|
@@ -3408,7 +3407,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_icon', array(
|
|
3408 |
'group' => 'text',
|
3409 |
'func' => 'pagelayer_sc_icon',
|
3410 |
'html' => '<div class="pagelayer-icon-holder">
|
3411 |
-
<a if-ext="{{link}}" class="pagelayer-ele-link" href="{{link}}">
|
3412 |
<i class="{{icon}} {{bg_shape}} {{icon_size}} pagelayer-animation-{{anim_hover}}"></i>
|
3413 |
</a>
|
3414 |
</div>',
|
@@ -3816,11 +3815,11 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_badge', array(
|
|
3816 |
'innerHTML' => 'title',
|
3817 |
'html' => '<div class="pagelayer-badge-span">
|
3818 |
<span if="{{text}}" class="pagelayer-badge-text">{{text}}</span>
|
3819 |
-
<a if-ext="{{badge_url}}" class="pagelayer-ele-link" href="{{badge_url}}">
|
3820 |
<span if="{{badge_text}}" class="pagelayer-badge-title pagelayer-badge-details pagelayer-badge-{{badge_notification_type}} pagelayer-badge-{{badge_style_type}}">{{badge_text}}</span>
|
3821 |
</a>
|
3822 |
</div>
|
3823 |
-
<a if-ext="{{badge_url}}" class="pagelayer-ele-link" href="{{badge_url}}">
|
3824 |
<button class="pagelayer-badge-title pagelayer-badge-btn pagelayer-btn-{{badge_btn_type}}">
|
3825 |
<span if="{{text}}" class="pagelayer-badge-text">{{text}}</span>
|
3826 |
<span if="{{badge_text}}" class="pagelayer-badge-details pagelayer-badge-{{badge_notification_type}} pagelayer-badge-{{badge_style_type}}">{{badge_text}}</span>
|
@@ -4864,7 +4863,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_btn', array(
|
|
4864 |
'type' => 'link',
|
4865 |
'label' => __pl('button_link_label'),
|
4866 |
'desc' => __pl('button_link_desc'),
|
4867 |
-
'addAttr' => ['{{element}} .pagelayer-btn-holder' => 'href="{{link}}"']
|
4868 |
),
|
4869 |
'rel' => array(
|
4870 |
'type' => 'text',
|
@@ -5250,7 +5249,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_social', array(
|
|
5250 |
'func' => 'pagelayer_sc_social',
|
5251 |
'not_visible' => 1,
|
5252 |
'html' => '<div class="pagelayer-icon-holder">
|
5253 |
-
<a if-ext="{{social_url}}" class="pagelayer-ele-link" href="{{social_url}}">
|
5254 |
<i class="pagelayer-social-fa {{icon}}"></i>
|
5255 |
</a>
|
5256 |
</div>',
|
@@ -5713,13 +5712,13 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array(
|
|
5713 |
<img class="pagelayer-img pagelayer-animation-{{anim_hover}}" src="{{func_image}}">
|
5714 |
</div>
|
5715 |
<div class="pagelayer-service-details">
|
5716 |
-
<a if-ext={{heading_url}} href="{{heading_url}}" class="pagelayer-ele-link">
|
5717 |
<div if={{service_heading}} class="pagelayer-service-heading">{{service_heading}}</div>
|
5718 |
</a>
|
5719 |
<div if={{service_text}} class="pagelayer-service-text">{{service_text}}</div>
|
5720 |
-
<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>
|
5721 |
</div>
|
5722 |
-
<a if-ext={{box_url}} href="{{box_url}}" class="pagelayer-ele-link pagelayer-box-link"> </a>
|
5723 |
</div>',
|
5724 |
'params' => [
|
5725 |
'service_image' => array(
|
@@ -6386,15 +6385,15 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array(
|
|
6386 |
<i class="{{service_icon}} pagelayer-icon-{{service_icon_shape_type}} pagelayer-animation-{{anim_hover}}" aria-hidden="true"></i>
|
6387 |
</div>
|
6388 |
<div class="pagelayer-service-details">
|
6389 |
-
<a if-ext={{heading_url}} href="{{heading_url}}" class="pagelayer-ele-link">
|
6390 |
<div if="{{service_heading}}" class="pagelayer-service-heading">{{service_heading}}</div>
|
6391 |
</a>
|
6392 |
<div if="{{service_text}}" class="pagelayer-service-text">{{service_text}}</div>
|
6393 |
-
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn pagelayer-button pagelayer-ele-link {{iconbox_button_type}} {{service_button_size}}">
|
6394 |
<span if="{{service_button_text}}">{{service_button_text}}</span>
|
6395 |
</a>
|
6396 |
</div>
|
6397 |
-
<a if-ext={{box_url}} href="{{box_url}}" class="pagelayer-ele-link pagelayer-box-link"> </a>
|
6398 |
</div>',
|
6399 |
'params' => array(
|
6400 |
'service_icon' => array(
|
@@ -7548,7 +7547,6 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_accordion_item', array(
|
|
7548 |
'type' => 'text',
|
7549 |
'label' => __pl('title'),
|
7550 |
'default' => 'Lorem',
|
7551 |
-
'desc' => __pl(''),
|
7552 |
),
|
7553 |
'text' => array(
|
7554 |
'type' => 'editor',
|
@@ -7849,7 +7847,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_testimonial', array(
|
|
7849 |
</div>
|
7850 |
<div class="pagelayer-{{image_position}}">
|
7851 |
<div if="{{cite}}" class="pagelayer-testimonial-cite">
|
7852 |
-
<a if-ext="{{cite_url}}" class="pagelayer-ele-link" href="{{cite_url}}">
|
7853 |
<span class="pagelayer-testimonial-author">{{cite}}</span>
|
7854 |
</a>
|
7855 |
<span if="{{designation}}" class="pagelayer-testimonial-author-title">
|
@@ -8930,7 +8928,7 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_post_props', array(
|
|
8930 |
),
|
8931 |
'featured_image' => array(
|
8932 |
'label' => __pl('featured_image'),
|
8933 |
-
'desc' => __pl('featured_image_desc'),
|
8934 |
'type' => 'image',
|
8935 |
'default' => PAGELAYER_URL.'/images/default-image.png',
|
8936 |
),
|
@@ -8998,7 +8996,6 @@ pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_wp_widgets', array(
|
|
8998 |
'type' => 'select',
|
8999 |
'label' => __pl('wp_widgets_area_select'),
|
9000 |
'default' => $pagelayer_wp_widget_default,
|
9001 |
-
'desc' => '',
|
9002 |
'list' => $pagelayer_wp_widgets
|
9003 |
)
|
9004 |
)
|
425 |
'type' => 'color',
|
426 |
'label' => __pl('color'),
|
427 |
'default' => '',
|
428 |
+
'desc' => __pl('fallback_color'),
|
429 |
'css' => 'background-color: {{val}};',
|
430 |
'show' => ['ele_bg_hover' => ''],
|
431 |
'req' => ['ele_bg_type' => 'image']
|
1922 |
'max' => 3000,
|
1923 |
'screen' => 1,
|
1924 |
'units' => [ 'px', '%', 'vw' ],
|
1925 |
+
'css' => ['{{element}}>.pagelayer-row-holder' => 'max-width: {{val}}; margin-left: auto; margin-right: auto;'],
|
1926 |
'req' => array(
|
1927 |
'width_content' => 'fixed'
|
1928 |
)
|
2770 |
'group' => 'text',
|
2771 |
'func' => 'pagelayer_sc_heading',
|
2772 |
'innerHTML' => 'text',
|
2773 |
+
'html' => '<a if-ext="{{link}}" href="{{{link}}}">
|
2774 |
<div if={{text}} class="pagelayer-heading-holder">{{text}}</div>
|
2775 |
</a>',
|
2776 |
'params' => array(
|
2820 |
'color' => array(
|
2821 |
'type' => 'color',
|
2822 |
'label' => __pl('color'),
|
|
|
2823 |
'css' => ['{{element}} .pagelayer-heading-holder *' => 'color:{{val}}', '{{element}} .pagelayer-heading-holder' => 'color:{{val}}'],
|
2824 |
'show' => ['heading_state' => 'normal']
|
2825 |
),
|
2896 |
<i if="{{double_indent}}" class="fa fa-quote-right"></i>
|
2897 |
</div>
|
2898 |
<div if="{{cite}}" class="pagelayer-quote-cite">
|
2899 |
+
<a if-ext="{{cite_url}}" href="{{{cite_url}}}">
|
2900 |
<span class="pagelayer-cite-holder">{{cite}}</span>
|
2901 |
</a>
|
2902 |
</div>
|
3407 |
'group' => 'text',
|
3408 |
'func' => 'pagelayer_sc_icon',
|
3409 |
'html' => '<div class="pagelayer-icon-holder">
|
3410 |
+
<a if-ext="{{link}}" class="pagelayer-ele-link" href="{{{link}}}">
|
3411 |
<i class="{{icon}} {{bg_shape}} {{icon_size}} pagelayer-animation-{{anim_hover}}"></i>
|
3412 |
</a>
|
3413 |
</div>',
|
3815 |
'innerHTML' => 'title',
|
3816 |
'html' => '<div class="pagelayer-badge-span">
|
3817 |
<span if="{{text}}" class="pagelayer-badge-text">{{text}}</span>
|
3818 |
+
<a if-ext="{{badge_url}}" class="pagelayer-ele-link" href="{{{badge_url}}}">
|
3819 |
<span if="{{badge_text}}" class="pagelayer-badge-title pagelayer-badge-details pagelayer-badge-{{badge_notification_type}} pagelayer-badge-{{badge_style_type}}">{{badge_text}}</span>
|
3820 |
</a>
|
3821 |
</div>
|
3822 |
+
<a if-ext="{{badge_url}}" class="pagelayer-ele-link" href="{{{badge_url}}}">
|
3823 |
<button class="pagelayer-badge-title pagelayer-badge-btn pagelayer-btn-{{badge_btn_type}}">
|
3824 |
<span if="{{text}}" class="pagelayer-badge-text">{{text}}</span>
|
3825 |
<span if="{{badge_text}}" class="pagelayer-badge-details pagelayer-badge-{{badge_notification_type}} pagelayer-badge-{{badge_style_type}}">{{badge_text}}</span>
|
4863 |
'type' => 'link',
|
4864 |
'label' => __pl('button_link_label'),
|
4865 |
'desc' => __pl('button_link_desc'),
|
4866 |
+
'addAttr' => ['{{element}} .pagelayer-btn-holder' => 'href="{{{link}}}"']
|
4867 |
),
|
4868 |
'rel' => array(
|
4869 |
'type' => 'text',
|
5249 |
'func' => 'pagelayer_sc_social',
|
5250 |
'not_visible' => 1,
|
5251 |
'html' => '<div class="pagelayer-icon-holder">
|
5252 |
+
<a if-ext="{{social_url}}" class="pagelayer-ele-link" href="{{{social_url}}}">
|
5253 |
<i class="pagelayer-social-fa {{icon}}"></i>
|
5254 |
</a>
|
5255 |
</div>',
|
5712 |
<img class="pagelayer-img pagelayer-animation-{{anim_hover}}" src="{{func_image}}">
|
5713 |
</div>
|
5714 |
<div class="pagelayer-service-details">
|
5715 |
+
<a if-ext={{heading_url}} href="{{{heading_url}}}" class="pagelayer-ele-link">
|
5716 |
<div if={{service_heading}} class="pagelayer-service-heading">{{service_heading}}</div>
|
5717 |
</a>
|
5718 |
<div if={{service_text}} class="pagelayer-service-text">{{service_text}}</div>
|
5719 |
+
<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>
|
5720 |
</div>
|
5721 |
+
<a if-ext={{box_url}} href="{{{box_url}}}" class="pagelayer-ele-link pagelayer-box-link"> </a>
|
5722 |
</div>',
|
5723 |
'params' => [
|
5724 |
'service_image' => array(
|
6385 |
<i class="{{service_icon}} pagelayer-icon-{{service_icon_shape_type}} pagelayer-animation-{{anim_hover}}" aria-hidden="true"></i>
|
6386 |
</div>
|
6387 |
<div class="pagelayer-service-details">
|
6388 |
+
<a if-ext={{heading_url}} href="{{{heading_url}}}" class="pagelayer-ele-link">
|
6389 |
<div if="{{service_heading}}" class="pagelayer-service-heading">{{service_heading}}</div>
|
6390 |
</a>
|
6391 |
<div if="{{service_text}}" class="pagelayer-service-text">{{service_text}}</div>
|
6392 |
+
<a if="{{service_button}}" href="{{{service_button_url}}}" class="pagelayer-service-btn pagelayer-button pagelayer-ele-link {{iconbox_button_type}} {{service_button_size}}">
|
6393 |
<span if="{{service_button_text}}">{{service_button_text}}</span>
|
6394 |
</a>
|
6395 |
</div>
|
6396 |
+
<a if-ext={{box_url}} href="{{{box_url}}}" class="pagelayer-ele-link pagelayer-box-link"> </a>
|
6397 |
</div>',
|
6398 |
'params' => array(
|
6399 |
'service_icon' => array(
|
7547 |
'type' => 'text',
|
7548 |
'label' => __pl('title'),
|
7549 |
'default' => 'Lorem',
|
|
|
7550 |
),
|
7551 |
'text' => array(
|
7552 |
'type' => 'editor',
|
7847 |
</div>
|
7848 |
<div class="pagelayer-{{image_position}}">
|
7849 |
<div if="{{cite}}" class="pagelayer-testimonial-cite">
|
7850 |
+
<a if-ext="{{cite_url}}" class="pagelayer-ele-link" href="{{{cite_url}}}">
|
7851 |
<span class="pagelayer-testimonial-author">{{cite}}</span>
|
7852 |
</a>
|
7853 |
<span if="{{designation}}" class="pagelayer-testimonial-author-title">
|
8928 |
),
|
8929 |
'featured_image' => array(
|
8930 |
'label' => __pl('featured_image'),
|
8931 |
+
//'desc' => __pl('featured_image_desc'),
|
8932 |
'type' => 'image',
|
8933 |
'default' => PAGELAYER_URL.'/images/default-image.png',
|
8934 |
),
|
8996 |
'type' => 'select',
|
8997 |
'label' => __pl('wp_widgets_area_select'),
|
8998 |
'default' => $pagelayer_wp_widget_default,
|
|
|
8999 |
'list' => $pagelayer_wp_widgets
|
9000 |
)
|
9001 |
)
|
@@ -172,7 +172,6 @@ function pagelayer_template_render($template){
|
|
172 |
}else{
|
173 |
echo do_shortcode(file_get_contents(get_stylesheet_directory().'/'.$template.'.pgl'));
|
174 |
}
|
175 |
-
|
176 |
}
|
177 |
|
178 |
// For check which template will be applied
|
@@ -273,7 +272,7 @@ function pagelayer_template_check_conditons($ids = [], $file = false, $return_al
|
|
273 |
}else{
|
274 |
$set_prio = 3;// Set sub_template Property 3
|
275 |
// If no id section then Property
|
276 |
-
if($sub_tmpl_array['no_id_section']){ $set_prio = 4; }
|
277 |
}
|
278 |
}
|
279 |
}
|
@@ -448,6 +447,10 @@ function pagelayer_get_post_content($id){
|
|
448 |
// Get the content
|
449 |
$post = get_post($id);
|
450 |
|
|
|
|
|
|
|
|
|
451 |
$content = $post->post_content;
|
452 |
pagelayer_load_shortcodes();
|
453 |
|
172 |
}else{
|
173 |
echo do_shortcode(file_get_contents(get_stylesheet_directory().'/'.$template.'.pgl'));
|
174 |
}
|
|
|
175 |
}
|
176 |
|
177 |
// For check which template will be applied
|
272 |
}else{
|
273 |
$set_prio = 3;// Set sub_template Property 3
|
274 |
// If no id section then Property
|
275 |
+
if(!empty($sub_tmpl_array['no_id_section'])){ $set_prio = 4; }
|
276 |
}
|
277 |
}
|
278 |
}
|
447 |
// Get the content
|
448 |
$post = get_post($id);
|
449 |
|
450 |
+
if(is_attachment()){
|
451 |
+
remove_filter( 'the_content', 'prepend_attachment' );
|
452 |
+
}
|
453 |
+
|
454 |
$content = $post->post_content;
|
455 |
pagelayer_load_shortcodes();
|
456 |
|
@@ -0,0 +1,479 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//////////////////////////////////////////////////////////////
|
4 |
+
//===========================================================
|
5 |
+
// license.php
|
6 |
+
//===========================================================
|
7 |
+
// PAGELAYER
|
8 |
+
// Inspired by the DESIRE to be the BEST OF ALL
|
9 |
+
// ----------------------------------------------------------
|
10 |
+
// Started by: Pulkit Gupta
|
11 |
+
// Date: 23rd Jan 2017
|
12 |
+
// Time: 23:00 hrs
|
13 |
+
// Site: http://pagelayer.com/wordpress (PAGELAYER)
|
14 |
+
// ----------------------------------------------------------
|
15 |
+
// Please Read the Terms of use at http://pagelayer.com/tos
|
16 |
+
// ----------------------------------------------------------
|
17 |
+
//===========================================================
|
18 |
+
// (c)Pagelayer Team
|
19 |
+
//===========================================================
|
20 |
+
//////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
// Are we being accessed directly ?
|
23 |
+
if(!defined('PAGELAYER_VERSION')) {
|
24 |
+
exit('Hacking Attempt !');
|
25 |
+
}
|
26 |
+
|
27 |
+
include_once(PAGELAYER_DIR.'/main/settings.php');
|
28 |
+
|
29 |
+
// The License Page
|
30 |
+
function pagelayer_website_settings(){
|
31 |
+
|
32 |
+
global $pagelayer, $pl_error;
|
33 |
+
|
34 |
+
pagelayer_load_font_options();
|
35 |
+
|
36 |
+
if(isset($_REQUEST['submit'])){
|
37 |
+
|
38 |
+
check_admin_referer('pagelayer-options');
|
39 |
+
|
40 |
+
$font_settings = ['body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pagelayer_color' => 'color'];
|
41 |
+
|
42 |
+
foreach($font_settings as $setting => $key){
|
43 |
+
|
44 |
+
if(isset($_POST[$key])){
|
45 |
+
|
46 |
+
foreach($_POST[$key] as $k => $v){
|
47 |
+
if($v == 'Default' || empty($v)){
|
48 |
+
unset($_POST[$key][$k]);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
$setting = is_numeric($setting) ? 'pagelayer_'.$key.'_typography' : $setting;
|
53 |
+
|
54 |
+
// Are we to save ?
|
55 |
+
update_option($setting, (!empty($_POST[$key]) ? $_POST[$key] : []));
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
// Blank the old Body font
|
60 |
+
if(!empty($_POST['body']['font-family'])){
|
61 |
+
update_option('pagelayer_body_font', '');
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
//pagelayer_print($_POST);
|
67 |
+
|
68 |
+
// Content Width
|
69 |
+
if(isset($_REQUEST['pagelayer_content_width'])){
|
70 |
+
update_option( 'pagelayer_content_width', $_REQUEST['pagelayer_content_width'] );
|
71 |
+
}
|
72 |
+
|
73 |
+
// Tablet breakpoint
|
74 |
+
if(isset($_REQUEST['pagelayer_tablet_breakpoint'])){
|
75 |
+
update_option( 'pagelayer_tablet_breakpoint', $_REQUEST['pagelayer_tablet_breakpoint'] );
|
76 |
+
}
|
77 |
+
|
78 |
+
// Mobile breakpoint
|
79 |
+
if(isset($_REQUEST['pagelayer_mobile_breakpoint'])){
|
80 |
+
update_option( 'pagelayer_mobile_breakpoint', $_REQUEST['pagelayer_mobile_breakpoint'] );
|
81 |
+
}
|
82 |
+
|
83 |
+
// Widget Space
|
84 |
+
if(isset($_REQUEST['pagelayer_between_widgets'])){
|
85 |
+
update_option( 'pagelayer_between_widgets', $_REQUEST['pagelayer_between_widgets'] );
|
86 |
+
}
|
87 |
+
|
88 |
+
if(defined('PAGELAYER_PREMIUM')){
|
89 |
+
|
90 |
+
// Save Header code
|
91 |
+
if(isset($_REQUEST['pagelayer_header_code'])){
|
92 |
+
update_option( 'pagelayer_header_code', wp_unslash($_REQUEST['pagelayer_header_code'] ));
|
93 |
+
}
|
94 |
+
|
95 |
+
// Save Footyer code
|
96 |
+
if(isset($_REQUEST['pagelayer_footer_code'])){
|
97 |
+
update_option( 'pagelayer_footer_code', wp_unslash($_REQUEST['pagelayer_footer_code'] ));
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
$GLOBALS['pl_saved'] = true;
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
pagelayer_website_settings_T();
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
// The License Page - THEME
|
111 |
+
function pagelayer_website_settings_T(){
|
112 |
+
|
113 |
+
global $pagelayer, $pl_error;
|
114 |
+
|
115 |
+
pagelayer_page_header('Pagelayer Website Settings');
|
116 |
+
|
117 |
+
// Saved ?
|
118 |
+
if(!empty($GLOBALS['pl_saved'])){
|
119 |
+
echo '<div class="notice notice-success"><p>'. __('The settings were saved successfully', 'pagelayer'). '</p></div><br />';
|
120 |
+
}
|
121 |
+
|
122 |
+
// Any errors ?
|
123 |
+
if(!empty($pl_error)){
|
124 |
+
pagelayer_report_error($pl_error);echo '<br />';
|
125 |
+
}
|
126 |
+
|
127 |
+
?>
|
128 |
+
|
129 |
+
<form class="pagelayer-setting-form" method="post" action="">
|
130 |
+
<?php wp_nonce_field('pagelayer-options'); ?>
|
131 |
+
<div class="tabs-wrapper">
|
132 |
+
<h2 class="nav-tab-wrapper pagelayer-wrapper">
|
133 |
+
<a href="#typography" class="nav-tab">Typography</a>
|
134 |
+
<a href="#headings" class="nav-tab ">Headings</a>
|
135 |
+
<a href="#colors" class="nav-tab ">Colors</a>
|
136 |
+
<a href="#website_container" class="nav-tab">Container</a>
|
137 |
+
<a href="#hf" class="nav-tab ">Header and Footer</a>
|
138 |
+
</h2>
|
139 |
+
|
140 |
+
<div class="pagelayer-tab-panel" id="typography">
|
141 |
+
|
142 |
+
<center><h2>Body and Content</h2></center>
|
143 |
+
|
144 |
+
<?php pagelayer_website_font_settings('body');?>
|
145 |
+
|
146 |
+
</div>
|
147 |
+
|
148 |
+
<div class="pagelayer-tab-panel" id="headings">
|
149 |
+
|
150 |
+
<?php
|
151 |
+
|
152 |
+
$headings = ['h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6'];
|
153 |
+
|
154 |
+
echo '<div style="display:inline-block;vertical-align: top;">
|
155 |
+
<ul class="nav-tab-wrapper pagelayer-wrapper pagelayer-heading-wrapper">';
|
156 |
+
|
157 |
+
foreach($headings as $k => $v){
|
158 |
+
echo '<li><a href="#tab_'.$k.'" class="nav-tab pagelayer-heading-tab" tab-class="pagelayer-heading-tab-panel">'.$v.' Settings</a></li>';
|
159 |
+
}
|
160 |
+
|
161 |
+
echo '</ul>
|
162 |
+
</div>
|
163 |
+
|
164 |
+
<div style="display:inline-block;vertical-align: top;">';
|
165 |
+
|
166 |
+
foreach($headings as $k => $v){
|
167 |
+
echo '<div class="pagelayer-heading-tab-panel" id="tab_'.$k.'">
|
168 |
+
<center><h2>'.$v.' Settings</h2></center>';
|
169 |
+
pagelayer_website_font_settings($k);
|
170 |
+
echo '</div>';
|
171 |
+
}
|
172 |
+
|
173 |
+
echo '</div>';
|
174 |
+
|
175 |
+
?>
|
176 |
+
|
177 |
+
</div>
|
178 |
+
|
179 |
+
<div class="pagelayer-tab-panel" id="colors">
|
180 |
+
<script src="https://unpkg.com/vanilla-picker@2.10.1/dist/vanilla-picker.min.js"></script>
|
181 |
+
<?php
|
182 |
+
pagelayer_website_color('Background Color', 'background');
|
183 |
+
pagelayer_website_color('Text Color', 'text');
|
184 |
+
pagelayer_website_color('Link Color', 'link');
|
185 |
+
pagelayer_website_color('Link Hover Color', 'link-hover');
|
186 |
+
pagelayer_website_color('Heading Color (H1-H6)', 'heading');
|
187 |
+
?>
|
188 |
+
Note : By default the theme colors would be inherited. If you set any value here, it will override your theme values. These colors can be over-written by the individual elements as well !
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<div class="pagelayer-tab-panel" id="website_container">
|
192 |
+
|
193 |
+
<table>
|
194 |
+
|
195 |
+
<tr>
|
196 |
+
<th><?php echo __('Content Width') ?></th>
|
197 |
+
<td>
|
198 |
+
<input name="pagelayer_content_width" type="number" step="1" min="320" max="5000" placeholder="1170" <?php if(get_option('pagelayer_content_width')){
|
199 |
+
echo 'value="'.get_option('pagelayer_content_width').'"';
|
200 |
+
}?>>
|
201 |
+
<p><?php echo __('Set the custom width of the content area. The default width set is 1170px.') ?></p>
|
202 |
+
</td>
|
203 |
+
<tr>
|
204 |
+
<tr>
|
205 |
+
<th><?php echo __('Tablet Breakpoint') ?></th>
|
206 |
+
<td>
|
207 |
+
<input name="pagelayer_tablet_breakpoint" type="number" step="1" min="320" max="5000" placeholder="768" <?php if(get_option('pagelayer_tablet_breakpoint')){
|
208 |
+
echo 'value="'.get_option('pagelayer_tablet_breakpoint').'"';
|
209 |
+
}?>>
|
210 |
+
<p><?php echo __('Set the breakpoint for tablet devices. The default breakpoint for tablet layout is 768px.') ?></p>
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
<tr>
|
214 |
+
<th><?php echo __('Mobile Breakpoint') ?></th>
|
215 |
+
<td>
|
216 |
+
<input name="pagelayer_mobile_breakpoint" type="number" step="1" min="320" max="5000" placeholder="360" <?php if(get_option('pagelayer_mobile_breakpoint')){
|
217 |
+
echo 'value="'.get_option('pagelayer_mobile_breakpoint').'"';
|
218 |
+
}?>>
|
219 |
+
<p><?php echo __('Set the breakpoint for mobile devices. The default breakpoint for mobile layout is 360px.') ?></p>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
<tr>
|
223 |
+
<th><?php echo __('Space Between Widgets') ?></th>
|
224 |
+
<td>
|
225 |
+
<input name="pagelayer_between_widgets" type="number" step="1" min="0" max="500" placeholder="15" <?php if(get_option('pagelayer_between_widgets')){
|
226 |
+
echo 'value="'.get_option('pagelayer_between_widgets').'"';
|
227 |
+
}?>>
|
228 |
+
<p><?php echo __('Set the Space Between Widgets. The default Space set is 15px.') ?></p>
|
229 |
+
</td>
|
230 |
+
<tr>
|
231 |
+
|
232 |
+
</table>
|
233 |
+
|
234 |
+
</div>
|
235 |
+
|
236 |
+
<div class="pagelayer-tab-panel" id="hf">
|
237 |
+
<?php if(!defined('PAGELAYER_PREMIUM')){
|
238 |
+
echo '<div class="pagelayer-notice pagelayer-notice-info">'.__('This feature is a part of <a href="'.PAGELAYER_PRO_URL.'" target="_blank">Pagelayer Pro</a>. You will need purchase <a href="'.PAGELAYER_PRO_URL.'" target="_blank">Pagelayer Pro</a> to use this feature.').'</div>';
|
239 |
+
} ?>
|
240 |
+
<table width="100%">
|
241 |
+
<tr>
|
242 |
+
<td colspan="2">
|
243 |
+
<b><?php echo __('Header and Footer code');?> :</b>
|
244 |
+
<p><?php echo __('You can add custom code like HTML, JavaScript, CSS etc. which will be inserted throughout your site.');?></p>
|
245 |
+
</td>
|
246 |
+
</tr>
|
247 |
+
<tr>
|
248 |
+
<th valign="top"><?php echo __('Header Code');?> : </th>
|
249 |
+
<td>
|
250 |
+
<textarea name="pagelayer_header_code" style="width:80%;" rows="6"><?php echo get_option( 'pagelayer_header_code' ); ?></textarea>
|
251 |
+
<p> <?php echo __('This code will be printed in <code><head></code> Section.') ?> </p>
|
252 |
+
</td>
|
253 |
+
</tr>
|
254 |
+
<tr>
|
255 |
+
<th valign="top"><?php echo __('Footer Code');?> : </th>
|
256 |
+
<td>
|
257 |
+
<textarea name="pagelayer_footer_code" style="width:80%;" rows="6"><?php echo get_option( 'pagelayer_footer_code' ); ?></textarea>
|
258 |
+
<p> <?php echo __('This code will be printed before closing the <code></body></code> Section.') ?> </p>
|
259 |
+
</td>
|
260 |
+
</tr>
|
261 |
+
</table>
|
262 |
+
</div>
|
263 |
+
|
264 |
+
</div>
|
265 |
+
<center><input type="submit" name="submit" class="button button-primary" value="Save Changes"></center>
|
266 |
+
<br /><br />
|
267 |
+
</form>
|
268 |
+
|
269 |
+
<script>
|
270 |
+
|
271 |
+
// Show the vanilla selector
|
272 |
+
function pagelayer_show_vanilla(){
|
273 |
+
jQuery('.pagelayer-show-vanilla').each(function(){
|
274 |
+
var jEle = jQuery(this);
|
275 |
+
var par = jEle.parent();
|
276 |
+
var input = par.find('input');
|
277 |
+
var sColor = '';
|
278 |
+
|
279 |
+
if(input.val().length > 0){
|
280 |
+
sColor = input.val();
|
281 |
+
jEle.find('.pagelayer-color-div').css('background', sColor);
|
282 |
+
jEle.find('.pagelayer-color-div').removeClass('pagelayer-color-none');
|
283 |
+
}
|
284 |
+
|
285 |
+
var picker = new Picker({
|
286 |
+
parent : jEle[0],
|
287 |
+
color : sColor,
|
288 |
+
});
|
289 |
+
|
290 |
+
// You can do what you want with the chosen color using two callbacks: onChange and onDone.
|
291 |
+
picker.onChange = function(color) {
|
292 |
+
jEle.find('.pagelayer-color-div').css('background', color.rgbaString);
|
293 |
+
jEle.find('.pagelayer-color-div').removeClass('pagelayer-color-none');
|
294 |
+
input.val(color.hex);
|
295 |
+
};
|
296 |
+
|
297 |
+
jEle.find('.dashicons').on('click', function(event){
|
298 |
+
event.preventDefault();
|
299 |
+
event.stopPropagation();
|
300 |
+
jEle.find('.pagelayer-color-div').addClass('pagelayer-color-none');
|
301 |
+
input.val('');
|
302 |
+
});
|
303 |
+
});
|
304 |
+
}
|
305 |
+
|
306 |
+
function pagelayer_handle_custom(ele){
|
307 |
+
jEle = jQuery(ele);
|
308 |
+
if(jEle.val().length > 1){
|
309 |
+
jEle.siblings().show();
|
310 |
+
}else{
|
311 |
+
jEle.siblings().hide();
|
312 |
+
jEle.siblings('input').val('');
|
313 |
+
}
|
314 |
+
}
|
315 |
+
|
316 |
+
jQuery(document).ready(function(){
|
317 |
+
pagelayer_show_vanilla();
|
318 |
+
jQuery('.pagelayer-show-custom').each(function(){
|
319 |
+
pagelayer_handle_custom(jQuery(this));
|
320 |
+
});
|
321 |
+
});
|
322 |
+
</script>
|
323 |
+
|
324 |
+
<?php
|
325 |
+
|
326 |
+
pagelayer_page_footer();
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
+
// Shows the font settings
|
331 |
+
function pagelayer_website_color($text, $field){
|
332 |
+
|
333 |
+
global $pagelayer, $pl_error;
|
334 |
+
|
335 |
+
$val = !empty($_POST) ? @$_POST['color'][$field] : @$pagelayer->settings['color'][$field];
|
336 |
+
|
337 |
+
echo '
|
338 |
+
<table>
|
339 |
+
<tr>
|
340 |
+
<th scope="row">'.$text.'</th>
|
341 |
+
<td>
|
342 |
+
<a href="#" class="pagelayer-show-vanilla"><div class="pagelayer-color-div pagelayer-color-none"></div><span class="dashicons dashicons-no"></span></a><input type="hidden" name="color['.$field.']" value="'.$val.'">
|
343 |
+
</td>
|
344 |
+
</tr>
|
345 |
+
</table>';
|
346 |
+
|
347 |
+
}
|
348 |
+
|
349 |
+
// Shows the font settings
|
350 |
+
function pagelayer_website_font_settings($prefix){
|
351 |
+
|
352 |
+
global $pagelayer, $pl_error;
|
353 |
+
|
354 |
+
if(!empty($_POST)){
|
355 |
+
$vals = $_POST;
|
356 |
+
}else{
|
357 |
+
$vals = $pagelayer->settings;
|
358 |
+
}
|
359 |
+
|
360 |
+
?>
|
361 |
+
|
362 |
+
<table>
|
363 |
+
<tr>
|
364 |
+
<th scope="row">Font Family </th>
|
365 |
+
<td>
|
366 |
+
<label>
|
367 |
+
<select name="<?php echo $prefix;?>[font-family]">
|
368 |
+
<?php
|
369 |
+
foreach($pagelayer->fonts as $k => $font){
|
370 |
+
echo '<option value="'.$font.'" '.($vals[$prefix]['font-family'] == $font ? 'selected' : '').'>'. (empty($font) ? 'Default': $font) .'</option>';
|
371 |
+
}
|
372 |
+
?>
|
373 |
+
</select>
|
374 |
+
</label>
|
375 |
+
</td>
|
376 |
+
</tr>
|
377 |
+
|
378 |
+
<tr>
|
379 |
+
<th scope="row">Font Size </th>
|
380 |
+
<td>
|
381 |
+
<label>
|
382 |
+
<select class="pagelayer-show-custom" onchange="pagelayer_handle_custom(this)">
|
383 |
+
<option value="" <?php echo (empty($vals[$prefix]['font-size']) ? 'selected="seleted"' : '');?>>Default</option>
|
384 |
+
<option value="custom" <?php echo (!empty($vals[$prefix]['font-size']) ? 'selected="seleted"' : '');?>>Custom</option>
|
385 |
+
</select>
|
386 |
+
<input type="number" name="<?php echo $prefix;?>[font-size]" <?php echo (!empty($vals[$prefix]['font-size']) ? 'value="'.$vals[$prefix]['font-size'].'"' : '');?> /><span>px</span>
|
387 |
+
</label>
|
388 |
+
</td>
|
389 |
+
</tr>
|
390 |
+
|
391 |
+
<tr>
|
392 |
+
<th scope="row">Font Style </th>
|
393 |
+
<td>
|
394 |
+
<label>
|
395 |
+
<select name="<?php echo $prefix;?>[font-style]">
|
396 |
+
<?php
|
397 |
+
foreach($pagelayer->font_style as $k => $var){
|
398 |
+
echo '<option value="'.$k.'" '.($vals[$prefix]['font-style'] == $k ? 'selected' : '').'>'.$var.'</option>';
|
399 |
+
}
|
400 |
+
?>
|
401 |
+
</select>
|
402 |
+
</label>
|
403 |
+
</td>
|
404 |
+
</tr>
|
405 |
+
|
406 |
+
<tr>
|
407 |
+
<th scope="row">Font Weight </th>
|
408 |
+
<td>
|
409 |
+
<label>
|
410 |
+
<select name="<?php echo $prefix;?>[font-weight]">
|
411 |
+
<?php
|
412 |
+
foreach($pagelayer->font_weight as $k => $var){
|
413 |
+
echo '<option value="'.$k.'" '.($vals[$prefix]['font-weight'] == $k ? 'selected' : '').'>'.$var.'</option>';
|
414 |
+
}
|
415 |
+
?>
|
416 |
+
</select>
|
417 |
+
</label>
|
418 |
+
</td>
|
419 |
+
</tr>
|
420 |
+
|
421 |
+
<tr>
|
422 |
+
<th scope="row">Text Transform </th>
|
423 |
+
<td>
|
424 |
+
<label>
|
425 |
+
<select name="<?php echo $prefix;?>[text-transform]">
|
426 |
+
<?php
|
427 |
+
foreach($pagelayer->text_transform as $k => $var){
|
428 |
+
echo '<option value="'.$k.'" '.($vals[$prefix]['text-transform'] == $k ? 'selected' : '').'>'.$var.'</option>';
|
429 |
+
}
|
430 |
+
?>
|
431 |
+
</select>
|
432 |
+
</label>
|
433 |
+
</td>
|
434 |
+
</tr>
|
435 |
+
|
436 |
+
<tr>
|
437 |
+
<th scope="row">Line Height </th>
|
438 |
+
<td>
|
439 |
+
<label>
|
440 |
+
<select class="pagelayer-show-custom" onchange="pagelayer_handle_custom(this)">
|
441 |
+
<option value="" <?php echo (empty($vals[$prefix]['line-height']) ? 'selected="seleted"' : '');?>>Default</option>
|
442 |
+
<option value="custom" <?php echo (!empty($vals[$prefix]['line-height']) ? 'selected="seleted"' : '');?>>Custom</option>
|
443 |
+
</select>
|
444 |
+
<input type="number" name="<?php echo $prefix;?>[line-height]" min="0.1" step="0.1" <?php echo (!empty($vals[$prefix]['line-height']) ? 'value="'.$vals[$prefix]['line-height'].'"' : '');?> />
|
445 |
+
</label>
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
+
|
449 |
+
<tr>
|
450 |
+
<th scope="row">Text Spacing </th>
|
451 |
+
<td>
|
452 |
+
<label>
|
453 |
+
<select class="pagelayer-show-custom" onchange="pagelayer_handle_custom(this)">
|
454 |
+
<option value="" <?php echo (empty($vals[$prefix]['letter-spacing']) ? 'selected="seleted"' : '');?>>Default</option>
|
455 |
+
<option value="custom" <?php echo (!empty($vals[$prefix]['letter-spacing']) ? 'selected="seleted"' : '');?>>Custom</option>
|
456 |
+
</select>
|
457 |
+
<input type="number" name="<?php echo $prefix;?>[letter-spacing]" min="1" step="1" <?php echo (!empty($vals[$prefix]['letter-spacing']) ? 'value="'.$vals[$prefix]['letter-spacing'].'"' : '');?> /><span>px</span>
|
458 |
+
</label>
|
459 |
+
</td>
|
460 |
+
</tr>
|
461 |
+
|
462 |
+
<tr>
|
463 |
+
<th scope="row">Word Spacing </th>
|
464 |
+
<td>
|
465 |
+
<label>
|
466 |
+
<select class="pagelayer-show-custom" onchange="pagelayer_handle_custom(this)">
|
467 |
+
<option value="" <?php echo (empty($vals[$prefix]['word-spacing']) ? 'selected="seleted"' : '');?>>Default</option>
|
468 |
+
<option value="custom" <?php echo (!empty($vals[$prefix]['word-spacing']) ? 'selected="seleted"' : '');?>>Custom</option>
|
469 |
+
</select>
|
470 |
+
<input type="number" name="<?php echo $prefix;?>[word-spacing]" min="1" step="1" <?php echo (!empty($vals[$prefix]['word-spacing']) ? 'value="'.$vals[$prefix]['word-spacing'].'"' : '');?> /><span>px</span>
|
471 |
+
</label>
|
472 |
+
</td>
|
473 |
+
</tr>
|
474 |
+
|
475 |
+
</table>
|
476 |
+
|
477 |
+
<?php
|
478 |
+
|
479 |
+
}
|
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: PageLayer
|
4 |
Plugin URI: http://wordpress.org/plugins/pagelayer/
|
5 |
Description: PageLayer is a WordPress page builder plugin. Its very easy to use and very light on the browser.
|
6 |
-
Version: 1.1.
|
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.1.9
|
7 |
Author: Pagelayer Team
|
8 |
Author URI: https://pagelayer.com/
|
9 |
License: LGPL v2.1
|
@@ -4,7 +4,7 @@ Tags: page builder, editor, landing page, drag-and-drop, pagelayer, form-builder
|
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.5
|
7 |
-
Stable tag: 1.1.
|
8 |
License: LGPL v2.1
|
9 |
License URI: http://www.gnu.org/licenses/lgpl-2.1.html
|
10 |
|
@@ -109,6 +109,27 @@ Do you have questions related to PageLayer ? Use the following links :
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
= 1.1.8 (July 02, 2020) =
|
113 |
* [Security-Fix] Our internal security audit revealed XSS vulnerabilities. This is fixed. Please upgrade to this version ASAP !
|
114 |
* [Bug-fix] When an image was clicked, the image gallery was opened to choose the image. This was a bug introduced in the last version and is fixed now.
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.5
|
7 |
+
Stable tag: 1.1.9
|
8 |
License: LGPL v2.1
|
9 |
License URI: http://www.gnu.org/licenses/lgpl-2.1.html
|
10 |
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 1.1.9 (July 14, 2020) =
|
113 |
+
* [Feature] Added Website settings to set global font styles and colors.
|
114 |
+
* [Improvement] We have improved the Link property and you can now search posts/pages links in your WordPress site. Those links will automatically be updated if the target URL changes.
|
115 |
+
* [Improvement] The image dropzone has further been improved. It will not show drop options if the dragged object is not an image.
|
116 |
+
* [Improvement] We have improved the export wizard. Now users can export posts by its type and also export the media.
|
117 |
+
* [Task] Added "playsinline" attribute in the background video in rows and columns.
|
118 |
+
* [Task] The Archive post widget has been improved and so has the all posts widgets.
|
119 |
+
* [Task] Added target option in Social Share widget.
|
120 |
+
* [Task] The post content widget will only show a dummy placeholder while using the post content widget in a Pagelayer Template. This makes it easy to edit and understand the structure of the template.
|
121 |
+
* [Task] Added dummy pagination for the Archive Posts widget while editing within a Pagelayer template.
|
122 |
+
* [Task] The language strings which were hard-coded have been moved to the language pack.
|
123 |
+
* [Task] The typography property has been further improved.
|
124 |
+
* [Task] Added placeholder for featured image widget while editing a Pagelayer Template.
|
125 |
+
* [Bug-Fix] Singular Templates were not showing Media / Attachments properly. This is fixed.
|
126 |
+
* [Bug-Fix] In certain cases, the Hide on Mobile / Tablet was not working properly. This is fixed.
|
127 |
+
* [Bug-Fix] The pQuery class name was conflicting with other plugins. This is fixed.
|
128 |
+
* [Bug-Fix] While editing a pagelayer template, the editable area was not shown in certain cases. This is fixed.
|
129 |
+
* [Bug-Fix] The Archive Title widget was not rendered properly while editing a Pagelayer Template. This is fixed.
|
130 |
+
* [Bug-Fix] The row max-width option was applied on its childrens row / inner row. This is fixed.
|
131 |
+
* [Bug-Fix] In certain cases, the singular/archive templates were not being saved properly and were applied to all the singular/archive pages respectively. This is fixed.
|
132 |
+
|
133 |
= 1.1.8 (July 02, 2020) =
|
134 |
* [Security-Fix] Our internal security audit revealed XSS vulnerabilities. This is fixed. Please upgrade to this version ASAP !
|
135 |
* [Bug-fix] When an image was clicked, the image gallery was opened to choose the image. This was a bug introduced in the last version and is fixed now.
|