File: /home/coopserp/www/popularfx-templates.zip
PK �f\��[_1 _1 license.phpnu �[��� <?php
if(!function_exists('popularfx_license')){
global $popularfx;
$popularfx['t'] = wp_get_theme();
// Setup import
function pfx_redownload_template_fix(){
global $popularfx, $pl_error;
$slug = get_theme_mod('popularfx_template');
// We dont have to setup anything
if(empty($slug)){
return;
}
$dest = pfx_templates_dir().'/'.$slug;
// Download
include_once(dirname(__FILE__).'/templates.php');
popularfx_download_template($slug);
if(file_exists($dest.'/style.css')){
pfx_fix_image_urls_108();
}else{
$pl_error['redownload_error'] = __('There was an error downloading the theme', 'popularfx');
return false;
}
$GLOBALS['pl_redownload'] = true;
}
// The PopularFX Settings Header
function popularfx_page_header($title = 'PopularFX License'){
$promos = apply_filters('popularfx_review_link', false);
echo '<div style="margin: 0px;">
<div class="metabox-holder">
<div class="postbox-container">
<div class="wrap" style="margin-top:0px;">
<h1 style="padding:0px"><!--This is to fix promo--></h1>
<table cellpadding="2" cellspacing="1" width="100%" class="fixed" border="0">
<tr>
<td valign="top"><h1>'.$title.'</h1></td>
'.($promos ? '<td align="right"><a target="_blank" class="button button-primary" href="https://wordpress.org/support/view/plugin-reviews/pagelayer">Review Pagelayer</a></td>' : '').'
<td align="right" width="40"><a target="_blank" href="https://twitter.com/PopularFXthemes"><img src="'.PFX_URL.'/images/twitter.png" /></a></td>
<td align="right" width="40"><a target="_blank" href="https://facebook.com/PopularFX"><img src="'.PFX_URL.'/images/facebook.png" /></a></td>
</tr>
</table>
<hr />
<!--Main Table-->
<table cellpadding="8" cellspacing="1" width="100%" class="fixed">
<tr>
<td valign="top">';
}
// The Pagelayer Settings footer
function popularfx_page_footer(){
global $popularfx;
echo '
</td>';
$promos = apply_filters('pagelayer_right_bar_promos', true);
if($promos){
$pagelayer_pro_url = defined('PAGELAYER_PRO_URL') ? PAGELAYER_PRO_URL : '';
echo '
<td width="200" valign="top" id="pagelayer-right-bar">';
echo '
<div class="postbox" style="min-width:0px !important;">
<h2 class="hndle ui-sortable-handle">
<span><a target="_blank" href="'.$pagelayer_pro_url.'"><img src="'.PFX_URL.'/images/pagelayer_product.png" width="100%" /></a></span>
</h2>
<div class="inside">
<i>The best WordPress page builder </i>:<br>
<ul class="pagelayer-right-ul">
<li>30+ Free Widgets</li>
<li>60+ Premium Widgets</li>
<li>400+ Premium Sections</li>
<li>Theme Builder</li>
<li>WooCommerce Builder</li>
<li>Theme Creator and Exporter</li>
<li>Form Builder</li>
<li>Popup Builder</li>
<li>And many more ...</li>
</ul>
<center><a class="button button-primary" target="_blank" href="'.$pagelayer_pro_url.'">Upgrade</a></center>
</div>
</div>';
echo '
<div class="postbox" style="min-width:0px !important;">
<h2 class="hndle ui-sortable-handle">
<span><a target="_blank" href="https://loginizer.com/?from=pfx-theme"><img src="'.PFX_URL.'/images/loginizer-product.png" width="100%" /></a></span>
</h2>
<div class="inside">
<i>Secure your website with the following features </i>:<br>
<ul class="lz-right-ul">
<li>PasswordLess Login</li>
<li>Two Factor Auth - Email</li>
<li>Two Factor Auth - App</li>
<li>Login Challenge Question</li>
<li>reCAPTCHA</li>
<li>Rename Login Page</li>
<li>Disable XML-RPC</li>
<li>And many more ...</li>
</ul>
<center><a class="button button-primary" href="https://loginizer.com/pricing">Upgrade</a></center>
</div>
</div>';
echo '
<div class="postbox" style="min-width:0px !important;">
<h2 class="hndle ui-sortable-handle">
<span><a target="_blank" href="https://wpcentral.co/?from=pfx-theme"><img src="'.PFX_URL.'/images/wpcentral_product.png" width="100%" /></a></span>
</h2>
<div class="inside">
<i>Manage all your WordPress sites from <b>1 dashboard</b> </i>:<br>
<ul class="pagelayer-right-ul">
<li>1-click Admin Access</li>
<li>Update WordPress</li>
<li>Update Themes</li>
<li>Update Plugins</li>
<li>Backup your WordPress Site</li>
<li>Plugins & Theme Management</li>
<li>Post Management</li>
<li>And many more ...</li>
</ul>
<center><a class="button button-primary" target="_blank" href="https://wpcentral.co/?from=pfx-template">Visit wpCentral</a></center>
</div>
</div>
</td>';
}
echo '
</tr>
</table>
<br />';
if(empty($GLOBALS['sitepad'])){
echo '<div style="width:45%;background:#FFF;padding:15px; margin:auto">
<b>Let your followers know that you use PopularFX to build your website :</b>
<form method="get" action="https://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);">
<textarea name="text" cols="45" row="3" style="resize:none;">I easily built my #WordPress #site using @PopularFXthemes</textarea>
<input type="submit" value="Tweet!" class="button button-primary" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/>
</form>
</div>
<br />
<script>
function dotweet(ele){
window.open(jQuery("#"+ele.id).attr("action")+"?"+jQuery("#"+ele.id).serialize(), "_blank", "scrollbars=no, menubar=no, height=400, width=500, resizable=yes, toolbar=no, status=no");
return false;
}
</script>
<hr />
<a href="'.(isset($popularfx['www_url']) ? esc_url($popularfx['www_url']) : '').'" target="_blank">'.$popularfx['t']->get('Name').'</a> v'.$popularfx['t']->get('Version').' You can report any bugs <a href="'.(isset($popularfx['support_url']) ? esc_url($popularfx['support_url']) : '').'" target="_blank">here</a>.';
}
echo '
</div>
</div>
</div>
</div>';
}
// The License Page
function popularfx_license(){
global $popularfx, $pl_error, $lic_resp;
if(!empty($_REQUEST['install_pro'])){
pfx_install_pagelayer_pro($popularfx['license']['license']);
return;
}
// 108 fixer option
if(isset($_REQUEST['redownload'])){
pfx_redownload_template_fix();
}
if(isset($_REQUEST['save_pfx_license'])){
check_admin_referer('popularfx-options');
}
// Is there a license key ?
if(isset($_POST['save_pfx_license'])){
$license = pfx_optpost('popularfx_license');
// Check if its a valid license
if(empty($license)){
$pl_error['lic_invalid'] = __('The license key was not submitted', 'popularfx');
return popularfx_license_T();
}
pfx_load_license($license);
if(is_array($lic_resp)){
$json = json_decode($lic_resp['body'], true);
//print_r($json);
}else{
$pl_error['resp_invalid'] = __('The response was malformed<br>', 'popularfx').var_export($lic_resp, true);
return popularfx_license_T();
}
// Save the License
if(empty($json['license'])){
$pl_error['lic_invalid'] = __('The license key is invalid', 'popularfx');
return popularfx_license_T();
}else{
// Mark as saved
$GLOBALS['pl_saved'] = true;
}
}
popularfx_license_T();
}
// The License Page - THEME
function popularfx_license_T(){
global $popularfx, $pagelayer, $pl_error;
popularfx_page_header('PopularFX License');
// Saved ?
if(!empty($GLOBALS['pl_saved'])){
echo '<div class="notice notice-success"><p>'. __('The settings were saved successfully', 'popularfx'). '</p></div><br />';
}
// Saved ?
if(!empty($GLOBALS['pl_redownload'])){
echo '<div class="notice notice-success"><p>'. __('The template was redownloaded successfully', 'popularfx'). '</p></div><br />';
}
// If the license is active and you are the free version, then suggest to install the pro
if(!empty($popularfx['license']['status']) && !defined('PAGELAYER_PREMIUM') && empty($_REQUEST['install_pro'])){
echo '<div class="updated"><p>'. __('You have activated the license, but are using the Free version ! <a href="'.admin_url('admin.php?page=popularfx&install_pro=1').'" class="button button-primary">Install Pagelayer Pro Now</a>', 'pagelayer'). '</p></div><br />';
}
// Pagelayer required notice
if(!defined('PAGELAYER_VERSION')){
echo '<div class="notice notice-warning"><p>'. __('It seems that PageLayer is not installed / active, the PopularFX needs PageLayer to work without any problems! <a href="'.admin_url('plugin-install.php?s=pagelayer&tab=search').'" class="button button-primary" target="_blank">Install / Active Pagelayer Now</a>'). '</p></div><br />';
}
// Any errors ?
if(!empty($pl_error)){
pagelayer_report_error($pl_error);echo '<br />';
}
$slug = get_theme_mod('popularfx_template');
?>
<div class="postbox">
<h2 class="hndle ui-sortable-handle">
<span><?php echo __('System Information', 'popularfx'); ?></span>
</h2>
<div class="inside">
<form action="" method="post" enctype="multipart/form-data">
<?php wp_nonce_field('popularfx-options'); ?>
<table class="wp-list-table fixed striped users" cellspacing="1" border="0" width="95%" cellpadding="10" align="center">
<?php
echo '
<tr>
<th align="left" width="25%">'.__('Theme Name', 'popularfx').'</th>
<td>'.$popularfx['t']->get('Name').'</td>
</tr>
<tr>
<th align="left" width="25%">'.__('Theme Version', 'popularfx').'</th>
<td>'.$popularfx['t']->get('Version').'</td>
</tr>
<tr>
<th align="left" width="25%">'.__('PopularFX Plugin Version', 'popularfx').'</th>
<td>'.PFX_VERSION.'</td>
</tr>';
if(is_super_admin()){
echo '
<tr>
<th align="left" valign="top">'.__('PopularFX License', 'popularfx').'</th>
<td align="left">
'.(empty($popularfx['license']) ? '<span style="color:red">Free Version</span> ' : '').'
<input type="text" name="popularfx_license" value="'.(empty($popularfx['license']) ? '' : $popularfx['license']['license']).'" size="30" placeholder="e.g. PFX-11111-22222-33333-44444" style="width:300px;" />
<input name="save_pfx_license" class="button button-primary" value="Update License" type="submit" />';
if(!empty($popularfx['license'])){
$expires = $popularfx['license']['expires'];
$expires = substr($expires, 0, 4).'/'.substr($expires, 4, 2).'/'.substr($expires, 6);
echo '<div style="margin-top:10px;">License Status : '.(empty($popularfx['license']['status_txt']) ? 'N.A.' : $popularfx['license']['status_txt']).'
License Expires : '.($popularfx['license']['expires'] <= date('Ymd') ? '<span style="color:red">'.$expires.'</span>' : $expires).'
</div>';
}else{
echo '<div style="margin-top:10px;">You are currently using the free version. If you have a Pro License, please enter it here to unlock the Pro features. You can buy a Pro license from our <a href="'.PFX_PRO_URL.'">website</a>.</div>';
}
echo
'</td>
</tr>';
}
echo '<tr>
<th align="left" width="25%">'.__('Pagelayer Version', 'popularfx').'</th>
<td>'.
(defined('PAGELAYER_VERSION')
? PAGELAYER_VERSION
: '<a href="'.admin_url('plugin-install.php?s=pagelayer&tab=search').'" class="button button-primary" target="_blank">Install/Active Pagelayer Now</a>') .
(defined('PAGELAYER_PREMIUM') ? ' (PRO Version)' : '')
.'</td>
</tr>
<tr>
<th align="left" width="25%">'.__('Current Template', 'popularfx').'</th>
<td>'.(empty($slug) ? 'N.A.' : ucfirst($slug).' <a class="button primary-button" href="'.admin_url('admin.php?page=popularfx&redownload=1').'">Re-Download Template</a>').'</td>
</tr>
<tr>
<th align="left">'.__('URL', 'popularfx').'</th>
<td>'.home_url().'</td>
</tr>
<tr>
<th align="left">'.__('Path', 'popularfx').'</th>
<td>'.ABSPATH.'</td>
</tr>
<tr>
<th align="left">'.__('Server\'s IP Address', 'popularfx').'</th>
<td>'.$_SERVER['SERVER_ADDR'].'</td>
</tr>
<tr>
<th align="left">'.__('wp-config.php is writable', 'popularfx').'</th>
<td>'.(is_writable(ABSPATH.'/wp-config.php') ? '<span style="color:red">Yes</span>' : '<span style="color:green">No</span>').'</td>
</tr>';
if(file_exists(ABSPATH.'/.htaccess')){
echo '
<tr>
<th align="left">'.__('.htaccess is writable', 'popularfx').'</th>
<td>'.(is_writable(ABSPATH.'/.htaccess') ? '<span style="color:red">Yes</span>' : '<span style="color:green">No</span>').'</td>
</tr>';
}
?>
</table>
</form>
</div>
</div>
<?php
popularfx_page_footer();
}
}PK �f\� N2� 2� freemium.phpnu �[��� <?php
//////////////////////////////////////////////////////////////
//===========================================================
// freemium.php
//===========================================================
// PAGELAYER
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Pulkit Gupta
// Date: 23rd Jan 2017
// Time: 23:00 hrs
// Site: http://pagelayer.com/wordpress (PAGELAYER)
// ----------------------------------------------------------
// Please Read the Terms of use at http://pagelayer.com/tos
// ----------------------------------------------------------
//===========================================================
// (c)Pagelayer Team
//===========================================================
//////////////////////////////////////////////////////////////
// Are we being accessed directly ?
if(!defined('PAGELAYER_VERSION')) {
exit('Hacking Attempt !');
}
global $pagelayer;
// Posts options style
$pagelayer_posts_options = array(
'type' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'default',
'list' => array(
'default' => __pl('default'),
),
),
'infinite_types' => array(
'type' => 'radio',
'label' => __pl('infinite_scroll'),
'addClass' => ['pagelayer-infinite-posts','{{element}} .pagelayer-posts-container' => 'pagelayer-infinite-scroll-{{val}}'],
'list' => array(
'' => __pl('none'),
'button' => __pl('Button'),
'auto' => __pl('Auto'),
),
'req' => ['!enable_slider' => 'true'],
),
'alignment' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'addClass' => 'pagelayer-arc-layout-{{val}}',
'list' => array(
'' => __pl('default'),
'left' => __pl('left'),
'right' => __pl('right'),
'alt' => __pl('Alternative')
),
),
'columns' => array(
'type' => 'select',
'label' => __pl('columns'),
'np' => 1,
'screen' => 1,
'css' => ['{{element}} .pagelayer-posts-container' => 'grid-template-columns: repeat({{val}},1fr);'],
'list' => array(
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
),
),
'col_gap' => array(
'type' => 'slider',
'label' => __pl('col_gap'),
'min' => 0,
'step' => 1,
'max' => 100,
'screen' => 1,
'css' => ['{{element}} .pagelayer-posts-container' => 'grid-column-gap: {{val}}px;'],
),
'row_gap' => array(
'type' => 'slider',
'label' => __pl('row_gap'),
'min' => 0,
'step' => 1,
'max' => 100,
'screen' => 1,
'css' => ['{{element}} .pagelayer-posts-container' => 'grid-row-gap: {{val}}px;'],
),
'data_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'default' => '5,5,5,5',
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-content' => 'padding : {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'data_margin' => array(
'type' => 'padding',
'label' => __pl('margin'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-col' => 'margin :{{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'bg_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-wposts-col' => 'background-color:{{val}};'],
),
'box_shadow' => array(
'type' => 'box_shadow',
'label' => __pl('box_shadow'),
'css' => ['{{element}} .pagelayer-wposts-col' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'],
),
'post_bor_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
)
),
'post_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} .pagelayer-wposts-col' => 'border-style: {{val}};',
],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'post_bor_hover' => ''
),
),
'post_border_color' => array(
'type' => 'color',
'label' => __pl('border_color_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-wposts-col' => 'border-color: {{val}};'],
'req' => array(
'!post_border_type' => ''
),
'show' => array(
'post_bor_hover' => ''
),
),
'post_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-col' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!post_border_type' => ''
],
'show' => array(
'post_bor_hover' => ''
),
),
'post_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-col' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!post_border_type' => '',
),
'show' => array(
'post_bor_hover' => '',
),
),
'post_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} .pagelayer-wposts-col:hover' => 'border-style: {{val}}',
],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'post_bor_hover' => 'hover'
),
),
'post_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color_hover_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-wposts-col:hover' => 'border-color: {{val}};'],
'req' => array(
'!post_border_type_hover' => ''
),
'show' => array(
'post_bor_hover' => 'hover'
),
),
'post_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width_hover'),
'screen' => 1,
'css' => [
'{{element}} .pagelayer-wposts-col:hover' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'
],
'req' => [
'!post_border_type_hover' => ''
],
'show' => array(
'post_bor_hover' => 'hover'
),
),
'post_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-col:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!post_border_type_hover' => '',
),
'show' => array(
'post_bor_hover' => 'hover',
),
),
'anim_hover' => array(
'type' => 'select',
'label' => __pl('Post Animation'),
'addClass' => ['{{element}} .pagelayer-wposts-col' => 'pagelayer-animation-{{val}}'],
'list' => [
'' => __pl('none'),
'grow' => __pl('Grow'),
'shrink' => __pl('Shrink'),
'pulse' => __pl('Pulse'),
'pulse-grow' => __pl('Pulse Grow'),
'pulse-shrink' => __pl('Pulse Shrink'),
'push' => __pl('Push'),
'pop' => __pl('Pop'),
'buzz' => __pl('Buzz'),
'buzz-out' => __pl('Buzz Out'),
'float' => __pl('Float'),
'sink' => __pl('Sink'),
'bob' => __pl('Bob'),
'hang' => __pl('Hang'),
'bounce-in' => __pl('Bounce In'),
'bounce-out' => __pl('Bounce Out'),
'rotate' => __pl('Rotate'),
'grow-rotate' => __pl('Grow Rotate'),
'skew-forward' => __pl('Skew Forward'),
'skew-backward' => __pl('Skew Backward'),
'wobble-vertical' => __pl('Wobble Vertical'),
'wobble-horizontal' => __pl('Wobble Horizontal'),
'wobble-bottom-to-right' => __pl('Wobble Bottom To Right'),
'wobble-top-to-right' => __pl('Wobble Top To Right'),
'wobble-top' => __pl('Wobble Top'),
'wobble-bottom' => __pl('Wobble Bottom'),
'wobble-skew' => __pl('Wobble Skew'),
],
)
);
// Posts thumb style
$pagelayer_thumb_style = [
'show_thumb' => array(
'label' => __pl('show_thumb'),
'type' => 'checkbox',
'default' => 'true',
//'addAttr' => ['{{element}} a' => 'target="_blank"'],
),
'thumb_img_type' => array(
'type' => 'select',
'label' => __pl('thumb_img_type'),
'list' => array(
'' => __pl('default'),
'custom' => __pl('custom')
),
'req' => ['show_thumb' => 'true'],
),
'def_thumb_img' => array(
'type' => 'image',
'label' => __pl('image'),
'req' => [
'show_thumb' => 'true',
'thumb_img_type' => 'custom',
]
),
'thumb_size' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'medium_large',
'list' => pagelayer_image_sizes(),
'req' => ['show_thumb' => 'true'],
),
'ratio' => array(
'type' => 'slider',
'label' => __pl('ratio'),
'min' => 0,
'step' => 0.1,
'max' => 2,
'default' => 0.7,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-thumb' => 'padding: calc(50% * {{val}}) 0;'],
'req' => ['show_thumb' => 'true'],
),
];
// Posts type style
$pagelayer_title_style = [
'show_title' => array(
'type' => 'checkbox',
'label' => __pl('show_title'),
'default' => 'true',
),
'title_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-wposts-title' => 'color:{{val}};'],
'req' => ['show_title' => 'true'],
),
'title_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',18,,,,,,,,,',
'css' => ['{{element}} .pagelayer-wposts-title' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => ['show_title' => 'true'],
),
'title_spacing' => array(
'type' => 'dimension',
'label' => __pl('top_bottom_spacing'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-title' => 'padding-top:{{val[0]}}px; padding-bottom:{{val[1]}}px;'],
'req' => ['show_title' => 'true'],
),
];
// Posts meta options
$pagelayer_meta_style = [
'meta' => array(
'type' => 'multiselect',
'label' => __pl('meta'),
'default' => 'author,date',
'list' => array(
'date' => __pl('date'),
'author' => __pl('author'),
'comments' => __pl('comments'),
'tags' => __pl('tags'),
'category' => __pl('category'),
),
),
'meta_sep' => array(
'type' => 'text',
'label' => __pl('separator'),
'default' => ' | ',
),
'meta_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-wposts-meta *' => 'color:{{val}};'],
),
'meta_bg' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => ['{{element}} .pagelayer-wposts-meta' => 'background-color:{{val}};'],
),
'meta_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-meta' => 'text-align:{{val}};'],
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
),
'meta_spacing' => array(
'type' => 'padding',
'label' => __pl('spacing'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-meta' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
),
'meta_bor_rad' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'units' => ['px', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-meta' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
),
'meta_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => [
'{{element}} .pagelayer-wposts-meta *' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
'{{element}} .pagelayer-wposts-sep' => 'font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important;'
],
),
'meta_tag_pos' => array(
'type' => 'select',
'label' => __pl('position'),
'screen' => 1,
'css' => [
'{{element}} .pagelayer-wposts-post' => 'position: relative;',
'{{element}} .pagelayer-wposts-meta' => 'position: {{val}};'
],
'list' => array(
'' => __pl('default'),
'relative' => __pl('relative'),
'absolute' => __pl('absolute')
),
),
'meta_width' => [
'type' => 'slider',
'label' => __pl('width'),
'screen' => 1,
'units' => ['px','%','em'],
'css' => ['{{element}} .pagelayer-wposts-meta' => 'width:{{val}};'],
'min' => 0,
'max' => 1000,
'step' => 1,
'req' => ['!meta_tag_pos' => '']
],
'meta_vposition' => [
'type' => 'select',
'label' => __pl('verticle_pos'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-meta' => '{{val}}:0;'],
'list' => [
'' => __pl('default'),
'top' => __pl('top'),
'bottom' => __pl('bottom')
],
'req' => ['!meta_tag_pos' => '']
],
'meta_vposition_offset' => [
'type' => 'slider',
'label' => __pl('ver_offset'),
'screen' => 1,
'units' => ['px','%','em'],
'css' => ['{{element}} .pagelayer-wposts-meta' => '{{meta_vposition}}:{{val}};'],
'min' => -1000,
'max' => 1000,
'step' => 1,
'req' => [
'!meta_vposition' => '',
'!meta_tag_pos' => ''
]
],
'meta_hposition' => [
'type' => 'select',
'label' => __pl('horizontal_pos'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-meta' => '{{val}}:0;'],
'list' => [
'' => __pl('default'),
'left' => __pl('left'),
'right' => __pl('right')
],
'req' => ['!meta_tag_pos' => '']
],
'meta_hposition_offset' => [
'type' => 'slider',
'label' => __pl('hor_offset'),
'screen' => 1,
'units' => ['px','%','em'],
'css' => ['{{element}} .pagelayer-wposts-meta' => '{{meta_hposition}}:{{val}};'],
'min' => -1000,
'max' => 1000,
'step' => 1,
'req' => [
'!meta_hposition' => '',
'!meta_tag_pos' => ''
]
]
];
// Posts content style
$pagelayer_content_style = [
'show_content' => array(
'type' => 'select',
'label' => __pl('show_content'),
'default' => 'excerpt',
'list' => array(
'' => __pl('none'),
'excerpt' => __pl('excerpt'),
'full' => __pl('full'),
),
),
'exc_length' => array(
'type' => 'spinner',
'label' => __pl('exc_length'),
'min' => 0,
'step' => 1,
'max' => 500,
'default' => 10,
'req' => ['show_content' => 'excerpt']
),
'content_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#121212',
'css' => ['{{element}} .pagelayer-wposts-content' => 'color:{{val}};'],
),
'content_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-content .pagelayer-wposts-excerpt' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'content_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-wposts-excerpt' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'content_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'left',
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-content' => 'text-align:{{val}};'],
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
),
];
//Post Infinite Style
$pagelayer_infinite_style = array(
'infinite_text' => array(
'type' => 'text',
'label' => __pl('Button Text'),
'default' => 'Load More',
'req' => ['infinite_types' => 'button']
),
'infinite_final' => array(
'type' => 'text',
'addAttr' => ['{{element}} .pagelayer_load_button' => 'data-text="{{infinite_final}}"'],
'label' => __pl('Post End Message'),
'default' => 'No More Post',
),
'infinite_full_width' => array(
'type' => 'checkbox',
'label' => __pl('stretch'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-load' => 'width: 100% !important; text-align: center;',
'{{element}} .pagelayer_load_button' =>'text-align: center;'],
),
'btn_typo' => array(
'type' => 'typography',
'label' => __pl('quote_content_typo'),
'css' => [
'{{element}} .pagelayer-btn-load-text' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
'{{element}} .pagelayer_load_button' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
],
),
'load_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer_load_button' => 'text-align:{{val}}'],
'req' => ['infinite_types' => 'button', 'infinite_full_width' => '']
),
'load_margin' => array(
'type' => 'padding',
'label' => __pl('margin'),
'screen' => 1,
'css' => ['{{element}} .pagelayer_load_button' => 'margin :{{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'load_btn_icon' => array(
'type' => 'icon',
'label' => __pl('service_box_font_icon_label'),
),
'load_btn_icon_position' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'pagelayer-btn-icon-left',
'list' => array(
'pagelayer-btn-icon-left' => __pl('left'),
'pagelayer-btn-icon-right' => __pl('right')
),
'req' => array(
'!load_btn_icon' => ''
),
),
'load_btn_icon_spacing' => array(
'type' => 'slider',
'label' => __pl('icon_spacing'),
'min' => 1,
'step' => 1,
'max' => 100,
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-load-icon' => 'padding: 0 {{val}}px;'],
'req' => ['!btn_icon' => ''],
),
'infinite_btn_type' => array(
'type' => 'select',
'label' => __pl('button_type_label'),
'default' => 'pagelayer-btn-default',
'list' => array(
'pagelayer-btn-default' => __pl('btn_type_default'),
'pagelayer-btn-primary' => __pl('btn_type_primary'),
'pagelayer-btn-secondary' => __pl('btn_type_secondary'),
'pagelayer-btn-success' => __pl('btn_type_success'),
'pagelayer-btn-info' => __pl('btn_type_info'),
'pagelayer-btn-warning' => __pl('btn_type_warning'),
'pagelayer-btn-danger' => __pl('btn_type_danger'),
'pagelayer-btn-dark' => __pl('btn_type_dark'),
'pagelayer-btn-light' => __pl('btn_type_light'),
'pagelayer-btn-link' => __pl('btn_type_link'),
'pagelayer-btn-anim' => __pl('btn_type_anim'),
'pagelayer-btn-custom' => __pl('btn_type_custom')
),
),
'infinite_anim_type' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'glow',
'addClass' => ['{{element}} .pagelayer-btn-load' => 'pagelayer-btn-anim-{{val}}'],
'list' => array(
'glow' => __pl('glow_button'),
'thin' => __pl('thin_button'),
'slide' => __pl('slide_button')
),
'req' => array(
'infinite_btn_type' => 'pagelayer-btn-anim'
),
),
'infinite_direction' => array(
'type' => 'select',
'label' => __pl('animation_direction'),
'default' => 'pagelayer-btn-anim-left',
'addClass' => ['{{element}} .pagelayer-btn-load' => '{{val}}'],
'list' => array(
'pagelayer-btn-anim-left' => __pl('left'),
'pagelayer-btn-anim-right' => __pl('right'),
),
'req' => array(
'infinite_anim_type' => 'slide',
'infinite_btn_type' => 'pagelayer-btn-anim',
),
),
'infinite_btn_size' => array(
'type' => 'select',
'label' => __pl('button_size_label'),
'default' => 'pagelayer-btn-large',
'list' => array(
'pagelayer-btn-mini' => __pl('mini'),
'pagelayer-btn-small' => __pl('small'),
'pagelayer-btn-large' => __pl('large'),
'pagelayer-btn-extra-large' => __pl('extra_large'),
'pagelayer-btn-double-large' => __pl('double_large'),
'pagelayer-btn-custom' => __pl('custom'),
)
),
'infinite_btn_custom_size' => array(
'type' => 'spinner',
'label' => __pl('btn_custom_size'),
'min' => 1,
'step' => 1,
'max' => 100,
'default' => 5,
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-load' => 'padding: calc({{val}}px / 2) {{val}}px;'],
'req' => array(
'infinite_btn_size' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
),
),
'infinite_btn_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => array(
'infinite_btn_type' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
),
),
'infinite_btn_bg_color' => array(
'type' => 'color',
'label' => __pl('btn_bg_color_label'),
'default' => '#818a91',
'css' => [
'{{element}} .pagelayer-btn-load' => 'background-color: {{val}};',
'{{element}} .pagelayer-btn-anim-thin' => 'background-color: unset !important;',
'{{element}} .pagelayer-btn-anim-thin::before' => 'background-color: {{val}};',
'{{element}} .pagelayer-btn-anim-thin::after' => 'background-color: {{val}};',
],
'req' => array(
'infinite_btn_type' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
),
'show' => array(
'infinite_btn_hover' => ''
),
),
'infinite_btn_color' => array(
'type' => 'color',
'label' => __pl('btn_color_label'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-btn-load' => 'color: {{val}};'],
'req' => array(
'infinite_btn_type' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
),
'show' => array(
'infinite_btn_hover' => ''
),
),
'infinite_btn_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('btn_hover_delay_label'),
'desc' => __pl('btn_hover_delay_desc'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 400,
'css' => ['{{element}} .pagelayer-btn-load' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
'show' => array(
'infinite_btn_type' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
'infinite_btn_hover' => 'hover'
),
),
'infinite_btn_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('btn_bg_color_hover_label'),
'css' => [
'{{element}} .pagelayer-btn-custom:hover, {{element}} .pagelayer-btn-anim-slide:after' => 'background-color: {{val}};',
],
'req' => array(
'infinite_btn_type' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
'!infinite_anim_type' => ['glow','thin'],
),
'show' => array(
'infinite_btn_hover' => 'hover',
'!infinite_anim_type' => ['glow','thin'],
),
),
'infinite_btn_color_hover' => array(
'type' => 'color',
'label' => __pl('btn_color_hover_label'),
'css' => ['{{element}} .pagelayer-btn-load:hover' => 'color: {{val}};'],
'req' => array(
'infinite_btn_type' => ['pagelayer-btn-custom','pagelayer-btn-anim'],
),
'show' => array(
'infinite_btn_hover' => 'hover'
),
),
'infinite_btn_shadow' => [
'type' => 'box_shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} .pagelayer-btn-load' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'],
],
'infinite_btn_shadow_hover' => [
'type' => 'box_shadow',
'label' => __pl('box_shadow_hover'),
'css' => ['{{element}} .pagelayer-btn-load:hover' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'],
],
'infinite_btn_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} .pagelayer-btn-load, {{element}} .pagelayer-btn-anim-thin:after, {{element}} .pagelayer-btn-anim-thin:before' => 'border-style: {{val}};',
'{{element}} .pagelayer-btn-anim-thin' => 'border-style: unset !important;',
],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'infinite_btn_hover' => ''
),
),
'infinite_btn_border_color' => array(
'type' => 'color',
'label' => __pl('border_color_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-btn-load' => 'border-color: {{val}};'],
'req' => array(
'!infinite_btn_border_type' => ''
),
'show' => array(
'infinite_btn_hover' => ''
),
),
'infinite_btn_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-load, {{element}} .pagelayer-btn-anim-thin:after, {{element}} .pagelayer-btn-anim-thin:before' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!infinite_btn_border_type' => ''
],
'show' => ['infinite_btn_hover' => ''],
),
'infinite_btn_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-load, {{element}} .pagelayer-btn-anim-glow:before' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!infinite_btn_border_type' => '',
'!infinite_anim_type' => 'slide'
),
'show' => array(
'infinite_btn_hover' => '',
'!infinite_anim_type' => 'slide'
),
),
'infinite_btn_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} .pagelayer-btn-load:hover, {{element}} .pagelayer-btn-anim-thin:hover:after, {{element}} .pagelayer-btn-anim-thin:hover:before' => 'border-style: {{val}}',
'{{element}} .pagelayer-btn-anim-thin:hover' => 'border-style: unset !important;',
],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'infinite_btn_hover' => 'hover'
),
),
'infinite_btn_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color_hover_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-btn-load:hover' => 'border-color: {{val}};'],
'req' => array(
'!btn_border_type_hover' => ''
),
'show' => array(
'infinite_btn_hover' => 'hover'
),
),
'infinite_btn_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width_hover'),
'screen' => 1,
'css' => [
'{{element}} .pagelayer-btn-load:hover, {{element}} .pagelayer-btn-anim-thin:hover:after, {{element}} .pagelayer-btn-anim-thin:hover:before' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'
],
'req' => [
'!infinite_btn_border_type_hover' => ''
],
'show' => array(
'infinite_btn_hover' => 'hover'
),
),
'infinite_btn_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-load:hover, {{element}} .pagelayer-btn-anim-glow:before' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!btn_border_type_hover' => '',
'!anim_type' => 'slide'
),
'show' => array(
'infinite_btn_hover' => 'hover',
'!infinite_anim_type' => 'slide'
),
),
);
// Post More style
$pagelayer_more_style = [
'show_more' => array(
'type' => 'checkbox',
'label' => __pl('show'),
),
'more' => array(
'type' => 'text',
'label' => __pl('text'),
'default' => 'read more »',
'req' => ['show_more' => 'true'],
),
'more_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-wposts-more' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => ['show_more' => 'true'],
),
'full_width' => array(
'type' => 'checkbox',
'label' => __pl('stretch'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'width: 100%; text-align: center;'],
'req' => ['show_more' => 'true'],
),
'align' => array(
'type' => 'radio',
'label' => __pl('obj_align_label'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-mdiv' => 'text-align: {{val}}'],
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
),
'req' => array(
'full_width' => '',
'show_more' => 'true',
)
),
'icon' => array(
'type' => 'icon',
'label' => __pl('service_box_font_icon_label'),
'req' => ['show_more' => 'true'],
),
'icon_position' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'pagelayer-btn-icon-left',
'list' => array(
'pagelayer-btn-icon-left' => __pl('left'),
'pagelayer-btn-icon-right' => __pl('right')
),
'req' => [
'show_more' => 'true',
'!icon' => ''
],
),
'icon_spacing' => array(
'type' => 'slider',
'label' => __pl('icon_spacing'),
'min' => 1,
'step' => 1,
'max' => 100,
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-icon' => 'padding: 0 {{val}}px;'],
'req' => array(
'!icon' => '',
'show_more' => 'true',
),
),
'btn_type' => array(
'type' => 'select',
'label' => __pl('button_type'),
//'addClass' => ['{{element}} .pagelayer-btn-holder' => '{{val}}'],
'list' => array(
'pagelayer-btn-link' => __pl('btn_type_link'),
'pagelayer-btn-default' => __pl('btn_type_default'),
'pagelayer-btn-primary' => __pl('btn_type_primary'),
'pagelayer-btn-secondary' => __pl('btn_type_secondary'),
'pagelayer-btn-success' => __pl('btn_type_success'),
'pagelayer-btn-info' => __pl('btn_type_info'),
'pagelayer-btn-warning' => __pl('btn_type_warning'),
'pagelayer-btn-danger' => __pl('btn_type_danger'),
'pagelayer-btn-dark' => __pl('btn_type_dark'),
'pagelayer-btn-light' => __pl('btn_type_light'),
'pagelayer-btn-custom' => __pl('btn_type_custom')
),
'req' => ['show_more' => 'true'],
),
'size' => array(
'type' => 'select',
'label' => __pl('button_size_label'),
'list' => array(
'pagelayer-btn-mini' => __pl('mini'),
'pagelayer-btn-small' => __pl('small'),
'pagelayer-btn-large' => __pl('large'),
'pagelayer-btn-extra-large' => __pl('extra_large'),
'pagelayer-btn-double-large' => __pl('double_large'),
'pagelayer-btn-custom' => __pl('custom'),
),
'req' => ['show_more' => 'true'],
),
'btn_custom_size' => array(
'type' => 'dimension',
'label' => __pl('btn_custom_size'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-more.pagelayer-btn-holder' => 'padding: {{val[0]}}px {{val[1]}}px;'],
'req' => array(
'size' => 'pagelayer-btn-custom',
'show_more' => 'true',
),
),
'btn_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => '',
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => array(
'btn_type' => 'pagelayer-btn-custom',
'show_more' => 'true',
),
),
'btn_bg_color' => array(
'type' => 'color',
'label' => __pl('btn_bg_color_label'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'background-color: {{val}};'],
'req' => array(
'btn_type' => 'pagelayer-btn-custom',
'show_more' => 'true',
),
'show' => array(
'btn_hover' => ''
),
),
'more_color' => array(
'type' => 'color',
'label' => __pl('color'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-more' => 'color:{{val}};'],
'req' => array(
'btn_type' => 'pagelayer-btn-custom',
'show_more' => 'true',
),
'show' => array(
'btn_hover' => ''
),
),
'btn_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('btn_hover_delay_label'),
'desc' => __pl('btn_hover_delay_desc'),
'min' => 0,
'step' => 100,
'max' => 5000,
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
'show' => array(
'btn_hover' => 'hover'
),
'req' => ['show_more' => 'true'],
),
'btn_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('btn_bg_color_hover_label'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'background-color: {{val}};'],
'req' => array(
'btn_type' => 'pagelayer-btn-custom',
'show_more' => 'true',
),
'show' => array(
'btn_hover' => 'hover'
),
),
'more_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wposts-more:hover' => 'color:{{val}};'],
'req' => array(
'btn_type' => 'pagelayer-btn-custom',
'show_more' => 'true',
),
'show' => array(
'btn_hover' => 'hover'
),
),
];
// Post More style
$pagelayer_btn_border_style = [
'btn_bor_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => '',
//'no_val' => 1,// Dont set any value to element
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
)
),
'btn_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'btn_bor_hover' => ''
)
),
'btn_border_color' => array(
'type' => 'color',
'label' => __pl('border_color_label'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-color: {{val}};'],
'req' => array(
'!btn_border_type' => ''
),
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!btn_border_type' => ''
],
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!btn_border_type' => ''
),
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'btn_bor_hover' => 'hover'
)
),
'btn_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color_hover_label'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-color: {{val}};'],
'req' => array(
'!btn_border_type_hover' => ''
),
'show' => array(
'btn_bor_hover' => 'hover'
),
),
'btn_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!btn_border_type_hover' => ''
],
'show' => array(
'btn_bor_hover' => 'hover'
),
),
'btn_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!btn_border_type_hover' => ''
),
'show' => array(
'btn_bor_hover' => 'hover'
),
),
];
// Archives Post title
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_archive_title', array(
'name' => __pl('archive_title'),
'group' => 'archive',
'html' => '<div class="pagelayer-archive-title">'. pagelayer_get_the_title() .'</div>',
'params' => array(
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'list' => [
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
],
'css' => ['{{element}} .pagelayer-archive-title' => 'text-align: {{val}}'],
),
'color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-archive-title' => 'color:{{val}}'],
),
'typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-archive-title' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
)
)
);
// Archive Posts shows the posts as per the QUERY of the current page
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_archive_posts', array(
'name' => __pl('archive_posts'),
'group' => 'archive',
'html' => '{{pagelayer_pagination_top}}
<div class="pagelayer-posts-container">{{pagelayer_archive_posts}}</div>
{{pagelayer_pagination_bottom}}
<div if="{{infinite_types}}" class="pagelayer_load_button" data-text={{infinite_final}}>
<a class="pagelayer-btn-holder pagelayer-btn-load pagelayer-ele-link {{infinite_btn_type}} {{infinite_btn_size}} {{load_btn_icon_position}}">
<i if="{{load_btn_icon}}" class="{{load_btn_icon}} pagelayer-btn-load-icon"></i>
<span if="{{infinite_text}}" class="pagelayer-btn-load-text" >{{infinite_text}}</span>
<i if="{{load_btn_icon}}" class="{{load_btn_icon}} pagelayer-btn-load-icon"></i>
</a>
<div class="pagelayer-loader-holder" >
<i class="fa fa-spinner fa-spin fa-3x fa-fw" aria-hidden="true"></i>
</div>
</div>',
'params' => $pagelayer_posts_options,
'thumb_style' => $pagelayer_thumb_style,
'title_style' => $pagelayer_title_style,
'meta_options' => $pagelayer_meta_style,
'content_style' => $pagelayer_content_style,
'more_style' => $pagelayer_more_style,
'infinite' => $pagelayer_infinite_style,
'paginate_links' => array(
'pagination' => array(
'type' => 'select',
'label' => __pl('pagination'),
'default' => 'number_prev_next',
'list' => array(
'' => __pl('none'),
'number' => __pl('number'),
'number_prev_next' => __pl('number_prev_next'),
),
),
'pagination_on' => array(
'type' => 'select',
'label' => __pl('pagination_on'),
'list' => array(
'' => __pl('bottom'),
'top' => __pl('top'),
),
'req' => ['!pagination' => '']
),
'pagi_prev_text' => array(
'type' => 'text',
'label' => __pl('prev_text'),
'default' => 'Previous',
'req' => ['!pagination' => ['', 'number']]
),
'pagi_next_text' => array(
'type' => 'text',
'label' => __pl('next_text'),
'default' => 'Next',
'req' => ['!pagination' => ['', 'number']]
),
'pagi_end_size' => array(
'type' => 'spinner',
'label' => __pl('pagi_end_size'),
'default' => 1,
'req' => ['!pagination' => '']
),
'pagi_mid_size' => array(
'type' => 'spinner',
'label' => __pl('pagi_mid_size'),
'default' => 2,
'req' => ['!pagination' => '']
),
'before_page_number' => array(
'type' => 'text',
'label' => __pl('before_page_number'),
'req' => ['!pagination' => '']
),
'after_page_number' => array(
'type' => 'text',
'label' => __pl('after_page_number'),
'req' => ['!pagination' => '']
),
),
'paginate_links_style' => array(
'pagi_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => [
'{{element}} .pagelayer-pagination' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
],
'req' => ['!pagination' => '']
),
'pagi_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-pagination' => 'text-align:{{val}}'],
'req' => ['!pagination' => '']
),
'pagi_colors' => array(
'type' => 'radio',
'label' => __pl('colors'),
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
'active' => __pl('active'),
),
'req' => ['!pagination' => '']
),
'pagi_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-pagination a.page-numbers' => 'color:{{val}}'],
'show' => [ 'pagi_colors' => 'normal'],
'req' => ['!pagination' => '']
),
'pagi_hover_color' => array(
'type' => 'color',
'label' => __pl('current_color'),
'css' => ['{{element}} .pagelayer-pagination a.page-numbers:hover' => 'color:{{val}}'],
'show' => [ 'pagi_colors' => 'hover'],
'req' => ['!pagination' => '']
),
'pagi_current_color' => array(
'type' => 'color',
'label' => __pl('current_color'),
'css' => ['{{element}} .pagelayer-pagination .current' => 'color:{{val}}'],
'show' => [ 'pagi_colors' => 'active']
),
'pagi_space_between' => array(
'type' => 'slider',
'label' => __pl('space_between'),
'css' => ['{{element}} .pagelayer-pagination .page-numbers:not(:last-child)' => 'margin-right:{{val}}px'],
'req' => ['!pagination' => '']
),
'pagi_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'css' => ['{{element}} .pagelayer-pagination' => 'padding:{{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => ['!pagination' => '']
),
),
'styles' => array(
'thumb_style' => __pl('thumb_style'),
'title_style' => __pl('title_style'),
'meta_options' => __pl('meta_options'),
'content_style' => __pl('content_style'),
'more_style' => __pl('more_style'),
'paginate_links' => __pl('paginate_links'),
'paginate_links_style' => __pl('paginate_links_style'),
'infinite' => __pl('infinite_scroll'),
),
)
);
// Site Title
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_wp_title', array(
'name' => __pl('Site Title'),
'group' => 'wordpress',
'html' => '<div class="pagelayer-wp-title-content">
<div class="pagelayer-wp-title-section">
<a href="'.get_site_url().'" class="pagelayer-wp-title-link pagelayer-ele-link">
<img if="{{site_logo}}" class="pagelayer-img pagelayer-wp-title-img" src="{{func_image}}" title="{{{logo_img-title}}}" alt="{{{logo_img-alt}}}"/>
<div class="pagelayer-wp-title-holder">
<div class="pagelayer-wp-title-heading">'.get_bloginfo( 'name' ).'</div>
<div if="{{site_desc}}" class="pagelayer-wp-title-desc">'.get_bloginfo( 'description' ).'</div>
</div>
</a>
</div>
<div>',
'params' => array(
'site_title_style' => array(
'type' => 'typography',
'label' => __pl('typography'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-title-heading' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'site_title_state' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'title_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-title-heading' => 'color:{{val}};'],
'show' => ['!site_title_state' => 'hover'],
),
'title_color_hover' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => ['{{element}} .pagelayer-wp-title-heading:hover' => 'color:{{val}};'],
'show' => ['site_title_state' => 'hover'],
),
'title_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('service_icon_hover_delay'),
'min' => 0,
'step' => 100,
'max' => 5000,
'css' => ['{{element}} .pagelayer-wp-title-heading' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => ['site_title_state' => 'hover'],
),
'text-align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'center',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-wp-title-heading' => 'text-align:{{val}};'],
),
'title_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp-title-heading' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'disable_title' => array(
'type' => 'checkbox',
'label' => __pl('disable_title'),
'desc' => __pl('disable_title_exp'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-title-holder' => 'display: none;'],
'req' => ['site_logo' => 'true']
),
),
'site_description' => array(
'site_desc' => array(
'type' => 'checkbox',
'label' => __pl('site_desc'),
'np' => 1,
),
'site_desc_style' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-wp-title-desc' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => ['site_desc' => 'true']
),
'site_desc_state' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => ['site_desc' => 'true']
),
'desc_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => ['{{element}} .pagelayer-wp-title-desc' => 'color:{{val}};'],
'show' => ['site_desc_state' => 'normal'],
'req' => ['site_desc' => 'true']
),
'desc_color_hover' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => ['{{element}} .pagelayer-wp-title-desc:hover' => 'color:{{val}};'],
'show' => ['site_desc_state' => 'hover'],
'req' => ['site_desc' => 'true']
),
'desc_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('service_icon_hover_delay'),
'min' => 0,
'step' => 100,
'max' => 5000,
'css' => ['{{element}} .pagelayer-wp-title-desc' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => ['site_desc_state' => 'hover'],
'req' => ['site_desc' => 'true']
),
'desc_text_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-wp-title-desc' => 'text-align:{{val}};'],
'req' => ['site_desc' => 'true']
),
'desc_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp-title-desc' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => ['site_desc' => 'true']
),
),
'logo_style' => array(
'site_logo' => array(
'type' => 'checkbox',
'label' => __pl('site_logo'),
'np' => 1,
//'desc' => __pl('site_logo_desc'),
),
'logo_img_type' => array(
'type' => 'select',
'label' => __pl('logo_img_type'),
'np' => 1,
'list' => array(
'' => __pl('default_logo'),
'custom-logo' => __pl('custom_logo'),
),
'req' => array(
'site_logo' => 'true'
)
),
'logo_img' => array(
'type' => 'image',
'label' => __pl('logo_select'),
'np' => 1,
'req' => array(
'site_logo' => 'true',
'logo_img_type' => 'custom-logo',
)
),
'logo_img_size' => array(
'type' => 'radio',
'label' => __pl('logo_size'),
'default' => 'full',
'list' => array(
'full' => __pl('full'),
'thumbnail' => __pl('thumbnail'),
'custom' => __pl('custom'),
),
'req' => array(
'site_logo' => 'true'
)
),
'logo_img_custom_size' => array(
'type' => 'slider',
'label' => __pl('logo_custom_size'),
'min' => 10,
'max' => 100,
'default' => 20,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp-title-img' => 'width:{{val}}%; height: auto;'],
'req' => array(
'logo_img_size' => 'custom',
'site_logo' => 'true'
)
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'left',
'list' => array(
'left' => __pl('left'),
'top' => __pl('top'),
'right' => __pl('right')
),
'addClass' => ['{{element}} .pagelayer-wp-title-link' => 'pagelayer-wp-title-align-{{val}}'],
'req' => array(
'site_logo' => 'true'
)
),
'vertical_align' => array(
'type' => 'radio',
'label' => __pl('vertical_alignment'),
'default' => 'middle',
'list' => array(
'top' => __pl('top'),
'middle' => __pl('middle'),
'bottom' => __pl('bottom')
),
'addClass' => ['{{element}} .pagelayer-wp-title-link' => 'pagelayer-wp-title-vertical-{{val}}'],
'req' => ['site_logo' => 'true',
'!align' => 'top']
),
),
'styles' => [
'site_description' => __pl('site_desc'),
'logo_style' => __pl('logo_style'),
]
)
);
// Copyright
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_copyright', array(
'name' => __pl('copyright'),
'group' => 'other',
'icon' => 'fa fa-copyright',
'html' => '<div class="pagelayer-copyright">
<a href="'.home_url().'">
{{copyright_text}}
</a>
</div>',
'params' => array(
'copyright_text' => array(
'type' => 'textarea',
'label' => __pl('text'),
'default' => pagelayer_get_option('pagelayer-copyright')
),
'color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-copyright *, {{element}} .pagelayer-copyright' => 'color:{{val}}']
),
'typography' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-copyright *, {{element}} .pagelayer-copyright' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'list' => [
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
],
'css' => ['{{element}} .pagelayer-copyright' => 'text-align: {{val}}'],
),
)
)
);
// Primary Menu
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_wp_menu', array(
'name' => __pl('primary_menu'),
'group' => 'wordpress',
'html' => '<div class="pagelayer-wp-menu-holder" data-layout="{{layout}}" data-submenu_ind="{{submenu_ind}}" data-drop_breakpoint="{{drop_breakpoint}}">
<div class="pagelayer-primary-menu-bar"><i class="{{menu_toggle_icon}}"></i></div>
<div class="pagelayer-wp-menu-container pagelayer-menu-type-{{layout}} pagelayer-menu-hover-{{pointer}} {{m_animation}} {{slide_style}}" data-align="{{align}}">
<div class="pagelayer-wp_menu-close"><i class="fas fa-times"></i></div>
{{nav_menu}}
</div>
</div>',
'params' => array(
'nav_list' => array(// Never use the same name as we are replacing in IMPORT
'type' => 'menus',
'label' => __pl('select_menu'),
'np' => 1,
'default' => pagelayer_get_menu_list(true),
'list' => pagelayer_get_menu_list(),
),
),
'menu_style' => [
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'default' => 'left',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-wp_menu-ul' => 'text-align:{{val}};'],
),
'layout' => array(
'type' => 'select',
'label' => __pl('layout'),
'default' => 'horizontal',
'list' => array(
'horizontal' => __pl('horizontal'),
'vertical' => __pl('vertical'),
'dropdown' => __pl('dropdown'),
),
),
'drop_breakpoint' => array(
'type' => 'select',
'label' => __pl('drop_breakpoint'),
'np' => 1,
'list' => array(
'none' => __pl('none'),
'mobile' => __pl('mobile'),
'tablet' => __pl('tablet'),
),
'req' => [ '!layout' => 'dropdown']
),
'pointer' => array(
'type' => 'select',
'label' => __pl('pointer'),
'default' => 'underline',
'list' => array(
'' => __pl('none'),
'underline' => __pl('underline'),
'overline' => __pl('overline'),
'doubleline' => __pl('double_line'),
'framed' => __pl('Framed'),
'background' => __pl('bg_color'),
'text' => __pl('text'),
),
),
'm_animation' => array(
'type' => 'select',
'label' => __pl('animation'),
'default' => 'slide',
'list' => array(
'none' => __pl('none'),
'fade' => __pl('fade'),
'slide' => __pl('slide'),
'grow' => __pl('Grow'),
'dropin' => __pl('drop_in'),
'dropout' => __pl('Drop_out'),
),
),
'list_style' => array(
'type' => 'select',
'label' => __pl('list_style'),
'np' => 1,
'default' => 'none',
'list' => array(
'none' => __pl('none'),
'circle' => __pl('list_list_type_circle'),
'decimal' => __pl('decimal'),
'square' => __pl('list_list_type_square'),
'disc' => __pl('list_list_type_disc'),
'inherit' => __pl('inherit'),
'upper-roman' => __pl('upper_roman'),
'upper-alpha' => __pl('upper_alpha'),
'lower-roman' => __pl('lower_roman'),
'lower-alpha' => __pl('lower_alpha'),
),
'css' => ['{{element}} .pagelayer-wp-menu-container li.menu-item' => 'list-style: {{val}};']
),
'submenu_ind' => array(
'type' => 'select',
'label' => __pl('sbmenu_indicator'),
'np' => 1,
'default' => 'caret-down',
'list' => array(
'' => __pl('none'),
'caret-down' => __pl('caret_down'),
'chevron-down' => __pl('chevron'),
'angle-down' => __pl('angle'),
'plus' => __pl('Plus'),
'arrow-down' => __pl('arrow_down'),
),
),
'submenu_anim' => array(
'type' => 'select',
'label' => __pl('submenu_anim'),
'np' => 1,
'list' => array(
'' => __pl('none'),
'pulse' => __pl('Pulse'),
'fade' => __pl('fade'),
'fadeindown' => __pl('fadeindown'),
'fadeinup' => __pl('fadeinup'),
'slideindown' => __pl('slideindown'),
'slideinup' => __pl('slideinup'),
'zoomin' => __pl('zoomin'),
'flip' => __pl('flip'),
),
'css' => ['{{element}} .pagelayer-active-sub-menu.pagelayer-mega-menu-item > .pagelayer-mega-menu,
:not(.pagelayer-ele-wrap) > {{element}} .pagelayer-menu-type-horizontal .pagelayer-mega-menu-item:hover > .pagelayer-mega-menu,
{{element}} .pagelayer-active-sub-menu:not(.pagelayer-mega-menu-item) > ul.sub-menu,
{{element}} .pagelayer-menu-type-horizontal .menu-item-has-children:not(.pagelayer-mega-menu-item, .pagelayer-mega-column-item .sub-menu li):hover > ul.sub-menu,
:not(.pagelayer-ele-wrap) > .pagelayer-wp_menu .pagelayer-menu-type-vertical[class*="pagelayer-submenu-position-"] .pagelayer-mega-menu-item:hover > .pagelayer-mega-menu,
{{element}} .pagelayer-menu-type-vertical[class*="pagelayer-submenu-position-"] .menu-item-has-children:not(.pagelayer-mega-menu-item, .pagelayer-mega-column-item .sub-menu li):hover > ul.sub-menu' => 'animation-name: pagelayer-submenu-{{val}};animation-duration: 300ms;animation-timing-function: linear; animation-iteration-count: 1;'],
),
'menu_colors' => array(
'type' => 'radio',
'label' => __pl('Background'),
'np' => 1,
//'no_val' => 1,// Dont set any value to element
'list' => [
'' => __pl('normal'),
'hover' => __pl('hover'),
'active' => __pl('active'),
],
),
'menu_color' => [
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-ul>li a:first-child' => 'color: {{val}};'],
'show' => ['menu_colors' => ''],
'screen' => 1
],
'menu_bg_color' => [
'type' => 'color',
'label' => __pl('p_bg_color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-ul>li' => 'background-color: {{val}};'],
'show' => ['menu_colors' => ''],
'screen' => 1
],
'menu_color_hover' => [
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-ul>li>a:hover' => 'color: {{val}};',
'{{element}} .pagelayer-wp_menu-ul>li.pagelayer-active-sub-menu>a:hover' => 'color: {{val}};'],
'show' => ['menu_colors' => 'hover'],
'screen' => 1
],
'menu_bg_color_hover' => [
'type' => 'color',
'label' => __pl('p_bg_color'),
'np' => 1,
'default' => '#00ccff',
'css' => ['{{element}} .pagelayer-menu-hover-background .pagelayer-wp_menu-ul>li:hover' => 'background-color: {{val}};','{{element}} .pagelayer-wp_menu-ul>li>a:hover:before' => 'background-color: {{val}};border-color:{{val}}',
'{{element}} .pagelayer-wp_menu-ul>li>a:hover:after' => 'background-color: {{val}};border-color:{{val}}',
'{{element}} .pagelayer-wp_menu-ul>li.pagelayer-active-sub-menu' => 'background-color: {{val}};'],
'show' => ['menu_colors' => 'hover'],
'screen' => 1
],
'menu_color_active' => [
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-ul>li.current-menu-item>a' => 'color: {{val}};'],
'show' => ['menu_colors' => 'active'],
'screen' => 1
],
'menu_bg_color_active' => [
'type' => 'color',
'label' => __pl('p_bg_color'),
'np' => 1,
'default' => '#00ccff',
'css' => ['{{element}} .pagelayer-wp_menu-ul>li.current-menu-item' => 'background-color: {{val}};'],
'show' => ['menu_colors' => 'active'],
'screen' => 1
],
'menu_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul li.menu-item > a' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'menu_pointer_height' => [
'type' => 'slider',
'label' => __pl('pointer_height'),
'screen' => 1,
'min' => 1,
'max' => 50,
'css' => ['{{element}} .pagelayer-menu-hover-underline:not(.none) .pagelayer-wp_menu-ul>li>a:before, {{element}} .pagelayer-menu-hover-doubleline:not(.none) .pagelayer-wp_menu-ul>li>a:before, {{element}} .pagelayer-menu-hover-doubleline:not(.none) .pagelayer-wp_menu-ul>li>a:after, {{element}} .pagelayer-menu-hover-overline:not(.none) .pagelayer-wp_menu-ul>li>a:before' => 'height:{{val}}px;',
'{{element}} .pagelayer-menu-hover-framed .pagelayer-wp_menu-ul>li>a:hover:before' => 'border-width: {{val}}px'],
'show' => ['pointer' => ['underline', 'overline', 'doubleline', 'framed']],
],
'horizontal_padding' => [
'type' => 'slider',
'label' => __pl('horizontal_padding'),
'default' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-ul>li>a' => 'padding-left: {{val}}px;padding-right: {{val}}px;'],
],
'vertical_padding' => [
'type' => 'slider',
'label' => __pl('vertical_padding'),
'default' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-ul>li>a' => 'padding-top: {{val}}px;padding-bottom : {{val}}px;'],
],
],
'submenu_style' => [
'submenu_align' => array(
'type' => 'radio',
'label' => __pl('item_alignment'),
'np' => 1,
'default' => 'left',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} ul.sub-menu li>a' => 'justify-content:{{val}} !important;'],
),
'submenu_position' => [
'type' => 'radio',
'label' => __pl('position'),
'default' => 'left',
'list' => array(
'left' => __pl('left'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-menu-type-horizontal .sub-menu' => '{{val}}:0px;', '{{element}} .pagelayer-menu-type-horizontal .sub-menu .sub-menu' => 'left:unset;{{val}}:100% !important;top:0px;'],
'req' => ['layout' => 'horizontal'],
],
'submenu_v_position' => [
'type' => 'radio',
'label' => __pl('position'),
'list' => array(
'' => __pl('Default'),
'left' => __pl('left'),
'right' => __pl('right'),
),
'addClass' => ['{{element}} .pagelayer-menu-type-vertical' => 'pagelayer-submenu-position-{{val}}'],
'req' => ['layout' => 'vertical'],
],
'submenu_colors' => array(
'type' => 'radio',
'label' => __pl('Background'),
'np' => 1,
//'no_val' => 1,// Dont set any value to element
'list' => [
'' => __pl('normal'),
'hover' => __pl('hover'),
'active' => __pl('active'),
],
),
'submenu_color' => [
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu>li a' => 'color: {{val}};'],
'show' => ['submenu_colors' => ''],
'screen' => 1
],
'submenu_bg_color' => [
'type' => 'color',
'label' => __pl('bg_color'),
'np' => 1,
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu' => 'background-color: {{val}};'],
'show' => ['submenu_colors' => ''],
'screen' => 1
],
'submenu_color_hover' => [
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu>li a:hover' => 'color: {{val}};', '{{element}} .pagelayer-wp-menu-container ul.sub-menu>li.pagelayer-active-sub-menu a:hover' => 'color: {{val}};'],
'show' => ['submenu_colors' => 'hover'],
'screen' => 1
],
'submenu_bg_color_hover' => [
'type' => 'color',
'label' => __pl('bg_color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu>li:hover' => 'background-color: {{val}};', '{{element}} .pagelayer-wp-menu-container ul.sub-menu>li.pagelayer-active-sub-menu' => 'background-color: {{val}};'],
'show' => ['submenu_colors' => 'hover'],
'screen' => 1
],
'submenu_color_active' => [
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu>li.current-menu-item a' => 'color: {{val}};'],
'show' => ['submenu_colors' => 'active'],
'screen' => 1
],
'submenu_bg_color_active' => [
'type' => 'color',
'label' => __pl('bg_color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu>li.current-menu-item' => 'background-color: {{val}};'],
'show' => ['submenu_colors' => 'active'],
'screen' => 1
],
'submenu_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'np' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu li a' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;']
),
'submenu_horizontal_padding' => [
'type' => 'slider',
'label' => __pl('horizontal_padding'),
'default' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu li a' => 'padding-left: {{val}}px;padding-right: {{val}}px;'],
],
'submenu_vertical_padding' => [
'type' => 'slider',
'label' => __pl('vertical_padding'),
'default' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container ul.sub-menu li a' => 'padding-top: {{val}}px;padding-bottom : {{val}}px;'],
],
'submenu_left_margin' => [
'type' => 'slider',
'label' => __pl('left_margin'),
'default' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp-menu-container .sub-menu a' => 'margin-left: {{val}}px;', '{{element}} .pagelayer-wp-menu-container .sub-menu .sub-menu a' => 'margin-left: calc(2 * {{val}}px);'],
],
'submenu_index' => [
'type' => 'slider',
'label' => __pl('z-index'),
'css' => ['{{element}} .menu-item .sub-menu, {{element}} .menu-item .pagelayer-mega-menu' => 'z-index:{{val}}'],
],
],
'menu_toggle' => [
'menu_toggle_icon' => array(
'type' => 'icon',
'label' => __pl('icon'),
'default' => 'fas fa-bars',
'addAttr' => ['{{element}} .pagelayer-primary-menu-bar i' => 'data-icon="{{menu_toggle_icon}}"'],
'desc' => __pl('menu_toggle_icon_desc')
),
'menu_toggle_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'default' => 'center',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-primary-menu-bar' => 'text-align:{{val}}'],
),
'menu_toggle_color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-primary-menu-bar i' => 'color:{{val}}'],
),
'menu_toggle_bg_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'np' => 1,
'default' => '#0986c050',
'css' => ['{{element}} .pagelayer-primary-menu-bar i' => 'background-color:{{val}}'],
),
'menu_toggle_size' => array(
'type' => 'slider',
'label' => __pl('font_size'),
'default' => 30,
'screen' => 1,
'css' => ['{{element}} .pagelayer-primary-menu-bar i' => 'font-size:{{val}}px'],
),
'menu_toggle_padding' => array(
'type' => 'dimension',
'label' => __pl('padding'),
'screen' => 1,
'units' => ['px', 'em', '%'],
'css' => ['{{element}} .pagelayer-primary-menu-bar i' => 'padding:{{val[0]}} {{val[1]}};'],
),
],
'dropdown_style' => [
'slide_style' => array(
'type' => 'select',
'label' => __pl('slide_style'),
'default' => 'pagelayer-wp_menu-right',
'list' => array(
'pagelayer-wp_menu-down' => __pl('slide-down'),
'pagelayer-wp_menu-right' => __pl('slide-right'),
'pagelayer-wp_menu-left' => __pl('slide-left'),
'pagelayer-wp_menu-full' => __pl('full_screen')
),
'req' => ['!drop_breakpoint' => 'none']
),
'dropdown_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'screen' => 1,
'list' => array(
'flex-start' => __pl('left'),
'center' => __pl('center'),
'flex-end' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-menu-type-dropdown .pagelayer-wp_menu-ul > li > a' => 'justify-content: {{val}};'],
),
'menu_width' => [
'type' => 'spinner',
'label' => __pl('width'),
'np' => 1,
'default' => 30,
'min' => 1,
'screen' => 1,
'css' => ['{{element}} .pagelayer-menu-type-dropdown' => 'width:{{val}}%;'],
'req' => [
'!drop_breakpoint' => 'none',
'!slide_style' => ['pagelayer-wp_menu-full','pagelayer-wp_menu-down']
]
],
'menu_down_width' => [
'type' => 'spinner',
'label' => __pl('width'),
'default' => 100,
'min' => 1,
'screen' => 1,
'css' => ['{{element}} .pagelayer-menu-type-dropdown' => 'width:{{val}}%;'],
'req' => [
'!drop_breakpoint' => 'none',
'slide_style' => 'pagelayer-wp_menu-down'
]
],
'menu_items_width' => [
'type' => 'spinner',
'label' => __pl('menu_items_width'),
'default' => 100,
'min' => 1,
'max' => 100,
'css' => ['{{element}} .pagelayer-menu-type-dropdown .pagelayer-wp_menu-ul' => 'width:{{val}}%;'],
'req' => [
'!drop_breakpoint' => 'none',
'!slide_style' => ['pagelayer-wp_menu-down']
]
],
'menu_posx' => array(
'type' => 'slider',
'label' => __pl('horizontal_pos'),
'screen' => 1,
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 0,
'css' => ['{{element}} .pagelayer-menu-type-dropdown .pagelayer-wp_menu-ul' => 'left: {{val}}%;'],
'req' => [
'!drop_breakpoint' => 'none',
'!slide_style' => 'pagelayer-wp_menu-down'
]
),
'menu_posy' => array(
'type' => 'slider',
'label' => __pl('verticle_postion'),
'screen' => 1,
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 8,
'css' => ['{{element}} .pagelayer-menu-type-dropdown .pagelayer-wp_menu-ul' => 'top: {{val}}%; transform: translateY(-{{val}}%);'],
'req' => [
'!drop_breakpoint' => 'none',
'!slide_style' => 'pagelayer-wp_menu-down'
]
),
'menu_bg' => array(
'type' => 'radio',
'label' => __pl('col_bg_styles'),
'np' => 1,
'default' => 'color',
'list' => array(
'' => __pl('none'),
'color' => __pl('color'),
'gradient' => __pl('gradient'),
),
'req' => ['!drop_breakpoint' => 'none']
),
'menu_items_bg' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-menu-type-dropdown' => 'background-color:{{val}}'],
'req' => [
'menu_bg' => 'color',
'!drop_breakpoint' => 'none'
],
),
'menu_items_gradient' => array(
'type' => 'gradient',
'label' => '',
'default' => '150,#44d3f6,23,#72e584,45,#2ca4eb,100',
'css' => ['{{element}} .pagelayer-menu-type-dropdown' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'],
'req' => [
'menu_bg' => 'gradient',
'!drop_breakpoint' => 'none'
],
),
],
'close_style' =>[
'close_size' => array(
'type' => 'slider',
'label' => __pl('font_size'),
'np' => 1,
'default' => 25,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-close i' => 'font-size:{{val}}px'],
'req' => ['!drop_breakpoint' => 'none'],
),
'close_padding' => array(
'type' => 'slider',
'label' => __pl('padding'),
'default' => 8,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-close i' => 'padding:{{val}}px'],
'req' => ['!drop_breakpoint' => 'none'],
),
'close_pos_x' => array(
'type' => 'slider',
'label' => __pl('horizontal_pos'),
'step' => 1,
'max' => 100,
'default' => 0,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-close i' => 'left:{{val}}%;'],
'req' => ['!drop_breakpoint' => 'none'],
),
'close_pos_y' => array(
'type' => 'slider',
'label' => __pl('verticle_postion'),
'step' => 1,
'max' => 100,
'default' => 0,
'screen' => 1,
'css' => ['{{element}} .pagelayer-wp_menu-close i' => 'top:{{val}}%;'],
'req' => ['!drop_breakpoint' => 'none'],
),
'close_state' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => '',
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'close_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff68',
'css' => ['{{element}} .pagelayer-wp_menu-close i' => 'color:{{val}}'],
'req' => ['!drop_breakpoint' => 'none'],
'show' => ['close_state' => '']
),
'close_bg_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '#00000036',
'css' => ['{{element}} .pagelayer-wp_menu-close i' => 'background-color:{{val}}'],
'req' => ['!drop_breakpoint' => 'none'],
'show' => ['close_state' => '']
),
'close_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('delay'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 600,
'css' => ['{{element}} .pagelayer-wp_menu-close i' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
'show' => ['close_state' => 'hover']
),
'close_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-wp_menu-close i:hover' => 'color:{{val}}'],
'req' => ['!drop_breakpoint' => 'none'],
'show' => ['close_state' => 'hover']
),
'close_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '#000000',
'css' => ['{{element}} .pagelayer-wp_menu-close i:hover' => 'background-color:{{val}}'],
'req' => ['!drop_breakpoint' => 'none'],
'show' => ['close_state' => 'hover']
),
],
'styles' => [
'menu_style' => __pl('menu_style'),
'submenu_style' => __pl('submenu_style'),
'menu_toggle' => __pl('toggle_style'),
'dropdown_style' => __pl('dropdown_style'),
'close_style' => __pl('close_style'),
]
)
);
// Menu items handler
// Created this shortcode only use for menus property
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_nav_menu_item', array(
'name' => __pl('Menu Items'),
'group' => 'other',
'not_visible' => 1,
'hide_active' => 1,
'parent' => [PAGELAYER_SC_PREFIX.'_wp_menu'],
'icon' => 'far fa-minus-square',
'holder' => '.pagelayer-menu-item-holder',
'has_group' => [
'section' => 'params',
'prop' => 'element',
],
'html' => '<div class="pagelayer-menu-item-holder"></div>',
'params' => array(
'title' => array(
'type' => 'text',
'label' => __pl('title'),
),
'menu_type' => array(
'type' => 'select',
'label' => __pl('menu_type'),
'desc' => __pl('menu_type_desc'),
'list' => array(
'' => __pl('flyout'),
'mega' => __pl('mega_menu'),
'column' => __pl('column_menu'),
),
'req' => ['menu_item_parent' => '0']
),
'element' => array(
'type' => 'group',
'label' => __pl('Inner Row'),
'sc' => PAGELAYER_SC_PREFIX.'_inner_row',
'count' => 1,
'item_label' => array(
'default' => __pl('Inner Row'),
),
'text' => __pl('Add new row'),
'req' => ['menu_type' => 'mega']
),
'columns' => array(
'type' => 'select',
'label' => __pl('columns_count'),
'screen' => 1,
'css' => ['.menu-item-{{ID}} > .sub-menu' => 'columns: {{val}}'],
'list' => array(
'' => __pl('default'),
1 => '1',
2 => '2',
3 => '3',
4 => '4',
5 => '5',
6 => '6',
7=> '7',
8 => '8',
9 => '9',
10 => '10'
),
'req' => ['menu_type' => 'column']
),
'col_gap' => array(
'type' => 'slider',
'label' => __pl('col_gap'),
'min' => 0,
'max' => 100,
'screen' => 1,
'css' => ['.menu-item-{{ID}} > .sub-menu' => 'column-gap: {{val}}px;'],
'req' => ['menu_type' => 'column']
),
'mega_width' => array(
'type' => 'select',
'label' => __pl('mega_width'),
'list' => array(
'' => __pl('menu_container'),
'row_container' => __pl('row_container'),
'custom' => __pl('custom'),
),
'addAttr' => 'pagelayer-mega-width="{{mega_width}}"',
'req' => ['!menu_type' => '']
),
'mega_custom_width' => array(
'type' => 'spinner',
'label' => __pl('mega_custom_width'),
'default' => '800',
'addAttr' => 'pagelayer-mega-custom-width="{{mega_custom_width}}"',
'req' => ['mega_width' => 'custom', '!menu_type' => '']
),
'menu_icon' => array(
'type' => 'icon',
'label' => __pl('icon'),
),
),
'menu_setting' => array(
'disable_link' => array(
'type' => 'checkbox',
'label' => __pl('disable_link'),
),
'hide_text' => array(
'type' => 'checkbox',
'label' => __pl('hide_text'),
'css' => ['.menu-item-{{ID}} > a .pagelayer-nav-menu-title' => 'display:none']
),
'icon_position' => array(
'type' => 'select',
'label' => __pl('icon_position'),
'list' => array(
'' => __pl('left'),
'right' => __pl('right'),
),
),
),
'highlight' => array(
'highlight_label' => array(
'type' => 'text',
'label' => __pl('highlight_label'),
),
'highlight_bg' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => ['.menu-item-{{ID}} > a .pagelayer-menu-highlight' => 'background:{{val}}']
),
'highlight_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['.menu-item-{{ID}} > a .pagelayer-menu-highlight' => 'color:{{val}}']
),
),
'styles' => array(
'menu_setting' => __pl('menu_setting'),
'highlight' => __pl('highlight_label'),
),
)
);
// Breadcrumb
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_breadcrumb', array(
'name' => __pl('breadcrumb'),
'group' => 'other',
'html' => '<span if="{{prefix}}" class="pagelayer-breadcrumb-prefix">{{prefix}}</span>
<span class="pagelayer-breadcrumb-section">'.
pagelayer_get_breadcrumb().
'</span>',
//'html' => yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ).pagelayer_get_breadcrumb(),
'params' => array(
'home' => array(
'type' => 'text',
'label' => __pl('home_label'),
'np' => 1,
'default' => 'Home',
),
'breadcrumb_color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-breadcrumb-section a' => 'color:{{val}};']
),
'breadcrumb_hover' => array(
'type' => 'color',
'label' => __pl('hovered_color'),
'css' => ['{{element}} .pagelayer-breadcrumb-section a:hover' => 'color:{{val}};']
),
'cur_color' => array(
'type' => 'color',
'label' => __pl('cur_color'),
'css' => ['{{element}} .pagelayer-breadcrumb-section' => 'color:{{val}};']
),
'typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-breadcrumb-section' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'alignment' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'center',
'screen' => 1,
'css' =>'text-align:{{val}};',
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
),
),
'prefix_style' => [
'prefix' => array(
'type' => 'text',
'label' => __pl('breadcrumb_prefix'),
),
'search_prefix' => array(
'type' => 'text',
'label' => __pl('search_prefix'),
),
'404_prefix' => array(
'type' => 'text',
'label' => __pl('404_prefix'),
),
'prefix_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-breadcrumb-prefix' => 'color:{{val}};']
),
'prefix_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-breadcrumb-prefix' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
],
'separator_style' => [
'separator' => array(
'type' => 'text',
'label' => __pl('separator_style'),
'default' => ' » ',
),
'separator_color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'default' => '#333333',
'css' => ['{{element}} .pagelayer-breadcrumb-sep' => 'color:{{val}};']
),
],
'styles' => [
'prefix_style' => __pl('prefix_style'),
'separator_style' => __pl('separator_style'),
]
)
);
// Contact Form
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_contact', array(
'name' => __pl('contact_form'),
'group' => 'other',
'has_group' => [
'section' => 'params',
'prop' => 'elements'
],
'holder' => '.pagelayer-contact-holder',
'html' => '<div class="pagelayer-contact-form-div pagelayer-contact-form-holder">
<div class="pagelayer-message-box pagelayer-message-top"></div>
<div if={{note}} class="pagelayer-contact-form-note">{{note}}</div>
<form class="pagelayer-contact-form" id="{{form}}" name="{{name}}" onsubmit="return pagelayer_contact_submit(this, event)" method="POST">
<div class="pagelayer-contact-holder">
</div>
<input type="hidden" name="cfa-pagelayer-id"/>
<input if="{{con_post_id}}" type="hidden" name="cfa-post-id" value="{{con_post_id}}"/>
<input if="{{contact_custom_templ}}" type="hidden" name="cfa-custom-template" value="{{contact_custom_templ}}"/>
<input if="{{redirect_url}}" type="hidden" name="cfa-redirect" value="{{{redirect_url}}}"/>
<div class="g-recaptcha pagelayer-recaptcha" data-sitekey="{{grecaptcha}}" if="{{captcha}}"></div>
<div class="pagelayer-contact-submit-holder">
<button if="{{submit}}" type="submit" form="{{form}}" class="pagelayer-contact-submit-btn pagelayer-btn-holder pagelayer-ele-link {{type}} {{size}} {{icon_position}}">
<i class="fa fa-circle-o-notch fa-spin" style="display:none;margin-right:5px;"></i>
<i if="{{icon}}" class="{{icon}} pagelayer-btn-icon pagelayer-cf-icon-left"></i>
<span if="{{submit}}" class="pagelayer-btn-text">{{submit}}</span>
<i if="{{icon}}" class="{{icon}} pagelayer-btn-icon pagelayer-cf-icon-right"></i>
</button>
</div>
</form>
<div class="pagelayer-message-box pagelayer-message-bottom"></div>
</div>',
'params' => array(
'elements' => array(
'type' => 'group',
'label' => __pl('Label'),
'sc' => PAGELAYER_SC_PREFIX.'_contact_item',
'item_label' => array(
'default' => __pl('Label'),
'param' => 'label_name'
),
'count' => 1,
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('field_name'))),
),
'redirect_show' => array(
'type' => 'checkbox',
'label' => __pl('redirect_url'),
),
'redirect_url' => array(
'type' => 'link',
'label' => __pl('redirect_urllabel'),
'desc' => __pl('redirect_urldesc'),
'req' => array(
'redirect_show' => 'true'
)
),
'captcha' => array(
'type' => 'checkbox',
'label' => __pl('use_recaptcha'),
'default' => '',
'desc' => __pl('use_recaptcha_desc'),
),
'form' => array(
'type' => 'text',
'label' => __pl('form_id'),
'desc' => __pl('form_id_desc'),
'default' => 'contact-form',
'np' => 1
),
'name' => array(
'type' => 'text',
'label' => __pl('form_name'),
'default' => 'Contact Form',
'desc' => __pl('form_name_desc'),
'np' => 1
),
'form_position' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'default',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-contact-form' => 'text-align: {{val}}'],
),
'note' => array(
'type' => 'text',
'label' => __pl('note'),
'edit' => '.pagelayer-contact-form-note',
),
'note_color' => array(
'type' => 'color',
'label' => __pl('note_color'),
'css' => ['{{element}} .pagelayer-contact-form-note' => 'color:{{val}}'],
),
),
'label_style' =>[
'form_label_color' => array(
'type' => 'color',
'label' => __pl('label_color'),
'default' => '',
'show' => ['field_state' => ''],
'css' => ['{{element}} label' => 'color: {{val}}'],
),
'label_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} label' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'space_label' => array(
'type' => 'padding',
'label' => __pl('space_between'),
'default' => ',,10,',
'screen' => 1,
'css' => ['{{element}} label' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
),
'form_placeholder_color' => array(
'type' => 'color',
'label' => __pl('placeholder_color'),
'default' => '',
'show' => ['field_state' => ''],
'css' => ['{{element}} ::placeholder' => 'color: {{val}}'],
),
'placeholder_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} ::placeholder' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
],
'input_style' => [
'input_state' => array(
'type' => 'radio',
'label' => __pl('state'),
'np' => 1,
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'form_input_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => [
'{{element}} textarea, {{element}} input, {{element}} select, {{element}} date' => 'color: {{val}}'
],
'req' => array(
'input_state' => 'normal'
),
),
'form_input_bg' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => [
'{{element}} textarea, {{element}} input, {{element}} select, {{element}} date' => 'background-color: {{val}}',
],
'req' => array(
'input_state' => 'normal',
),
),
'input_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('input_hover_delay_label'),
'min' => 0,
'step' => 100,
'max' => 5000,
'css' => ['{{element}} textarea:hover, {{element}} input:hover, {{element}} select:hover, {{element}} date:hover' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
'show' => array(
'input_state' => 'hover'
),
),
'form_input_color_hover' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => [
'{{element}} textarea:hover, {{element}} input:hover, {{element}} select:hover, {{element}} date:hover' => 'color: {{val}}'
],
'req' => array(
'input_state' => 'hover'
),
),
'form_input_bg_hover' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => [
'{{element}} textarea:hover, {{element}} input:hover, {{element}} select:hover, {{element}} date:hover' => 'background-color: {{val}}'
],
'req' => array(
'input_state' => 'hover'
),
),
'input_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} select, {{element}} input,{{element}} textarea' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'input_height' => array(
'type' => 'spinner',
'label' => __pl('text_field_height'),
'min' => 1,
'max' => 1000,
'step' => 1,
'screen' => 1,
'css' => [
'{{element}} input, {{element}} select, {{element}} textarea'=> 'line-height: {{val}}px; min-height: {{val}}px',
],
),
'input_padding' => array(
'type' => 'dimension',
'label' => __pl('padding'),
'screen' => 1,
'default' => '10,10',
'css' => [
'{{element}} input, {{element}} select, {{element}} textarea'=> 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[0]}}px; padding-left:{{val[1]}}px',
],
),
/* 'input_state' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => '',
'list' => [
'' => __pl('normal'),
'hover' => __pl('hover'),
],
), */
],
'form_style' => [
'field_state' => array(
'type' => 'radio',
'label' => '',
'np' => 1,
'default' => '',
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
'focus' => __pl('focus'),
),
),
'field_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} input, {{element}} select, {{element}} textarea' => 'border-style: {{val}}',
'{{element}} input[type="checkbox"] + label:before' => 'border-style: {{val}}'
],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'field_state' => ''
),
),
'field_border_color' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'default' => '#0986c0',
'css' => [
'{{element}} input, {{element}} select, {{element}} textarea' => 'border-color: {{val}};',
'{{element}} input[type="checkbox"] + label:before' => 'border-color: {{val}};'
],
'req' => array(
'!field_border_type' => ''
),
'show' => array(
'field_state' => ''
),
),
'field_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} input, {{element}} select, {{element}} textarea, {{element}} input[type="checkbox"] + label:before' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!field_border_type' => ''
],
'show' => array(
'field_state' => ''
),
),
'field_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} input, {{element}} select, {{element}} textarea' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!field_border_type' => ''
),
'show' => array(
'field_state' => ''
),
),
'field_shadow' => array(
'type' => 'box_shadow',
'label' => __pl('shadow'),
'screen' => 1,
'css' => [
'{{element}} input, {{element}} select, {{element}} textarea, {{element}} input[type="checkbox"] + label:before' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'
],
'show' => ['field_state' => ''],
),
'field_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('service_btn_hover_delay'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 400,
'css' => ['{{element}} input, {{element}} select, {{element}} textarea' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => array(
'field_state' => 'hover'
),
),
'field_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} input:hover, {{element}} select:hover, {{element}} textarea:hover' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'field_state' => 'hover'
),
),
'field_border_color_hover' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'css' => ['{{element}} input:hover, {{element}} select:hover, {{element}} textarea:hover' => 'border-color: {{val}};'],
'default' => '#0986c0',
'req' => array(
'!field_border_type_hover' => ''
),
'show' => array(
'field_state' => 'hover'
),
),
'field_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} input:hover, {{element}} select:hover, {{element}} textarea:hover' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!field_border_type_hover' => ''
],
'show' => array(
'field_state' => 'hover'
),
),
'field_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} input:hover, {{element}} select:hover, {{element}} textarea:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!field_border_type_hover' => ''
),
'show' => array(
'field_state' => 'hover'
),
),
'field_shadow_hover' => array(
'type' => 'box_shadow',
'label' => __pl('text_shadow'),
'screen' => 1,
'css' => [
'{{element}} input:hover, {{element}} select:hover, {{element}} textarea:hover' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'
],
'show' => ['field_state' => 'hover'],
),
'field_border_type_focus' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} input:focus, {{element}} select:focus, {{element}} textarea:focus' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'field_state' => 'focus'
),
),
'field_border_color_focus' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'css' => ['{{element}} input:focus, {{element}} select:focus, {{element}} textarea:focus' => 'border-color: {{val}};'],
'default' => '#0986c0',
'req' => array(
'!field_border_type_focus' => ''
),
'show' => array(
'field_state' => 'focus'
),
),
'field_border_width_focus' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} input:focus, {{element}} select:focus, {{element}} textarea:focus' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!field_border_type_focus' => ''
],
'show' => array(
'field_state' => 'focus'
),
),
'field_border_radius_focus' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} input:focus, {{element}} select:focus, {{element}} textarea:focus' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!field_border_type_focus' => ''
),
'show' => array(
'field_state' => 'focus'
),
),
'field_shadow_focus' => array(
'type' => 'box_shadow',
'label' => __pl('text_shadow'),
'screen' => 1,
'css' => [
'{{element}} input:focus, {{element}} select:focus, {{element}} textarea:focus' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'
],
'show' => ['field_state' => 'focus'],
),
],
'radio_style' => [
'form_box_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '',
'css' => [
'{{element}} input[type="radio"]:checked:before' => 'color: {{val}}',
'{{element}} input[type="checkbox"]:checked + label:before' => 'color: {{val}}'
],
),
'form_box_bg_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '',
'css' => [
'{{element}} input[type="radio"]:checked:before' => 'background-color: {{val}}',
'{{element}} input[type="checkbox"]:checked + label:before' => 'background-color: {{val}}'
],
),
'inline_radio' => array(
'type' => 'checkbox',
'label' => __pl('inline'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-radcheck-holder' => 'display:flex; align-items:center;']
),
'radio_padding' => array(
'type' => 'dimension',
'label' => __pl('padding'),
'screen' => 1,
'default' => '10,10',
'css' => [
'{{element}} input[type="checkbox"] + label:before, {{element}} input[type="radio"]'=> 'height:{{val[0]}}px; min-height:{{val[0]}}px; width:{{val[1]}}px;',
],
),
'radio_spacing' => array(
'type' => 'padding',
'label' => __pl('space_around'),
'screen' => 1,
'css' => [
'{{element}} .pagelayer-radcheck-holder>div'=> 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;',
],
),
],
'button_style' => [
'hide_btn' => array(
'type' => 'checkbox',
'label' => __pl('hide_btn'),
),
'submit' => array(
'type' => 'text',
'label' => __pl('submit_button_label'),
'default' => 'Submit',
'edit' => '.pagelayer-btn-text',
'req' => ['!hide_btn' => 'true'],
),
'btn_typo' => array(
'type' => 'typography',
'label' => __pl('quote_content_typo'),
'css' => [
'{{element}} .pagelayer-btn-text' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
'{{element}} .pagelayer-btn-holder' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
],
'req' => ['!hide_btn' => 'true'],
),
'stretch' => array(
'type' => 'checkbox',
'label' => __pl('stretch_button_label'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-contact-submit-btn' => 'width: 100%'],
'req' => ['!hide_btn' => 'true'],
),
'btn_spacing' => array(
'type' => 'padding',
'label' => __pl('spacing'),
'css' => ['{{element}} .pagelayer-contact-submit-btn' => 'margin-top:{{val[0]}}px; margin-right:{{val[1]}}px; margin-bottom:{{val[2]}}px; margin-left:{{val[3]}}px;'],
'req' => [
'!hide_btn' => 'true',
]
),
'type' => array(
'type' => 'select',
'label' => __pl('button_type_label'),
'default' => 'pagelayer-btn-default',
//'addClass' => ['{{element}} .pagelayer-btn-holder' => '{{val}}'],
'list' => array(
'pagelayer-btn-default' => __pl('btn_type_default'),
'pagelayer-btn-primary' => __pl('btn_type_primary'),
'pagelayer-btn-secondary' => __pl('btn_type_secondary'),
'pagelayer-btn-success' => __pl('btn_type_success'),
'pagelayer-btn-info' => __pl('btn_type_info'),
'pagelayer-btn-warning' => __pl('btn_type_warning'),
'pagelayer-btn-danger' => __pl('btn_type_danger'),
'pagelayer-btn-dark' => __pl('btn_type_dark'),
'pagelayer-btn-light' => __pl('btn_type_light'),
'pagelayer-btn-link' => __pl('btn_type_link'),
'pagelayer-btn-custom' => __pl('btn_type_custom')
),
'req' => ['!hide_btn' => 'true'],
),
'size' => array(
'type' => 'select',
'label' => __pl('button_size_label'),
'default' => 'pagelayer-btn-small',
'list' => array(
'pagelayer-btn-mini' => __pl('mini'),
'pagelayer-btn-small' => __pl('small'),
'pagelayer-btn-large' => __pl('large'),
'pagelayer-btn-extra-large' => __pl('extra_large'),
'pagelayer-btn-double-large' => __pl('double_large'),
'pagelayer-btn-custom' => __pl('custom'),
),
'req' => ['!hide_btn' => 'true'],
),
'btn_custom_size' => array(
'type' => 'dimension',
'label' => __pl('btn_custom_size'),
'default' => '5,10',
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[0]}}px; padding-left:{{val[1]}}px;'],
'req' => array(
'size' => 'pagelayer-btn-custom',
'!hide_btn' => 'true'
),
),
'contect_btn_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-contact-submit-holder' => 'text-align:{{val}}'],
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'req' => ['!hide_btn' => 'true'],
),
'btn_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => '',
//'no_val' => 1,// Dont set any value to element
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => array(
'type' => 'pagelayer-btn-custom',
'!hide_btn' => 'true'
),
),
'btn_bg_color' => array(
'type' => 'color',
'label' => __pl('btn_bg_color_label'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-btn-holder' => 'background-color: {{val}};'],
'req' => array(
'type' => 'pagelayer-btn-custom',
),
'show' => array(
'btn_hover' => '',
'!hide_btn' => 'true'
),
),
'btn_color' => array(
'type' => 'color',
'label' => __pl('btn_color_label'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-btn-holder' => 'color: {{val}};'],
'req' => array(
'type' => 'pagelayer-btn-custom',
),
'show' => array(
'btn_hover' => '',
'!hide_btn' => 'true'
),
),
'btn_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('btn_hover_delay_label'),
'desc' => __pl('btn_hover_delay_desc'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 400,
'css' => ['{{element}} .pagelayer-btn-holder' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'],
'show' => array(
'btn_hover' => 'hover',
'!hide_btn' => 'true'
),
),
'btn_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('btn_bg_color_hover_label'),
'default' => '',
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'background-color: {{val}};'],
'req' => array(
'type' => 'pagelayer-btn-custom',
),
'show' => array(
'btn_hover' => 'hover',
'!hide_btn' => 'true'
),
),
'btn_color_hover' => array(
'type' => 'color',
'label' => __pl('btn_color_hover_label'),
'default' => '',
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'color: {{val}};'],
'req' => array(
'type' => 'pagelayer-btn-custom',
),
'show' => array(
'btn_hover' => 'hover',
'!hide_btn' => 'true'
),
),
],
'icon_style' => [
'icon' => array(
'type' => 'icon',
'label' => __pl('service_box_font_icon_label'),
'default' => '',
),
'icon_position' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'pagelayer-btn-icon-left',
'list' => array(
'pagelayer-btn-icon-left' => __pl('left'),
'pagelayer-btn-icon-right' => __pl('right')
),
'req' => array(
'!icon' => ''
),
),
'icon_spacing' => array(
'type' => 'slider',
'label' => __pl('icon_spacing'),
'min' => 1,
'step' => 1,
'max' => 100,
'default' => 5,
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-icon' => 'padding: 0 {{val}}px;'],
'req' => array(
'!icon' => ''
),
),
],
'border_style' => [
'btn_bor_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'np' => 1,
'default' => '',
//'no_val' => 1,// Dont set any value to element
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
)
),
'btn_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_color' => array(
'type' => 'color',
'label' => __pl('border_color_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-color: {{val}};'],
'req' => array(
'!btn_border_type' => ''
),
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!btn_border_type' => ''
],
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!btn_border_type' => ''
),
'show' => array(
'btn_bor_hover' => ''
),
),
'btn_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'btn_bor_hover' => 'hover'
),
),
'btn_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color_hover_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-color: {{val}};'],
'req' => array(
'!btn_border_type_hover' => ''
),
'show' => array(
'btn_bor_hover' => 'hover'
),
),
'btn_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!btn_border_type_hover' => ''
],
'show' => array(
'btn_bor_hover' => 'hover'
),
),
'btn_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!btn_border_type_hover' => ''
),
'show' => array(
'btn_bor_hover' => 'hover'
),
),
],
'message_style' => array(
'show_msg_box' => array(
'type' => 'checkbox',
'label' => __pl('show_msg_box'),
'desc' => __pl('show_msg_box_desc')
),
'message_pos' => array(
'type' => 'radio',
'label' => __pl('position'),
'list' => array(
'' => __pl('top'),
'bottom' => __pl('bottom'),
),
'addClass' => 'pagelayer-message-box-{{val}}'
),
'msg_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'css' => ['{{element}} .pagelayer-cf-msg-suc, {{element}} .pagelayer-cf-msg-err' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
),
'msg_margin' => array(
'type' => 'padding',
'label' => __pl('margin'),
'css' => ['{{element}} .pagelayer-cf-msg-suc, {{element}} .pagelayer-cf-msg-err' => 'margin-top:{{val[0]}}px; margin-right:{{val[1]}}px; margin-bottom:{{val[2]}}px; margin-left:{{val[3]}}px;'],
),
'msg_type' => array(
'type' => 'radio',
'label' => __pl(' '),
'list' => array(
'success' => __pl('Success'),
'failed' => __pl('failed')
)
),
'msg_success_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => [
'{{element}} .pagelayer-cf-msg-suc' => 'color: {{val}}'
],
'show' => array(
'msg_type' => 'success'
),
),
'msg_success_bg' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => [
'{{element}} .pagelayer-cf-msg-suc' => 'background-color: {{val}}',
],
'show' => array(
'msg_type' => 'success'
),
),
'succ_msg_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} .pagelayer-cf-msg-suc' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'msg_type' => 'success'
)
),
'succ_msg_border_color' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'default' => '#0986c0',
'css' => [
'{{element}} .pagelayer-cf-msg-suc' => 'border-color: {{val}};'
],
'req' => array(
'!succ_msg_border_type' => ''
),
'show' => array(
'msg_type' => 'success'
),
),
'succ_msg_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-cf-msg-suc' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => array(
'!succ_msg_border_type' => ''
),
'show' => array(
'msg_type' => 'success'
),
),
'succ_msg_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-cf-msg-suc' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!succ_msg_border_type' => ''
),
'show' => array(
'msg_type' => 'success'
),
),
'msg_failed_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'css' => [
'{{element}} .pagelayer-cf-msg-err' => 'color: {{val}}'
],
'show' => array(
'msg_type' => 'failed'
),
),
'msg_failed_bg' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => [
'{{element}} .pagelayer-cf-msg-err' => 'background-color: {{val}}',
],
'show' => array(
'msg_type' => 'failed'
),
),
'fail_msg_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => [
'{{element}} .pagelayer-cf-msg-err' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'msg_type' => 'failed'
),
),
'fail_msg_border_color' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'default' => '#0986c0',
'css' => [
'{{element}} .pagelayer-cf-msg-err' => 'border-color: {{val}};'
],
'req' => array(
'!fail_msg_border_type' => ''
),
'show' => array(
'msg_type' => 'failed'
),
),
'fail_msg_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-cf-msg-err' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => array(
'!fail_msg_border_type' => ''
),
'show' => array(
'msg_type' => 'failed'
),
),
'fail_msg_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-cf-msg-err' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => ['!fail_msg_border_type' => ''],
'show' => ['msg_type' => 'failed'],
)
),
'mail_template' => array(
'contact_custom_templ' => array(
'type' => 'checkbox',
'label' => __pl('custom_templ'),
),
'templ_modal' => array(
'type' => 'modal',
'label' => __pl('create_mail_templ'),
'show_group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
'to_email' => array(
'type' => 'text',
'label' => __pl('to_email'),
'group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
'from_email' => array(
'type' => 'text',
'label' => __pl('from_email'),
'group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
'cont_subject' => array(
'type' => 'text',
'label' => __pl('subject'),
'group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
'cont_header' => array(
'type' => 'textarea',
'label' => __pl('additional_head'),
'group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
'cont_body' => array(
'type' => 'textarea',
'label' => __pl('message_body'),
'desc' => __pl('usr_field_desc'),
'rows' => 4,
'group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
'cont_use_html' => array(
'type' => 'checkbox',
'label' => __pl('use_html'),
'group' => 'contact_templ_modal',
'req' => ['contact_custom_templ' => 'true'],
),
),
'styles' => [
'label_style' => __pl('label_style'),
'input_style' => __pl('input_style'),
'radio_style' => __pl('radio_style'),
'form_style' => __pl('form_style'),
'button_style' => __pl('button_style'),
'icon_style' => __pl('icon_style'),
'border_style' => __pl('btn_border_style'),
'message_style' => __pl('message_style'),
'mail_template' => __pl('mail_template'),
]
)
);
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_contact_item', array(
'name' => __pl('contact_item'),
'group' => 'other',
'not_visible' => 1,
'html' => '{{fieldhtml}}',
'parent' => [PAGELAYER_SC_PREFIX.'_contact'],
'params' => array(
'label_name' => array(
'type' => 'text',
'label' => __pl('label_name'),
'default' => 'Input Label',
'edit' => '.pagelayer-form-label',
'keep_prop' => 1, // Prevent to remove props in gutenburg
'np' => 1
),
'field_type' => array(
'type' => 'select',
'label' => __pl('input_field_type'),
'default' => 'text',
'list' => array(
'text' => __pl('text'),
'email' => __pl('e-mail'),
'number' => __pl('number'),
'tel' => __pl('telephone'),
'checkbox' => __pl('checkbox'),
'radio' => __pl('radio'),
'textarea' => __pl('textarea'),
'select' => __pl('select'),
'date' => __pl('date'),
'file' => __pl('file'),
'label' => __pl('label'),
),
'np' => 1
),
'values' => array(
'type' => 'textarea',
'label' => __pl('values'),
'default' => "One\nTwo",
'show' => array(
'field_type' => ['select', 'checkbox', 'radio']
),
'np' => 1
),
'textarea_rows' => array(
'type' => 'spinner',
'label' => __pl('row'),
'default' => 6,
'min' => 1,
'max' => 100,
'screen' => 1,
'req' => array(
'field_type' => ['textarea']
),
'np' => 1
),
'accept_file' => array(
'type' => 'text',
'label' => __pl('accept_file'),
'req' => array(
'field_type' => ['file']
),
'np' => 1
),
'required' => array(
'type' => 'checkbox',
'label' => __pl('required_label'),
'default' => '',
),
'label_as_holder' => array(
'type' => 'checkbox',
'label' => __pl('show_label_as_placeholder'),
'default' => '',
'req' => ['!field_type' => ['label']],
),
'placeholder' => array(
'type' => 'text',
'label' => __pl('placeholder'),
'default' => '',
'req' => ['!field_type' => ['label']],
'show' => ['!label_as_holder' => 'true'],
),
'field_name' => array(
'type' => 'text',
'label' => __pl('input_field_name'),
'np' => 1,
'default' => 'Fieldname',
'req' => ['!field_type' => ['label']],
),
'field_width' => array(
'type' => 'slider',
'label' => __pl('width'),
'default' => 100,
'min' => 1,
'max' => 100,
'screen' => 1,
'css' => ['{{wrap}}' => 'width:{{val}}%'],
),
'field_display' => array(
'type' => 'select',
'label' => __pl('display'),
'screen' => 1,
'default' => '',
'css' => ['{{wrap}}' => 'display:{{val}}'],
'list' => array(
'' => __pl('full'),
'inline-block' => __pl('inline'),
),
),
'space_between' => array(
'type' => 'padding',
'label' => __pl('space_between'),
'default' => ',,10,',
'screen' => 1,
'css' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;',
),
)
)
);
// Post Title
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_title', array(
'name' => __pl('post_title'),
'group' => 'other',
'html' => '<div class="pagelayer-post-title">
<a class="pagelayer-ele-link" if-ext="{{link}}" href="{{{link}}}">
{{open_html_tag}}<span if="{{before}}">{{before}} </span>'.pagelayer_get_the_title(false).'<span if="{{after}}"> {{after}}</span>{{close_html_tag}}
</a>
</div>',
'params' => array(
'before' => array(
'type' => 'text',
'label' => __pl('before'),
'np' => 1,
),
'after' => array(
'type' => 'text',
'label' => __pl('after'),
'np' => 1,
),
'link' => array(
'type' => 'link',
'label' => __pl('image_link_label'),
'selector' => '.pagelayer-ele-link',
),
'html_tag' => array(
'type' => 'select',
'label' => __pl('html_tag'),
'default' => 'h1',
'list' => [
'' => __pl('default'),
'h1' => 'H1',
'h2' => 'H2',
'h3' => 'H3',
'h4' => 'H4',
'h5' => 'H5',
'h6' => 'H6',
],
),
'title_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#0986c0',
'css' => [
'{{element}} .pagelayer-post-title'=> 'color:{{val}}',
'{{element}} .pagelayer-post-title *'=> 'color:{{val}}'
],
),
'typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',35,,700,,,solid,,,,',
'css' => ['{{element}} .pagelayer-post-title' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'shadow' => array(
'type' => 'shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} .pagelayer-post-title' => 'text-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}};'],
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'list' => [
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
],
'css' => 'text-align: {{val}}',
),
)
)
);
// Post Content
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_content', array(
'name' => __pl('post_content'),
'group' => 'other',
'html' => '<div class="entry-content pagelayer-post-excerpt">{{post_content}}</div>',
'params' => array(
'color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-post-excerpt' => 'color:{{val}}'],
),
'typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-post-excerpt' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'list' => [
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
],
'css' => 'text-align: {{val}}'
),
)
)
);
// Post Excerpt
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_excerpt', array(
'name' => __pl('post_excerpt'),
'group' => 'other',
'html' => '{{{post_excerpt}}}',
'params' => array(
'color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'css' => ['{{element}} .pagelayer-post-excerpt' => 'color:{{val}}'],
),
'typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-post-excerpt' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'list' => [
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
],
'css' => 'text-align: {{val}}',
),
'pe_margin' => array(
'type' => 'padding',
'label' => __pl('margin'),
'screen' => 1,
'units' => ['px', 'em'],
'css' => ['{{element}} .pagelayer-post-excerpt' => 'margin-top:{{val[0]}}; margin-right:{{val[1]}}; margin-bottom:{{val[2]}}; margin-left:{{val[3]}};'],
),
)
)
);
// Featured Image
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_featured_img', array(
'name' => __pl('featured_img'),
'group' => 'other',
'html' => '<a if-ext="{{link_type}}" href="{{func_link}}" class="pagelayer-ele-link" pagelayer-image-link-type="{{link_type}}">
<div class="pagelayer-featured-img">{{img_html}}</div>
</a>
<p if="{{caption}}" class="pagelayer-featured-caption">{{caption}}</p>',
'params' => array(
'img' => array(
'label' => __pl('fallback_img'),
'type' => 'image',
'np' => 1,
),
'size' => array(
'label' => __pl('obj_image_size_label'),
'type' => 'select',
'default' => 'full',
'list' => array(
'full' => __pl('full'),
'large' => __pl('large'),
'medium' => __pl('medium'),
'thumbnail' => __pl('thumbnail'),
'custom' => __pl('custom')
)
),
'custom_size' => array(
'type' => 'dimension',
'units' => ['px', '%'],
'screen' => 1,
'label' => __pl('image_custom_size_label'),
'css' => ['{{element}} img' => 'width: {{val[0]}}; height: {{val[1]}};'],
'req' => ['size' => 'custom']
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'list' => [
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
],
'css' => 'text-align: {{val}}',
),
'img_filter' => array(
'type' => 'filter',
'label' => __pl('filter'),
'default' => '0,100,100,0,0,100,100',
'css' => ['{{element}} img' => 'filter: blur({{val[0]}}px) brightness({{val[1]}}%) contrast({{val[2]}}%) grayscale({{val[3]}}%) hue-rotate({{val[4]}}deg) opacity({{val[5]}}%) saturate({{val[6]}}%)'],
),
'img_shadow' => array(
'type' => 'box_shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} img' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}} !important;'],
),
),
'link_settings' => [
'link_type' => array(
'label' => __pl('image_link_label'),
'type' => 'select',
'default' => '',
'list' => array(
'' => __pl('none'),
'custom_url' => __pl('custom_url'),
'media_file' => __pl('media_file'),
'lightbox' => __pl('lightbox')
)
),
'link' => array(
'type' => 'link',
'label' => __pl('image_link_label'),
'desc' => __pl('image_link_desc'),
'selector' => '.pagelayer-ele-link',
'req' => array(
'link_type' => 'custom_url'
)
),
'rel' => array(
'label' => __pl('image_rel_label'),
'type' => 'text',
'default' => '',
'addAttr' => ['{{element}} a' => 'rel="{{rel}}"'],
'req' => array(
'link_type' => 'media_file'
)
),
'target' => array(
'label' => __pl('open_link_in_new_window'),
'type' => 'checkbox',
'addAttr' => ['{{element}} a' => 'target="_blank"'],
'req' => ['link_type' => ['custom_url', 'media_file']], // For backward compatibility of the new link property in version 1.5.8, hide it for custom_url.
'show' => ['link_type' => 'media_file']
),
],
'caption_style' => [
'caption' => array(
'label' => __pl('gallery_grid_caption_label'),
'desc' => __pl('gallery_grid_caption_desc'),
'np' => 1,
'type' => 'text',
),
'caption_color' => array(
'label' => __pl('Caption Color'),
'type' => 'color',
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-featured-caption' => 'color: {{val}}'],
),
'caption_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-featured-caption' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
],
'border_style' => [
'f_border_hover' => array(
'type' => 'radio',
'label' => '',
'np' => 1,
'default' => '',
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'img_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} img' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'f_border_hover' => ''
),
),
'img_border_color' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'default' => '#0986c0',
'css' => ['{{element}} img' => 'border-color: {{val}};'],
'req' => array(
'!img_border_type' => ''
),
'show' => array(
'f_border_hover' => ''
),
),
'img_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} img' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!img_border_type' => ''
],
'show' => array(
'f_border_hover' => ''
),
),
'img_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} img' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'show' => array(
'f_border_hover' => ''
),
),
'img_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('service_btn_hover_delay'),
'min' => 0,
'step' => 100,
'max' => 2000,
'default' => 400,
'css' => ['{{element}} img' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => ['f_border_hover' => 'hover'],
),
'img_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} img:hover' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'f_border_hover' => 'hover'
),
),
'img_border_color_hover' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'css' => ['{{element}} img:hover' => 'border-color: {{val}};'],
'default' => '#0986c0',
'req' => array(
'!img_border_type_hover' => ''
),
'show' => array(
'f_border_hover' => 'hover'
),
),
'img_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} img:hover' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!img_border_type_hover' => ''
],
'show' => array(
'f_border_hover' => 'hover'
),
),
'img_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} img:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'show' => array(
'f_border_hover' => 'hover'
),
),
],
'styles' => [
'caption_style' => __pl('caption_style'),
'link_settings' => __pl('link_settings'),
'border_style' => __pl('border_style')
]
)
);
// Post info
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_info', array(
'name' => __pl('post_info'),
'group' => 'other',
'has_group' => [
'section' => 'params',
'prop' => 'elements',
],
'holder' => '.pagelayer-post-info-container',
'html' => '<div class="pagelayer-post-info-container pagelayer-post-info-{{layout}}"></div>',
'params' => array(
'elements' => array(
'type' => 'group',
'label' => __pl('post_info_list'),
'sc' => PAGELAYER_SC_PREFIX.'_post_info_list',
'item_label' => array(
'default' => __pl('info_list'),
'param' => 'type',
),
'count' => 1,
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('post_info'))),
),
'layout' => array(
'type' => 'select',
'label' => __pl('layout'),
'np' => 1,
'default' => 'vertical',
'list' => array(
'horizontal' => __pl('horizontal'),
'vertical' => __pl('vertical'),
),
),
'space_between' => array(
'type' => 'slider',
'label' => __pl('list_spacing_label'),
'default' => 15,
'screen' => 1,
'css' => ['{{element}} .pagelayer-post-info-vertical .pagelayer-post-info-list-container' => 'margin-right:{{val}}px',
'{{element}} .pagelayer-post-info-horizontal .pagelayer-post-info-list-container' => 'margin-bottom:{{val}}px']
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'default' => 'left',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-post-info-container' => 'text-align:{{val}}']
),
),
'icon_style' => array(
'icon_size' => array(
'type' => 'slider',
'label' => __pl('font_size'),
'units' => ['px', 'em', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-post-info-icon span' => 'font-size:{{val}}'],
),
'icon_colors' => array(
'type' => 'radio',
'label' => __pl('color'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'icon_color_normal' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-info-icon span' => 'color:{{val}}'],
'show' => ['icon_colors' => 'normal']
),
'icon_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-info-icon span:hover' => 'color:{{val}}'],
'show' => ['icon_colors' => 'hover']
),
),
'text_style' => array(
'input_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-post-info-list-container a' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'text_colors' => array(
'type' => 'radio',
'label' => __pl('color'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'text_color_normal' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-info-label' => 'color:{{val}}',
'{{element}} .pagelayer-post-info-label a' => 'color:{{val}}'],
'show' => ['text_colors' => 'normal']
),
'text_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-info-label:hover' => 'color:{{val}}',
'{{element}} .pagelayer-post-info-label:hover a' => 'color:{{val}}'],
'show' => ['text_colors' => 'hover']
),
),
'terms_style' => array(
'terms_text_colors' => array(
'type' => 'radio',
'label' => __pl('color'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'terms_text_color_normal' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-terms *' => 'color:{{val}} !important'],
'show' => ['terms_text_colors' => 'normal']
),
'terms_text_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-terms *:hover' => 'color:{{val}} !important'],
'show' => ['terms_text_colors' => 'hover']
),
'terms_background_color_normal' => array(
'type' => 'color',
'label' => __pl('background_color'),
'css' => ['{{element}} .pagelayer-terms *' => 'background-color:{{val}}'],
'show' => ['terms_text_colors' => 'normal']
),
'terms_background_color_hover' => array(
'type' => 'color',
'label' => __pl('background_color'),
'css' => ['{{element}} .pagelayer-terms *:hover' => 'background-color:{{val}}'],
'show' => ['terms_text_colors' => 'hover']
),
'terms_text_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-terms *' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'],
),
'terms_text_margin' => array(
'type' => 'padding',
'label' => __pl('margin'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-terms *' => 'margin-top:{{val[0]}}px; margin-right:{{val[1]}}px; margin-bottom:{{val[2]}}px; margin-left:{{val[3]}}px;'],
),
'terms_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-terms *' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'show' => array(
'btn_bor_hover' => ''
),
),
),
'styles' => array(
'icon_style' => __pl('icon_style'),
'text_style' => __pl('text_style'),
'terms_style' => __pl('terms_style'),
),
)
);
// Post info list
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_info_list', array(
'name' => __pl('post_info_list'),
'group' => 'other',
'html' => '<div class="pagelayer-post-info-list-container" if="{{post_info_content}}">
<a if-ext="{{info_link}}" href="{{link}}" class="pagelayer-post-info-list-link">
<span class="pagelayer-post-info-icon">
<span if="{{info_icon_on}}" class="{{info_icon}}"></span>
<img class="pagelayer-img" if="{{info_avatar}}" src="{{avatar_url}}"></span>
</span>
<span if="{{info_before}}" class="pagelayer-post-info-before">{{info_before}}</span>
<span class="pagelayer-post-info-label pagelayer-{{type}}">{{post_info_content}}</span>
</a>
</div>',
'not_visible' => 1,
'parent' => [PAGELAYER_SC_PREFIX.'_post_info'],
'params' => array(
'type' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'author',
'np' => 1,
'list' => array(
'author' => __pl('author'),
'date' => __pl('date'),
'time' => __pl('time'),
'comments' => __pl('comments'),
'terms' => __pl('Terms'),
'custom' => __pl('custom'),
),
),
'date_format' => array(
'type' => 'select',
'label' => __pl('date_format'),
'default' => 'default',
'list' => array(
'default' => __pl('default'),
'0' => 'F j, Y',
'1' => 'Y-m-d',
'2' => 'm/d/Y',
'3' => 'd/m/Y',
'custom' => __pl('custom'),
),
'req' => ['type' => 'date'],
),
'date_format_custom' => array(
'type' => 'text',
'label' => __pl('custom_date_format'),
'default' => 's - M -Y',
'req' => ['date_format' => 'custom', 'type' => 'date'],
),
'time_format' => array(
'type' => 'select',
'label' => __pl('time_format'),
'default' => 'default',
'list' => array(
'default' => __pl('default'),
'0' => 'g:i a',
'1' => 'g:i A',
'2' => 'H:i',
'custom' => __pl('custom'),
),
'req' => ['type' => 'time'],
),
'time_format_custom' => array(
'type' => 'text',
'label' => __pl('custom_time_format'),
'default' => 'g:i a',
'req' => ['time_format' => 'custom', 'type' => 'time'],
),
'taxonomy' => array(
'type' => 'select',
'label' => __pl('Post_taxonomy'),
'default' => 'category',
'list' => pagelayer_tax_list(),
'req' => ['type' => 'terms'],
),
'type_custom' => array(
'type' => 'text',
'label' => __pl('custom'),
'req' => ['type' => 'custom'],
),
'info_before' => array(
'type' => 'text',
'label' => __pl('before'),
'np' => 1,
),
'info_avatar' => array(
'type' => 'checkbox',
'label' => __pl('avatar_style'),
'req' => ['type' => 'author'],
),
'info_avatar_size' => array(
'type' => 'slider',
'label' => __pl('obj_size_label'),
'default' => 22,
'screen' => 1,
'css' => ['{{element}} .pagelayer-post-info-icon img' => 'height:{{val}}px;width:{{val}}px;border-radius:50%;display:inline-block;'],
'req' => ['info_avatar' => 'true', 'type' => 'author'],
),
'info_link' => array(
'type' => 'checkbox',
'label' => __pl('link_settings'),
'default' => true,
'req' => ['!type' => 'time'],
),
'info_custom_link' => array(
'type' => 'text',
'label' => __pl('custom_link'),
'default' => '#',
'req' => ['type' => 'custom'],
),
'info_icon_on' => array(
'type' => 'checkbox',
'label' => __pl('icon'),
'default' => true,
'req' => ['info_avatar' => ''],
),
'info_icon' => array(
'type' => 'icon',
'label' => __pl('icon_list'),
'default' => 'fas fa-user-circle',
'req' => ['info_icon_on' => 'true', 'info_avatar' => ''],
),
),
)
);
// Post navigation
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_nav', array(
'name' => __pl('post_nav'),
'group' => 'other',
'html' => '<div class="pagelayer-post-nav-container">
<div class="pagelayer-prev-post">
{{prev_link}}
</div>
<div class="pagelayer-post-nav-separator"></div>
<div class="pagelayer-next-post">
{{next_link}}
</div>
</div>',
'params' => array(
'in_same_term' => array(
'type' => 'checkbox',
'label' => __pl('in_same_term'),
'np' => 1,
),
'taxonomies' => array(
'type' => 'select',
'label' => __pl('Post_taxonomy'),
'default' => 'category',
'list' => pagelayer_tax_list(),
'req' => ['in_same_term' => 'true'],
),
),
'nav_label' => array(
'lables' => array(
'type' => 'checkbox',
'label' => __pl('label'),
'default' => 'true',
),
'prev_label' => array(
'type' => 'text',
'label' => __pl('prev_label'),
'np' => 1,
'default' => __pl('Previous'),
'req' => ['lables' => 'true'],
),
'next_label' => array(
'type' => 'text',
'label' => __pl('next_label'),
'np' => 1,
'default' => __pl('Next'),
'req' => ['lables' => 'true'],
),
'label_colors' => array(
'type' => 'radio',
'label' => __pl('color'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => ['lables' => 'true'],
),
'label_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-nav-link' => 'color:{{val}}'],
'show' => ['label_colors' => 'normal'],
'req' => ['lables' => 'true'],
),
'label_hover_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-nav-link:hover' => 'color:{{val}}'],
'show' => ['label_colors' => 'hover'],
'req' => ['lables' => 'true'],
),
'label_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-post-nav-link' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => ['lables' => 'true'],
),
),
'nav_title' => array(
'post_title' => array(
'type' => 'checkbox',
'label' => __pl('post_title'),
'default' => 'true',
),
'title_colors' => array(
'type' => 'radio',
'label' => __pl('color'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => ['post_title' => 'true'],
),
'title_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-nav-title' => 'color:{{val}}'],
'show' => ['title_colors' => 'normal'],
'req' => ['post_title' => 'true'],
),
'title_hover_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-nav-title:hover' => 'color:{{val}}'],
'show' => ['title_colors' => 'hover'],
'req' => ['post_title' => 'true'],
),
'title_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => ['{{element}} .pagelayer-post-nav-title' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => ['post_title' => 'true'],
),
),
'nav_icon' => array(
'arrows' => array(
'type' => 'checkbox',
'label' => __pl('arrows'),
'default' => 'true',
),
'arrows_list' => array(
'type' => 'select',
'label' => __pl('arrows_list'),
'default' => 'angle',
'list' => array(
'angle' => __pl('angle'),
'arrow' => __pl('Arrow'),
'angle-double' => __pl('angle_double'),
'arrow-circle' => __pl('arrow_circle'),
'arrow-circle-o' => __pl('arrow_circle_O'),
'chevron' => __pl('chevron'),
'chevron-circle' => __pl('chevron_circle'),
'caret' => __pl('caret'),
'long-arrow' => __pl('long_arrow'),
),
'req' => ['arrows' => 'true'],
),
'icon_colors' => array(
'type' => 'radio',
'label' => __pl('color'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => ['arrows' => 'true'],
),
'icon_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-nav-icon' => 'color:{{val}}'],
'show' => ['icon_colors' => 'normal'],
'req' => ['arrows' => 'true'],
),
'icon_hover_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-post-nav-icon:hover' => 'color:{{val}}'],
'show' => ['icon_colors' => 'hover'],
'req' => ['arrows' => 'true'],
),
'icon_size' => array(
'type' => 'slider',
'label' => __pl('font_size'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-post-nav-icon' => 'font-size:{{val}}px'],
'req' => ['arrows' => 'true'],
),
),
'nav_sep' => array(
'disable_sep' => array(
'type' => 'checkbox',
'label' => __pl('disable_sep'),
'css' => ['{{element}} .pagelayer-post-nav-separator' => 'display:none'],
),
'sep_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#bdbdbd',
'css' => ['{{element}} .pagelayer-post-nav-separator' => 'background-color:{{val}}'],
'req' => ['disable_sep' => '']
),
'sep_rotate' => array(
'type' => 'slider',
'label' => __pl('Rotate'),
'default' => 20,
'max' => 360,
'screen' => 1,
'css' => ['{{element}} .pagelayer-post-nav-separator' => 'transform: rotate({{val}}deg);'],
'req' => ['disable_sep' => '']
),
'sep_width' => array(
'type' => 'slider',
'label' => __pl('width'),
'default' => 1,
'max' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-post-nav-separator' => 'width: {{val}}px;'],
'req' => ['disable_sep' => '']
),
),
'styles' => array(
'nav_label' => __pl('label_style'),
'nav_title' => __pl('title_style'),
'nav_icon' => __pl('icon_style'),
'nav_sep' => __pl('separator_style'),
),
)
);
// Post comment
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_post_comment', array(
'name' => __pl('post_commment'),
'group' => 'other',
'html' => '<div class="pagelayer-post-comment-container">
{{post_comment}}
</div>',
'params' => array(
'comment_skin' => array(
'type' => 'select',
'label' => __pl('skin'),
'default' => 'theme_comment',
'list' => array(
'theme_comment' => __pl('theme_tamplate'),
),
),
'post_type' => array(
'type' => 'radio',
'label' => __pl('post_type'),
'default' => 'current',
'list' => array(
'current' => __pl('current'),
'custom' => __pl('custom'),
),
),
'post_id' => array(
'type' => 'select',
'label' => __pl('post_list'),
'default' => '',
'list' => pagelayer_get_posts(),
'req' => ['post_type' => 'custom']
),
),
)
);
// Flipbox
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_flipbox', array(
'name' => __pl('Flipbox'),
'group' => 'other',
'html' => '<div class="pagelayer-flipbox-container pagelayer-flipbox-{{back_section}} pagelayer-flipbox-{{flip_animation}} pagelayer-flipbox-direction-{{animation_direction}}">
<div class="pagelayer-flipbox-overlay"></div>
<div class="pagelayer-flipbox-main">
<div class="pagelayer-flipbox-flipper">
<div class="pagelayer-flipbox-box pagelayer-flipbox-front" style="background-image:url({{front_background}});">
<div class="pagelayer-flipbox-box-overlay">
<div class="pagelayer-flipbox-box-inner">
<div class="pagelayer-flipbox-content">
<div class="pagelayer-icon-holder pagelayer-service-icon pagelayer-service-{{icon_view}}">
<i class="{{icon}} {{bg_shape}} {{icon_size}} pagelayer-animation-{{anim_hover}}"></i>
</div>
<div if="{{heading_image}}" class="pagelayer-flipbox-image">
<img class="pagelayer-img pagelayer-animation-{{anim_hover}}" src="{{func_image}}" title="{{{heading_image-title}}}" alt="{{{heading_image-alt}}}" />
</div>
<h2 if={{front_heading}}>{{front_heading}}</h2>
<p if={{front_content}}>{{front_content}}</p>
</div>
</div>
</div>
</div>
<div class="pagelayer-flipbox-box pagelayer-flipbox-back" style="">
<div class="pagelayer-flipbox-box-overlay">
<div class="pagelayer-flipbox-box-inner">
<div class="pagelayer-flipbox-content">
<h2 if={{back_heading}}>{{back_heading}}</h2>
<p if={{back_content}}>{{back_content}}</p>
<a if="{{display_button}}" href="{{{back_button_url}}}" class="pagelayer-service-btn {{back_button_type}} pagelayer-ele-link pagelayer-button {{back_button_size}}">{{back_button_text}}</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>',
'params' => array(
'height' => array(
'type' => 'slider',
'label' => __pl('block_height'),
'np' => 1,
'min' => 100,
'max' => 1200,
'default' => 500,
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-flipper' => 'height: {{val}}px;'],
),
'content_width' => array(
'type' => 'slider',
'label' => __pl('content_width'),
'min' => 50,
'max' => 100,
'default' => 100,
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-content' => 'width: {{val}}%; margin:0 auto;'],
),
'flip_animation' => array(
'type' => 'select',
'label' => __pl('animation_styles'),
'default' => 'flip',
'list' => array(
'flip' => __pl('flip'),
'slide' => __pl('slide'),
'push' => __pl('push'),
'zoom-in' => __pl('zoom-in'),
'zoom-out' => __pl('zoom-out'),
'fade' => __pl('fade'),
),
),
'animation_direction' => array(
'type' => 'select',
'label' => __pl('animation_direction'),
'default' => 'right',
'list' => array(
'up' => __pl('top'),
'down' => __pl('bottom'),
'right' => __pl('right'),
'left' => __pl('left'),
),
'req' => array(
'!flip_animation' => ['fade','zoom-out','zoom-in'],
),
),
'animation_duration' => array(
'type' => 'spinner',
'label' => __pl('animation_duration'),
'np' => 1,
'default' => 600,
'min' => 100,
'step' => 50,
'max' => 2000,
'css' => ['{{element}} .pagelayer-flipbox-box' => 'transition: all {{val}}ms ease-in-out !important;
-webkit-transition: all {{val}}ms ease-in-out !important;']
),
'flip_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-flipbox-flipper' => 'border-style: {{val}}'],
'list' => array(
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
),
),
'flip_border_color' => array(
'type' => 'color',
'label' => __pl('border_color'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-flipbox-flipper' => 'border-color: {{val}};'],
'req' => array(
'!flip_border_type' => ''
),
),
'flip_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-flipper' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => array(
'!flip_border_type' => ''
),
),
'flip_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'units' => ['px', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-flipper' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
),
),
'front_section' => array(
'heading_element' => array(
'type' => 'radio',
'label' => __pl('visual_element'),
'default' => '',
'list' => array(
'' => __pl('none'),
'icon' => __pl('icon'),
'image' => __pl('image'),
),
),
'icon' => array(
'type' => 'icon',
'label' => __pl('icon'),
'default' => 'fas fa-star',
'req' => array(
'heading_element'=>'icon',
),
),
'icon_view' => array(
'type' => 'select',
'label' => __pl('iconbox_icon_view'),
'default' => 'default',
'list' =>array(
'default' => __pl('default'),
'stacked' => __pl('Stacked'),
'framed' => __pl('Framed'),
),
'req' => array(
'heading_element'=>'icon',
),
),
'bg_shape' => array(
'type' => 'select',
'label' => __pl('icon_background_shape'),
'default' => 'pagelayer-icon-circle',
'list' => array(
'' => __pl('icon_shape_none'),
'pagelayer-icon-circle' => __pl('icon_shape_circle'),
'pagelayer-icon-square' => __pl('icon_shape_square'),
'pagelayer-icon-rounded' => __pl('icon_shape_rounded')
),
'req' => array(
'heading_element'=>'icon',
'!icon_view' => 'default',
),
),
'icon_color_style' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'position: relative; color: {{val}};',
'{{element}} pagelayer-flipbox-content i:before' => 'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);'],
'default' => '#ffffff',
'req' => array(
'heading_element'=>'icon',
),
),
'bg_color' => array(
'type' => 'color',
'label' => __pl('icon_background_color'),
'default' => '#ef9229',
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'background-color: {{val}};'],
'req' => array(
'heading_element'=>'icon',
'!bg_shape' => '',
'icon_view' => 'stacked',
),
'show' => array(
'icon_hover' => ''
),
),
'icon_background_size' => array(
'type' => 'spinner',
'label' => __pl('icon_background_size'),
'default' => 20,
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'padding: calc(0.5em + {{val}}px);'],
'min' => 1,
'max' => 100,
'step' => 1,
'screen' => 1,
'req' => array(
'heading_element'=>'icon',
),
),
'icon_size' => array(
'type' => 'select',
'label' => __pl('size_label'),
'default' => 'pagelayer-icon-large',
'list' => array(
'pagelayer-icon-mini' => __pl('mini'),
'pagelayer-icon-small' => __pl('small'),
'pagelayer-icon-large' => __pl('large'),
'pagelayer-icon-extra-large' => __pl('extra_large'),
'pagelayer-icon-double-large' => __pl('double_large'),
'pagelayer-icon-custom' => __pl('custom'),
),
'req' => array(
'heading_element'=>'icon',
),
),
'icon_size_custom' => array(
'type' => 'spinner',
'label' => __pl('icon_custom_size'),
'min' => 1,
'step' => 1,
'max' => 100,
'default' => 26,
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'font-size: {{val}}px'],
'req' => array(
'icon_size' => 'pagelayer-icon-custom',
'heading_element' => 'icon'
),
),
'icon_rotate' => array(
'type' => 'spinner',
'label' => __pl('icon_rotate'),
'default' => 0,
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'transform: rotate({{val}}deg)'],
'min' => 0,
'max' => 360,
'step' => 1,
'screen' => 1,
'req' => array(
'heading_element'=>'icon',
),
),
'icon_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'req' => array(
'heading_element'=>'icon',
),
),
'icon_border_color' => array(
'type' => 'color',
'label' => __pl('icon_border_color'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'border-color: {{val}};'],
'req' => array(
'!icon_border_type' => '',
'heading_element' => 'icon'
),
),
'icon_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!icon_border_type' => '',
'heading_element' => 'icon'
],
),
'icon_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-content i' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!icon_border_type' => '',
'heading_element' => 'icon'
),
),
'heading_image'=> array(
'type' => 'image',
'label' => __pl('image'),
'default' => PAGELAYER_URL.'/images/default-image.png',
'req' => array(
'heading_element' => 'image',
),
),
'heading_image_size' => array(
'type' => 'radio',
'label' => __pl('image_size'),
'default' => 'full',
'list' => array(
'full' => __pl('full'),
'thumbnail' => __pl('thumbnail'),
'custom' => __pl('custom'),
),
'req' => array(
'heading_element' => 'image',
),
),
'heading_image_custom_size' => array(
'type' => 'slider',
'label' => __pl('img_custom_size'),
'min' => 0,
'max' => 100,
'screen' => 1,
'default' => 50,
'css' => ['{{element}} .pagelayer-flipbox-image img' => 'width:{{val}}%; height: auto;'],
'req' => array(
'heading_element' => 'image',
'heading_image_size' => 'custom',
)
),
'heading_image_spacing' => array(
'type' => 'slider',
'label' => __pl('spacing'),
'min' => 0,
'max' => 100,
'screen' => 1,
'default' => 20,
'css' => ['{{element}} .pagelayer-flipbox-image img' => 'margin-bottom:{{val}}px;'],
'req' => array(
'heading_element' => 'image',
)
),
'front-text-align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'center',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-flipbox-front .pagelayer-flipbox-box-overlay' => 'text-align:{{val}} !important;'],
),
'front_heading' => array(
'type' => 'text',
'default' => 'Flipbox Heading',
'label' => __pl('heading_name'),
'np' => 1,
),
'heading_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-flipbox-front .pagelayer-flipbox-content h2' => 'color:{{val}};'],
),
'heading_typography' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => 'Poppins,40,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-flipbox-front .pagelayer-flipbox-content h2' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'front_content' => array(
'type' => 'textarea',
'label' => __pl('content'),
'np' => 1,
'default' => 'Flipbox content comes here such as It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.',
),
'front_content_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-flipbox-front .pagelayer-flipbox-content p' => 'color:{{val}};'],
),
'front_content_typography' => array(
'type' => 'typography',
'label' => __pl('text_style'),
'default' => ',16,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-flipbox-front .pagelayer-flipbox-content p' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'front_shadow' => array(
'type' => 'box_shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} .pagelayer-flipbox-front' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}};'],
),
'front_background_type' => array(
'type' => 'radio',
'label' => __pl('background_type'),
'default' => '',
'list' => array(
'color' => __pl('color'),
'gradient' => __pl('gradient'),
'image' => __pl('image'),
),
),
'front_background_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '',
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-color:{{val}};'],
'req' => array(
'front_background_type' => 'color',
),
),
'front_background_gradient' => array(
'type' => 'gradient',
'label' => __pl('background_gradient'),
'default' => '150,#f12711,40,#f5af19,60,#f5af19,100',
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%) !important;'],
'req' => array(
'front_background_type' => 'gradient',
),
),
'front_background_image' => array(
'type' => 'image',
'label' => __pl('image'),
'np' => 1,
'default' => PAGELAYER_URL.'/images/default-image.png',
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-image:url("{{{front_background_image-url}}}") !important;'],
'req' => array(
'front_background_type' => 'image',
),
),
'front_background_attachment' => array(
'type' => 'select',
'label' => __pl('background_attachment'),
'list' => array(
'' => __pl('default'),
'scroll' => __pl('scroll'),
'fixed' => __pl('fixed')
),
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-attachment: {{val}}'],
'req' => array(
'front_background_type' => 'image',
),
),
'front_background_posx' => array(
'type' => 'select',
'label' => __pl('ele_bg_posx'),
'list' => array(
'' => __pl('default'),
'center' => __pl('center'),
'left' => __pl('left'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-position-x: {{val}};'],
'req' => array(
'front_background_type' => 'image',
),
),
'front_background_posy' => array(
'type' => 'select',
'label' => __pl('ele_bg_posy'),
'list' => array(
'' => __pl('default'),
'center' => __pl('center'),
'top' => __pl('top'),
'bottom' => __pl('bottom')
),
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-position-y: {{val}};'],
'req' => array(
'front_background_type' => 'image',
),
),
'front_background_repeat' => array(
'type' => 'select',
'label' => __pl('repeat'),
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-repeat: {{val}};'],
'list' => array(
'' => __pl('default'),
'repeat' => __pl('repeat'),
'no-repeat' => __pl('no-repeat'),
'repeat-x' => __pl('repeat-x'),
'repeat-y' => __pl('repeat-y'),
),
'req' => array(
'front_background_type' => 'image',
),
),
'front_background_size' => array(
'type' => 'select',
'label' => __pl('ele_bg_size'),
'css' => ['{{element}} .pagelayer-flipbox-front' => 'background-size: {{val}};'],
'list' => array(
'' => __pl('default'),
'cover' => __pl('cover'),
'contain' => __pl('contain')
),
'req' => array(
'front_background_type' => 'image',
),
),
'front_section_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'screen' => 1,
'default' => '100,100,100,100',
'css' => ['{{element}} .pagelayer-flipbox-front .pagelayer-flipbox-box-overlay' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
),
'back_section' => array(
'back_section' => array(
'type' => 'checkbox',
'label' => __pl('back_side'),
),
'back-text-align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'center',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-flipbox-box-overlay' => 'text-align:{{val}} !important;'],
),
'back_heading' => array(
'type' => 'text',
'label' => __pl('title'),
'np' => 1,
'default' => 'Flipbox Back Heading',
),
'back_heading_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#000000',
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-flipbox-content h2' => 'color:{{val}};'],
),
'back_heading_typography' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => 'Poppins,40,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-flipbox-content h2' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'back_content' => array(
'type' => 'textarea',
'label' => __pl('content'),
'np' => 1,
'default' => 'Flipbox content comes here such as It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.',
),
'back_content_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'default' => '#3c3f40',
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-flipbox-content p' => 'color:{{val}};'],
),
'back_content_typography' => array(
'type' => 'typography',
'label' => __pl('text_style'),
'default' => ',16,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-flipbox-content p' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'back_shadow' => array(
'type' => 'box_shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} .pagelayer-flipbox-back' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}};'],
),
'display_button' => array(
'type' => 'checkbox',
'label' => __pl('button'),
),
'back_button_url' => array(
'type' => 'link',
'label' => __pl('btn_url_label'),
'selector' => '.pagelayer-service-btn',
'req' => array(
'!display_button' => '',
),
),
'back_button_text' => array(
'type' => 'text',
'label' => __pl('button_text_label'),
'default' => 'Click Here!',
'req' => array(
'!display_button' => '',
),
),
'back_button_typography' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',20,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-service-btn' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => array(
'!display_button' => '',
),
),
'back_button_type' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'pagelayer-btn-default',
'list' => array(
'pagelayer-btn-default' => __pl('btn_type_default'),
'pagelayer-btn-primary' => __pl('btn_type_primary'),
'pagelayer-btn-secondary' => __pl('btn_type_secondary'),
'pagelayer-btn-success' => __pl('btn_type_success'),
'pagelayer-btn-info' => __pl('btn_type_info'),
'pagelayer-btn-warning' => __pl('btn_type_warning'),
'pagelayer-btn-danger' => __pl('btn_type_danger'),
'pagelayer-btn-dark' => __pl('btn_type_dark'),
'pagelayer-btn-light' => __pl('btn_type_light'),
'pagelayer-btn-link' => __pl('btn_type_link'),
'pagelayer-btn-custom' => __pl('btn_type_custom')
),
'req' => array(
'!display_button' => '',
),
),
'back_button_size' => array(
'type' => 'select',
'label' => __pl('button_size'),
'default' => 'pagelayer-btn-mini',
'list' => array(
'pagelayer-btn-mini' => __pl('mini'),
'pagelayer-btn-small' => __pl('small'),
'pagelayer-btn-large' => __pl('large'),
'pagelayer-btn-extra-large' => __pl('extra_large'),
'pagelayer-btn-double-large' => __pl('double_large'),
'pagelayer-btn-custom' => __pl('custom')
),
'req' => array(
'!display_button' => '',
),
),
'back_button_custom_size' => array(
'type' => 'spinner',
'label' => __pl('btn_custom_size'),
'min' => 1,
'step' => 1,
'max' => 100,
'default' => 5,
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-service-btn' => 'padding: calc({{val}}px / 2) {{val}}px;'],
'req' => array(
'back_button_size' => 'pagelayer-btn-custom',
),
),
'back_btn_spacing' => array(
'type' => 'slider',
'label' => __pl('spacing'),
'min' => 0,
'max' => 200,
'default' => 10,
'screen' => 1,
'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top: {{val}}px;'],
'req' => array(
'!display_button' => '',
),
),
'back_btn_state' => array(
'type' => 'radio',
'label' => __pl('button_state'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
'req' => array(
'back_button_type' => 'pagelayer-btn-custom',
'!display_button' => '',
),
),
'back_button_color' => array(
'type' => 'color',
'label' => __pl('button_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-service-btn' => 'color:{{val}};'],
'show' => array(
'back_btn_state' => 'normal',
),
),
'back_button_bg_color' => array(
'type' => 'color',
'label' => __pl('button_bg_color'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-service-btn' => 'background-color:{{val}};'],
'show' => array(
'back_btn_state' => 'normal',
),
),
'back_btn_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('btn_hover_delay'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 400,
'css' => ['{{element}} .pagelayer-service-btn' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => array(
'back_btn_state' => 'hover',
),
),
'back_button_color_hover' => array(
'type' => 'color',
'label' => __pl('button_color'),
'default' => '',
'css' => ['{{element}} .pagelayer-service-btn:hover' => 'color:{{val}} !important;'],
'show' => array(
'back_btn_state' => 'hover',
),
),
'back_button_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('button_bg_color'),
'default' => '',
'css' => ['{{element}} .pagelayer-service-btn:hover' => 'background-color:{{val}} !important;'],
'show' => array(
'back_btn_state' => 'hover'
),
),
'back_background_type' => array(
'type' => 'radio',
'label' => __pl('background_type'),
'default' => '',
'list' => array(
'color' => __pl('color'),
'gradient' => __pl('gradient'),
'image' => __pl('image'),
),
),
'back_background_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '',
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-color:{{val}};'],
'req' => array(
'back_background_type' => 'color',
),
),
'back_background_gradient' => array(
'type' => 'gradient',
'label' => __pl('background_gradient'),
'default' => '150,#1488CC,40,#2B32B2,60,#2B32B2,100',
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%) !important;'],
'req' => array(
'back_background_type' => 'gradient',
),
),
'back_background_image' => array(
'type' => 'image',
'label' => __pl('image'),
'default' => PAGELAYER_URL.'/images/default-image.png',
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-image:url("{{{back_background_image-url}}}") !important;'],
'req' => array(
'back_background_type' => 'image',
),
),
'back_background_attachment' => array(
'type' => 'select',
'label' => __pl('background_attachment'),
'list' => array(
'' => __pl('default'),
'scroll' => __pl('scroll'),
'fixed' => __pl('fixed')
),
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-attachment: {{val}}'],
'req' => array(
'back_background_type' => 'image',
),
),
'back_background_posx' => array(
'type' => 'select',
'label' => __pl('ele_bg_posx'),
'list' => array(
'' => __pl('default'),
'center' => __pl('center'),
'left' => __pl('left'),
'right' => __pl('right')
),
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-position-x: {{val}};'],
'req' => array(
'back_background_type' => 'image',
),
),
'back_background_posy' => array(
'type' => 'select',
'label' => __pl('ele_bg_posy'),
'list' => array(
'' => __pl('default'),
'center' => __pl('center'),
'top' => __pl('top'),
'bottom' => __pl('bottom')
),
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-position-y: {{val}};'],
'req' => array(
'back_background_type' => 'image',
),
),
'back_background_repeat' => array(
'type' => 'select',
'label' => __pl('ele_bg_repeat'),
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-repeat: {{val}};'],
'list' => array(
'' => __pl('default'),
'repeat' => __pl('repeat'),
'no-repeat' => __pl('no-repeat'),
'repeat-x' => __pl('repeat-x'),
'repeat-y' => __pl('repeat-y'),
),
'req' => array(
'back_background_type' => 'image',
),
),
'back_background_size' => array(
'type' => 'select',
'label' => __pl('ele_bg_size'),
'css' => ['{{element}} .pagelayer-flipbox-back' => 'background-size: {{val}};'],
'list' => array(
'' => __pl('default'),
'cover' => __pl('cover'),
'contain' => __pl('contain')
),
'req' => array(
'back_background_type' => 'image',
),
),
'back_section_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'default' => '100,100,100,100',
'screen' => 1,
'css' => ['{{element}} .pagelayer-flipbox-back .pagelayer-flipbox-box-overlay' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
),
'styles' => [
'front_section' => __pl('front_section'),
'back_section' => __pl('back_section'),
]
)
);
// Countdown Timer
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_countdown', array(
'name' => __pl('countdown_timer'),
'group' => 'other',
'html' => '<div class="pagelayer-countdown-container" pagelayer-expiry-date={{date}} pagelayer-time-type={{time_zone}}>
<div class="pagelayer-countdown-expired">
<p if={{expired_text}}>{{expired_text}}</p>
</div>
<div class="pagelayer-countdown-counter">
<div if={{days}} class="pagelayer-countdown-days pagelayer-countdown-item pagelayer-countdown-{{display}}">
<div class="pagelayer-days-count pagelayer-countdown-count"></div>
<div if={{show_label}} class="pagelayer-countdown-name">
<span if={{days_label_text}}>{{days_label_text}}</span>
</div>
</div>
<div if={{hours}} class="pagelayer-countdown-hours pagelayer-countdown-item pagelayer-countdown-{{display}}">
<div class="pagelayer-hours-count pagelayer-countdown-count"></div>
<div if={{show_label}} class="pagelayer-countdown-name">
<span if={{hours_label_text}}>{{hours_label_text}}</span>
</div>
</div>
<div if={{minutes}} class="pagelayer-countdown-minutes pagelayer-countdown-item pagelayer-countdown-{{display}}">
<div class="pagelayer-minutes-count pagelayer-countdown-count"></div>
<div if={{show_label}} class="pagelayer-countdown-name">
<span if={{minutes_label_text}} >{{minutes_label_text}}</span>
</div>
</div>
<div if={{seconds}} class="pagelayer-countdown-seconds pagelayer-countdown-item pagelayer-countdown-{{display}}">
<div class="pagelayer-seconds-count pagelayer-countdown-count"></div>
<div if={{show_label}} class="pagelayer-countdown-name">
<span if={{seconds_label_text}} >{{seconds_label_text}}</span>
</div>
</div>
</div>
</div>',
'params' => array(
'date' => array(
'type' => 'datetime',
'displayMode' => 'datetime', // date | datetime (default)
'returnMode' => 'YYYY-MM-DD H:m:s', // mysql format uses here (default: Y-m-d H:i:s )
'label' => __pl('date_picker_label'),
'np' => 1,
'default' => '',
),
'time_zone' => array(
'type' => 'select',
'label' => __pl('time_zone'),
'default' => 'server',
'list' => array(
'server' => __pl('server_time'),
'local' => __pl('user_local')
),
),
'number_color' => array(
'type' => 'color',
'label' => __pl('color'),
'np' => 1,
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-countdown-count' => 'color:{{val}}'],
),
'number_style' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',50,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-countdown-count' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'number_spacing' => array(
'type' => 'padding',
'label' => __pl('spacing'),
'units' => ['px', 'em', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-count' => 'margin-top: {{val[0]}}; margin-right: {{val[1]}}; margin-bottom: {{val[2]}}; margin-left: {{val[3]}};'],
),
'days' => array(
'type' => 'checkbox',
'label' => __pl('days'),
'np' => 1,
'default' => 'true',
),
'hours' => array(
'type' => 'checkbox',
'label' => __pl('hours'),
'np' => 1,
'default' => 'true',
),
'minutes' => array(
'type' => 'checkbox',
'label' => __pl('minutes'),
'np' => 1,
'default' => 'true',
),
'seconds' => array(
'type' => 'checkbox',
'label' => __pl('seconds'),
'np' => 1,
'default' => 'true',
),
),
'expired_text' =>[
'display_expired_text' => array(
'type' => 'checkbox',
'label' => __pl('expired_text'),
),
'expired_text' => array(
'type' => 'text',
'label' => __pl('text'),
'default' => 'Countdown Timer Expired',
),
'expired_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'default' => '#000000',
'css' => ['{{element}} .pagelayer-countdown-expired p' => 'color:{{val}};'],
),
'expired_background_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'css' => ['{{element}} .pagelayer-countdown-expired' => 'background-color:{{val}};'],
),
'expired_style' => array(
'type' => 'typography',
'label' => __pl('expired_style'),
'default' => ',50,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-countdown-expired p' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'expired_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'units' => ['px', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-expired' => 'padding: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
),
'expired_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'default' => 'center',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
),
'css' => ['{{element}} .pagelayer-countdown-expired' => 'text-align:{{val}};'],
),
],
'text_style' =>[
'show_label' => array(
'type' => 'checkbox',
'label' => __pl('show_title'),
'np' => 1,
'default' => 'true',
),
'custom_label_text' => array(
'type' => 'checkbox',
'label' => __pl('custom_label_text'),
'show' => array(
'show_label' => 'true',
),
),
'days_label_text' => array(
'type' => 'text',
'label' => __pl('days'),
'default' => __pl('days'),
'show' => array(
'!custom_label_text' => '',
'!days' => '',
),
),
'hours_label_text' => array(
'type' => 'text',
'label' => __pl('hours'),
'default' => __pl('hours'),
'show' => array(
'!custom_label_text' => '',
'!hours' => '',
),
),
'minutes_label_text' => array(
'type' => 'text',
'label' => __pl('minutes'),
'default' => __pl('minutes'),
'show' => array(
'!custom_label_text' => '',
'!minutes' => '',
),
),
'seconds_label_text' => array(
'type' => 'text',
'label' => __pl('seconds'),
'default' => __pl('seconds'),
'show' => array(
'!custom_label_text' => '',
'!seconds' => '',
),
),
'font_color' => array(
'type' => 'color',
'label' => __pl('text_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-countdown-name span' => 'color:{{val}}'],
'show' => array(
'show_label' => 'true',
),
),
'cd_text_style' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',18,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-countdown-name' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'show' => array(
'show_label' => 'true',
),
),
],
'block_styles' =>[
'display' => array(
'type' => 'select',
'label' => __pl('display'),
'default' => 'block',
'list' => [
'block' => __pl('block'),
'inline' => __pl('inline'),
],
),
'block_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '#2b1661',
'css' => ['{{element}} .pagelayer-countdown-item' => 'background-color:{{val}}'],
),
'blocks_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'units' => ['px', 'em', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-item' => 'padding-top: {{val[0]}}; padding-right: {{val[1]}}; padding-bottom: {{val[2]}}; padding-left: {{val[3]}}'],
),
'blocks_space' => array(
'type' => 'padding',
'label' => __pl('block_space'),
'units' => ['px', 'em'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-item' => 'margin-top: {{val[0]}}; margin-right: {{val[1]}}; margin-bottom: {{val[2]}}; margin-left: {{val[3]}}'],
),
'cd_border_state' => array(
'type' => 'radio',
'label' => __pl(''),
'default' => '',
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'cd_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-countdown-item' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'cd_border_state' => ''
),
),
'cd_border_color' => array(
'type' => 'color',
'label' => __pl('border_color'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-countdown-item' => 'border-color: {{val}};'],
'req' => array(
'!cd_border_type' => ''
),
'show' => array(
'cd_border_state' => ''
),
),
'cd_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-item' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!cd_border_type' => ''
],
'show' => array(
'cd_border_state' => ''
),
),
'cd_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'units' => ['px', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-item' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
'show' => array(
'cd_border_state' => ''
),
),
'cd_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-countdown-item:hover' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => array(
'cd_border_state' => 'hover'
),
),
'cd_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color'),
'css' => ['{{element}} .pagelayer-countdown-item:hover' => 'border-color: {{val}};'],
'default' => '#0986c0',
'req' => array(
'!cd_border_type_hover' => ''
),
'show' => array(
'cd_border_state' => 'hover'
),
),
'cd_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-item:hover' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'],
'req' => [
'!cd_border_type_hover' => ''
],
'show' => array(
'cd_border_state' => 'hover'
),
),
'cd_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'units' => ['px', '%'],
'screen' => 1,
'css' => ['{{element}} .pagelayer-countdown-item:hover' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'],
'show' => array(
'cd_border_state' => 'hover'
),
),
'cd_shadow' => array(
'type' => 'box_shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} .pagelayer-countdown-item' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}};'],
'show' => array(
'cd_border_state' => '',
),
),
'cd_shadow_hover' => array(
'type' => 'box_shadow',
'label' => __pl('shadow'),
'css' => ['{{element}} .pagelayer-countdown-item:hover' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[4]}}px {{val[3]}} {{val[5]}};'],
'show' => array(
'cd_border_state' => 'hover'
),
),
],
'styles' => [
'text_style' => __pl('title_style'),
'expired_text' => __pl('expired_text'),
'block_styles' => __pl('block_styles'),
],
)
);
// Button Group
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_btn_grp', array(
'name' => __pl('btn_grp'),
'group' => 'button',
'has_group' => [
'section' => 'params',
'prop' => 'elements'
],
'params' => array(
'elements' => array(
'type' => 'group',
'label' => __pl('buttons'),
'sc' => PAGELAYER_SC_PREFIX.'_btn',
'item_label' => array(
'default' => __pl('button'),
'param' => 'text'
),
'count' => 2,
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('button_name'))),
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'default' => 'center',
'screen' => 1,
'css' => [
'{{element}}' => 'text-align: {{val}}',
'{{element}} .pagelayer-btn' => 'text-align: {{val}}'
],
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
)
),
'group_layout' => array(
'type' => 'radio',
'label' => __pl('layout'),
'default' => 'horizontal',
'css' => ['{{element}} > div' => 'display: inline-block;'],
'list' => array(
'horizontal' => __pl('horizontal'),
'' => __pl('vertical')
)
),
'hindent' => array(
'type' => 'spinner',
'label' => __pl('space_between'),
'np' => 1,
'default' => '5',
'css' => ['{{element}} .pagelayer-btn' => 'padding-left: {{val}}px; padding-right: {{val}}px;'],
'min' => 0,
'step' => 1,
'max' => 50,
'default' => 3,
'screen' => 1,
'req' => ['group_layout' => 'horizontal']
),
'vindent' => array(
'type' => 'spinner',
'label' => __pl('space_between'),
'np' => 1,
'default' => '5',
'css' => ['{{element}} .pagelayer-btn' => 'padding-top: {{val}}px; padding-bottom: {{val}}px;'],
'min' => 0,
'step' => 1,
'max' => 50,
'default' => 3,
'screen' => 1,
'req' => ['group_layout' => '']
)
)
)
);
// Testimonial Slider
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_testimonial_slider', array(
'name' => __pl('testimonial_slider'),
'group' => 'other',
'has_group' => [
'section' => 'params',
'prop' => 'elements'
],
'icon' => 'pli pli-commenting-o',
'prevent_inside' => ['pl_slides'],
'child_selector' => '>.pagelayer-owl-stage-outer>.pagelayer-owl-stage>.pagelayer-owl-item', // Make it very specifc
'holder' => '.pagelayer-testimonials-holder',
'html' => '<div class="pagelayer-testimonials-holder pagelayer-owl-holder pagelayer-owl-carousel pagelayer-owl-theme"></div>',
'params' => array(
'elements' => array(
'type' => 'group',
'label' => __pl('testimonial'),
'sc' => PAGELAYER_SC_PREFIX.'_testimonial',
'item_label' => array(
'default' => __pl('testimonial'),
'param' => 'cite'
),
'count' => 3,
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('testimonial')))
),
),
'slider_options' => $pagelayer->slider_options,
'arrow_styles' => $pagelayer->slider_arrow_styles,
'pager_styles' => $pagelayer->slider_pager_styles,
'styles' => [
'slider_options' => __pl('slider_options'),
'arrow_styles' => __pl('arrow_styles'),
'pager_styles' => __pl('pager_styles'),
]
));
// Pricing Table
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_pricing', array(
'name' => __pl('pricing_table'),
'group' => 'other',
'has_group' => [
'section' => 'feature_style',
'prop' => 'elements'
],
'holder' => '.pagelayer-pricing-ul',
'html' => '<div class="pagelayer-pricing-details">
<div if="{{ribbon_text}}" class="pagelayer-pricing-ribbon-container">
<div class="pagelayer-pricing-ribbon">
{{ribbon_text}}
</div>
</div>
<h3 if="{{plan_title}}" class="pagelayer-pricing-type">{{plan_title}}</h3>
<h4 if="{{plan_sub_title}}" class="pagelayer-pricing-sub-title">{{plan_sub_title}}</h4>
</div>
<div class="pagelayer-pricing-rate-section">
<h4 if="{{original_price}}" class="pagelayer-pricing-price pagelayer-pricing-original">
<span class="pagelayer-pricing-rate">
<span if="{{currency}}">{{currency}}</span><span class="pagelayer-pricing-orig-amt">{{original_price}}</span>
</span>
</h4>
<h2 class="pagelayer-pricing-price">
<span if="{{currency}}" class="pagelayer-pricing-currency pagelayer-pricing-currency-{{currency_position}}">{{currency}}</span><span if="{{price}}" class="pagelayer-pricing-rate pagelayer-pricing-amt">{{price}}</span>
</h2>
<p if="{{period}}" class="pagelayer-pricing-duration">{{period}}</p>
</div>
<div class="pagelayer-pricing-features">
<ul class="pagelayer-pricing-ul"></ul>
<a if="{{price_button}}" href="{{{button_url}}}" class="pagelayer-pricing-btn {{button_type}} pagelayer-ele-link pagelayer-button {{button_size}}">{{button_text}}</a>
<p if="{{additional_info}}" class="pagelayer-pricing-additional">{{additional_info}}</p>
</div>',
'params' => array(
'plan_title' => array(
'type' => 'text',
'label' => __pl('plan_type'),
'np' => 1,
'default' => 'Standard',
'edit' => '.pagelayer-pricing-type',
),
'title_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-type' => 'color:{{val}};'],
),
'title_size' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => 'Poppins,20,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-type' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'content_align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'screen' => 1,
'css' => 'text-align: {{val}};',
'list' => array(
'left' => __pl('left'),
'' => __pl('center'),
'right' => __pl('right'),
)
),
),
//styles
'header_style' => [
'header_background_color' => array(
'type' => 'color',
'label' => __pl('bg_color'),
'default' => '#d55400',
'css' => ['{{element}} .pagelayer-pricing-details' => 'background-color:{{val}} !important;'],
),
'header_padding' => array(
'label' => __pl('padding'),
'type' => 'padding',
'screen' => 1,
'default' => '10,10,10,10',
'css' => ['{{element}} .pagelayer-pricing-details' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'header_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-pricing-details' =>'border-style: {{val}};'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
),
'header_border_color' => array(
'type' => 'color',
'label' => __pl('border_color'),
'default' => '#e5e5e8',
'css' => ['{{element}} .pagelayer-pricing-details' => 'border-color: {{val}};'],
'req' => ['!header_border_type' => '']
),
'header_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'default' => '0,0,0,0',
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-details' =>'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'],
'req' => ['!header_border_type' => '']
),
'header_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-details' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => ['!header_border_type' => '']
),
],
'subtitle_style' => [
'plan_sub_title' => array(
'type' => 'text',
'label' => __pl('subtitle'),
'default' => 'For beginners',
'edit' => '.pagelayer-pricing-sub-title',
),
'subtitle_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-sub-title' => 'color:{{val}}'],
),
'subtitle_size' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => 'Poppins,18,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-sub-title' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
],
'price_style' => [
'price' => array(
'type' => 'text',
'label' => __pl('plan_price'),
'np' => 1,
'default' => '49',
'edit' => '.pagelayer-pricing-amt',
),
'sale' => array(
'type' => 'checkbox',
'label' => __pl('sale'),
),
'original_price' => array(
'type' => 'text',
'label' => __pl('old_price'),
'default' => '100',
'edit' => '.pagelayer-pricing-orig-amt',
'keep_prop' => 1, // Prevent to remove props in gutenburg
'css' => ['{{element}} .pagelayer-pricing-original '=> 'display:inline-block;'],
'req' => array(
'sale' => 'true'
)
),
'price_size' => array(
'label' => __pl('price_size'),
'type' => 'typography',
'default' => 'Poppins,45,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-price .pagelayer-pricing-rate' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'price_sale_size' => array(
'label' => __pl('old_price_size'),
'type' => 'typography',
'default' => 'Poppins,35,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-original .pagelayer-pricing-rate' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => array(
'sale' => 'true'
)
),
'price_state' => array(
'type' => 'radio',
'label' => __pl('price_state'),
'default' => 'normal',
'list' => array(
'normal' => __pl('normal'),
'hover' => __pl('hover'),
),
),
'price_line_height' => array(
'label' => __pl('price_line_height'),
'type' => 'slider',
'min' => 0,
'max' => 500,
'default' => 30,
'css' => ['{{element}} .pagelayer-pricing-price .pagelayer-pricing-currency' => 'line-height:{{val}}%;'],
),
'price_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-price .pagelayer-pricing-rate' => 'color:{{val}}'],
'show' => ['price_state' => 'normal'],
),
'old_price_color' => array(
'type' => 'color',
'label' => __pl('old_price_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-price.pagelayer-pricing-original .pagelayer-pricing-rate' => 'color:{{val}}'],
'show' => ['price_state' => 'normal'],
'req' => ['sale' => 'true'],
),
'old_price_line_color' => array(
'type' => 'color',
'label' => __pl('old_price_line_color'),
'default' => '#000000',
'css' => ['{{element}} .pagelayer-pricing-price.pagelayer-pricing-original' => 'color:{{val}}'],
'show' => ['price_state' => 'normal'],
'req' => ['sale' => 'true'],
),
'price_background_color' => array(
'type' => 'color',
'label' => __pl('background_color'),
'default' => '#e98b2b',
'css' => ['{{element}} .pagelayer-pricing-rate-section' => 'background-color:{{val}}'],
'show' => ['price_state' => 'normal'],
),
'price_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-pricing-price .pagelayer-pricing-rate:hover' => 'color:{{val}}'],
'show' => ['price_state' => 'hover'],
),
'old_price_color_hover' => array(
'type' => 'color',
'label' => __pl('old_price_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-price.pagelayer-pricing-original .pagelayer-pricing-rate:hover' => 'color:{{val}}'],
'show' => ['price_state' => 'hover'],
'req' => ['sale' => 'true'],
),
'old_price_line_color_hover' => array(
'type' => 'color',
'label' => __pl('old_price_line_color'),
'css' => ['{{element}} .pagelayer-pricing-price.pagelayer-pricing-original:hover' => 'color:{{val}}'],
'show' => ['price_state' => 'hover'],
'req' => ['sale' => 'true'],
),
'price_background_color_hover' => array(
'type' => 'color',
'label' => __pl('background_color'),
'css' => ['{{element}} .pagelayer-pricing-rate-section:hover' => 'background-color:{{val}}'],
'show' => ['price_state' => 'hover'],
),
'price_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-pricing-rate-section' =>'border-style: {{val}};'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
),
'price_border_color' => array(
'type' => 'color',
'label' => __pl('border_color'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-pricing-rate-section' => 'border-color: {{val}};'],
'req' => ['!price_border_type' => '']
),
'price_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'css' => ['{{element}} .pagelayer-pricing-rate-section' =>'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'],
'req' => ['!price_border_type' => '']
),
'price_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'css' => ['{{element}} .pagelayer-pricing-rate-section' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => ['!price_border_type' => '']
),
'price_margin' => array(
'type' => 'padding',
'label' => __pl('margin'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-rate-section' => 'margin: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
'price_padding' => array(
'type' => 'padding',
'label' => __pl('padding'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-rate-section' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
),
],
'currency_style' => [
'currency' => array(
'type' => 'text',
'label' => __pl('currency'),
'np' => 1,
'default' => '$',
'edit' => '.pagelayer-pricing-currency',
),
'currency_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-price .pagelayer-pricing-currency' => 'color:{{val}}'],
),
'currency_size' => array(
'label' => __pl('currency_size'),
'type' => 'typography',
'default' => 'Poppins,35,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-price .pagelayer-pricing-currency' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'currency_position' => array(
'type' => 'radio',
'label' => __pl('position'),
'default' => 'top',
'list' => array(
'top' => __pl('top'),
'middle' => __pl('middle'),
'bottom' => __pl('bottom'),
),
),
],
'period_style' => [
'period_inline' => array(
'type' => 'checkbox',
'label' => __pl('inline'),
'css' => ['{{element}} .pagelayer-pricing-duration' => 'display:inline-block;'],
),
'period' => array(
'type' => 'text',
'label' => __pl('period'),
'np' => 1,
'default' => 'Per Month',
'edit' => '.pagelayer-pricing-duration',
),
'period_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-duration' => 'color:{{val}}'],
),
'period_size' => array(
'type' => 'typography',
'label' => __pl('heading_typo'),
'default' => ',16,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-duration' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
],
'feature_style' => [
'elements' => array(
'type' => 'group',
'label' => __pl('features_item'),
'sc' => PAGELAYER_SC_PREFIX.'_list_item',
'item_label' => array(
'default' => __pl('Features Item'),
'param' => 'item'
),
'count' => 3,
'text' =>strtr(__pl('add_new_item'), array('%name%' => __pl('Feature'))),
),
'features_background_color' => array(
'type' => 'color',
'label' => __pl('background_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-features' => 'background-color:{{val}}'],
),
'features_text_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#000000',
'css' => ['{{element}} .pagelayer-pricing-ul li span' => 'color:{{val}}'],
),
'features_text_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',18,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-ul li span' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'pri_features_spacing' => array(
'label' => __pl('space_between'),
'type' => 'slider',
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-ul > :not(:last-child) ' => 'margin-bottom:{{val}}px'],
),
'features_padding' => array(
'label' => __pl('padding'),
'type' => 'padding',
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-features' => 'padding: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px !important;'],
),
],
'additional_info' => [
'additional_info' => array(
'type' => 'textarea',
'label' => __pl('additional_info'),
'default' => 'Some Additional Information',
'edit' => '.pagelayer-pricing-additional',
),
'additional_text_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#000000',
'css' => ['{{element}} .pagelayer-pricing-additional' => 'color:{{val}}'],
),
'addition_text_typo' => array(
'type' => 'typography',
'label' => __pl('heading_typo'),
'default' => ',16,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-additional' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
],
'button_style' => [
'price_button' => array(
'type' => 'checkbox',
'label' => __pl('show_btn'),
'default' => 'true',
),
'button_type' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'pagelayer-btn-danger',
'list' => array(
'pagelayer-btn-default' => __pl('btn_type_default'),
'pagelayer-btn-primary' => __pl('btn_type_primary'),
'pagelayer-btn-secondary' => __pl('btn_type_secondary'),
'pagelayer-btn-success' => __pl('btn_type_success'),
'pagelayer-btn-info' => __pl('btn_type_info'),
'pagelayer-btn-warning' => __pl('btn_type_warning'),
'pagelayer-btn-danger' => __pl('btn_type_danger'),
'pagelayer-btn-dark' => __pl('btn_type_dark'),
'pagelayer-btn-light' => __pl('btn_type_light'),
'pagelayer-btn-link' => __pl('btn_type_link'),
'pagelayer-btn-custom' => __pl('btn_type_custom')
),
'req' => array(
'price_button' => 'true'
),
),
'button_size' => array(
'type' => 'select',
'label' => __pl('button_size_label'),
'default' => 'pagelayer-btn-mini',
'list' => array(
'pagelayer-btn-mini' => __pl('mini'),
'pagelayer-btn-small' => __pl('small'),
'pagelayer-btn-large' => __pl('large'),
'pagelayer-btn-extra-large' => __pl('extra_large'),
'pagelayer-btn-double-large' => __pl('double_large'),
'pagelayer-btn-custom' => __pl('custom'),
),
'req' => array(
'price_button' => 'true'
)
),
'button_size_custom' => array(
'type' => 'dimension',
'label' => __pl('padding'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-pricing-btn' => 'padding:{{val[0]}}px {{val[1]}}px;'],
'req' => array(
'button_size' => 'pagelayer-btn-custom'
)
),
'button_url' => array(
'type' => 'link',
'label' => __pl('btn_url_label'),
'selector' => '.pagelayer-pricing-btn',
'np' => 1,
'req' => array(
'price_button' => 'true'
),
),
'button_text' => array(
'type' => 'text',
'label' => __pl('button_text_label'),
'np' => 1,
'default' => 'Buy This Plan',
'edit' => '.pagelayer-pricing-btn',
'req' => array(
'price_button' => 'true'
),
),
'btn_typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'css' => [
'{{element}} .pagelayer-pricing-btn' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;',
],
),
'btn_spacing' => array(
'type' => 'slider',
'label' => __pl('spacing'),
'min' => '0',
'max' => '200',
'screen' => 1,
'default' => '10',
'css' => ['{{element}} .pagelayer-pricing-btn' => 'margin-top: {{val}}px;'],
'req' => [
'price_button' => 'true',
]
),
'btn_state' => array(
'type' => 'radio',
'label' => __pl('button_state'),
'default' => 'normal',
'list' => array(
'normal' => __pl('Normal'),
'hover' => __pl('Hover'),
),
'req' => array(
'price_button' => 'true',
'button_type' => 'pagelayer-btn-custom'
),
),
'button_color' => array(
'type' => 'color',
'label' => __pl('iconbox_button_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-btn' => 'color:{{val}};'],
'req' => [
'price_button' => 'true',
'button_type' => 'pagelayer-btn-custom',
],
'show' => ['btn_state' => 'normal']
),
'button_bg_color' => array(
'type' => 'color',
'label' => __pl('button_bg_color'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-pricing-btn' => 'background-color:{{val}};'],
'req' => [
'button_type' => 'pagelayer-btn-custom',
],
'show' => ['btn_state' => 'normal']
),
'price_btn_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-pricing-btn' =>'border-style: {{val}};'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => ['btn_state' => 'normal']
),
'price_btn_border_color' => array(
'type' => 'color',
'label' => __pl('border_color'),
'css' => ['{{element}} .pagelayer-pricing-btn' => 'border-color: {{val}};'],
'req' => ['!price_btn_border_type' => ''],
'show' => ['btn_state' => 'normal']
),
'price_btn_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'css' => ['{{element}} .pagelayer-pricing-btn' =>'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'],
'req' => ['!price_btn_border_type' => ''],
'show' => ['btn_state' => 'normal']
),
'price_btn_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'css' => ['{{element}} .pagelayer-pricing-btn' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'show' => ['btn_state' => 'normal']
),
'pricing_btn_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('btn_hover_delay'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 400,
'css' => ['{{element}} .pagelayer-pricing-btn' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => ['btn_state' => 'hover'],
),
'pricing_btn_color_hover' => array(
'type' => 'color',
'label' => __pl('iconbox_button_color'),
'default' => '',
'css' => ['{{element}} .pagelayer-pricing-btn:hover' => 'color:{{val}};'],
'show' => ['btn_state' => 'hover'],
),
'pricing_btn_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('button_bg_color_hover'),
'default' => '',
'css' => ['{{element}} .pagelayer-pricing-btn:hover' => 'background-color:{{val}};'],
'show' => ['btn_state' => 'hover'],
),
'price_btn_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-pricing-btn:hover' =>'border-style: {{val}};'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => ['btn_state' => 'hover']
),
'price_btn_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color'),
'css' => ['{{element}} .pagelayer-pricing-btn:hover' => 'border-color: {{val}};'],
'req' => ['!price_btn_border_type_hover' => ''],
'show' => ['btn_state' => 'hover']
),
'price_btn_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'css' => ['{{element}} .pagelayer-pricing-btn:hover' =>'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'],
'req' => ['!price_btn_border_type_hover' => ''],
'show' => ['btn_state' => 'hover']
),
'price_btn_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'css' => ['{{element}} .pagelayer-pricing-btn:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'show' => ['btn_state' => 'hover']
),
],
'ribbon_style' => [
'ribbon' => array(
'type' => 'checkbox',
'label' => __pl('ribbion_display'),
),
'ribbon_text' => array(
'type' => 'text',
'label' => __pl('ribbion_text'),
'default' => 'Popular',
'css' => ['{{element}} .pagelayer-pricing-ribbon'=> 'display:inline-block;'],
'req' => array(
'ribbon' => 'true'
)
),
'ribbon_text_size' => array(
'type' => 'typography',
'label' => __pl('ribbon_text_size'),
'default' => ',16,,500,,,solid,,,,',
'css' => ['{{element}} .pagelayer-pricing-ribbon' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
'req' => array(
'ribbon' => 'true'
)
),
'ribbon_text_color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-pricing-ribbon' => 'color:{{val}}'],
'req' => array(
'ribbon' => 'true'
)
),
'ribbon_background' => array(
'type' => 'color',
'label' => __pl('background_color'),
'default' => '#fd6129',
'css' => ['{{element}} .pagelayer-pricing-ribbon' => 'background-color:{{val}}'],
'req' => array(
'ribbon' => 'true'
)
),
],
'styles' => [
'subtitle_style' => __pl('subtitle'),
'header_style' => __pl('header_style'),
'currency_style' => __pl('currency_style'),
'price_style' => __pl('price_style'),
'period_style' => __pl('period_style'),
'feature_style' => __pl('feature_style'),
'button_style' => __pl('button_style'),
'additional_info' => __pl('addition_info'),
'ribbon_style' => __pl('ribbon_style'),
],
)
);
// Social Share Group
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_share_grp', array(
'name' => __pl('social_share'),
'group' => 'button',
'has_group' => [
'section' => 'params',
'prop' => 'elements'
],
'params' => array(
'elements' => array(
'type' => 'group',
'label' => __pl('social_share_grp'),
'sc' => PAGELAYER_SC_PREFIX.'_share',
'item_label' => array(
'default' => __pl('share_item'),
'param' => 'icon'
),
'count' => 3,
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('share_name'))),
),
),
'layout_style' => [
'type' => array(
'type' => 'select',
'label' => __pl('type'),
//'css' => ['{{element}} .pagelayer-share-content:hover' => 'border-style: {{val}}'],
'addClass' => 'pagelayer-share-type-{{val}}',
'default' => 'icon-label',
'list' => [
'icon' => __pl('icon'),
'icon-label' => __pl('icon-label'),
'label' => __pl('label'),
],
),
'count' => array(
'type' => 'radio',
'label' => __pl('count_in_line'),
'default' => '',
'screen' => 1,
'css' => ['{{element}} > div' => 'width: calc(100% / {{val}});'],
'list' => array(
'' => __pl('auto'),
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
),
'req' => array(
'!type' => 'icon'
)
),
'bg_shape' => array(
'type' => 'select',
'label' => __pl('icon_background_shape'),
'np' => 1,
'default' => 'pagelayer-social-shape-square',
//'css' => ['{{element}} i' => 'height:1em; width:1em; position: absolute; top: 50%; left: 50%; transform: translate(-50% , -50%);',
//'{{element}} .pagelayer-icon-holder' => 'position: relative; min-height: 1em; min-width: 1em;'],
'addClass' => '{{val}}',
'list' => array(
'pagelayer-social-bg-none' => __pl('icon_shape_none'),
'pagelayer-social-shape-circle' => __pl('icon_shape_circle'),
'pagelayer-social-shape-square' => __pl('icon_shape_square'),
'pagelayer-social-shape-rounded' => __pl('icon_shape_rounded'),
'pagelayer-social-shape-boxed' => __pl('icon_shape_boxed'),
'pagelayer-social-outline-border' => __pl('icon_shape_outline')
),
),
/* 'bg_size' => array(
'type' => 'spinner',
'label' => __pl('social_grp_size_label'),
'css' => ['{{element}} .pagelayer-icon-holder' => 'height: calc(1em + {{val}}px); width: calc(1em + {{val}}px);'],
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 10,
'req' => array(
'!bg_shape' => ''
)
), */
'align' => array(
'type' => 'radio',
'label' => __pl('obj_align_label'),
'np' => 1,
'default' => 'center',
'css' => 'text-align: {{val}};',
'screen' => 1,
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right')
)
),
/* 'group_layout' => array(
'type' => 'radio',
'label' => __pl('layout'),
'css' => ['{{element}} > div' => 'display: inline-block;'],
'default' => 'horizontal',
'list' => array(
'' => __pl('vertical'),
'horizontal' => __pl('horizontal')
)
), */
'vspace' => array(
'type' => 'spinner',
'label' => __pl('space_between_col'),
'css' => ['{{element}} .pagelayer-share' => 'padding-top: {{val}}px; padding-bottom: {{val}}px;'],
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 2,
'screen' => 1,
/* 'req' => array(
'group_layout' => 'horizontal'
) */
),
'hspace' => array(
'type' => 'spinner',
'label' => __pl('space_between_row'),
'css' => ['{{element}} .pagelayer-share' => 'padding-left: {{val}}px; padding-right: {{val}}px;'],
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 2,
'screen' => 1,
/* 'req' => array(
'group_layout' => ''
) */
),
'height' => array(
'type' => 'slider',
'label' => __pl('height'),
'css' => ['{{element}} .pagelayer-share-content' => 'min-height: {{val}}px;'],
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 35,
'screen' => 1,
),
/* 'width' => array(
'type' => 'slider',
'label' => __pl('width'),
'css' => ['{{element}} .pagelayer-share-content' => 'min-width: {{val}}px;'],
'min' => 0,
'step' => 1,
'max' => 100,
), */
],
'icon_style' => [
'icon_size' => array(
'type' => 'spinner',
'label' => __pl('social_grp_size_label'),
'css' => ['{{element}} i' => 'font-size: {{val}}px;',
'{{element}} .pagelayer-icon-holder' => 'font-size: {{val}}px;'],
'min' => 1,
'step' => 1,
'max' => 500,
'default' => 25,
'screen' => 1,
),
'icon_space' => array(
'type' => 'spinner',
'label' => __pl('space_around'),
'css' => ['{{element}} .pagelayer-icon-holder' => 'padding-left: calc(0.5em + {{val}}px); padding-right: calc(0.5em + {{val}}px);'],
'min' => 0,
'step' => 1,
'max' => 100,
'default' => 5,
'screen' => 1,
),
'color_scheme' => array(
'type' => 'select',
'label' => __pl('color'),
'default' => 'pagelayer-scheme-official',
'addClass' => '{{val}}',
'list' => array(
'' => __pl('custom'),
'pagelayer-scheme-official' => __pl('official')
)
),
'social_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'default' => '',
//'no_val' => 1,// Dont set any value to element
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
)
),
'icon_color' => array(
'type' => 'color',
'label' => __pl('social_color_label'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-share-buttons i' => 'color: {{val}} !important;'],
'req' => array(
'color_scheme' => ''
),
'show' => ['social_hover' => '']
),
'icon_bg_color' => array(
'type' => 'color',
'label' => __pl('social_bg_color_label'),
'default' => '#0986c0',
'css' => ['{{element}} .pagelayer-share-content' => 'background-color: {{val}} !important;'],
'req' => array(
'!bg_shape' => '',
'color_scheme' => ''
),
'show' => ['social_hover' => '']
),
'icon_border_type' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-share-content' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => ['social_hover' => '']
),
'icon_border_color' => array(
'type' => 'color',
'label' => __pl('service_box_icon_border_color_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-share-content' => 'border-color: {{val}} !important;'],
'req' => array(
'!icon_border_type' => '',
'color_scheme' => ''
),
'show' => ['social_hover' => '']
),
'icon_border_width' => array(
'type' => 'padding',
'label' => __pl('border_width'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-share-content' => 'border-top-width: {{val[0]}}px !important; border-right-width: {{val[1]}}px !important; border-bottom-width: {{val[2]}}px !important; border-left-width: {{val[3]}}px !important'],
'req' => [
'!icon_border_type' => ''
],
'show' => ['social_hover' => '']
),
'icon_border_radius' => array(
'type' => 'padding',
'label' => __pl('border_radius'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-share-content' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!icon_border_type' => ''
),
'show' => ['social_hover' => '']
),
'social_hover_delay' => array(
'type' => 'spinner',
'label' => __pl('btn_hover_delay_label'),
'desc' => __pl('btn_hover_delay_desc'),
'min' => 0,
'step' => 100,
'max' => 5000,
'default' => 400,
'css' => ['{{element}} .pagelayer-share-content' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;',
'{{element}} .pagelayer-share-content i' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'],
'show' => array(
'social_hover' => 'hover'
),
),
'icon_color_hover' => array(
'type' => 'color',
'label' => __pl('social_color_label'),
'css' => ['{{element}} .pagelayer-share-buttons:hover i' => 'color: {{val}} !important;'],
'req' => array(
'color_scheme' => ''
),
'show' => ['social_hover' => 'hover']
),
'icon_bg_color_hover' => array(
'type' => 'color',
'label' => __pl('social_bg_color_label'),
'css' => ['{{element}} .pagelayer-share-content:hover' => 'background-color: {{val}} !important;'],
'req' => array(
'!bg_shape' => '',
'color_scheme' => ''
),
'show' => ['social_hover' => 'hover']
),
'icon_border_type_hover' => array(
'type' => 'select',
'label' => __pl('border_type'),
'css' => ['{{element}} .pagelayer-share-content:hover' => 'border-style: {{val}}'],
'list' => [
'' => __pl('none'),
'solid' => __pl('solid'),
'double' => __pl('double'),
'dotted' => __pl('dotted'),
'dashed' => __pl('dashed'),
'groove' => __pl('groove'),
],
'show' => ['social_hover' => 'hover']
),
'icon_border_color_hover' => array(
'type' => 'color',
'label' => __pl('border_color_hover_label'),
'default' => '#42414f',
'css' => ['{{element}} .pagelayer-share-content:hover' => 'border-color: {{val}} !important;'],
'req' => array(
'!icon_border_type_hover' => '',
'color_scheme' => ''
),
'show' => ['social_hover' => 'hover']
),
'icon_border_width_hover' => array(
'type' => 'padding',
'label' => __pl('border_width_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-share-content:hover' => 'border-top-width: {{val[0]}}px !important; border-right-width: {{val[1]}}px !important; border-bottom-width: {{val[2]}}px !important; border-left-width: {{val[3]}}px !important'],
'req' => [
'!icon_border_type_hover' => ''
],
'show' => ['social_hover' => 'hover']
),
'icon_border_radius_hover' => array(
'type' => 'padding',
'label' => __pl('border_radius_hover'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-share-content:hover' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px; -webkit-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;-moz-border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;'],
'req' => array(
'!icon_border_type_hover' => ''
),
'show' => ['social_hover' => 'hover']
),
],
'label_style' => [
'hide_name' => array(
'type' => 'checkbox',
'label' => __pl('hide_name'),
'screen' => 1,
'css' => ['{{element}} .pagelayer-icon-name span' => 'display: none;'],
),
'name_typo' => array(
'type' => 'typography',
'label' => __pl('quote_content_typo'),
'default' => ',15,,,,,solid,,,,',
'css' => ['{{element}} .pagelayer-icon-name' => 'font-family: {{val[0]}}; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'label_hover' => array(
'type' => 'radio',
'label' => __pl('state'),
'list' => array(
'' => __pl('normal'),
'hover' => __pl('hover'),
)
),
'label_color' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-icon-name-span' => 'color: {{val}} !important;'],
'show' => ['label_hover' => '']
),
'label_color_hover' => array(
'type' => 'color',
'label' => __pl('color'),
'css' => ['{{element}} .pagelayer-icon-name-span:hover' => 'color: {{val}} !important;'],
'show' => ['label_hover' => 'hover']
)
],
'styles' => [
'layout_style' => __pl('layout_style'),
'icon_style' => __pl('icon_style'),
'label_style' => __pl('label_style'),
]
)
);
// Social Share Button
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_share', array(
'name' => __pl('icon'),
'group' => 'button',
'not_visible' => 1,
'parent' => [PAGELAYER_SC_PREFIX.'_share_grp'],
'html' => '
<a class="pagelayer-ele-link" title="{{icon}}" href="{{social_url}}">
<div class="pagelayer-share-content">
<div class="pagelayer-icon-holder pagelayer-share-buttons">
<i class="pagelayer-social-fa {{icon}}"></i>
</div>
<div class="pagelayer-icon-name">
<span class="pagelayer-icon-name-span">{{icon_label}}</span>
</div>
</div>
</a>',
'params' => array(
'icon' => array(
'type' => 'icon',
'label' => __pl('list_icon_label'),
'default' => 'fab fa-facebook-square',
'addAttr' => ['{{element}} .pagelayer-share-content' => 'data-icon="{{icon}}"'],
'list' => ['facebook', 'facebook-f', 'facebook-square', 'facebook-messenger', 'twitter', 'twitter-square', 'google-plus', 'google-plus-square', 'google-plus-g', 'instagram', 'linkedin', 'linkedin-in', 'pinterest', 'pinterest-p', 'pinterest-square', 'reddit-alien', 'reddit-square', 'reddit', 'skype', 'stumbleupon', 'stumbleupon-circle', 'telegram', 'telegram-plane', 'tumblr', 'tumblr-square', 'vk', 'weibo', 'whatsapp', 'whatsapp-square', 'wordpress', 'wordpress-simple', 'xing', 'xing-square', 'delicious', 'dribbble', 'dribbble-square', 'snapchat-ghost','get-pocket', 'envelope', 'envelope-open', 'envelope-o'],
),
'custom_profile' => array(
'type' => 'text',
'label' => __pl('custom_profile'),
'req' => ['icon' => ['fab fa-instagram', 'fab fa-dribbble', 'fab fa-dribbble-square']]
),
'text' => array(
'type' => 'text',
'label' => __pl('custom_label_text'),
'edit' => '.pagelayer-icon-name-span',
'np' => 1,
),
'target' => array(
'label' => __pl('open_link_in_new_window'),
'type' => 'checkbox',
'addAttr' => ['{{element}} a' => 'target="_blank"'],
'np' => 1,
),
)
)
);
// Animated heading
pagelayer_freemium_shortcode(PAGELAYER_SC_PREFIX.'_anim_heading', array(
'name' => __pl('animated_heading'),
'group' => 'text',
'innerHTML' => 'text',
'html' => '<a if-ext="{{link}}" href="{{link}}">
<div class="pagelayer-aheading-holder {{rotate_req}} {{animations}}">
<div if="{{text}}" class="pagelayer-animated-heading pagelayer-animated-title">{{text}}</div> {{rotate_html}}
<div if="{{after_text}}" class="pagelayer-animated-heading">{{after_text}}</div>
<div class="pagelayer-blobs_1"></div><div class="pagelayer-blobs_2"></div><div class="pagelayer-blobs_3"></div><div class="pagelayer-blobs_4"></div><div class="pagelayer-blobs_5"></div><div class="pagelayer-blobs_6"></div><div class="pagelayer-blobs_7"></div>
</div>
</a>',
'params' => array(
'type' => array(
'type' => 'select',
'label' => __pl('type'),
'default' => 'effects',
'addClass' => 'pagelayer-heading-{{val}}',
'list' => array(
'effects' => __pl('effects'),
'rotating' => __pl('rotating'),
),
),
'effects' => array(
'type' => 'select',
'label' => __pl('effects'),
'default' => 'blobs',
'addClass' => 'pagelayer-hEffect-{{val}}',
'list' => array(
'none' => __pl('none'),
'blobs' => __pl('blobs'),
'stroke' => __pl('stroke'),
'shadow' => __pl('shadow'),
),
'req' => [ 'type' => 'effects' ]
),
'animations' => array(
'type' => 'select',
'label' => __pl('effects'),
'default' => 'pagelayer-aheading-rotate1',
'list' => array(
'pagelayer-aheading-rotate1' => __pl('rotate-1'),
'pagelayer-aheading-rotate2' => __pl('rotate-2'),
'pagelayer-aheading-rotate3' => __pl('rotate-3'),
'pagelayer-aheading-loading-bar' => __pl('loading-bar'),
'pagelayer-aheading-slide' => __pl('slide'),
'pagelayer-aheading-clip' => __pl('clip'),
'pagelayer-aheading-zoom' => __pl('zoom'),
'pagelayer-aheading-scale' => __pl('scale'),
'pagelayer-aheading-push' => __pl('push'),
),
'req' => [ 'type' => 'rotating' ]
),
'hide_clip' => array(
'label' => __pl('clip_hide'),
'type' => 'checkbox',
'css' => ['{{element}} .pagelayer-words-wrapper:after' => 'display:none'],
'req' => [ 'animations' => 'pagelayer-aheading-clip' ]
),
'align' => array(
'type' => 'radio',
'label' => __pl('alignment'),
'np' => 1,
'default' => 'center',
'screen' => 1,
'css' => 'text-align: {{val}};',
'list' => array(
'left' => __pl('left'),
'center' => __pl('center'),
'right' => __pl('right'),
)
),
),
'title_style' => [
'text' => array(
'type' => 'text',
'label' => __pl('title'),
'np' => 1,
'default' => __pl('animated_heading'),
'edit' => '.pagelayer-animated-title',
'e' => [ 'v', 'f', 'r']
),
'rotate_text' => array(
'type' => 'textarea',
'label' => __pl('rotate_text'),
'np' => 1,
'default' => __pl('rotate_default'),
'req' => [ 'type' => 'rotating' ]
),
'after_text' => array(
'type' => 'text',
'label' => __pl('after_text'),
'np' => 1,
'req' => [ 'type' => 'rotating' ]
),
'typo' => array(
'type' => 'typography',
'label' => __pl('typography'),
'default' => ',40,,700,,,solid,,,,',
'css' => ['{{element}} .pagelayer-animated-heading' => 'font-family: {{val[0]}} !important; font-size: {{val[1]}}px !important; font-style: {{val[2]}} !important; font-weight: {{val[3]}} !important; font-variant: {{val[4]}} !important; text-decoration-line: {{val[5]}} !important; text-decoration-style: {{val[6]}} !important; line-height: {{val[7]}}em !important; text-transform: {{val[8]}} !important; letter-spacing: {{val[9]}}px !important; word-spacing: {{val[10]}}px !important;'],
),
'color_type' => array(
'type' => 'radio',
'label' => __pl(''),
'np' => 1,
'default' => 'color',
'list' => array(
'color' => __pl('color'),
'gradient' => __pl('gradient'),
),
),
'color' => array(
'type' => 'color',
'label' => __pl('color'),
'default' => '#A236FA',
'css' => [
'{{element}} .pagelayer-animated-heading' => 'background:{{val}}; -webkit-background-clip: text;',
'{{element}}.pagelayer-hEffect-shadow .pagelayer-animated-heading' => 'color:{{val}};',
'{{element}} .pagelayer-rotating-text *' => 'background:{{val}}; -webkit-background-clip: text;',
'{{element}} .pagelayer-aheading-loading-bar .pagelayer-words-wrapper:after' => 'background:{{val}};',
'{{element}} .pagelayer-aheading-clip .pagelayer-words-wrapper:after' => 'background:{{val}};'
],
'req' => ['color_type' => 'color']
),
'gradient' => array(
'type' => 'gradient',
'label' => '',
'default' => '150,#44d3f6,23,#72e584,45,#2ca4eb,100',
'css' => [
'{{element}} .pagelayer-animated-heading' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%); -webkit-background-clip: text;',
'{{element}} .pagelayer-rotating-text *' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%); -webkit-background-clip: text;',
'{{element}} .pagelayer-aheading-loading-bar .pagelayer-words-wrapper:after' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);',
'{{element}} .pagelayer-aheading-clip .pagelayer-words-wrapper:after' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'
],
'req' => [
'color_type' => 'gradient',
'!effects' => 'shadow'
]
),
],
'misc_style' => [
'blob_1' => array(
'type' => 'color',
'label' => __pl('blob_1_color'),
'default' => '#ff1493',
'css' => ['{{element}} .pagelayer-blobs_1' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'blob_2' => array(
'type' => 'color',
'label' => __pl('blob_2_color'),
'default' => '#ff4500',
'css' => ['{{element}} .pagelayer-blobs_2' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'blob_3' => array(
'type' => 'color',
'label' => __pl('blob_3_color'),
'default' => '#00ff00',
'css' => ['{{element}} .pagelayer-blobs_3' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'blob_4' => array(
'type' => 'color',
'label' => __pl('blob_4_color'),
'default' => '#ff0000',
'css' => ['{{element}} .pagelayer-blobs_4' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'blob_5' => array(
'type' => 'color',
'label' => __pl('blob_5_color'),
'default' => '#ffff00',
'css' => ['{{element}} .pagelayer-blobs_5' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'blob_6' => array(
'type' => 'color',
'label' => __pl('blob_6_color'),
'default' => '#00ffff',
'css' => ['{{element}} .pagelayer-blobs_6' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'blob_7' => array(
'type' => 'color',
'label' => __pl('blob_7_color'),
'default' => '#ff8c00',
'css' => ['{{element}} .pagelayer-blobs_7' => 'background:{{val}}'],
'req' => [
'effects' => 'blobs',
'type' => 'effects'
]
),
'stroke' => array(
'type' => 'slider',
'label' => __pl('stroke_thickness'),
'min' => 1,
'step' => 1,
'max' => 50,
'default' => 5,
'screen' => 1,
'css' => ['{{element}} .pagelayer-animated-heading' => '-webkit-text-stroke: {{val}}px transparent;'],
'req' => [ 'effects' => 'stroke' ]
),
'stroke_color' => array(
'type' => 'color',
'label' => __pl('stroke_color'),
'default' => '#ffffff',
'css' => ['{{element}} .pagelayer-animated-heading' => 'color:{{val}}'],
'req' => [ 'effects' => 'stroke' ]
),
'shadow_color' => array(
'type' => 'shadow',
'label' => __pl('shadow'),
'default' => '2,2,,#999999',
'screen' => 1,
'css' => ['{{element}} .pagelayer-animated-heading' => 'text-shadow: {{val[0]}}px {{val[1]}}px #fff, calc({{val[0]}}px * 2) calc({{val[1]}}px * 2) {{val[3]}};'],
'req' => [ 'type' => 'effects', 'effects' => 'shadow' ]
),
'rotate_color' => array(
'type' => 'color',
'label' => __pl('rotate_color'),
'css' => [
'{{element}} .pagelayer-rotating-text *' => 'background:{{val}}; -webkit-background-clip: text;',
'{{element}} .pagelayer-aheading-loading-bar .pagelayer-words-wrapper:after' => 'background:{{val}};',
'{{element}} .pagelayer-aheading-clip .pagelayer-words-wrapper:after' => 'background:{{val}};'
],
'req' => ['type' => 'rotating']
),
],
'styles' => [
'title_style' => __pl('title_style'),
'misc_style' => __pl('misc_style'),
]
)
);
PK �f\�s'~ revnu �[��� 2622PK �f\cB4�! ! index.phpnu �[��� <?php //prevent directory listingPK �f\>X"V�g �g license.txtnu �[��� GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
PK �f\h֕~A� A�
templates.phpnu �[��� <?php
function popularfx_ajax_output($data){
echo json_encode($data);
wp_die();
}
function popularfx_ajax_output_xmlwrap($data){
echo '<popularfx-xmlwrap>'.json_encode($data).'</popularfx-xmlwrap>';
wp_die();
}
function popularfx_import_template($slug, $items = array()){
$data = [];
$destination = pfx_templates_dir().'/'.$slug;
include_once(PAGELAYER_DIR.'/main/import.php');
// Our function needs to efficiently replace the variables
$GLOBALS['popularfx_template_import_slug'] = $slug;
add_filter('pagelayer_start_insert_content', 'popularfx_pagelayer_start_insert_content', 10);
// Full import
if(empty($items)){
// Now import the template
if(!pagelayer_import_theme($slug, $destination)){
$data['error']['import_err'] = __('Could not import the template !', 'popularfx');
$data['error'] = array_merge($data['error'], $pl_error);
return $data;
}
// Save the name of the slug
set_theme_mod('popularfx_template', $slug);
// Single items
}else{
// Now import the SINGLE ITEMS
if(!pagelayer_import_single($slug, $items, $destination)){
$data['error']['import_err'] = __('Could not import the single item !', 'popularfx');
$data['error'] = array_merge($data['error'], $pl_error);
return $data;
}
}
$data['done'] = 1;
return $data;
}
// Download the template
function popularfx_download_template($slug){
global $popularfx, $pl_error;
set_time_limit(300);
$data = [];
// Now lets download the templates
if(!function_exists( 'download_url' ) ) {
require_once ABSPATH . 'wp-admin/includes/file.php';
}
$url = pfx_api_url().'/givetemplate.php?slug='.$slug.'&license='.@$popularfx['license']['license'].'&url='.rawurlencode(site_url());
//echo $url;
$tmp_file = download_url($url);
//echo filesize($tmp_file);
//var_dump($tmp_file);
// Error downloading
if(is_wp_error($tmp_file) || filesize($tmp_file) < 1){
if(!empty($tmp_file->errors)){
$data['error']['download_err'] = __('Could not download the theme !', 'popularfx').var_export($tmp_file->errors, true);
return $data;
}
}
$destination = pfx_templates_dir().'/'.$slug;
@mkdir($destination, 0755, true);
//echo $destination;
define('FS_METHOD', 'direct');
WP_Filesystem();
$ret = unzip_file($tmp_file, $destination);
//r_print($ret);
// Try to delete
@unlink($tmp_file);
// Error downloading
if(is_wp_error($ret) || !file_exists($destination.'/style.css')){
if(!empty($ret->errors)){
$data['error']['download'] = __('Could not extract the template !', 'popularfx').var_export($ret->errors, true);
return $data;
}
}
return $data;
}
// Get list of templates
function popularfx_get_templates_list(){
$data = get_transient('popularfx_templates');
// Get any existing copy of our transient data
if(false === $data){
// Start checking for an update
$send_for_check = array(
'timeout' => 90,
'user-agent' => 'WordPress'
);
$raw_response = wp_remote_post( pfx_api_url().'templates.json', $send_for_check );
//pagelayer_print($raw_response);die();
// Is the response valid ?
if ( !is_wp_error( $raw_response ) && ( $raw_response['response']['code'] == 200 ) ){
$data = json_decode($raw_response['body'], true);
}
//pagelayer_print($data);die();
// Feed the updated data into the transient
if(!empty($data['list']) && count($data['list']) > 10){
set_transient('popularfx_templates', $data, 2 * HOUR_IN_SECONDS);
}
}
return $data;
}
// Get the template info from our servers
function popularfx_ajax_template_info(){
// Some AJAX security
check_ajax_referer('popularfx_ajax', 'popularfx_nonce');
$data = [];
if(isset($_REQUEST['slug'])){
$resp = wp_remote_get(pfx_api_url().'template-info.php?slug='.$_REQUEST['slug'], array('timeout' => 30));
// Is the response valid ?
if ( !is_wp_error( $resp ) && ( $resp['response']['code'] == 200 ) ){
$data = json_decode($resp['body'], true);
}
}
popularfx_ajax_output($data);
}
// Start the installation of the template
function popularfx_ajax_start_install_template(){
global $popularfx;
// Some AJAX security
check_ajax_referer('popularfx_ajax', 'popularfx_nonce');
set_time_limit(300);
$data = [];
//pagelayer_print($_POST);die();
$license = pfx_optpost('popularfx_license');
// Check if its a valid license
if(!empty($license)){
$resp = wp_remote_get(pfx_api_url().'license.php?license='.$license.'&url='.rawurlencode(site_url()), array('timeout' => 30));
if(is_array($resp)){
$json = json_decode($resp['body'], true);
//print_r($json);
}else{
$data['error']['resp_invalid'] = __('The response from PopularFX servers was malformed. Please try again in sometime !', 'popularfx').var_export($resp, true);
popularfx_ajax_output($data);
}
// Save the License
if(empty($json['license'])){
$data['error']['lic_invalid'] = __('The license key is invalid', 'popularfx');
popularfx_ajax_output($data);
}else{
update_option('popularfx_license', $json);
// Load license
pfx_load_license();
}
}
// Load templates
$popularfx['templates'] = popularfx_get_templates_list();
$slug = pfx_optpost('theme');
if(!defined('PAGELAYER_VERSION')){
$data['error']['pl_req'] = __('Pagelayer is required to run these templates !', 'popularfx');
popularfx_ajax_output($data);
}
$single = pfx_optpost('single');
if(!empty($single) && version_compare(PAGELAYER_VERSION, '1.3.2', '<')){
$data['error']['pl_single_import'] = __('You need Pagelayer 1.3.2 to import single pages', 'popularfx');
popularfx_ajax_output($data);
}
// See if the theme is valid
if(empty($popularfx['templates']['list'][$slug])){
$data['error']['template_invalid'] = __('The template you submitted is invalid !', 'popularfx');
popularfx_ajax_output($data);
}
$template = $popularfx['templates']['list'][$slug];
// Do we have the req PL version ?
if(!empty($template['pl_ver']) && version_compare(PAGELAYER_VERSION, $template['pl_ver'], '<')){
$data['error']['pl_ver'] = __('Your Pagelayer version is '.PAGELAYER_VERSION.' while the template requires '.$template['pl_ver'], 'popularfx');
popularfx_ajax_output($data);
}
// Do we have the req PFX Plugin version ?
if(!empty($template['pfx_ver']) && version_compare(PFX_VERSION, $template['pfx_ver'], '<')){
$data['error']['pfx_ver'] = __('Your PopularFX Plugin version is '.PFX_VERSION.' while the template requires '.$template['pfx_ver'], 'popularfx');
popularfx_ajax_output($data);
}
// Is it a pro template ?
if($template['type'] > 1 && empty($popularfx['license']['status'])){
$data['error']['template_pro'] = sprintf(__('The selected template is a Pro template and you have a free or expired license. Please purchase the PopularFX Pro license from <a href="%s" target="_blank">here</a>.', 'popularfx'), PFX_PRO_URL);
popularfx_ajax_output($data);
}
$do_we_have_pro = defined('PAGELAYER_PREMIUM');
// Do we need to install Pagelayer or Pagelayer PRO ?
if(!function_exists('pagelayer_theme_import_notices') || (empty($do_we_have_pro) && $template['type'] > 1)){
if($template['type'] > 1){
$installed = pfx_install_pagelayer_pro(@$popularfx['license']['license']);
}else{
$installed = popularfx_install_pagelayer();
}
// Did we fail to install ?
if(is_wp_error($installed) || empty($installed)){
$install_url = admin_url('admin.php?page=popularfx_install_pagelayer&license=').@$popularfx['license']['license'];
$data['error']['pagelayer'] = sprintf(__('There was an error in installing Pagelayer which is required by this template. Please install Pagelayer manually by clicking <a href="%s" target="_blank">here</a> and then install the template !', 'popularfx'), $install_url);
if(!empty($installed->errors)){
$data['error']['pagelayer_logs'] = var_export($installed->errors, true);
}
popularfx_ajax_output_xmlwrap($data);
}
}
// Lets notify to download
$data['download'] = 1;
popularfx_ajax_output_xmlwrap($data);
}
// Download template
function popularfx_ajax_download_template(){
global $popularfx;
// Some AJAX security
check_ajax_referer('popularfx_ajax', 'popularfx_nonce');
$slug = pfx_optpost('theme');
// Do the download
$data = popularfx_download_template($slug);
// Any error ?
if(!empty($data['error'])){
popularfx_ajax_output($data);
}
// Lets import then
$data['import'] = 1;
popularfx_ajax_output($data);
}
// Import template
function popularfx_ajax_import_template(){
global $popularfx, $pl_error;
// Some AJAX security
check_ajax_referer('popularfx_ajax', 'popularfx_nonce');
$slug = pfx_optpost('theme');
$single = pfx_optpost('single');
$items = !empty($single) ? ['page' => [$single]] : [];
// Import the template
$data = popularfx_import_template($slug, $items);
popularfx_ajax_output($data);
}
// This is to replace the image variables for the template URL
function popularfx_pagelayer_start_insert_content($post){
$url = pfx_templates_dir_url().'/'.$GLOBALS['popularfx_template_import_slug'].'/';
$replacers['{{theme_url}}/images/'] = $url.'images/';
$replacers['{{theme_url}}'] = $url;
$replacers['{{theme_images}}'] = $url.'images/';
$replacers['{{themes_dir}}'] = dirname(get_stylesheet_directory_uri());
foreach($replacers as $key => $val){
$post['post_content'] = str_replace($key, $val, $post['post_content']);
}
return $post;
}
if(!function_exists('popularfx_templates')){
// The Templates Page
function popularfx_templates(){
global $popularfx, $pl_error;
$popularfx['templates'] = popularfx_get_templates_list();
if(isset($_REQUEST['install'])){
check_admin_referer('popularfx-template');
}
// Is there a license key ?
if(isset($_POST['install'])){
$done = 1;
}
popularfx_templates_T();
}
// The License Page - THEME
function popularfx_templates_T(){
global $popularfx, $pagelayer, $pl_error;
// Any errors ?
if(!empty($pl_error)){
pagelayer_report_error($pl_error);echo '<br />';
}
?>
</div><!--TODO : REMOVE and rectify CSS -->
<div id="popularfx_search" class="popularfx-row">
<div class="popularfx-logo">
<a href="<?php echo PFX_WWW_URL;?>" target="_blank"><img src="<?php echo PFX_URL.'/images/popularfx-logo.png';?>" width="35" /></a>
</div>
<div class="popularfx-back"><</div>
<div class="popularfx-dropdown popularfx-categories">
<div class="popularfx-current-cat">All</div><span class="popularfx-down">⌄</span>
<div class="popularfx-dropdown-content"><div class="popularfx-cat-holder popularfx-row"></div></div>
</div>
<div class="popularfx-search">
<span class="dashicons dashicons-search"></span><input class="popularfx-search-field" /><span class="popularfx-sf-empty dashicons dashicons-no-alt"></span>
<div id="popularfx-suggestion"></div>
</div>
<div class="popularfx-sort">
<label>Sort By :</label>
<select id="popularfx-sortby" class="popularfx-sortby">
<option value="default">--</option>
<option value="latest">Latest</option>
<option value="oldest">Oldest</option>
</select>
</div>
</div>
<div class="popularfx-page" id="popularfx-templates-holder">
<div id="popularfx-pagination"></div>
<div id="popularfx-templates" class="popularfx-row"></div>
<div id="popularfx-single-template">
<div style="margin-bottom: 20px; margin-top: 10px;">
<h1 style="display: inline-block;margin: 0px;vertical-align: middle;" id="popularfx-template-name"></h1>
<a href="" id="popularfx-demo" class="button popularfx-demo-btn" target="_blank">Demo</a>
</div>
<div style="margin: 0px; vertical-align: top;">
<div style="width: 52%; display: inline-block; text-align: center;">
<div style="width: 100%; max-height: 400px; overflow: auto; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
<img id="popularfx_display_image" src="" width="100%">
</div>
</div>
<div id="popularfx_screenshots" style="width: 45%; display: inline-block; padding: 0px 10px; vertical-align: top;"></div>
</div>
<div style="position:fixed; bottom: 50px; right: 30px;">
<input name="import_theme" class="button button-popularfx" value="Import Theme Content" type="button" onclick="popularfx_modal('#popularfxModal')" />
<input name="import_single" id="pfx_import_single" class="button button-popularfx-single hidden" value="Import Single Page" type="button" onclick="popularfx_modal('#popularfxModal', true)" />
</div>
</div>
</div>
<?php if(!defined('PAGELAYER_VERSION')){
?>
<div id="popularfx_notification" class="popularfx-row">
<div class="popularfx-notification-div">
<div class="popularfx-notification-text">PopularFX templates requires <a href="<?php echo admin_url('plugin-install.php?s=pagelayer&tab=search&type=term')?>" target="_blank">Pagelayer Builder</a> to be installed & activated !</div>
</div>
</div>
<?php
}
?>
<style>
.popularfx-page{
position: relative;
top: 25px;
width: 100%;
margin-bottom: 80px;
}
.popularfx-logo{
margin-right: 20px;
}
.popularfx-back{
border: 1px solid #fff;
border-radius : 2px;
font-weight: bold;
margin-right: 20px;
padding: 10px;
line-height: 100%;
cursor: pointer;
}
.popularfx-search{
text-align:center;
margin: 0px;
position:relative;
min-width: 375px;
margin-right:20px;
}
.popularfx-search-field{
width:100%;
line-height:120%;
padding: 5px 20px 5px 30px;
border-radius: 3px;
border: none;
font-size: 14px;
height:100%;
}
.popularfx-search .dashicons{
position: absolute;
top: 0;
padding: 0 7px;
color: #666;
line-height: 40px;
}
.popularfx-search .popularfx-sf-empty{
right:0;
left:auto;
font-weight:bolder;
cursor:pointer;
}
#popularfx-suggestion {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 420px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 12px 16px;
z-index: 1;
color: #111;
top: 38px;
left: -1px;
}
#popularfx-single-template{
display:none;
}
#popularfx-pagination{
float: right;
margin-right: 20px;
}
#popularfx-pagination ul li{
display: inline-block;
padding: 4px 12px;
border-top: 1px solid #358cb7;
border-bottom: 1px solid #358cb7;
border-left: 1px solid #358cb7;
background: #fff;
}
#popularfx-pagination ul li:last-child{
border-right: 1px solid #358cb7;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
#popularfx-pagination ul li:first-child{
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
#popularfx-pagination ul li.active{
background: #358cb7;
}
#popularfx-pagination ul li.active a{
color: #fff;
}
#popularfx-pagination ul li a{
text-decoration: none;
}
#popularfx_search{
position: fixed;
top: 32px;
margin-left: -20px;
width: 100%;
z-index: 10000;
background: #466d8e;
color: #FFF;
box-shadow: 0 2px 10px 0 #2b2b2b6b;
padding: 15px;
}
#popularfx_notification{
position: fixed;
bottom: 0px;
margin-left: -20px;
width: 100%;
z-index: 10000;
background: #F90716;
color: #FFF;
padding: 10px;
}
.popularfx-notification-div{
width: 90%;
}
.popularfx-notification-text{
text-align: center;
}
.popularfx-notification-text a{
color: #ffffff;
font-weight: bold;
}
.popularfx-categories{
padding: 10px;
border: 1px solid #fff;
border-radius : 2px;
min-width: 150px;
margin-right: 20px;
}
.popularfx-cat{
padding: 7px 10px;
box-sizing: border-box;
cursor: pointer;
}
.popularfx-down{
position: absolute;
left: auto;
right: 0;
right: 10px;
top: 6px;
}
.popularfx-dropdown {
position: relative;
display: inline-block;
}
.popularfx-dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 420px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
padding: 12px 16px;
z-index: 1;
color: #111;
top: 38px;
left: -1px;
}
.popularfx-dropdown:hover .popularfx-dropdown-content {
display: block;
}
.popularfx-row{
box-sizing: border-box;
display: flex;
flex: 1 0 auto;
flex-direction: row;
flex-wrap: wrap;
width:100%;
align-content: stretch;
position: relative;
}
.popularfx-md-4{
width:25%;
}
.popularfx-theme-details{
margin-right:20px;
margin-bottom:40px;
transition: all 0.4s;
border-radius: 2px;
border: 1px solid #ccc;
cursor: pointer;
}
.popularfx-theme-details:hover{
margin-top: -2px;
box-shadow: 0 2px 40px 0 rgba(0, 0, 0, 0.1), 0 3px 20px 0 rgba(0, 0, 0, 0.1);
}
.popularfx-theme-screenshot img{
max-width:100%;
}
.popularfx-theme-screenshot{
position:relative;
}
.popularfx-premium-themes{
position: absolute;
right: -10px;
top: 10px;
font-size: 14px;
background: red;
color: #fff;
padding: 5px 12px;
border-radius: 3px;
z-index: 1000;
font-weight: bold;
}
.popularfx-theme-name{
background: #fff;
padding: 15px;
font-size: 14px;
font-weight: 600;
}
.popularfx_img_screen{
width: 120px;
margin: 0px 15px 10px 15px;
display: inline-block;
border: 1px solid transparent;
border-radius: 3px;
cursor: pointer;
}
.popularfx_img_selected{
border: 1px solid #1A9CDB;
}
.popularfx_img_div{
overflow: hidden;
height: 160px;
}
.popularfx_img_name{
text-align: center;
background: #fff;
padding: 5px 10px;
border-top: 1px solid #ccc;
text-transform: capitalize;
}
#popularfx-demo{
display: inline-block;
vertical-align: middle;
margin-left: 40px;
}
.popularfx-demo-btn{
padding: 2px 25px !important;
font-size: 15px !important;
font-weight: bold;
background: #4590d2 !important;
color: #fff !important;
border: 1px solid #4590d2 !important;
transition: all .3s linear;
}
.popularfx-demo-btn:hover{
background: #fff !important;
color: #4590d2 !important;
}
.button-popularfx{
padding: 12px 25px !important;
font-size: 15px !important;
font-weight: bold;
background: #7444fd !important;
color: #fff !important;
border: 1px solid #7444fd !important;
transition: all .3s linear;
cursor: pointer;
}
.button-popularfx:hover{
background: #fff !important;
color: #7444fd !important;
}
.button-popularfx-single{
padding: 12px 25px !important;
font-size: 15px !important;
font-weight: bold;
background: #4590d2 !important;
color: #fff !important;
border: 1px solid #4590d2 !important;
transition: all .3s linear;
cursor: pointer;
}
.button-popularfx-single:hover{
background: #fff !important;
color: #4590d2 !important;
}
/* The Modal (background) */
.popularfx-modal {
display: none;
position: fixed;
z-index: 10000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
/* Modal Content/Box */
.popularfx-modal-holder {
background-color: #fefefe;
margin: 15% auto; /* 15% from the top and centered */
border: 1px solid #888;
width: 50%;
min-height: 175px;
position: relative;
}
/* The Close Button */
.popularfx-modal-close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.popularfx-modal-close:hover,
.popularfx-modal-close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
.popularfx-modal-header{
max-height: 80px;
top: 0px;
border-bottom: 1px solid #ccc;
}
.popularfx-modal-footer{
max-height: 80px;
bottom: 0px;
border-top: 1px solid #ccc;
text-align: right;
}
.popularfx-modal-header,
.popularfx-modal-content,
.popularfx-modal-footer{
padding: 15px;
width: 100%;
box-sizing: border-box;
}
#popularfx-import-form>div{
padding: 4px;
font-weight: 600;
}
.popularfx-exp{
font-size: 12px;
}
#popularfx_license_div{
margin: 20px 60px 10px 60px;
display: none;
}
#popularfx-error-template{
display: none;
background: #f7dbdb;
padding: 1px 10px;
margin-bottom: 15px;
}
#popularfx-progress-template{
display: none;
background: #dcf1f9;
padding: 10px;
margin-bottom: 15px;
}
#popularfx-progress-template img{
vertical-align: middle;
margin-right: 10px;
}
#wpbody div#setting-error-tgmpa, #wpbody .update-nag, #wpbody .notice, #wpbody div.error {
display: none;
}
#wpfooter{
position: relative;
}
.pfx-sub-head,
.pfx-content{
margin: 5px 0px;
}
#popularfx-sortby{
height:100%;
}
</style>
<!-- The Modal -->
<div id="popularfxModal" class="popularfx-modal">
<!-- Modal holder -->
<div class="popularfx-modal-holder">
<!-- Modal header -->
<div class="popularfx-modal-header">
<b>Import Theme Contents</b> <span class="popularfx-modal-close">×</span>
</div>
<!-- Modal content -->
<div class="popularfx-modal-content">
<div class="popularfx-import">
<div id="popularfx-error-template"></div>
<div id="popularfx-progress-template">
<img src="<?php echo PFX_URL;?>/images/progress.svg" width="20" /> <span id="popularfx-progress-txt"></span>
</div>
<form id="popularfx-import-form" method="post" enctype="multipart/form-data">
<?php wp_nonce_field('popularfx-template');?>
<input name="theme" id="popularfx-template-install" value="" type="hidden" />
<div class="pfx-single"><input type="checkbox" name="save_as_draft" /> Save as Draft</div>
<div class="pfx-full"><input type="checkbox" name="no_header_menu" /> Do not create Header Menu</div>
<div class="pfx-full"><input type="checkbox" name="delete_old_import" /> Delete Previously Imported Content</div>
<div><input type="checkbox" name="overwrite" /> Overwrite existing Page(s) with same name</div>
<div class="pfx-full"><input type="checkbox" name="set_home_page" checked /> Set the Home Page as per the content</div>
<hr/>
<div class="pfx-full">
<h2 class="pfx-sub-head">Image Copyright</h2>
<p>We try our best to use images that are free from legal perspectives. However, we do not take any responsibility for the same. Do you want to use the demo images with this theme ?</p>
<ul class="pfx-content">
<li><input type="checkbox" name="download_imgs" value="1"/> If you click here, then the images will be downloaded from their respective sources.<br/></li>
<li>By default it will use placeholder images which are distributed with this theme and can be replaced easily.</li>
</ul>
</div>
<input type="hidden" name="single" value="" />
<?php
if(empty($popularfx['license'])){
echo '<div id="popularfx_license_div">License Key : <input type="text" id="popularfx_license_key" name="popularfx_license" placeholder="PFX-XXXXX-XXXXX-XXXXX-XXXXX" size="40" /><br>
<span class="popularfx-exp">This is a Pro Template and you will need to enter your <a href="'.PFX_PRO_URL.'">PopularFX License</a> to install this !</span>
</div>';
}
?>
<input name="install" value="1" type="hidden" />
</form>
</div>
<div class="popularfx-done" style="display: block;">
<h3 style="margin-top: 0px;">Congratulations, the template was imported successfully !</h3>
You can now customize the website as per your requirements with the help of Pagelayer or the Customizer.<br><br>
<b>Note</b> : We strongly recommend you change all images and media. We try our best to use images which are copyright free or are allowed under their licensing. However, we take no responsibilities for the same and recommend you change all media and images !
</div>
</div>
<!-- Modal footer -->
<div class="popularfx-modal-footer">
<div class="popularfx-done">
<a class="button popularfx-demo-btn" href="<?php echo site_url();?>" target="_blank">Visit Website</a>
</div>
<div class="popularfx-import">
<button class="button button-primary" onclick="return popularfx_start_install_template()">Import</button>
<button class="button popularfx-cancel">Cancel</button>
</div>
</div>
</div>
</div>
<script>
function popularfx_modal(sel, single){
var modal = jQuery(sel);
single = single || false;
modal.show();
modal.find('.popularfx-done').hide();
modal.find('.popularfx-import').show();
if(single){
var page_name = jQuery('.popularfx_img_selected').attr('page-name');
modal.find('[name=single]').val(page_name);
modal.find('.pfx-full').hide();
modal.find('.pfx-single').show();
modal.find('[name=save_as_draft]').attr('checked', 'checked');
}else{
modal.find('[name=single]').val('');
modal.find('.pfx-full').show();
modal.find('.pfx-single').hide();
}
// Get the <span> element that closes the modal
var span = modal.find(".popularfx-modal-close, .popularfx-cancel");
// When the user clicks on <span> (x), close the modal
span.on("click", function() {
modal.hide();
});
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if(event.target == modal[0]){
modal.hide();
}
}
}
// Show any errors
function popularfx_show_error(err){
var html = '<ul>';
for(var x in err){
html += '<li>'+err[x]+'</li>';
}
html += '</ul>';
jQuery('#popularfx-error-template').html(html).show();
jQuery('#popularfx-progress-template').hide();
}
// Start install
function popularfx_start_install_template(){
jQuery('#popularfx-error-template').hide();
jQuery('#popularfx-progress-template').show();
jQuery('#popularfx-progress-txt').html('Checking the requirements ...');
// Make the call
jQuery.ajax({
url: popularfx_ajax_url+'&action=popularfx_start_install_template',
type: 'POST',
data: jQuery('#popularfx-import-form').serialize()+'&popularfx_nonce='+popularfx_ajax_nonce,
success: function(data){
// Install plugin gives too much output, hence match the data
var res = data.match(/<popularfx\-xmlwrap>(.*?)<\/popularfx\-xmlwrap>/is);
if(res){
data = res[1];
}
data = JSON.parse(data);
popularfx_download_template(data);
},
error: function(jqXHR, textStatus, errorThrown){
popularfx_show_error({err: 'AJAX failure ! Status : '+textStatus+' | Error : '+errorThrown});
}
});
return false;
}
// Download template
function popularfx_download_template(data){
if('error' in data){
popularfx_show_error(data['error']);
return false;
}
jQuery('#popularfx-progress-txt').html('Downloading the template ...');
// Make the call
jQuery.ajax({
url: popularfx_ajax_url+'&action=popularfx_download_template',
type: 'POST',
data: jQuery('#popularfx-import-form').serialize()+'&popularfx_nonce='+popularfx_ajax_nonce,
dataType: 'json',
success: popularfx_import_template,
error: function(jqXHR, textStatus, errorThrown){
popularfx_show_error({err: 'AJAX failure ! Status : '+textStatus+' | Error : '+errorThrown});
}
});
}
// Import template
function popularfx_import_template(data){
if('error' in data){
popularfx_show_error(data['error']);
return false;
}
jQuery('#popularfx-progress-txt').html('Importing the template ...');
// Make the call
jQuery.ajax({
url: popularfx_ajax_url+'&action=popularfx_import_template',
type: 'POST',
data: jQuery('#popularfx-import-form').serialize()+'&popularfx_nonce='+popularfx_ajax_nonce,
dataType: 'json',
success: function(data){
//console.log(data);
var modal = jQuery('#popularfxModal');
if('done' in data){
modal.find('.popularfx-done').show();
modal.find('.popularfx-import').hide();
}
},
error: function(jqXHR, textStatus, errorThrown){
popularfx_show_error({err: 'AJAX failure ! Status : '+textStatus+' | Error : '+errorThrown});
}
});
}
// Add to tabs override
jQuery(document).ready(function(){
popularfx_templates_fn(jQuery);
});
var popularfx_ajax_nonce = '<?php echo wp_create_nonce('popularfx_ajax');?>';
var popularfx_ajax_url = '<?php echo admin_url( 'admin-ajax.php' );?>?&';
var popularfx_demo = 'https://demos.popularfx.com/';
function popularfx_templates_fn($){
popularfx_templates = <?php echo json_encode($popularfx['templates']);?>;
var themes = popularfx_templates['list'];
var categories = popularfx_templates['categories'];
var mirror = '<?php echo pfx_sp_api_url();?>files/themes/';
// Back button handler
$('.popularfx-back').click(function(){
show_themes();
});
// Fill the categories
var chtml = '<div class="popularfx-md-4 popularfx-cat" data-cat="">All</div>';
for(var x in categories){
chtml += '<div class="popularfx-md-4 popularfx-cat" data-cat="'+x+'">'+categories[x]['en']+'</div>';
}
$('.popularfx-cat-holder').html(chtml);
$('.popularfx-cat-holder').find('.popularfx-cat').click(function(){
show_themes($(this).data('cat'));
});
// Show the themes
function show_themes(cat, search, page){
var sortby = $('.popularfx-sortby').val();
$("#popularfx-suggestion").hide();
$("#popularfx-single-template").hide();
$("#popularfx-pagination").show();
$("#popularfx-templates").show();
// Blank html
$('#popularfx-templates').html('');
$('#popularfx-pagination').html('');
var search = search || "";
var cat = cat || "";
var num = 60;
var page = page || 1;
var start = num * (page - 1);
var end = num + start;
var i = 0;
if(cat.length > 0){
$('.popularfx-current-cat').html(categories[cat]['en']);
$('.popularfx-current-cat').data('cat', cat);
}else{
$('.popularfx-current-cat').html('All');
$('.popularfx-current-cat').data('cat', '');
}
var allowed_list = [];
if(search.length > 0){
search = search.toLowerCase();
for(var x in popularfx_templates['tags']){
if(x.toLowerCase().indexOf(search) >= 0){
allowed_list = allowed_list.concat(popularfx_templates['tags'][x]);
}
}
}
if(allowed_list.length > 0){
allowed_list = Array.from(new Set(allowed_list));
}
var themeids = [];
var sorted = {};
var rsorted = {};
for(var x in themes){
themeids.push(parseInt(themes[x].thid));
}
if(sortby == "latest"){
var datatheme = Object.values(themes);
var rsorted_ids = themeids.sort().reverse();
for(var x of rsorted_ids){
for( var y in datatheme){
if(datatheme[y].thid == x){
rsorted[datatheme[y].slug] = datatheme[y];
}
}
}
themes = rsorted;
}else if(sortby == "oldest"){
var datatheme = Object.values(themes);
var sorted_ids = themeids.sort();
for(var x of sorted_ids){
for( var y in datatheme){
if(datatheme[y].thid == x){
sorted[datatheme[y].slug] = datatheme[y];
}
}
}
themes = sorted;
}else{
themes = popularfx_templates['list'];
}
for(var x in themes){
// Is it same category
if(cat.length > 0 && cat != themes[x].category){
continue;
}
// Is it a searched item
if(search.length > 0 && themes[x].name.toLowerCase().indexOf(search) === -1 && allowed_list.indexOf(themes[x].thid) === -1){
continue;
}
if(i >= start && i < end){
//console.log(x+' '+i+' '+start+' '+end);
show_theme_tile(themes[x], x);
}
i++;
}
$('.popularfx-theme-details').click(function(){
var jEle = $(this);
show_theme_details(jEle.attr('slug'));
});
var pages = Math.ceil(i/num);
if(pages > 1){
var html = '<ul class="pagination">';
for(var p = 1; p <= pages; p++){
html += '<li class="page-item '+(page == p ? 'active' : '')+'"><a class="page-link" href="#" data-cat="'+cat+'" data-search="'+search+'" data-page="'+p+'">'+p+'</a></li>';
}
html += '</ul>';
$('#popularfx-pagination').html(html);
$('#popularfx-pagination').find('.page-link').click(function(){
var j = $(this);
show_themes(j.data('cat'), j.data('search'), j.data('page'));
});
}
}
function show_theme_tile(theme, x){
var html = '<div class="popularfx-md-4">'+
'<div class="popularfx-theme-details" slug="'+theme['slug']+'" thid="'+theme['thid']+'">'+
'<div class="popularfx-theme-screenshot">'+
(theme['type'] != 1 ? '<div class="popularfx-premium-themes">Pro</div>' : '')+
'<img src="'+mirror+'/'+theme['slug']+'/screenshot.jpg" loading="lazy" alt="" />'+
'</div>'+
'<div class="popularfx-theme-name">'+theme['name']+'</div>'+
'</div>'+
'</div>';
$('#popularfx-templates').append(html);
}
function strip_extension(str) {
return str.substr(0,str.lastIndexOf('.'));
}
// Show the theme details
function show_theme_details(slug){
var theme = themes[slug];
$("#popularfx-suggestion").hide();
$("#popularfx-single-template").show();
$("#popularfx-pagination").hide();
$("#popularfx-templates").hide();
// Set install value
$('#popularfx-template-install').val(slug);
// Set name
$("#popularfx-template-name").html(theme['name']);
// Demo URL
$("#popularfx-demo").attr("href", popularfx_demo+(theme['name'].replace(' ', '_')));
// Blank screenshots
$("#popularfx_screenshots").html('');
// Is the license PRO ?
if(theme['type'] >= 2){
$('#popularfx_license_div').css('display', 'inline-block');
}else{
$('#popularfx_license_div').hide();
}
var url = mirror+'/'+theme['slug'];
// Show home image
$("#popularfx_display_image").attr("src", "");
$("#popularfx_display_image").attr("src", url+'/screenshots/home.jpg');
$("#popularfx_display_image").parent().scrollTop(0);
// Make the call
jQuery.ajax({
url: popularfx_ajax_url+'&action=popularfx_template_info',
type: 'POST',
data: {
popularfx_nonce: popularfx_ajax_nonce,
slug: slug
},
dataType: 'json',
success:function(theme) {
$("#pfx_import_single").addClass("hidden");
var sc = '';
// Show the screenshots
for(var x in theme['screenshots']){
var page_name = strip_extension(theme['screenshots'][x]);
sc += '<div class="popularfx_img_screen" page="'+x+'" page-name="'+page_name+'">'+
'<div class="popularfx_img_div"><img src="'+url+'/screenshots/'+theme['screenshots'][x]+'" width="100%" /></div>'+
'<div class="popularfx_img_name">'+page_name+'</div>'+
'</div>'
}
$("#popularfx_screenshots").html(sc);
$("#popularfx_screenshots").find('.popularfx_img_screen').click(function(){
jEle = $(this);
$("#popularfx_display_image").attr("src", jEle.find("img").attr("src"));
$("#popularfx_display_image").parent().scrollTop(0);
$("#pfx_import_single").removeClass("hidden");
$(".popularfx_img_screen").removeClass("popularfx_img_selected");
jEle.addClass("popularfx_img_selected");
});
}
});
}
// Search Clear
$('.popularfx-sf-empty').click(function(){
$('.popularfx-search-field').val('');
show_themes();
});
// Seach
$('.popularfx-search-field').on('keyup', function(e){
show_themes('', $(this).val());
});
// Sort themes
$('.popularfx-sortby').change(function(){
show_themes($('.popularfx-current-cat').data('cat'), $('.popularfx-search-field').val());
});
/*var timer = null;
// Search for a theme
function suggest_theme(e, a) {
clearTimeout(timer);
// check value only after user stops typing
timer = setTimeout(function () {
if (e.keyCode == 8) {
if (!a) {
$("#popularfx-suggestion").hide();
}
}
if (a) {
a = a.split(" ");//split if has space
show_searched_theme(a); //search for theme
}
}, 200);
}
function show_searched_theme(val) {
var data = new Array();
var arr = new Array();
var vale = val.join(" "); // join split file
var vale_slug = val.join(""); //join for slug
vale_slug = vale_slug.toLowerCase();
vale = vale.toLowerCase();
//val = jQuery.trim(val);
for (var x in themes) {
var slug = themes[x].slug;
//var tags = themes[x].tags;
//search by theme name
if ((themes[x].name.substring(0, vale.length) === vale)) {
data.push(themes[x].slug);
arr.push(themes[x].name);
}
//search by slug
if ((themes[x].slug.substring(0, vale_slug.length) === vale_slug)) {
data.push(themes[x].slug);
arr.push(themes[x].name);
}
}
// Search by tags
//for (var z in popularfx_templates.tags) {
// var tag = z.toLowerCase();
// if (tag.lastIndexOf(vale, 0) === 0) {
// if (data.indexOf(themes[x].slug) == -1 && arr.indexOf(themes[x].name) == -1) {
// data.push(themes[x].slug);
// arr.push(themes[x].name);
// }
// }
//}
var txt = ""; // from here add value for search suggestion
txt = '<ul id="list-suggestion" style="padding: 0px;margin-bottom:0 !important">';
if (!jQuery.isEmptyObject(data)) {
for (i in data) {
txt += '<a style="text-decoration: none;cursor:pointer;"><li>' + arr[i] + '</li></a>';
}
} else {
txt += '<a class="inliner" href="javascript:void(0);"><li value="no-suggestion">No themes found with this search criteria</li></a>';
}
txt += '</ul>';
$("#popularfx-suggestion").html(txt);
$("#popularfx-suggestion").show();
$("#popularfx-suggestion a").click(function(){
});
}*/
show_themes();
};
</script>
<?php
}
}PK �f\0�wVy Vy freemium_functions.phpnu �[��� <?php
//////////////////////////////////////////////////////////////
//===========================================================
// freemium_functions.php
//===========================================================
// PAGELAYER
// Inspired by the DESIRE to be the BEST OF ALL
// ----------------------------------------------------------
// Started by: Pulkit Gupta
// Date: 23rd Jan 2017
// Time: 23:00 hrs
// Site: http://pagelayer.com/wordpress (PAGELAYER)
// ----------------------------------------------------------
// Please Read the Terms of use at http://pagelayer.com/tos
// ----------------------------------------------------------
//===========================================================
// (c)Pagelayer Team
//===========================================================
//////////////////////////////////////////////////////////////
// Are we being accessed directly ?
if(!defined('PAGELAYER_VERSION')) {
exit('Hacking Attempt !');
}
// Get page title - 2C
function pagelayer_get_the_title( $including_context = false ) {
$title = '';
if(pagelayer_is_live() || wp_doing_ajax() || pagelayer_is_gutenberg_editor()){
return 'Title';
}
if ( is_singular() ) {
$title = get_the_title();
if ( $including_context ) {
$post_type_obj = get_post_type_object( get_post_type() );
$title = sprintf( '%s: %s', $post_type_obj->labels->singular_name, $title );
}
} elseif ( is_search() ) {
$title = sprintf( __( 'Search Results for: %s'), get_search_query() );
if ( get_query_var( 'paged' ) ) {
$title .= sprintf( __( ' – Page %s' ), get_query_var( 'paged' ) );
}
} elseif ( is_category() ) {
$title = single_cat_title( '', false );
if ( $including_context ) {
$title = sprintf( __( 'Category Archives: %s' ), $title );
}
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
if ( $including_context ) {
$title = sprintf( __( 'Tag Archives: %s' ), $title );
}
} elseif ( is_author() ) {
$title = get_the_author() ;
if ( $including_context ) {
$title = sprintf( __( 'Author Archives: %s' ), $title );
}
} elseif ( is_year() ) {
$title = get_the_date( _x( 'Y', 'yearly archives date format' ) );
if ( $including_context ) {
$title = sprintf( __( 'Yearly Archives: %s' ), $title );
}
} elseif ( is_month() ) {
$title = get_the_date( _x( 'F Y', 'monthly archives date format' ) );
if ( $including_context ) {
$title = sprintf( __( 'Monthly Archives: %s' ), $title );
}
} elseif ( is_day() ) {
$title = get_the_date( _x( 'F j, Y', 'daily archives date format' ) );
if ( $including_context ) {
$title = sprintf( __( 'Daily Archives: %s' ), $title );
}
} elseif ( is_tax( 'post_format' ) ) {
if ( is_tax( 'post_format', 'post-format-aside' ) ) {
$title = _x( 'Asides', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
$title = _x( 'Galleries', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
$title = _x( 'Images', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
$title = _x( 'Videos', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
$title = _x( 'Quotes', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
$title = _x( 'Links', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
$title = _x( 'Statuses', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
$title = _x( 'Audio', 'post format archive title' );
} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
$title = _x( 'Chats', 'post format archive title' );
}
} elseif ( is_post_type_archive() ) {
$title = post_type_archive_title( '', false );
if ( $including_context ) {
$title = sprintf( __( 'Archives: %s' ), $title );
}
} elseif ( is_tax() ) {
$title = single_term_title( '', false );
if ( $including_context ) {
$tax = get_taxonomy( get_queried_object()->taxonomy );
$title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, $title );
}
} elseif ( is_404() ) {
$title = __( 'Page Not Found' );
} elseif ( is_archive() ) {
$title = get_the_archive_title();
} elseif ( is_home() ) {
$title = single_post_title('', false);
}
return $title;
}
// Get Taxonomies
function pagelayer_tax_list($item = '', $page = false){
// Get types
$types = pagelayer_post_types($page);
// Loop thru
foreach($types as $slug => $label){
// Get the items
$items = get_object_taxonomies($slug, 'objects');
foreach($items as $name => $v) {
if(!isset($taxonomies[$name])){
$taxonomies[$name] = array('label' => $v->labels->singular_name, 'posttypes' => array($label));
}else{
$taxonomies[$name]['posttypes'][] = $label;
}
}
}
// Make it simple
foreach($taxonomies as $k => $v){
$taxonomies[$k] = $v['label'].' ('.implode(', ', $v['posttypes']).')';
}
$pos = array_search($item, array_keys($taxonomies));
if(!empty($pos)) {
$cut = array_splice($taxonomies, $pos, 1);
$taxonomies = $cut + $taxonomies;
}
return $taxonomies;
}
/////////////////////////////////////
// Miscellaneous Shortcode Functions
/////////////////////////////////////
// The types of Posts
function pagelayer_post_types($page = false){
// Get the types
$args = array('public' => TRUE);
$types = get_post_types($args, 'objects');
// Unset Page if not required
if($page == false){
unset($types['page']);
}
// Remove Attachment types !
unset($types['attachment']);
foreach($types as $name => $type){
$return[$name] = $type->labels->singular_name;
}
return $return;
}
// Get all posts and pages list
function pagelayer_get_posts($args = array()){
if(empty($args)){
$args = array_keys(pagelayer_post_types(true));
}
$posts_list = array();
// Get type
foreach($args as $p){
// Create post list
foreach(get_posts(['post_type' => $p]) as $post){
$posts_list[$post->ID] = $post->post_title;
}
}
return $posts_list;
}
// Get Menu List()
function pagelayer_get_menu_list($return_def = false){
$menus = wp_get_nav_menus();
$nav_menu = array(
'0' => __('-- Select Menu --')
);
$default = $menus[0]->term_id;
foreach ( $menus as $menu ) {
$nav_menu[$menu->term_id] = $menu->name;
if($default > $menu->term_id){
$default = $menu->term_id;
}
}
if($return_def){
return $default;
}
return $nav_menu;
}
// Animated Heading
function pagelayer_sc_anim_heading(&$el){
$el['atts']['rotate_html'] = '';
//Creates html for rotating text
if(!empty($el['atts']['rotate_text'])){
$rotate_text = '';
$rotate_text = explode(',', $el['atts']['rotate_text']);
$el['atts']['rotate_html'] .= '<div class="pagelayer-animated-heading pagelayer-rotating-text pagelayer-words-wrapper">';
//print_r($rotate_text);
foreach($rotate_text as $key => $val){
//print_r($key);
$el['atts']['rotate_html'] .= '<span';
if( $key == 0){
$el['atts']['rotate_html'] .= ' class="pagelayer-is-visible"';
}
$el['atts']['rotate_html'] .= '>' . $rotate_text[$key] . '</span>';
}
$el['atts']['rotate_html'] .= '</div>';
}
//Required classes for particular rotate
$el['atts']['rotate_req'] = '';
$letters = ['pagelayer-aheading-rotate2', 'pagelayer-aheading-rotate3', 'pagelayer-aheading-scale'];
if(!empty($el['atts']['animations'])){
if(in_array($el['atts']['animations'], $letters)){
$el['atts']['rotate_req'] = 'letters ';
}
if($el['atts']['animations'] == 'clip'){
$el['atts']['rotate_req'] = 'is-full-width ';
}
}
}
// Contact Form
function pagelayer_sc_contact(&$el){
$el['atts']['grecaptcha'] = get_option('pagelayer_google_captcha');
if(!empty($el['atts']['captcha'])){
if(!wp_script_is('pagelayer_cap_script', 'registered')){
$pagelayer_cap_lang = get_option('pagelayer_google_captcha_lang');
$lang = empty($pagelayer_cap_lang) ? '' : '&hl='.$pagelayer_cap_lang;
wp_register_script('pagelayer_cap_script', "https://www.google.com/recaptcha/api.js?render=explicit$lang", array(), PAGELAYER_VERSION, true);
}
wp_enqueue_script('pagelayer_cap_script');
}
}
// Contact Form Item
function pagelayer_sc_contact_item(&$el){
$html = '';
$options = array();
$placeholder = '';
$required = '';
if(!empty($el['atts']['required'])){
$required = 'required';
}
if(!empty($el['atts']['label_name']) && empty($el['atts']['label_as_holder'])){
$html = '<label for="'.@$el['atts']['field_name'].'"><span class="pagelayer-form-label">'.$el['atts']['label_name'].'</span>';
if(!empty($required)){
$html .= ' *';
}
$html .= '</label>';
}
if(!empty($el['atts']['label_as_holder'])){
$placeholder = $el['atts']['label_name'];
}else{
if(!empty($el['atts']['placeholder'])) $placeholder = $el['atts']['placeholder'];
}
// File accept
$file_accept = '.jpg,.jpeg,.png,.gif,.pdf,.doc,.docx,.ppt,.pptx,.odt,.avi,.ogg,.m4a,.mov,.mp3,.mp4,.mpg,.wav,.wmv';
if(!empty($el['atts']['accept_file'])){
$file_accept = $el['atts']['accept_file'];
}
if($el['atts']['field_type'] == 'select'){
$html .= '<select name="'.$el['atts']['field_name'].'" '.$required.'>';
if(!empty($el['atts']['label_name']) && !empty($el['atts']['label_as_holder'])){
$html .= '<option value="" disabled selected>'.$el['atts']['label_name'].'</option>';
}else{
$html .= '<option value="" disabled selected>---</option>';
}
if(!empty($el['atts']['values'])){
$options = explode("\n", $el['atts']['values']);
for($x = 0; $x < sizeof($options); $x++){
$html .= '<option value="'.trim($options[$x]).'" >'.trim($options[$x]).'</option>';
}
}
$html .= '</select>';
}elseif($el['atts']['field_type'] == 'checkbox'){
$html .= '<div class="pagelayer-radcheck-holder pagelayer-contact-checkbox" '.$required.'>';
if(!empty($el['atts']['values'])){
$options = explode("\n", $el['atts']['values']);
for($x = 0; $x < sizeof($options); $x++){
$html .= '<div><input type="checkbox" id="'.$el["id"].trim($options[$x]).'" name="'.$el['atts']['field_name'].'[]" value="'.trim($options[$x]).'"/><label for="'.$el["id"].trim($options[$x]).'" class="pagelayer-form-label">'.trim($options[$x]).'</label></div>';
}
}
$html .= '</div>';
}elseif($el['atts']['field_type'] == 'radio'){
$html .= '<div class="pagelayer-radcheck-holder">';
if(!empty($el['atts']['values'])){
$options = explode("\n", $el['atts']['values']);
for($x = 0; $x < sizeof($options); $x++){
$html .= '<div><input type="radio" name="'.$el['atts']['field_name'].'"'.$required.' value="'.trim($options[$x]).'"/><span>
'.trim($options[$x]).'</span></div>';
}
}
$html .= '</div>';
}elseif($el['atts']['field_type'] == 'textarea'){
$html .= '<textarea name="'.$el['atts']['field_name'].'" rows="'.$el['atts']['textarea_rows'].'" '.$required.' placeholder="'.$placeholder.'"></textarea>';
}elseif($el['atts']['field_type'] == 'file'){
$html .= '<input type="'.$el['atts']['field_type'].'" '.$required.' name="'.$el['atts']['field_name'].'" accept="'.$file_accept.'" />';
}elseif($el['atts']['field_type'] == 'label'){
$html .= '';
}else{
$html .= '<input type="'.$el['atts']['field_type'].'" '.$required.' placeholder="'.$placeholder.'" name="'.$el['atts']['field_name'].'" />';
}
$el['atts']['fieldhtml'] = $html;
}
// Featured Image Handler
function pagelayer_sc_featured_img(&$el){
// Image size
if(!empty($el['atts']['size'])){
$size = $el['atts']['size'];
}
$thumbnail_id = get_post_thumbnail_id();
$title = $alt = '';
if(!empty($thumbnail_id)){
$title = get_the_title($thumbnail_id);
$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
}
if($size){
$src = get_the_post_thumbnail_url(null, $size);
}else{
$src = get_the_post_thumbnail_url();
}
// Fallback image
if(empty($src) && !empty($el['atts']['img'])){
$src = !empty($el['tmp']['img-'.$size.'-url']) ? @$el['tmp']['img-'.$size.'-url'] : @$el['tmp']['img-url'];
$alt = $el['tmp']['img-alt'];
$title = $el['tmp']['img-title'];
}
$el['atts']['img_html'] = '';
if(!empty($src)){
$el['atts']['img_html'] = '<img class="pagelayer-img" src="'.$src.'" title="'.$title.'" alt="'.$alt.'" />';
}elseif(pagelayer_is_live_template()){
$el['atts']['img_html'] = '<img class="pagelayer-img" src="'.PAGELAYER_URL.'/images/default-image.png" />';
}
// What is the link ?
if(!empty($el['atts']['link_type'])){
// Custom url
if($el['atts']['link_type'] == 'custom_url'){
// Backward compatibility for new link props
pagelayer_add_link_backward($el, array( 'rel' => '', 'selector' => '.pagelayer-ele-link'));
$el['atts']['func_link'] = empty($el['tmp']['link']) ? '' : $el['tmp']['link'];
}
// Link to the media file itself
if($el['atts']['link_type'] == 'media_file' || $el['atts']['link_type'] == 'lightbox'){
$el['atts']['func_link'] = $src;
}
}
}
// Site Title Handler
function pagelayer_sc_wp_title(&$el){
// Decide the image URL
$el['atts']['func_image'] = @$el['tmp']['id-'.$el['atts']['id-size'].'-url'];
$el['atts']['func_image'] = empty($el['atts']['func_image']) ? @$el['tmp']['id-url'] : $el['atts']['func_id'];
// Default Logo
if(empty($el['atts']['logo_img_type'])){
// Load it
$logo = pagelayer_site_logo();
// Only if we get it
if(!empty($logo)){
$el['atts']['func_image'] = @$logo[$el['atts']['logo_img_size'].'-url'];
$el['atts']['func_image'] = empty($el['atts']['func_image']) ? @$logo['url'] : $el['atts']['func_image'];
$el['tmp']['logo_img-title'] = @$logo['title'];
$el['tmp']['logo_img-alt'] = @$logo['alt'];
}
// Custom logo
}else{
$el['atts']['func_image'] = @$el['tmp']['logo_img-'.$el['atts']['logo_img_size'].'-url'];
$el['atts']['func_image'] = empty($el['atts']['func_image']) ? @$el['tmp']['logo_img-url'] : $el['atts']['func_image'];
$el['tmp']['logo_img-title'] = @$el['tmp']['logo_img-title'];
$el['tmp']['logo_img-alt'] = @$el['tmp']['logo_img-alt'];
}
}
// Primary menu Handler
function pagelayer_sc_wp_menu(&$el){
if(!empty($el['atts']['inside_mega'])){
$el['atts']['nav_menu'] = '';
if(pagelayer_is_live()){
$el['atts']['nav_menu'] = 'Primary Menu Holder. Please select the correct menu.';
}
return true;
}
// Setting default toggle icon. If the icon is empty.
if(empty($el['atts']['menu_toggle_icon'])){
$el['atts']['menu_toggle_icon'] = 'fas fa-bars';
}
// Load Pagelayer nav menu walker
include_once(PAGELAYER_DIR.'/main/nav_walker.php');
$el['atts']['nav_menu'] = wp_nav_menu( array(
'menu' => wp_get_nav_menu_object(@$el['atts']['nav_list']),
'menu_id' => @$el['atts']['nav_list'],
'menu_class' => 'pagelayer-wp_menu-ul',
'walker' => new Pagelayer_Walker_Nav_Menu(),
//'theme_location' => 'primary',
'echo' => false,
) );
}
// Post Navigation Handler
function pagelayer_sc_post_nav(&$el){
$in_same_term = false;
$taxonomies = 'category';
$title = '';
$arrows_list = $el['atts']['arrows_list'];
if(!empty($el['atts']['in_same_term'])){
$in_same_term = true;
$taxonomies = $el['atts']['taxonomies'];
}
if(!empty($el['atts']['post_title'])){
$title = '<span class="pagelayer-post-nav-title">%title</span>';
}
$next_label = '<span class="pagelayer-next-holder">
<span class="pagelayer-post-nav-link"> '.$el["atts"]["next_label"].'</span>'.$title.'
</span>
<span class="pagelayer-post-nav-icon fa fa-'.$arrows_list.'-right"></span>';
$prev_label = '<span class="pagelayer-post-nav-icon fa fa-'.$arrows_list.'-left"></span>
<span class="pagelayer-next-holder">
<span class="pagelayer-post-nav-link"> '.$el["atts"]["prev_label"].'</span>'.$title.'
</span>';
$el['atts']['next_link'] = get_next_post_link('%link', $next_label, $in_same_term, '', $taxonomies);
$el['atts']['prev_link'] = get_previous_post_link('%link', $prev_label, $in_same_term, '', $taxonomies );
}
// Comments Handler
function pagelayer_sc_post_comment(&$el){
global $post;
// Is it custom ?
if($el['atts']['post_type'] == 'custom' && !empty($el['atts']['post_id'])){
$orig_post = $post;
$post = get_post($el['atts']['post_id']);
}
$post_id = $post->ID;
//echo $post_id.' - '.$el['atts']['post_id'];
if ( comments_open($post_id) || get_comments_number($post_id) ) {
// Handel comments template echo
ob_start();
comments_template();
$el['atts']['post_comment'] = '<div class="pagelayer-comments-template">'.ob_get_clean().'</div>';
// Comments are now closed
if(!comments_open($post_id)){
$el['atts']['post_comment'] = '<div class="pagelayer-comments-close">
<h2>Comments are closed!</h2>
</div>';
}
}else{
$el['atts']['post_comment'] = '';
}
if(pagelayer_is_live_template() || $post->post_type == 'pagelayer-template'){
$el['atts']['post_comment'] = '<div class="pagelayer-comments-close">
<center><h4>Comments section !</h4></center>
</div>';
}
if(!empty($orig_post)){
$post = $orig_post;
}
}
// post navigation Handler
function pagelayer_sc_post_info_list(&$el){
global $post;
$el['atts']['post_info_content'] ='';
switch($el['atts']['type']){
case 'author':
$author_id = get_the_author_meta( 'ID' ) ? get_the_author_meta( 'ID' ) : $GLOBALS['post']->post_author;
$el['atts']['link'] = get_author_posts_url( $author_id );
$el['atts']['avatar_url'] = get_avatar_url( $author_id, 96 );
$el['atts']['post_info_content'] = get_the_author_meta( 'display_name', $author_id );
break;
case 'date':
$format = [
'default' => 'F j, Y',
'0' => 'F j, Y',
'1' => 'Y-m-d',
'2' => 'm/d/Y',
'3' => 'd/m/Y',
'custom' => empty( $el['atts']['date_format_custom'] ) ? 'F j, Y' : $el['atts']['date_format_custom'],
];
$el['atts']['post_info_content'] = get_the_time( $format[ $el['atts']['date_format'] ] );
$el['atts']['link'] = get_day_link( get_post_time( 'Y' ), get_post_time( 'm' ), get_post_time( 'j' ) );
break;
case 'time':
$format = [
'default' => 'g:i a',
'0' => 'g:i a',
'1' => 'g:i A',
'2' => 'H:i',
'custom' => empty( $el['atts']['time_format_custom'] ) ? 'F j, Y' : $el['atts']['time_format_custom'],
];
$el['atts']['post_info_content'] = get_the_time( $format[ $el['atts']['time_format'] ] );
if(!pagelayer_is_live_template()){
$el['atts']['link'] = 'javascript:void(0)';
$el['atts']['info_link'] = 1;
}
break;
case 'comments':
$el['atts']['post_info_content'] = (int) get_comments_number();
$el['atts']['link'] = get_comments_link();
// Comments are closed then dont show !
if(pagelayer_is_live_template() || $GLOBALS['post']->post_type == 'pagelayer-template'){
$el['atts']['post_info_content'] = 1;
}elseif(!comments_open($post->ID)){
$el['atts']['post_info_content'] = '';
}
break;
case 'terms':
$taxonomy = $el['atts']['taxonomy'];
$terms = wp_get_post_terms( get_the_ID(), $taxonomy );
foreach ( $terms as $term ) {
$el['atts']['post_info_content'] .= ' <a href="'. get_term_link( $term ) .'"> '. $term->name .' </a>';
}
if(pagelayer_is_live_template() || $GLOBALS['post']->post_type == 'pagelayer-template'){
$el['atts']['post_info_content'] .= '<a>Dummy '.ucfirst(str_replace('_', ' ', $el['atts']['taxonomy'])).'</a>';
}
$el['atts']['info_link'] = '';
break;
case 'custom':
$el['atts']['post_info_content'] = $el['atts']['type_custom'];
$el['atts']['link'] = $el['atts']['info_custom_link'];
break;
}
}
// Post Content Handler - 2C
function pagelayer_sc_post_content(&$el){
static $did_posts = [];
global $pagelayer;
$post_obj = get_post();
if(empty( $post_obj )){
return false;
}
if ( post_password_required( $post_obj->ID ) && !pagelayer_is_live() ) {
$el['atts']['post_content'] = get_the_password_form( $post_obj->ID );
return;
}
// Avoid recursion
if ( isset( $did_posts[$post_obj->ID] ) || pagelayer_is_live_template($post_obj) ) {
$el['atts']['post_content'] = '<div style="min-height:20px;background-color:#e3e3e3;text-align:center">Post Content Holder</div>';
return;
}
// Is it an attachment
if(is_attachment()){
$el['atts']['post_content'] = '<center>'.wp_get_attachment_image( get_the_ID(), 'full' ).'</center>';
return;
}
// To prevent recursion, set it to True
$did_posts[$post_obj->ID] = true;
$content = $post_obj->post_content;
// If we are rendering a template and this post content is being edited live, then dont_make_editable is set true in pagelayer_get_post_content. Hence we need to set it as false and revert it after rendering the posts content !
if(!empty($pagelayer->dont_make_editable)){
$reset = $pagelayer->dont_make_editable;
$pagelayer->dont_make_editable = false;
// While rendering post content inside the template
$rendering_template_id = $pagelayer->rendering_template_id;
$pagelayer->rendering_template_id = $post_obj->ID;
}
// Split to pages.
setup_postdata( $post_obj );
$content = apply_filters( 'the_content', get_the_content() );
if(!empty($reset)){
$pagelayer->rendering_template_id = $rendering_template_id;
$pagelayer->dont_make_editable = $reset;
}
$content .= wp_link_pages( array(
'before' => '<p class="post-nav-links pagelayer-page-links"><span class="page-links-title pagelayer-page-links-title">' . __( 'Pages:') . '</span>',
'after' => '</p>',
'echo' => 0,
)
);
$el['atts']['post_content'] = $content;
}
// Archive Posts shows the posts as per the QUERY of the current page
function pagelayer_sc_archive_posts(&$el){
global $wp_query, $pagelayer;
$query_args = $wp_query->query_vars;
if(pagelayer_is_live() || (wp_doing_ajax() && @$_REQUEST['action'] == 'pagelayer_archive_posts_data')){
$query_args = ['post_type' => 'post'];
$dummy_pagination = 10;
}
$allow_param = array('show_thumb', 'thumb_size', 'show_content', 'show_title', 'more', 'btn_type', 'size', 'icon_position', 'icon', 'show_more', 'meta_sep', 'exc_length', 'thumb_img_type', 'infinite_types' );
$param = array();
foreach($allow_param as $val){
$param[$val] = !empty($el['atts'][$val]) ? $el['atts'][$val] : '';
}
if(!empty($el['atts']['meta'])){
$meta_arr = explode(',',$el['atts']['meta']);
//pagelayer_print($el['atts']['meta']);
foreach($meta_arr as $arr){
$param[$arr] = $arr;
}
}
if(!empty($el['atts']['thumb_img_type'])){
$img_size = @$el['tmp']['def_thumb_img-'.$el['atts']['thumb_size'].'-url'];
$param['def_thumb_img'] = empty($img_size) ? @$el['tmp']['def_thumb_img-url'] : $img_size;
}
$el['atts']['pagelayer_pagination_top'] = '';
$el['atts']['pagelayer_pagination_bottom'] = '';
if(!empty($el['atts']['pagination']) && empty($el['atts']['infinite_types'])){
// Create array for pagination
$pagination = array(
'prev_next' => $el['atts']['pagination'] == 'number' ? false : true,
'prev_text' => __( @$el['atts']['pagi_prev_text'] ),
'next_text' => __( @$el['atts']['pagi_next_text'] ),
'end_size' => $el['atts']['pagi_end_size'],
'mid_size' => $el['atts']['pagi_mid_size'],
'before_page_number' => @$el['atts']['before_page_number'],
'after_page_number' => @$el['atts']['after_page_number'],
);
if(!empty($dummy_pagination)){
$pagination['total'] = 10;
}
if( @$el['atts']['pagination_on'] == 'top'){
$el['atts']['pagelayer_pagination_top'] = '<div class="pagelayer-pagination">'.paginate_links($pagination).'</div>';
}else{
$el['atts']['pagelayer_pagination_bottom'] = '<div class="pagelayer-pagination">'.paginate_links($pagination).'</div>';
}
}
if(wp_doing_ajax() && @$_REQUEST['action'] == 'pagelayer_infinite_posts'){
$query_args['paged'] = $el['atts']['paged'];
}else{
$data = array('tag' => $el['tag'], 'atts' => $el['oAtts']);
$pagelayer->localScript['pagelayer_post_'.$el['id']] = $data;
}
$el['atts']['pagelayer_archive_posts'] = pagelayer_posts($param, $query_args);
}
// Flipbox handler
function pagelayer_sc_flipbox(&$el){
// Flipbox front heading image
if(!empty($el['atts']['heading_image'])){
$el['atts']['func_image'] = @$el['tmp']['heading_image-'.$el['atts']['heading_image_size'].'-url'];
$el['atts']['func_image'] = empty($el['atts']['func_image']) ? @$el['tmp']['heading_image-url'] : $el['atts']['func_image'];
}
$back = @$el['atts']['back_section'];
if(pagelayer_is_live() && !empty($back)){
$el['attr'][] = 'back_section="'.$back.'"';
}
}
// Countdown handler
function pagelayer_sc_countdown(&$el){
$exp = @$el['atts']['display_expired_text'];
if(pagelayer_is_live() && !empty($exp)){
$el['attr'][] = 'display_expired_text="'.$exp.'"';
}
if(!isset($el['atts']['custom_label_text'])){
$el['atts']['days_label_text'] = 'Days';
$el['atts']['hours_label_text'] = 'Hours';
$el['atts']['minutes_label_text'] = 'Minutes';
$el['atts']['seconds_label_text'] = 'Seconds';
}
}
// Social Share Handler
function pagelayer_sc_share(&$el){
if(empty($el['atts']['icon'])){
return;
}
$profileName = '';
if(isset($el['atts']['custom_profile'])){
$profileName = $el['atts']['custom_profile'].'/';
}
$icon_splited = explode(' fa-', $el['atts']['icon']);
$el['classes'][] = ['.pagelayer-share-content' => 'pagelayer-'.$icon_splited[1]];
$icon = $icon_splited[1];
$labelList = array(
'Facebook' => array(
'icons' => array('facebook', 'facebook-f', 'facebook-messenger', 'facebook-square', 'facebook-official'),
'url' => 'https://www.facebook.com/sharer/sharer.php?u='
),
'Twitter' => array(
'icons' => array('twitter', 'twitter-square'),
'url' => 'https://twitter.com/intent/tweet?url='
),
'Google+' => array(
'icons' => array('google-plus', 'google-plus-square', 'google-plus-g'),
'url' => 'https://plus.google.com/share?url='
),
'Instagram' => array(
'icons' => array('instagram'),
'url' => 'https://www.instagram.com/'.$profileName,
'no' => 1
),
'Linkedin' => array(
'icons' => array('linkedin', 'linkedin-in', 'linkedin-square'),
'url' => 'https://www.linkedin.com/shareArticle?url='
),
'pinterest' => array(
'icons' => array('pinterest', 'pinterest-p', 'pinterest-square'),
'url' => '//www.pinterest.com/pin/create/button/?url='
),
'Reddit' => array(
'icons' => array('reddit-alien', 'reddit-square', 'reddit'),
'url' => 'https://reddit.com/submit?url='
),
'Skype' => array(
'icons' => array('skype'),
'url' => 'https://web.skype.com/share?',
'no' => 1
),
'Stumbleupon' => array(
'icons' => array('stumbleupon', 'stumbleupon-circle'),
'url' => 'https://www.stumbleupon.com/submit?url='
),
'Telegram' => array(
'icons' => array('telegram', 'telegram-plane'),
'url' => 'https://t.me/share/url?url='
),
'Tumblr' => array(
'icons' => array('tumblr', 'tumblr-square'),
'url' => 'https://www.tumblr.com/share/link?url='
),
'VK' => array(
'icons' => array('vk'),
'url' => 'http://vk.com/share.php?url='
),
'Weibo' => array(
'icons' => array('weibo'),
'url' => 'http://service.weibo.com/share/share.php?url='
),
'WhatsApp' => array(
'icons' => array('whatsapp', 'whatsapp-square'),
'url' => 'whatsapp://send?text='
),
'WordPress' => array(
'icons' => array('wordpress', 'wordpress-simple'),
'url' => 'https://wordpress.com/press-this.php?u='
),
'Xing' => array(
'icons' => array('xing', 'xing-square'),
'url' => 'https://www.xing.com/spi/shares/new?url='
),
'Delicious' => array(
'icons' => array('delicious'),
'url' => 'https://delicious.com/save?v=5&noui&jump=close&url='
),
'Dribbble' => array(
'icons' => array('dribbble', 'dribbble-square'),
'url' => 'https://dribbble.com/shots/'.$profileName,
'no' => 1
),
'Pocket' => array(
'icons' => array('get-pocket'),
'url' => 'https://getpocket.com/edit?url='
),
'Email' => array(
'icons' => array('envelope', 'envelope-open', 'envelope-o'),
'url' => 'mailto:?body='
)
);
if(!empty($el['atts']['text'])){
$el['atts']['icon_label'] = $el['atts']['text'];
}else{
foreach($labelList as $key => $val){
if(in_array($icon, $val['icons'])){
$el['atts']['icon_label'] = $key;
break;
}
}
}
foreach($labelList as $key => $val){
if(in_array($icon, $val['icons'])){
if(empty($val['no'])){
$el['atts']['social_url'] = $val['url'].$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
}else{
$el['atts']['social_url'] = $val['url'];
}
break;
}
}
}
// If the excerpt for current post is there only then give
function pagelayer_get_the_excerpt(){
global $post;
if(!empty($post->post_excerpt)){
return $post->post_excerpt;
}
return '';
}
function pagelayer_sc_post_excerpt(&$el){
$el['tmp']['post_excerpt'] = '';
$tmp_excerpt = pagelayer_get_the_excerpt();
if(!empty($tmp_excerpt) && strlen($tmp_excerpt) > 0){
$el['tmp']['post_excerpt'] = '<div class="pagelayer-post-excerpt">'.$tmp_excerpt.'</div>';
}
if(pagelayer_is_live_template()){
$el['tmp']['post_excerpt'] = '<div class="pagelayer-post-excerpt pagelayer-empty-widget"></div>';
}
}
function pagelayer_sc_copyright(&$el){
$el['atts']['copyright_text'] = pagelayer_get_option('pagelayer-copyright');
$el['oAtts']['copyright_text'] = $el['atts']['copyright_text'];
}
// Pricing Handler
function pagelayer_sc_pricing(&$el){
//Backward compatibility for new link props
pagelayer_add_link_backward($el, array(
'link' => 'button_url',
'rel' => '',
'target' => 'button_url_target',
'selector' => '.pagelayer-pricing-btn'
));
}
// Post Title
function pagelayer_sc_post_title(&$el){
$el['atts']['open_html_tag'] = !empty($el['atts']['html_tag']) ? '<'.$el['atts']['html_tag'].'>' :'';
$el['atts']['close_html_tag'] = !empty($el['atts']['html_tag']) ? '</'.$el['atts']['html_tag'].'>' :'';
}PK �f\��G�A� A� plugin-update-checker.phpnu �[��� <?php
/**
* Plugin Update Checker Library 3.2
* http://w-shadow.com/
*
* Copyright 2016 Janis Elsts
* Released under the MIT license. See license.txt for details.
*/
if ( !class_exists('PopularFXUpdateChecker_3_2', false) ):
/**
* A custom plugin update checker.
*
* @author Janis Elsts
* @copyright 2016
* @version 3.2
* @access public
*/
class PopularFXUpdateChecker_3_2 {
public $metadataUrl = ''; //The URL of the plugin's metadata file.
public $pluginAbsolutePath = ''; //Full path of the main plugin file.
public $pluginFile = ''; //Plugin filename relative to the plugins directory. Many WP APIs use this to identify plugins.
public $slug = ''; //Plugin slug.
public $optionName = ''; //Where to store the update info.
public $muPluginFile = ''; //For MU plugins, the plugin filename relative to the mu-plugins directory.
public $debugMode = false; //Set to TRUE to enable error reporting. Errors are raised using trigger_error()
//and should be logged to the standard PHP error log.
public $scheduler;
protected $upgraderStatus;
private $debugBarPlugin = null;
private $cachedInstalledVersion = null;
private $metadataHost = ''; //The host component of $metadataUrl.
/**
* Class constructor.
*
* @param string $metadataUrl The URL of the plugin's metadata file.
* @param string $pluginFile Fully qualified path to the main plugin file.
* @param string $slug The plugin's 'slug'. If not specified, the filename part of $pluginFile sans '.php' will be used as the slug.
* @param integer $checkPeriod How often to check for updates (in hours). Defaults to checking every 12 hours. Set to 0 to disable automatic update checks.
* @param string $optionName Where to store book-keeping info about update checks. Defaults to 'external_updates-$slug'.
* @param string $muPluginFile Optional. The plugin filename relative to the mu-plugins directory.
*/
public function __construct($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = ''){
$this->metadataUrl = $metadataUrl;
$this->pluginAbsolutePath = $pluginFile;
$this->pluginFile = plugin_basename($this->pluginAbsolutePath);
$this->muPluginFile = $muPluginFile;
$this->slug = $slug;
$this->optionName = $optionName;
$this->debugMode = (bool)(constant('WP_DEBUG'));
//If no slug is specified, use the name of the main plugin file as the slug.
//For example, 'my-cool-plugin/cool-plugin.php' becomes 'cool-plugin'.
if ( empty($this->slug) ){
$this->slug = basename($this->pluginFile, '.php');
}
//Plugin slugs must be unique.
$slugCheckFilter = 'puc_is_slug_in_use-' . $this->slug;
$slugUsedBy = apply_filters($slugCheckFilter, false);
if ( $slugUsedBy ) {
$this->triggerError(sprintf(
'Plugin slug "%s" is already in use by %s. Slugs must be unique.',
htmlentities($this->slug),
htmlentities($slugUsedBy)
), E_USER_ERROR);
}
add_filter($slugCheckFilter, array($this, 'getAbsolutePath'));
if ( empty($this->optionName) ){
$this->optionName = 'external_updates-' . $this->slug;
}
//Backwards compatibility: If the plugin is a mu-plugin but no $muPluginFile is specified, assume
//it's the same as $pluginFile given that it's not in a subdirectory (WP only looks in the base dir).
if ( (strpbrk($this->pluginFile, '/\\') === false) && $this->isUnknownMuPlugin() ) {
$this->muPluginFile = $this->pluginFile;
}
$this->scheduler = $this->createScheduler($checkPeriod);
$this->upgraderStatus = new PopularFX_PucUpgraderStatus_3_2();
$this->installHooks();
}
/**
* Create an instance of the scheduler.
*
* This is implemented as a method to make it possible for plugins to subclass the update checker
* and substitute their own scheduler.
*
* @param int $checkPeriod
* @return PopularFX_PucScheduler_3_2
*/
protected function createScheduler($checkPeriod) {
return new PopularFX_PucScheduler_3_2($this, $checkPeriod);
}
/**
* Install the hooks required to run periodic update checks and inject update info
* into WP data structures.
*
* @return void
*/
protected function installHooks(){
//Override requests for plugin information
add_filter('plugins_api', array($this, 'injectInfo'), 20, 3);
//Insert our update info into the update array maintained by WP.
add_filter('site_transient_update_plugins', array($this,'injectUpdate')); //WP 3.0+
add_filter('transient_update_plugins', array($this,'injectUpdate')); //WP 2.8+
add_filter('site_transient_update_plugins', array($this, 'injectTranslationUpdates'));
add_filter('plugin_row_meta', array($this, 'addCheckForUpdatesLink'), 10, 2);
add_action('admin_init', array($this, 'handleManualCheck'));
add_action('all_admin_notices', array($this, 'displayManualCheckResult'));
//Clear the version number cache when something - anything - is upgraded or WP clears the update cache.
add_filter('upgrader_post_install', array($this, 'clearCachedVersion'));
add_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion'));
//Clear translation updates when WP clears the update cache.
//This needs to be done directly because the library doesn't actually remove obsolete plugin updates,
//it just hides them (see getUpdate()). We can't do that with translations - too much disk I/O.
add_action('delete_site_transient_update_plugins', array($this, 'clearCachedTranslationUpdates'));
if ( did_action('plugins_loaded') ) {
$this->initDebugBarPanel();
} else {
add_action('plugins_loaded', array($this, 'initDebugBarPanel'));
}
//Rename the update directory to be the same as the existing directory.
add_filter('upgrader_source_selection', array($this, 'fixDirectoryName'), 10, 3);
//Enable language support (i18n).
load_plugin_textdomain('plugin-update-checker', false, plugin_basename(dirname(__FILE__)) . '/languages');
//Allow HTTP requests to the metadata URL even if it's on a local host.
$this->metadataHost = @parse_url($this->metadataUrl, PHP_URL_HOST);
add_filter('http_request_host_is_external', array($this, 'allowMetadataHost'), 10, 2);
}
/**
* Explicitly allow HTTP requests to the metadata URL.
*
* WordPress has a security feature where the HTTP API will reject all requests that are sent to
* another site hosted on the same server as the current site (IP match), a local host, or a local
* IP, unless the host exactly matches the current site.
*
* This feature is opt-in (at least in WP 4.4). Apparently some people enable it.
*
* That can be a problem when you're developing your plugin and you decide to host the update information
* on the same server as your test site. Update requests will mysteriously fail.
*
* We fix that by adding an exception for the metadata host.
*
* @param bool $allow
* @param string $host
* @return bool
*/
public function allowMetadataHost($allow, $host) {
if ( strtolower($host) === strtolower($this->metadataHost) ) {
return true;
}
return $allow;
}
/**
* Retrieve plugin info from the configured API endpoint.
*
* @uses wp_remote_get()
*
* @param array $queryArgs Additional query arguments to append to the request. Optional.
* @return PopularFXInfo_3_2
*/
public function requestInfo($queryArgs = array()){
//Query args to append to the URL. Plugins can add their own by using a filter callback (see addQueryArgFilter()).
$installedVersion = $this->getInstalledVersion();
$queryArgs['installed_version'] = ($installedVersion !== null) ? $installedVersion : '';
$queryArgs = apply_filters('puc_request_info_query_args-'.$this->slug, $queryArgs);
//Various options for the wp_remote_get() call. Plugins can filter these, too.
$options = array(
'timeout' => 10, //seconds
'headers' => array(
'Accept' => 'application/json'
),
);
$options = apply_filters('puc_request_info_options-'.$this->slug, $options);
//The plugin info should be at 'http://your-api.com/url/here/$slug/info.json'
$url = $this->metadataUrl;
if ( !empty($queryArgs) ){
$url = add_query_arg($queryArgs, $url);
}
$result = wp_remote_get(
$url,
$options
);
//Try to parse the response
$status = $this->validateApiResponse($result);
$pluginInfo = null;
if ( !is_wp_error($status) ){
$pluginInfo = PopularFXInfo_3_2::fromJson($result['body']);
if ( $pluginInfo !== null ) {
$pluginInfo->filename = $this->pluginFile;
$pluginInfo->slug = $this->slug;
}
} else {
$this->triggerError(
sprintf('The URL %s does not point to a valid plugin metadata file. ', $url)
. $status->get_error_message(),
E_USER_WARNING
);
}
$pluginInfo = apply_filters('puc_request_info_result-'.$this->slug, $pluginInfo, $result);
return $pluginInfo;
}
/**
* Check if $result is a successful update API response.
*
* @param array|WP_Error $result
* @return true|WP_Error
*/
private function validateApiResponse($result) {
if ( is_wp_error($result) ) { /** @var WP_Error $result */
return new WP_Error($result->get_error_code(), 'WP HTTP Error: ' . $result->get_error_message());
}
if ( !isset($result['response']['code']) ) {
return new WP_Error('puc_no_response_code', 'wp_remote_get() returned an unexpected result.');
}
if ( $result['response']['code'] !== 200 ) {
return new WP_Error(
'puc_unexpected_response_code',
'HTTP response code is ' . $result['response']['code'] . ' (expected: 200)'
);
}
if ( empty($result['body']) ) {
return new WP_Error('puc_empty_response', 'The metadata file appears to be empty.');
}
return true;
}
/**
* Retrieve the latest update (if any) from the configured API endpoint.
*
* @uses PopularFXUpdateChecker::requestInfo()
*
* @return PopularFXUpdate_3_2 An instance of PopularFXUpdate, or NULL when no updates are available.
*/
public function requestUpdate(){
//For the sake of simplicity, this function just calls requestInfo()
//and transforms the result accordingly.
$pluginInfo = $this->requestInfo(array('checking_for_updates' => '1'));
if ( $pluginInfo == null ){
return null;
}
$update = PopularFXUpdate_3_2::fromPopularFXInfo($pluginInfo);
//Keep only those translation updates that apply to this site.
$update->translations = $this->filterApplicableTranslations($update->translations);
return $update;
}
/**
* Filter a list of translation updates and return a new list that contains only updates
* that apply to the current site.
*
* @param array $translations
* @return array
*/
private function filterApplicableTranslations($translations) {
$languages = array_flip(array_values(get_available_languages()));
$installedTranslations = wp_get_installed_translations('plugins');
if ( isset($installedTranslations[$this->slug]) ) {
$installedTranslations = $installedTranslations[$this->slug];
} else {
$installedTranslations = array();
}
$applicableTranslations = array();
foreach($translations as $translation) {
//Does it match one of the available core languages?
$isApplicable = array_key_exists($translation->language, $languages);
//Is it more recent than an already-installed translation?
if ( isset($installedTranslations[$translation->language]) ) {
$updateTimestamp = strtotime($translation->updated);
$installedTimestamp = strtotime($installedTranslations[$translation->language]['PO-Revision-Date']);
$isApplicable = $updateTimestamp > $installedTimestamp;
}
if ( $isApplicable ) {
$applicableTranslations[] = $translation;
}
}
return $applicableTranslations;
}
/**
* Get the currently installed version of the plugin.
*
* @return string Version number.
*/
public function getInstalledVersion(){
if ( isset($this->cachedInstalledVersion) ) {
return $this->cachedInstalledVersion;
}
$pluginHeader = $this->getPluginHeader();
if ( isset($pluginHeader['Version']) ) {
$this->cachedInstalledVersion = $pluginHeader['Version'];
return $pluginHeader['Version'];
} else {
//This can happen if the filename points to something that is not a plugin.
$this->triggerError(
sprintf(
"Can't to read the Version header for '%s'. The filename is incorrect or is not a plugin.",
$this->pluginFile
),
E_USER_WARNING
);
return null;
}
}
/**
* Get plugin's metadata from its file header.
*
* @return array
*/
protected function getPluginHeader() {
if ( !is_file($this->pluginAbsolutePath) ) {
//This can happen if the plugin filename is wrong.
$this->triggerError(
sprintf(
"Can't to read the plugin header for '%s'. The file does not exist.",
$this->pluginFile
),
E_USER_WARNING
);
return array();
}
if ( !function_exists('get_plugin_data') ){
/** @noinspection PhpIncludeInspection */
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
}
return get_plugin_data($this->pluginAbsolutePath, false, false);
}
/**
* Check for plugin updates.
* The results are stored in the DB option specified in $optionName.
*
* @return PopularFXUpdate_3_2|null
*/
public function checkForUpdates(){
$installedVersion = $this->getInstalledVersion();
//Fail silently if we can't find the plugin or read its header.
if ( $installedVersion === null ) {
$this->triggerError(
sprintf('Skipping update check for %s - installed version unknown.', $this->pluginFile),
E_USER_WARNING
);
return null;
}
$state = $this->getUpdateState();
if ( empty($state) ){
$state = new stdClass;
$state->lastCheck = 0;
$state->checkedVersion = '';
$state->update = null;
}
$state->lastCheck = time();
$state->checkedVersion = $installedVersion;
$this->setUpdateState($state); //Save before checking in case something goes wrong
$state->update = $this->requestUpdate();
$this->setUpdateState($state);
return $this->getUpdate();
}
/**
* Load the update checker state from the DB.
*
* @return stdClass|null
*/
public function getUpdateState() {
$state = get_site_option($this->optionName, null);
if ( empty($state) || !is_object($state)) {
$state = null;
}
if ( isset($state, $state->update) && is_object($state->update) ) {
$state->update = PopularFXUpdate_3_2::fromObject($state->update);
}
return $state;
}
/**
* Persist the update checker state to the DB.
*
* @param StdClass $state
* @return void
*/
private function setUpdateState($state) {
if ( isset($state->update) && is_object($state->update) && method_exists($state->update, 'toStdClass') ) {
$update = $state->update; /** @var PopularFXUpdate_3_2 $update */
$state->update = $update->toStdClass();
}
update_site_option($this->optionName, $state);
}
/**
* Reset update checker state - i.e. last check time, cached update data and so on.
*
* Call this when your plugin is being uninstalled, or if you want to
* clear the update cache.
*/
public function resetUpdateState() {
delete_site_option($this->optionName);
}
/**
* Intercept plugins_api() calls that request information about our plugin and
* use the configured API endpoint to satisfy them.
*
* @see plugins_api()
*
* @param mixed $result
* @param string $action
* @param array|object $args
* @return mixed
*/
public function injectInfo($result, $action = null, $args = null){
$relevant = ($action == 'plugin_information') && isset($args->slug) && (
($args->slug == $this->slug) || ($args->slug == dirname($this->pluginFile))
);
if ( !$relevant ) {
return $result;
}
$pluginInfo = $this->requestInfo();
$pluginInfo = apply_filters('puc_pre_inject_info-' . $this->slug, $pluginInfo);
if ( $pluginInfo ) {
return $pluginInfo->toWpFormat();
}
return $result;
}
/**
* Insert the latest update (if any) into the update list maintained by WP.
*
* @param StdClass $updates Update list.
* @return StdClass Modified update list.
*/
public function injectUpdate($updates){
//Is there an update to insert?
$update = $this->getUpdate();
//No update notifications for mu-plugins unless explicitly enabled. The MU plugin file
//is usually different from the main plugin file so the update wouldn't show up properly anyway.
if ( $this->isUnknownMuPlugin() ) {
$update = null;
}
if ( !empty($update) ) {
//Let plugins filter the update info before it's passed on to WordPress.
$update = apply_filters('puc_pre_inject_update-' . $this->slug, $update);
$updates = $this->addUpdateToList($updates, $update);
} else {
//Clean up any stale update info.
$updates = $this->removeUpdateFromList($updates);
}
return $updates;
}
/**
* @param StdClass|null $updates
* @param PopularFXUpdate_3_2 $updateToAdd
* @return StdClass
*/
private function addUpdateToList($updates, $updateToAdd) {
if ( !is_object($updates) ) {
$updates = new stdClass();
$updates->response = array();
}
$wpUpdate = $updateToAdd->toWpFormat();
$pluginFile = $this->pluginFile;
if ( $this->isMuPlugin() ) {
//WP does not support automatic update installation for mu-plugins, but we can still display a notice.
$wpUpdate->package = null;
$pluginFile = $this->muPluginFile;
}
$updates->response[$pluginFile] = $wpUpdate;
return $updates;
}
/**
* @param stdClass|null $updates
* @return stdClass|null
*/
private function removeUpdateFromList($updates) {
if ( isset($updates, $updates->response) ) {
unset($updates->response[$this->pluginFile]);
if ( !empty($this->muPluginFile) ) {
unset($updates->response[$this->muPluginFile]);
}
}
return $updates;
}
/**
* Insert translation updates into the list maintained by WordPress.
*
* @param stdClass $updates
* @return stdClass
*/
public function injectTranslationUpdates($updates) {
$translationUpdates = $this->getTranslationUpdates();
if ( empty($translationUpdates) ) {
return $updates;
}
//Being defensive.
if ( !is_object($updates) ) {
$updates = new stdClass();
}
if ( !isset($updates->translations) ) {
$updates->translations = array();
}
//In case there's a name collision with a plugin hosted on wordpress.org,
//remove any preexisting updates that match our plugin.
$translationType = 'plugin';
$filteredTranslations = array();
foreach($updates->translations as $translation) {
if ( ($translation['type'] === $translationType) && ($translation['slug'] === $this->slug) ) {
continue;
}
$filteredTranslations[] = $translation;
}
$updates->translations = $filteredTranslations;
//Add our updates to the list.
foreach($translationUpdates as $update) {
$convertedUpdate = array_merge(
array(
'type' => $translationType,
'slug' => $this->slug,
'autoupdate' => 0,
//AFAICT, WordPress doesn't actually use the "version" field for anything.
//But lets make sure it's there, just in case.
'version' => isset($update->version) ? $update->version : ('1.' . strtotime($update->updated)),
),
(array)$update
);
$updates->translations[] = $convertedUpdate;
}
return $updates;
}
/**
* Rename the update directory to match the existing plugin directory.
*
* When WordPress installs a plugin or theme update, it assumes that the ZIP file will contain
* exactly one directory, and that the directory name will be the same as the directory where
* the plugin/theme is currently installed.
*
* GitHub and other repositories provide ZIP downloads, but they often use directory names like
* "project-branch" or "project-tag-hash". We need to change the name to the actual plugin folder.
*
* This is a hook callback. Don't call it from a plugin.
*
* @param string $source The directory to copy to /wp-content/plugins. Usually a subdirectory of $remoteSource.
* @param string $remoteSource WordPress has extracted the update to this directory.
* @param WP_Upgrader $upgrader
* @return string|WP_Error
*/
public function fixDirectoryName($source, $remoteSource, $upgrader) {
global $wp_filesystem; /** @var WP_Filesystem_Base $wp_filesystem */
//Basic sanity checks.
if ( !isset($source, $remoteSource, $upgrader, $upgrader->skin, $wp_filesystem) ) {
return $source;
}
//If WordPress is upgrading anything other than our plugin, leave the directory name unchanged.
if ( !$this->isPluginBeingUpgraded($upgrader) ) {
return $source;
}
//Rename the source to match the existing plugin directory.
$pluginDirectoryName = dirname($this->pluginFile);
if ( $pluginDirectoryName === '.' ) {
return $source;
}
$correctedSource = trailingslashit($remoteSource) . $pluginDirectoryName . '/';
if ( $source !== $correctedSource ) {
//The update archive should contain a single directory that contains the rest of plugin files. Otherwise,
//WordPress will try to copy the entire working directory ($source == $remoteSource). We can't rename
//$remoteSource because that would break WordPress code that cleans up temporary files after update.
if ( $this->isBadDirectoryStructure($remoteSource) ) {
return new WP_Error(
'puc-incorrect-directory-structure',
sprintf(
'The directory structure of the update is incorrect. All plugin files should be inside ' .
'a directory named <span class="code">%s</span>, not at the root of the ZIP file.',
htmlentities($this->slug)
)
);
}
/** @var WP_Upgrader_Skin $upgrader->skin */
$upgrader->skin->feedback(sprintf(
'Renaming %s to %s…',
'<span class="code">' . basename($source) . '</span>',
'<span class="code">' . $pluginDirectoryName . '</span>'
));
if ( $wp_filesystem->move($source, $correctedSource, true) ) {
$upgrader->skin->feedback('Plugin directory successfully renamed.');
return $correctedSource;
} else {
return new WP_Error(
'puc-rename-failed',
'Unable to rename the update to match the existing plugin directory.'
);
}
}
return $source;
}
/**
* Check for incorrect update directory structure. An update must contain a single directory,
* all other files should be inside that directory.
*
* @param string $remoteSource Directory path.
* @return bool
*/
private function isBadDirectoryStructure($remoteSource) {
global $wp_filesystem; /** @var WP_Filesystem_Base $wp_filesystem */
$sourceFiles = $wp_filesystem->dirlist($remoteSource);
if ( is_array($sourceFiles) ) {
$sourceFiles = array_keys($sourceFiles);
$firstFilePath = trailingslashit($remoteSource) . $sourceFiles[0];
return (count($sourceFiles) > 1) || (!$wp_filesystem->is_dir($firstFilePath));
}
//Assume it's fine.
return false;
}
/**
* Is there and update being installed RIGHT NOW, for this specific plugin?
*
* @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
* @return bool
*/
public function isPluginBeingUpgraded($upgrader = null) {
return $this->upgraderStatus->isPluginBeingUpgraded($this->pluginFile, $upgrader);
}
/**
* Get the details of the currently available update, if any.
*
* If no updates are available, or if the last known update version is below or equal
* to the currently installed version, this method will return NULL.
*
* Uses cached update data. To retrieve update information straight from
* the metadata URL, call requestUpdate() instead.
*
* @return PopularFXUpdate_3_2|null
*/
public function getUpdate() {
$state = $this->getUpdateState(); /** @var StdClass $state */
//Is there an update available?
if ( isset($state, $state->update) ) {
$update = $state->update;
//Check if the update is actually newer than the currently installed version.
$installedVersion = $this->getInstalledVersion();
if ( ($installedVersion !== null) && version_compare($update->version, $installedVersion, '>') ){
$update->filename = $this->pluginFile;
return $update;
}
}
return null;
}
/**
* Get a list of available translation updates.
*
* This method will return an empty array if there are no updates.
* Uses cached update data.
*
* @return array
*/
public function getTranslationUpdates() {
$state = $this->getUpdateState();
if ( isset($state, $state->update, $state->update->translations) ) {
return $state->update->translations;
}
return array();
}
/**
* Remove all cached translation updates.
*
* @see wp_clean_update_cache
*/
public function clearCachedTranslationUpdates() {
$state = $this->getUpdateState();
if ( isset($state, $state->update, $state->update->translations) ) {
$state->update->translations = array();
$this->setUpdateState($state);
}
}
/**
* Add a "Check for updates" link to the plugin row in the "Plugins" page. By default,
* the new link will appear after the "Visit plugin site" link.
*
* You can change the link text by using the "puc_manual_check_link-$slug" filter.
* Returning an empty string from the filter will disable the link.
*
* @param array $pluginMeta Array of meta links.
* @param string $pluginFile
* @return array
*/
public function addCheckForUpdatesLink($pluginMeta, $pluginFile) {
$isRelevant = ($pluginFile == $this->pluginFile)
|| (!empty($this->muPluginFile) && $pluginFile == $this->muPluginFile);
if ( $isRelevant && current_user_can('update_plugins') ) {
$linkUrl = wp_nonce_url(
add_query_arg(
array(
'puc_check_for_updates' => 1,
'puc_slug' => $this->slug,
),
self_admin_url('plugins.php')
),
'puc_check_for_updates'
);
$linkText = apply_filters('puc_manual_check_link-' . $this->slug, __('Check for updates', 'plugin-update-checker'));
if ( !empty($linkText) ) {
$final_link = sprintf('<a href="%s">%s</a>', esc_attr($linkUrl), $linkText);
$pluginMeta[] = apply_filters('puc_manual_final_check_link-' . $this->slug, $final_link);
}
}
return $pluginMeta;
}
/**
* Check for updates when the user clicks the "Check for updates" link.
* @see self::addCheckForUpdatesLink()
*
* @return void
*/
public function handleManualCheck() {
$shouldCheck =
isset($_GET['puc_check_for_updates'], $_GET['puc_slug'])
&& $_GET['puc_slug'] == $this->slug
&& current_user_can('update_plugins')
&& check_admin_referer('puc_check_for_updates');
if ( $shouldCheck ) {
$update = $this->checkForUpdates();
$status = ($update === null) ? 'no_update' : 'update_available';
wp_redirect(add_query_arg(
array(
'puc_update_check_result' => $status,
'puc_slug' => $this->slug,
),
self_admin_url('plugins.php')
));
}
}
/**
* Display the results of a manual update check.
* @see self::handleManualCheck()
*
* You can change the result message by using the "puc_manual_check_message-$slug" filter.
*/
public function displayManualCheckResult() {
if ( isset($_GET['puc_update_check_result'], $_GET['puc_slug']) && ($_GET['puc_slug'] == $this->slug) ) {
$status = strval($_GET['puc_update_check_result']);
if ( $status == 'no_update' ) {
$message = __('This plugin is up to date.', 'plugin-update-checker');
} else if ( $status == 'update_available' ) {
$message = __('A new version of this plugin is available.', 'plugin-update-checker');
} else {
$message = sprintf(__('Unknown update checker status "%s"', 'plugin-update-checker'), htmlentities($status));
}
printf(
'<div class="updated notice is-dismissible"><p>%s</p></div>',
apply_filters('puc_manual_check_message-' . $this->slug, $message, $status)
);
}
}
/**
* Check if the plugin file is inside the mu-plugins directory.
*
* @return bool
*/
protected function isMuPlugin() {
static $cachedResult = null;
if ( $cachedResult === null ) {
//Convert both paths to the canonical form before comparison.
$muPluginDir = realpath(WPMU_PLUGIN_DIR);
$pluginPath = realpath($this->pluginAbsolutePath);
if(!empty($muPluginDir)){
$cachedResult = (strpos($pluginPath, $muPluginDir) === 0);
}else{
$cachedResult = false;
}
}
return $cachedResult;
}
/**
* MU plugins are partially supported, but only when we know which file in mu-plugins
* corresponds to this plugin.
*
* @return bool
*/
protected function isUnknownMuPlugin() {
return empty($this->muPluginFile) && $this->isMuPlugin();
}
/**
* Clear the cached plugin version. This method can be set up as a filter (hook) and will
* return the filter argument unmodified.
*
* @param mixed $filterArgument
* @return mixed
*/
public function clearCachedVersion($filterArgument = null) {
$this->cachedInstalledVersion = null;
return $filterArgument;
}
/**
* Get absolute path to the main plugin file.
*
* @return string
*/
public function getAbsolutePath() {
return $this->pluginAbsolutePath;
}
/**
* Register a callback for filtering query arguments.
*
* The callback function should take one argument - an associative array of query arguments.
* It should return a modified array of query arguments.
*
* @uses add_filter() This method is a convenience wrapper for add_filter().
*
* @param callable $callback
* @return void
*/
public function addQueryArgFilter($callback){
add_filter('puc_request_info_query_args-'.$this->slug, $callback);
}
/**
* Register a callback for filtering arguments passed to wp_remote_get().
*
* The callback function should take one argument - an associative array of arguments -
* and return a modified array or arguments. See the WP documentation on wp_remote_get()
* for details on what arguments are available and how they work.
*
* @uses add_filter() This method is a convenience wrapper for add_filter().
*
* @param callable $callback
* @return void
*/
public function addHttpRequestArgFilter($callback){
add_filter('puc_request_info_options-'.$this->slug, $callback);
}
/**
* Register a callback for filtering the plugin info retrieved from the external API.
*
* The callback function should take two arguments. If the plugin info was retrieved
* successfully, the first argument passed will be an instance of PopularFXInfo. Otherwise,
* it will be NULL. The second argument will be the corresponding return value of
* wp_remote_get (see WP docs for details).
*
* The callback function should return a new or modified instance of PopularFXInfo or NULL.
*
* @uses add_filter() This method is a convenience wrapper for add_filter().
*
* @param callable $callback
* @return void
*/
public function addResultFilter($callback){
add_filter('puc_request_info_result-'.$this->slug, $callback, 10, 2);
}
/**
* Register a callback for one of the update checker filters.
*
* Identical to add_filter(), except it automatically adds the "puc_" prefix
* and the "-$plugin_slug" suffix to the filter name. For example, "request_info_result"
* becomes "puc_request_info_result-your_plugin_slug".
*
* @param string $tag
* @param callable $callback
* @param int $priority
* @param int $acceptedArgs
*/
public function addFilter($tag, $callback, $priority = 10, $acceptedArgs = 1) {
add_filter('puc_' . $tag . '-' . $this->slug, $callback, $priority, $acceptedArgs);
}
/**
* Initialize the update checker Debug Bar plugin/add-on thingy.
*/
public function initDebugBarPanel() {
$debugBarPlugin = dirname(__FILE__) . '/debug-bar-plugin.php';
if ( class_exists('Debug_Bar', false) && file_exists($debugBarPlugin) ) {
/** @noinspection PhpIncludeInspection */
require_once $debugBarPlugin;
$this->debugBarPlugin = new PopularFX_PucDebugBarPlugin_3_2($this);
}
}
/**
* Trigger a PHP error, but only when $debugMode is enabled.
*
* @param string $message
* @param int $errorType
*/
protected function triggerError($message, $errorType) {
if ( $this->debugMode ) {
trigger_error($message, $errorType);
}
}
}
endif;
if ( !class_exists('PopularFXInfo_3_2', false) ):
/**
* A container class for holding and transforming various plugin metadata.
*
* @author Janis Elsts
* @copyright 2016
* @version 3.2
* @access public
*/
class PopularFXInfo_3_2 {
//Most fields map directly to the contents of the plugin's info.json file.
//See the relevant docs for a description of their meaning.
public $name;
public $slug;
public $version;
public $homepage;
public $sections = array();
public $banners;
public $translations = array();
public $download_url;
public $author;
public $author_homepage;
public $requires;
public $tested;
public $upgrade_notice;
public $rating;
public $num_ratings;
public $downloaded;
public $active_installs;
public $last_updated;
public $id = 0; //The native WP.org API returns numeric plugin IDs, but they're not used for anything.
public $filename; //Plugin filename relative to the plugins directory.
/**
* Create a new instance of PopularFXInfo from JSON-encoded plugin info
* returned by an external update API.
*
* @param string $json Valid JSON string representing plugin info.
* @return PopularFXInfo_3_2|null New instance of PopularFXInfo, or NULL on error.
*/
public static function fromJson($json){
/** @var StdClass $apiResponse */
$apiResponse = json_decode($json);
if ( empty($apiResponse) || !is_object($apiResponse) ){
trigger_error(
"Failed to parse plugin metadata. Try validating your .json file with http://jsonlint.com/",
E_USER_NOTICE
);
return null;
}
$valid = self::validateMetadata($apiResponse);
if ( is_wp_error($valid) ){
trigger_error($valid->get_error_message(), E_USER_NOTICE);
return null;
}
$info = new self();
foreach(get_object_vars($apiResponse) as $key => $value){
$info->$key = $value;
}
//json_decode decodes assoc. arrays as objects. We want it as an array.
$info->sections = (array)$info->sections;
return $info;
}
/**
* Very, very basic validation.
*
* @param StdClass $apiResponse
* @return bool|WP_Error
*/
protected static function validateMetadata($apiResponse) {
if (
!isset($apiResponse->name, $apiResponse->version)
|| empty($apiResponse->name)
|| empty($apiResponse->version)
) {
return new WP_Error(
'puc-invalid-metadata',
"The plugin metadata file does not contain the required 'name' and/or 'version' keys."
);
}
return true;
}
/**
* Transform plugin info into the format used by the native WordPress.org API
*
* @return object
*/
public function toWpFormat(){
$info = new stdClass;
//The custom update API is built so that many fields have the same name and format
//as those returned by the native WordPress.org API. These can be assigned directly.
$sameFormat = array(
'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice',
'num_ratings', 'downloaded', 'active_installs', 'homepage', 'last_updated',
);
foreach($sameFormat as $field){
if ( isset($this->$field) ) {
$info->$field = $this->$field;
} else {
$info->$field = null;
}
}
//Other fields need to be renamed and/or transformed.
$info->download_link = $this->download_url;
$info->author = $this->getFormattedAuthor();
$info->sections = array_merge(array('description' => ''), $this->sections);
if ( !empty($this->banners) ) {
//WP expects an array with two keys: "high" and "low". Both are optional.
//Docs: https://wordpress.org/plugins/about/faq/#banners
$info->banners = is_object($this->banners) ? get_object_vars($this->banners) : $this->banners;
$info->banners = array_intersect_key($info->banners, array('high' => true, 'low' => true));
}
return $info;
}
protected function getFormattedAuthor() {
if ( !empty($this->author_homepage) ){
return sprintf('<a href="%s">%s</a>', $this->author_homepage, $this->author);
}
return $this->author;
}
}
endif;
if ( !class_exists('PopularFXUpdate_3_2', false) ):
/**
* A simple container class for holding information about an available update.
*
* @author Janis Elsts
* @copyright 2016
* @version 3.2
* @access public
*/
class PopularFXUpdate_3_2 {
public $id = 0;
public $slug;
public $version;
public $homepage;
public $download_url;
public $upgrade_notice;
public $tested;
public $translations = array();
public $filename; //Plugin filename relative to the plugins directory.
private static $fields = array(
'id', 'slug', 'version', 'homepage', 'tested',
'download_url', 'upgrade_notice', 'filename',
'translations'
);
/**
* Create a new instance of PopularFXUpdate from its JSON-encoded representation.
*
* @param string $json
* @return PopularFXUpdate_3_2|null
*/
public static function fromJson($json){
//Since update-related information is simply a subset of the full plugin info,
//we can parse the update JSON as if it was a plugin info string, then copy over
//the parts that we care about.
$pluginInfo = PopularFXInfo_3_2::fromJson($json);
if ( $pluginInfo != null ) {
return self::fromPopularFXInfo($pluginInfo);
} else {
return null;
}
}
/**
* Create a new instance of PopularFXUpdate based on an instance of PopularFXInfo.
* Basically, this just copies a subset of fields from one object to another.
*
* @param PopularFXInfo_3_2 $info
* @return PopularFXUpdate_3_2
*/
public static function fromPopularFXInfo($info){
return self::fromObject($info);
}
/**
* Create a new instance of PopularFXUpdate by copying the necessary fields from
* another object.
*
* @param StdClass|PopularFXInfo_3_2|PopularFXUpdate_3_2 $object The source object.
* @return PopularFXUpdate_3_2 The new copy.
*/
public static function fromObject($object) {
$update = new self();
$fields = self::$fields;
if ( !empty($object->slug) ) {
$fields = apply_filters('puc_retain_fields-' . $object->slug, $fields);
}
foreach($fields as $field){
if (property_exists($object, $field)) {
$update->$field = $object->$field;
}
}
return $update;
}
/**
* Create an instance of StdClass that can later be converted back to
* a PopularFXUpdate. Useful for serialization and caching, as it avoids
* the "incomplete object" problem if the cached value is loaded before
* this class.
*
* @return StdClass
*/
public function toStdClass() {
$object = new stdClass();
$fields = self::$fields;
if ( !empty($this->slug) ) {
$fields = apply_filters('puc_retain_fields-' . $this->slug, $fields);
}
foreach($fields as $field){
if (property_exists($this, $field)) {
$object->$field = $this->$field;
}
}
return $object;
}
/**
* Transform the update into the format used by WordPress native plugin API.
*
* @return object
*/
public function toWpFormat(){
$update = new stdClass;
$update->id = $this->id;
$update->slug = $this->slug;
$update->new_version = $this->version;
$update->url = $this->homepage;
$update->package = $this->download_url;
$update->tested = $this->tested;
$update->plugin = $this->filename;
if ( !empty($this->upgrade_notice) ){
$update->upgrade_notice = $this->upgrade_notice;
}
return $update;
}
}
endif;
if ( !class_exists('PopularFX_PucScheduler_3_2', false) ):
/**
* The scheduler decides when and how often to check for updates.
* It calls @see PopularFXUpdateChecker::checkForUpdates() to perform the actual checks.
*
* @version 3.2
*/
class PopularFX_PucScheduler_3_2 {
public $checkPeriod = 12; //How often to check for updates (in hours).
public $throttleRedundantChecks = false; //Check less often if we already know that an update is available.
public $throttledCheckPeriod = 72;
/**
* @var PopularFXUpdateChecker_3_2
*/
protected $updateChecker;
private $cronHook = null;
/**
* Scheduler constructor.
*
* @param PopularFXUpdateChecker_3_2 $updateChecker
* @param int $checkPeriod How often to check for updates (in hours).
*/
public function __construct($updateChecker, $checkPeriod) {
$this->updateChecker = $updateChecker;
$this->checkPeriod = $checkPeriod;
//Set up the periodic update checks
$this->cronHook = 'check_plugin_updates-' . $this->updateChecker->slug;
if ( $this->checkPeriod > 0 ){
//Trigger the check via Cron.
//Try to use one of the default schedules if possible as it's less likely to conflict
//with other plugins and their custom schedules.
$defaultSchedules = array(
1 => 'hourly',
12 => 'twicedaily',
24 => 'daily',
);
if ( array_key_exists($this->checkPeriod, $defaultSchedules) ) {
$scheduleName = $defaultSchedules[$this->checkPeriod];
} else {
//Use a custom cron schedule.
$scheduleName = 'every' . $this->checkPeriod . 'hours';
add_filter('cron_schedules', array($this, '_addCustomSchedule'));
}
if ( !wp_next_scheduled($this->cronHook) && !defined('WP_INSTALLING') ) {
wp_schedule_event(time(), $scheduleName, $this->cronHook);
}
add_action($this->cronHook, array($this, 'maybeCheckForUpdates'));
register_deactivation_hook($this->updateChecker->pluginFile, array($this, '_removeUpdaterCron'));
//In case Cron is disabled or unreliable, we also manually trigger
//the periodic checks while the user is browsing the Dashboard.
add_action( 'admin_init', array($this, 'maybeCheckForUpdates') );
//Like WordPress itself, we check more often on certain pages.
/** @see wp_update_plugins */
add_action('load-update-core.php', array($this, 'maybeCheckForUpdates'));
add_action('load-plugins.php', array($this, 'maybeCheckForUpdates'));
add_action('load-update.php', array($this, 'maybeCheckForUpdates'));
//This hook fires after a bulk update is complete.
add_action('upgrader_process_complete', array($this, 'maybeCheckForUpdates'), 11, 0);
} else {
//Periodic checks are disabled.
wp_clear_scheduled_hook($this->cronHook);
}
}
/**
* Check for updates if the configured check interval has already elapsed.
* Will use a shorter check interval on certain admin pages like "Dashboard -> Updates" or when doing cron.
*
* You can override the default behaviour by using the "puc_check_now-$slug" filter.
* The filter callback will be passed three parameters:
* - Current decision. TRUE = check updates now, FALSE = don't check now.
* - Last check time as a Unix timestamp.
* - Configured check period in hours.
* Return TRUE to check for updates immediately, or FALSE to cancel.
*
* This method is declared public because it's a hook callback. Calling it directly is not recommended.
*/
public function maybeCheckForUpdates(){
if ( empty($this->checkPeriod) ){
return;
}
$state = $this->updateChecker->getUpdateState();
$shouldCheck =
empty($state) ||
!isset($state->lastCheck) ||
( (time() - $state->lastCheck) >= $this->getEffectiveCheckPeriod() );
//Let plugin authors substitute their own algorithm.
$shouldCheck = apply_filters(
'puc_check_now-' . $this->updateChecker->slug,
$shouldCheck,
(!empty($state) && isset($state->lastCheck)) ? $state->lastCheck : 0,
$this->checkPeriod
);
if ( $shouldCheck ) {
$this->updateChecker->checkForUpdates();
}
}
/**
* Calculate the actual check period based on the current status and environment.
*
* @return int Check period in seconds.
*/
protected function getEffectiveCheckPeriod() {
$currentFilter = current_filter();
if ( in_array($currentFilter, array('load-update-core.php', 'upgrader_process_complete')) ) {
//Check more often when the user visits "Dashboard -> Updates" or does a bulk update.
$period = 60;
} else if ( in_array($currentFilter, array('load-plugins.php', 'load-update.php')) ) {
//Also check more often on the "Plugins" page and /wp-admin/update.php.
$period = 3600;
} else if ( $this->throttleRedundantChecks && ($this->updateChecker->getUpdate() !== null) ) {
//Check less frequently if it's already known that an update is available.
$period = $this->throttledCheckPeriod * 3600;
} else if ( defined('DOING_CRON') && constant('DOING_CRON') ) {
//WordPress cron schedules are not exact, so lets do an update check even
//if slightly less than $checkPeriod hours have elapsed since the last check.
$cronFuzziness = 20 * 60;
$period = $this->checkPeriod * 3600 - $cronFuzziness;
} else {
$period = $this->checkPeriod * 3600;
}
return $period;
}
/**
* Add our custom schedule to the array of Cron schedules used by WP.
*
* @param array $schedules
* @return array
*/
public function _addCustomSchedule($schedules){
if ( $this->checkPeriod && ($this->checkPeriod > 0) ){
$scheduleName = 'every' . $this->checkPeriod . 'hours';
$schedules[$scheduleName] = array(
'interval' => $this->checkPeriod * 3600,
'display' => sprintf('Every %d hours', $this->checkPeriod),
);
}
return $schedules;
}
/**
* Remove the scheduled cron event that the library uses to check for updates.
*
* @return void
*/
public function _removeUpdaterCron(){
wp_clear_scheduled_hook($this->cronHook);
}
/**
* Get the name of the update checker's WP-cron hook. Mostly useful for debugging.
*
* @return string
*/
public function getCronHookName() {
return $this->cronHook;
}
}
endif;
if ( !class_exists('PopularFX_PucUpgraderStatus_3_2', false) ):
/**
* A utility class that helps figure out which plugin WordPress is upgrading.
*
* It may seem strange to have an separate class just for that, but the task is surprisingly complicated.
* Core classes like Plugin_Upgrader don't expose the plugin file name during an in-progress update (AFAICT).
* This class uses a few workarounds and heuristics to get the file name.
*/
class PopularFX_PucUpgraderStatus_3_2 {
private $upgradedPluginFile = null; //The plugin that is currently being upgraded by WordPress.
public function __construct() {
//Keep track of which plugin WordPress is currently upgrading.
add_filter('upgrader_pre_install', array($this, 'setUpgradedPlugin'), 10, 2);
add_filter('upgrader_package_options', array($this, 'setUpgradedPluginFromOptions'), 10, 1);
add_filter('upgrader_post_install', array($this, 'clearUpgradedPlugin'), 10, 1);
add_action('upgrader_process_complete', array($this, 'clearUpgradedPlugin'), 10, 1);
}
/**
* Is there and update being installed RIGHT NOW, for a specific plugin?
*
* Caution: This method is unreliable. WordPress doesn't make it easy to figure out what it is upgrading,
* and upgrader implementations are liable to change without notice.
*
* @param string $pluginFile The plugin to check.
* @param WP_Upgrader|null $upgrader The upgrader that's performing the current update.
* @return bool True if the plugin identified by $pluginFile is being upgraded.
*/
public function isPluginBeingUpgraded($pluginFile, $upgrader = null) {
if ( isset($upgrader) ) {
$upgradedPluginFile = $this->getPluginBeingUpgradedBy($upgrader);
if ( !empty($upgradedPluginFile) ) {
$this->upgradedPluginFile = $upgradedPluginFile;
}
}
return ( !empty($this->upgradedPluginFile) && ($this->upgradedPluginFile === $pluginFile) );
}
/**
* Get the file name of the plugin that's currently being upgraded.
*
* @param Plugin_Upgrader|WP_Upgrader $upgrader
* @return string|null
*/
private function getPluginBeingUpgradedBy($upgrader) {
if ( !isset($upgrader, $upgrader->skin) ) {
return null;
}
//Figure out which plugin is being upgraded.
$pluginFile = null;
$skin = $upgrader->skin;
if ( $skin instanceof Plugin_Upgrader_Skin ) {
if ( isset($skin->plugin) && is_string($skin->plugin) && ($skin->plugin !== '') ) {
$pluginFile = $skin->plugin;
}
} elseif ( isset($skin->plugin_info) && is_array($skin->plugin_info) ) {
//This case is tricky because Bulk_Plugin_Upgrader_Skin (etc) doesn't actually store the plugin
//filename anywhere. Instead, it has the plugin headers in $plugin_info. So the best we can
//do is compare those headers to the headers of installed plugins.
$pluginFile = $this->identifyPluginByHeaders($skin->plugin_info);
}
return $pluginFile;
}
/**
* Identify an installed plugin based on its headers.
*
* @param array $searchHeaders The plugin file header to look for.
* @return string|null Plugin basename ("foo/bar.php"), or NULL if we can't identify the plugin.
*/
private function identifyPluginByHeaders($searchHeaders) {
if ( !function_exists('get_plugins') ){
/** @noinspection PhpIncludeInspection */
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
}
$installedPlugins = get_plugins();
$matches = array();
foreach($installedPlugins as $pluginBasename => $headers) {
$diff1 = array_diff_assoc($headers, $searchHeaders);
$diff2 = array_diff_assoc($searchHeaders, $headers);
if ( empty($diff1) && empty($diff2) ) {
$matches[] = $pluginBasename;
}
}
//It's possible (though very unlikely) that there could be two plugins with identical
//headers. In that case, we can't unambiguously identify the plugin that's being upgraded.
if ( count($matches) !== 1 ) {
return null;
}
return reset($matches);
}
/**
* @access private
*
* @param mixed $input
* @param array $hookExtra
* @return mixed Returns $input unaltered.
*/
public function setUpgradedPlugin($input, $hookExtra) {
if (!empty($hookExtra['plugin']) && is_string($hookExtra['plugin'])) {
$this->upgradedPluginFile = $hookExtra['plugin'];
} else {
$this->upgradedPluginFile = null;
}
return $input;
}
/**
* @access private
*
* @param array $options
* @return array
*/
public function setUpgradedPluginFromOptions($options) {
if (isset($options['hook_extra']['plugin']) && is_string($options['hook_extra']['plugin'])) {
$this->upgradedPluginFile = $options['hook_extra']['plugin'];
} else {
$this->upgradedPluginFile = null;
}
return $options;
}
/**
* @access private
*
* @param mixed $input
* @return mixed Returns $input unaltered.
*/
public function clearUpgradedPlugin($input = null) {
$this->upgradedPluginFile = null;
return $input;
}
}
endif;
if ( !class_exists('PopularFX_PucFactory', false) ):
/**
* A factory that builds instances of other classes from this library.
*
* When multiple versions of the same class have been loaded (e.g. PopularFXUpdateChecker 1.2
* and 1.3), this factory will always use the latest available version. Register class
* versions by calling {@link PopularFX_PucFactory::addVersion()}.
*
* At the moment it can only build instances of the PopularFXUpdateChecker class. Other classes
* are intended mainly for internal use and refer directly to specific implementations. If you
* want to instantiate one of them anyway, you can use {@link PopularFX_PucFactory::getLatestClassVersion()}
* to get the class name and then create it with <code>new $class(...)</code>.
*/
class PopularFX_PucFactory {
protected static $classVersions = array();
protected static $sorted = false;
/**
* Create a new instance of PopularFXUpdateChecker.
*
* @see PopularFXUpdateChecker::__construct()
*
* @param $metadataUrl
* @param $pluginFile
* @param string $slug
* @param int $checkPeriod
* @param string $optionName
* @param string $muPluginFile
* @return PopularFXUpdateChecker_3_2
*/
public static function buildUpdateChecker($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') {
$class = self::getLatestClassVersion('PopularFXUpdateChecker');
return new $class($metadataUrl, $pluginFile, $slug, $checkPeriod, $optionName, $muPluginFile);
}
/**
* Get the specific class name for the latest available version of a class.
*
* @param string $class
* @return string|null
*/
public static function getLatestClassVersion($class) {
if ( !self::$sorted ) {
self::sortVersions();
}
if ( isset(self::$classVersions[$class]) ) {
return reset(self::$classVersions[$class]);
} else {
return null;
}
}
/**
* Sort available class versions in descending order (i.e. newest first).
*/
protected static function sortVersions() {
foreach ( self::$classVersions as $class => $versions ) {
uksort($versions, array(__CLASS__, 'compareVersions'));
self::$classVersions[$class] = $versions;
}
self::$sorted = true;
}
protected static function compareVersions($a, $b) {
return -version_compare($a, $b);
}
/**
* Register a version of a class.
*
* @access private This method is only for internal use by the library.
*
* @param string $generalClass Class name without version numbers, e.g. 'PopularFXUpdateChecker'.
* @param string $versionedClass Actual class name, e.g. 'PopularFXUpdateChecker_1_2'.
* @param string $version Version number, e.g. '1.2'.
*/
public static function addVersion($generalClass, $versionedClass, $version) {
if ( !isset(self::$classVersions[$generalClass]) ) {
self::$classVersions[$generalClass] = array();
}
self::$classVersions[$generalClass][$version] = $versionedClass;
self::$sorted = false;
}
}
endif;
//Register classes defined in this file with the factory.
PopularFX_PucFactory::addVersion('PopularFXUpdateChecker', 'PopularFXUpdateChecker_3_2', '3.2');
PopularFX_PucFactory::addVersion('PopularFXUpdate', 'PopularFXUpdate_3_2', '3.2');
PopularFX_PucFactory::addVersion('PopularFXInfo', 'PopularFXInfo_3_2', '3.2');
PopularFX_PucFactory::addVersion('PopularFX_PucGitHubChecker', 'PopularFX_PucGitHubChecker_3_2', '3.2');
PK �f\@��j �j popularfx-templates.phpnu �[��� <?php
/*
Plugin Name: PopularFX Website Templates
Plugin URI: https://popularfx.com/
Description: PopularFX is a lightweight theme with 500+ templates to make beautiful websites with Pagelayer. PopularFX can be used for a blogging site, WooCommerce Store, Business website, personal portfolio, etc.
Version: 1.3.1
Author: Pagelayer Team
Author URI: https://pagelayer.com/
Text Domain: popularfx
*/
// We need the ABSPATH
if (!defined('ABSPATH')) exit;
if(!function_exists('add_action')){
echo 'You are not allowed to access this page directly.';
exit;
}
define('PFX_FILE', __FILE__);
define('PFX_BASE', plugin_basename(PFX_FILE));
define('PFX_PRO_BASE', 'popularfx-templates/popularfx-templates.php');
define('PFX_VERSION', '1.3.1');
define('PFX_DIR', dirname(PFX_FILE));
define('PFX_SLUG', 'popularfx-templates');
define('PFX_URL', plugins_url('', PFX_FILE));
define('PFX_CSS', PFX_URL.'/css');
define('PFX_JS', PFX_URL.'/js');
define('PFX_PRO_URL', 'https://popularfx.com/pricing?from=pfx-plugin');
define('PFX_WWW_URL', 'https://popularfx.com/');
define('PFX_DOCS', 'https://popularfx.com/docs/');
define('PFX_API', 'https://a.softaculous.com/popularfx/');
define('PFX_PAGELAYER_API', 'https://api.pagelayer.com/');
// Ok so we are now ready to go
register_activation_hook(PFX_FILE, 'pfx_activation');
// Is called when the ADMIN enables the plugin
function pfx_activation(){
global $wpdb;
$sql = array();
add_option('popularfx_version', PFX_VERSION);
}
// Checks if we are to update ?
function pfx_update_check(){
global $wpdb;
$sql = array();
$current_version = get_option('popularfx_version');
$version = (int) str_replace('.', '', $current_version);
// No update required
if($current_version == PFX_VERSION){
return true;
}
// Is it first run ?
if(empty($current_version)){
// Reinstall
pfx_activation();
// Trick the following if conditions to not run
$version = (int) str_replace('.', '', PFX_VERSION);
}
// Save the new Version
update_option('popularfx_version', PFX_VERSION);
// Bug fix prior to 108 - We can only attempt this once
if($version <= 108 && get_option('template') == 'popularfx'){
$template = get_theme_mod('popularfx_template');
$template_dir = get_template_directory().'/templates/'.$template;
$style = $template_dir.'/style.css';
$dest = pfx_templates_dir().'/'.$template;
if(!empty($template) && file_exists($style)){
if(!function_exists( 'download_url' ) ) {
require_once ABSPATH . 'wp-admin/includes/file.php';
}
define('FS_METHOD', 'direct');
WP_Filesystem();
// Create the dir if missing
wp_mkdir_p($dest);
// Just copy the dir
copy_dir($template_dir, $dest);
if(file_exists($dest.'/style.css')){
pfx_fix_image_urls_108();
}
}
}
$pagelayer_tmp_plugins = get_option('active_plugins');
// Is the premium plugin loaded ?
if(!defined('SITEPAD') && in_array('pagelayer-pro/pagelayer-pro.php', $pagelayer_tmp_plugins) ){
// Was introduced in 1.8.8
$pagelayer_pro_info = get_option('pagelayer_pro_version');
if(!empty($pagelayer_pro_info) && version_compare($pagelayer_pro_info, '1.8.8', '>=')){
// Dont do anything
// Lets check for older versions
}else{
if(!function_exists( 'get_plugins' )){
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$pagelayer_pro_info = get_plugins('/pagelayer-pro');
if(
!empty($pagelayer_pro_info) &&
!empty($pagelayer_pro_info['pagelayer-pro.php']) &&
version_compare($pagelayer_pro_info['pagelayer-pro.php']['Version'], '1.8.6', '>=')
){
ob_start();
pfx_install_pagelayer(true);
ob_end_clean();
}
}
}
}
// Add the action to load the plugin
add_action('plugins_loaded', 'pfx_load_plugin');
// The function that will be called when the plugin is loaded
function pfx_load_plugin(){
global $pagelayer, $popularfx;
// Load license
pfx_load_license();
// Check if the installed version is outdated
pfx_update_check();
// Load the language
load_plugin_textdomain('popularfx', false, PFX_SLUG.'/languages/');
// Check for updates
include_once(PFX_DIR.'/plugin-update-checker.php');
$popularfx_updater = PopularFX_PucFactory::buildUpdateChecker(pfx_api_url().'update2.php?version='.PFX_VERSION, PFX_FILE);
// Add the license key to query arguments
$popularfx_updater->addQueryArgFilter('pfx_updater_filter_args');
// Show the text to install the license key
add_filter('puc_manual_final_check_link-pagelayer-pro', 'pfx_updater_check_link', 10, 1);
// Template Installation related ajax calls
add_action('wp_ajax_popularfx_template_info', 'pfx_templates_ajax');
add_action('wp_ajax_popularfx_start_install_template', 'pfx_templates_ajax');
add_action('wp_ajax_popularfx_download_template', 'pfx_templates_ajax');
add_action('wp_ajax_popularfx_import_template', 'pfx_templates_ajax');
// Load the freemium widgets
if(!defined('PAGELAYER_PREMIUM')){
add_action('pagelayer_load_custom_widgets', 'pfx_freemium_shortcodes');
}
// Are we to setup a template ?
$slug = get_option('popularfx_setup_template');
if(!empty($slug)){
add_action('after_setup_theme', 'pfx_setup_template_import');
}
}
// Setup import
function pfx_setup_template_import(){
$slug = get_option('popularfx_setup_template');
// We dont have to setup anything
if(empty($slug)){
return;
}
// Setup the theme credit
update_option('pagelayer-copyright', pagelayer_get_option('pagelayer-copyright').' | '.popularfx_copyright());
// Set that we have setup
delete_option('popularfx_setup_template');
include_once(dirname(__FILE__).'/templates.php');
$_POST['delete_old_import'] = 1;
$_POST['set_home_page'] = 1;
$data = popularfx_import_template($slug);
if(!empty($_GET['install-pfx-template'])){
popularfx_ajax_output($data);
}else{
wp_redirect(home_url());
}
exit();
}
// Load the freemium widgets
function pfx_freemium_shortcodes(){
if(defined('PAGELAYER_PREMIUM')){
return;
}
include_once(dirname(__FILE__).'/freemium_functions.php');
include_once(dirname(__FILE__).'/freemium.php');
}
// Add our license key if ANY
function pfx_updater_filter_args($queryArgs) {
global $popularfx;
if ( !empty($popularfx['license']['license']) ) {
$queryArgs['license'] = $popularfx['license']['license'];
}
$queryArgs['url'] = rawurlencode(site_url());
return $queryArgs;
}
// Handle the Check for update link and ask to install license key
function pfx_updater_check_link($final_link){
global $popularfx;
if(empty($popularfx['license']['license'])){
return '<a href="'.admin_url('admin.php?page=popularfx').'">Install PopularFX Pro License Key</a>';
}
return $final_link;
}
// This adds the left menu in WordPress Admin page
add_action('admin_menu', 'pfx_admin_menu', 5);
function pfx_admin_menu() {
$capability = 'edit_theme_options';// TODO : Capability for accessing this page
// Add the menu page
add_menu_page(__('PopularFX'), __('PopularFX'), $capability, 'popularfx', 'pfx_page_handler', PFX_URL.'/images/popularfx-logo-menu.png');
// Options Page
add_submenu_page('popularfx', __('PopularFX'), __('Options'), $capability, 'popularfx', 'pfx_page_handler');
// PopularFX Templates
add_submenu_page('popularfx', __('Website Templates'), __('Website Templates'), $capability, 'popularfx_templates', 'pfx_page_templates');
// Manually Import Template
//add_submenu_page('popularfx', __('Manual Import'), __('Manual Import'), $capability, 'popularfx_manual_import', 'pfx_manual_import');
if(!function_exists('pagelayer_theme_import_notices')){
add_submenu_page('popularfx', 'Install Pagelayer', 'Install Pagelayer', 'install_plugins', 'popularfx_install_pagelayer', 'pfx_install_pagelayer');
}
}
function pfx_install_pagelayer($skin_ajax = false){
global $pagelayer;
if(!empty($_GET['license'])){
return pfx_install_pagelayer_pro();
}
// Include the necessary stuff
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
// Includes necessary for Plugin_Upgrader and Plugin_Installer_Skin
include_once( ABSPATH . 'wp-admin/includes/file.php' );
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
// Filter to prevent the activate text
add_filter('install_plugin_complete_actions', 'pfx_install_pagelayer_complete_actions', 10, 3);
echo '<h2>Install Pagelayer Free Version</h2>';
if( file_exists( WP_PLUGIN_DIR . '/pagelayer/pagelayer.php' ) && is_plugin_inactive( '/pagelayer/pagelayer.php' )) {
echo 'Pagelayer Plugin already installed!';
echo '<br><br>Activating Pagelayer Plugin !';
activate_plugin('/pagelayer/pagelayer.php');
echo '<br><br><b>Done! Pagelayer is activated.</b>';
return true;
}
$skin = !empty($skin_ajax)? new WP_Ajax_Upgrader_Skin() : new Plugin_Installer_Skin();
$upgrader = new Plugin_Upgrader( $skin );
$installed = $upgrader->install('https://downloads.wordpress.org/plugin/pagelayer.zip');
if(is_wp_error( $installed ) || empty($installed)){
return $installed;
}
if ( !is_wp_error( $installed ) && $installed ) {
echo 'Activating Pagelayer Plugin !';
$installed = activate_plugin('pagelayer/pagelayer.php');
if ( is_null($installed)) {
$installed = true;
echo '<div id="message" class="updated"><p>'. sprintf(__('Done! Pagelayer is now installed and activated. Please click <a href="%s">here</a> to import your themes content', 'popularfx'), admin_url('admin.php?page=pagelayer_import')). '</p></div><br />';
echo '<br><br><b>Done! Pagelayer is now installed and activated.</b>';
}
}
return $installed;
}
// Install Pagelayer Pro
function pfx_install_pagelayer_pro($license = ''){
global $pagelayer;
$license = empty($license) ? $_GET['license'] : $license;
// Include the necessary stuff
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
// Includes necessary for Plugin_Upgrader and Plugin_Installer_Skin
include_once( ABSPATH . 'wp-admin/includes/file.php' );
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
// Filter to prevent the activate text
add_filter('install_plugin_complete_actions', 'pfx_install_pagelayer_complete_actions', 10, 3);
echo '<h2>Install Pagelayer Pro</h2>';
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( ) );
$installed = $upgrader->install(PFX_PAGELAYER_API.'download.php?version=latest&license='.$license.'&url='.rawurlencode(site_url()));
if(is_wp_error( $installed ) || empty($installed)){
return $installed;
}
if ( !is_wp_error( $installed ) && $installed ) {
echo 'Activating Pagelayer Pro !';
$installed = activate_plugin('pagelayer-pro/pagelayer-pro.php');
if ( is_null($installed)) {
$installed = true;
echo '<div id="message" class="updated"><p>'. sprintf(__('Done! Pagelayer Pro is now installed and activated. Please click <a href="%s">here</a> to import your themes content', 'popularfx'), admin_url('admin.php?page=pagelayer_import')). '</p></div><br />';
echo '<br><br><b>Done! Pagelayer Pro is now installed and activated.</b>';
}
}
return $installed;
}
// Prevent pro activate text for installer
function pfx_install_pagelayer_complete_actions($install_actions, $api, $plugin_file){
if($plugin_file == 'pagelayer-pro/pagelayer-pro.php'){
return array();
}
if($plugin_file == 'pagelayer/pagelayer.php'){
return array();
}
return $install_actions;
}
// Show the message to install pagelayer Pro
function pfx_pagelayer_required(){
if($_REQUEST['page'] == 'popularfx_install_pagelayer'){
return;
}
echo '
<div class="notice notice-warning">
<p style="font-size:13px">You need the <a href="'.PFX_WWW_URL.'" target="_blank"><b>Pagelayer Editor</b></a> to run this theme and also import its content ! Please enter your PopularFX / Pagelayer Pro License key and click on <b>Install</b></p>
<p style="font-size:13px">
<input type="text" id="pfx_license_key" placeholder="PFX-XXXXX-XXXXX-XXXXX-XXXXX" size="40" /> <button class="button button-primary" onclick="popularfx_install_pagelayer()">Install</button>
</p>
</div>
<script>
function pfx_install_pagelayer(){
var url = "'.admin_url('admin.php?page=popularfx_install_pagelayer&license=').'"+jQuery("#pfx_license_key").val();
window.location = url;
}
</script>';
}
function pfx_page_templates() {
include_once(dirname(__FILE__).'/templates.php');
popularfx_templates();
}
function pfx_templates_ajax() {
include_once(dirname(__FILE__).'/templates.php');
if($_GET['action'] == 'popularfx_template_info'){
popularfx_ajax_template_info();
}
if($_GET['action'] == 'popularfx_start_install_template'){
popularfx_ajax_start_install_template();
}
if($_GET['action'] == 'popularfx_download_template'){
popularfx_ajax_download_template();
}
if($_GET['action'] == 'popularfx_import_template'){
popularfx_ajax_import_template();
}
}
function pfx_page_handler() {
include_once(dirname(__FILE__).'/license.php');
popularfx_license();
}
// Default Templates for Blog
function pfx_create_blog_template($template_name){
global $pagelayer;
$file = pfx_cleanpath(get_theme_root());
// Do we have the blog template ?
if(file_exists($file.'/blog-template.pgl')){
return;
}
$data['blog-template'] = '[pl_row pagelayer-id="ffbgB5e4xPIruUJC" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
[pl_col pagelayer-id="aF6cze85x0CVnb4I" overlay_hover_delay="400"]
[pl_archive_title pagelayer-id="a6sL2H8c5FJDwHmL" align="left" typo=",,,,,,Solid,,,," ele_margin="0px,0px,18px,0px" font_size="28"]
[/pl_archive_title]
[pl_archive_posts pagelayer-id="CrFuxlpqwrKx1cok" type="default" columns="3" columns_mobile="1" col_gap="20" row_gap="40" data_padding="5,5,5,5" bg_color="#ffffff" show_thumb="true" show_title="true" meta="author,date,comments" meta_sep="|" show_content="excerpt" content_color="#121212" content_align="left" pagination="number_prev_next" thumb_size="medium_large" ratio="0.7" title_color="#0986c0" title_typo=",18,,,,,solid,,,," exc_length="10" pagi_prev_text="Previous" pagi_next_text="Next" pagi_end_size="1" pagi_mid_size="2" pagi_align="center"]
[/pl_archive_posts]
[/pl_col]
[/pl_row]';
$data['single-template'] = '[pl_row pagelayer-id="TeNMIn3gRsvsyDZj" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
[pl_col pagelayer-id="qyP2XV3ClSd9cEWM" overlay_hover_delay="400"]
[pl_post_title pagelayer-id="nNt87422AXwZoBQg" title_color="" typo=",35,,700,,,solid,,,," align="center"]
[/pl_post_title]
[/pl_col]
[/pl_row]
[pl_row pagelayer-id="6UuOjtSrBDhWOnWG" stretch="auto" col_gap="10" width_content="fixed" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100" row_width="70%" fixed_width="70%" fixed_width_tablet="85%" fixed_width_mobile="100%"]
[pl_col pagelayer-id="gzGSF2JVwcPcNUk6" overlay_hover_delay="400" col_width="80" col="12"]
[pl_post_info pagelayer-id="gBDuE9nYBu0bIHyv" layout="vertical" space_between="15" align="center" icon_colors="normal" text_colors="normal"]
[pl_post_info_list pagelayer-id="ZMZjpaTiEc9Ien3t" type="author" info_link="true" info_icon_on="true" info_icon="fas fa-user-circle"]
[/pl_post_info_list]
[pl_post_info_list pagelayer-id="xI8gpn9VRfPDkZ0Q" type="date" info_link="true" info_icon_on="true" info_icon="fas fa-calendar-alt" date_format="default"]
[/pl_post_info_list]
[pl_post_info_list pagelayer-id="LaEZYd9SjEnQHsg3" type="time" info_link="true" info_icon_on="true" info_icon="fas fa-clock" time_format="default"]
[/pl_post_info_list]
[pl_post_info_list pagelayer-id="9lTHiEQJQqESt6YG" type="comments" info_link="true" info_icon_on="true" info_icon="fas fa-comment"]
[/pl_post_info_list]
[/pl_post_info]
[pl_post_excerpt pagelayer-id="NklzzZGW3ve1X8BS" ele_margin="15px,0px,15px,0px" align="left"]
[/pl_post_excerpt]
[pl_featured_img pagelayer-id="sZLiICVhGCbBTx1a" size="full" img_filter="0,100,100,0,0,100,100" caption_color="#0986c0" img_hover_delay="400" custom_size="70%,0%" align="center"]
[/pl_featured_img]
[pl_post_content pagelayer-id="7JbkxQEvq0skyUUl" ele_margin="35px,0px,35px,0px" font_size="NaN"]
[/pl_post_content]
[pl_post_info pagelayer-id="tvno5FCIKdwGa8IE" layout="horizontal" space_between="5" align="left" icon_colors="normal" text_colors="normal" input_typo=",,,,,,Solid,,,,"]
[pl_post_info_list pagelayer-id="SwoZ4cxl3XFMLE3l" type="terms" info_link="true" info_icon_on="" info_icon="fas fa-user-circle" taxonomy="category" info_before="Category :"]
[/pl_post_info_list]
[pl_post_info_list pagelayer-id="sgTqNx5LkBHODkrG" type="terms" info_link="true" info_icon_on="" info_icon="fas fa-user-circle" taxonomy="post_tag" info_before="Tags :"]
[/pl_post_info_list]
[/pl_post_info]
[/pl_col]
[/pl_row]
[pl_row pagelayer-id="heO1UxRj8lIQZ52M" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
[pl_col pagelayer-id="s3sgObVllcHz0CB7" overlay_hover_delay="400"]
[pl_post_nav pagelayer-id="RrRky7duRa9KGmsA" lables="true" post_title="true" arrows="true" sep_color="#bdbdbd" sep_rotate="20" sep_width="5" prev_label="Previous" next_label="Next" label_colors="normal" title_colors="normal" arrows_list="angle" icon_colors="normal"]
[/pl_post_nav]
[/pl_col]
[/pl_row]
[pl_row pagelayer-id="duGtpLrwHkOWbE0m" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
[pl_col pagelayer-id="ad58IjV6dHjcRBmV" overlay_hover_delay="400"]
[pl_post_comment pagelayer-id="bwueyBxPgdNLC1Ec" comment_skin="theme_comment" post_type="current"]
[/pl_post_comment]
[/pl_col]
[/pl_row]';
$conf = '{
"single-template": {
"type": "single",
"title": "Single Template",
"conditions": [
{
"type": "include",
"template": "singular",
"sub_template": "post",
"id": ""
},
{
"type": "include",
"template": "singular",
"sub_template": "attachment",
"id": ""
}
]
},
"blog-template": {
"type": "archive",
"title": "Blog Template",
"conditions": [
{
"type": "include",
"template": "archives",
"sub_template": "",
"id": ""
}
]
}
}';
$pgl = json_decode($conf, true);
// Loop the default template
foreach($pgl as $k => $v){
$new_post = array();
// Is the page there ?
$template = get_page_by_path($k, OBJECT, $pagelayer->builder['name']);
// It does exist so save the revision IF its the header and footer
if(!empty($template)){
$rev = wp_save_post_revision($template->ID);
// Did we save the rev ?
//if(empty($rev)){
// TODO : Throw error
//}
$new_post['ID'] = $template->ID;
}
// Make an array
$new_post['post_content'] = $data[$k];
$new_post['post_title'] = $v['title'];
$new_post['post_name'] = $k;
$new_post['post_type'] = $pagelayer->builder['name'];
$new_post['post_status'] = 'publish';
$new_post['comment_status'] = 'closed';
$new_post['ping_status'] = 'closed';
//pagelayer_print($new_post);die();
// Now insert / update the post
$ret = pagelayer_insert_content($new_post, $err);
$post_id = $ret;
// Did we save the rev ?
if(empty($ret)){
die('Could not update the Pagelayer Template '.$k);
}
// Save our template type
update_post_meta($post_id, 'pagelayer_template_type', $v['type']);
update_post_meta($post_id, 'pagelayer_template_conditions', $v['conditions']);
update_post_meta($post_id, 'pagelayer_imported_content', $template_name);
}
}
// Load license data
function pfx_load_license($parent = 0){
global $popularfx, $pagelayer, $lic_resp;
$license_field = 'popularfx_license';
$license_api_url = PFX_API;
// Save license
if(!empty($parent) && is_string($parent) && strlen($parent) > 5){
$lic['license'] = $parent;
// Load license of Soft Pro
}elseif(!empty($parent)){
$license_field = 'softaculous_pro_license';
$lic = get_option('softaculous_pro_license', []);
// My license
}else{
$lic = get_option($license_field, []);
}
// Loaded license is a Soft Pro
if(!empty($lic['license']) && preg_match('/^softwp/is', $lic['license'])){
$license_field = 'softaculous_pro_license';
$license_api_url = 'https://a.softaculous.com/softwp/';
$prods = apply_filters('softaculous_pro_products', []);
}else{
$prods = [];
}
if(empty($lic['last_update'])){
$lic['last_update'] = time() - 86600;
}
// Update license details as well
if(!empty($lic) && !empty($lic['license']) && (time() - @$lic['last_update']) >= 86400){
$url = $license_api_url.'/license.php?license='.$lic['license'].'&prods='.implode(',', $prods).'&url='.rawurlencode(site_url());
$resp = wp_remote_get($url);
$lic_resp = $resp;
//Did we get a response ?
if(is_array($resp)){
$tosave = json_decode($resp['body'], true);
//Is it the license ?
if(!empty($tosave['license'])){
$tosave['last_update'] = time();
update_option($license_field, $tosave);
$lic = $tosave;
}
}
}
// If the license is Free or Expired check for Softaculous Pro license
if(empty($lic) || empty($lic['active'])){
if(function_exists('softaculous_pro_load_license')){
$softaculous_license = softaculous_pro_load_license();
if(!empty($softaculous_license['license']) &&
(!empty($softaculous_license['active']) || empty($lic['license']))
){
$lic = $softaculous_license;
}
}elseif(empty($parent)){
$lic = get_option('softaculous_pro_license', []);
if(!empty($lic)){
return pfx_load_license(1);
}
}
}
if(!empty($lic['license'])){
$popularfx['license'] = $lic;
}
// Add the same license to Pagelayer if we have Pagelayer Pro with an unlicensed value
if(function_exists('pagelayer_theme_import_notices') && empty($pagelayer->license['status']) && !empty($popularfx['license']['status'])){
$pagelayer->license = $popularfx['license'];
}
}
add_filter('softaculous_pro_products', 'popularfx_softaculous_pro_products', 10, 1);
function popularfx_softaculous_pro_products($r = []){
$r['popularfx'] = 'popularfx';
return $r;
}
function pfx_sp_api_url(){
global $popularfx;
return str_replace('/popularfx', '/sitepad', pfx_api_url());
}
function pfx_api_url($main_server = 0, $suffix = 'popularfx'){
global $popularfx;
$r = array(
'https://s0.softaculous.com/a/softwp/',
'https://s1.softaculous.com/a/softwp/',
'https://s2.softaculous.com/a/softwp/',
'https://s3.softaculous.com/a/softwp/',
'https://s4.softaculous.com/a/softwp/',
'https://s5.softaculous.com/a/softwp/',
'https://s7.softaculous.com/a/softwp/',
'https://s8.softaculous.com/a/softwp/'
);
$mirror = $r[array_rand($r)];
// If the license is newly issued, we need to fetch from API only
if(!empty($main_server) || empty($popularfx['license']['last_edit']) ||
(!empty($popularfx['license']['last_edit']) && (time() - 3600) < $popularfx['license']['last_edit'])
){
$mirror = PFX_API;
}
if(!empty($suffix)){
$mirror = str_replace('/softwp', '/'.$suffix, $mirror);
}
return $mirror;
}
// Add settings link on plugin page
add_filter('plugin_action_links_popularfx-templates/popularfx-templates.php', 'pfx_plugin_action_links');
function pfx_plugin_action_links($links){
global $popularfx;
if(empty($popularfx['license']['status'])){
$links[] = '<a href="'.PFX_PRO_URL.'" style="color:#3db634;" target="_blank">'._x('Go Pro', 'Upgrade to PopularFX Pro for many more features', 'popularfx').'</a>';
}
$settings_link = '<a href="admin.php?page=popularfx">Settings</a>';
array_unshift($links, $settings_link);
return $links;
}
// Check if a field is posted via POST else return default value
function pfx_optpost($name, $default = ''){
if(!empty($_POST[$name])){
return pfx_inputsec(pfx_htmlizer(trim($_POST[$name])));
}
return $default;
}
function pfx_inputsec($string){
$string = addslashes($string);
// This is to replace ` which can cause the command to be executed in exec()
$string = str_replace('`', '\`', $string);
return $string;
}
function pfx_htmlizer($string){
$string = htmlentities($string, ENT_QUOTES, 'UTF-8');
preg_match_all('/(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)/', $string, $matches);//r_print($matches);
foreach($matches[1] as $mk => $mv){
$tmp_m = pfx_entity_check($matches[2][$mk]);
$string = str_replace($matches[1][$mk], $tmp_m, $string);
}
return $string;
}
function pfx_entity_check($string){
//Convert Hexadecimal to Decimal
$num = ((substr($string, 0, 1) === 'x') ? hexdec(substr($string, 1)) : (int) $string);
//Squares and Spaces - return nothing
$string = (($num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num < 0x20) ? '' : '&#'.$num.';');
return $string;
}
function pfx_cleanpath($path){
$path = str_replace('\\', '/', $path);
$path = str_replace('//', '/', $path);
return rtrim($path, '/');
}
function pfx_templates_dir(){
$dir = wp_upload_dir(NULL, false);
return $dir['basedir'].'/popularfx-templates';
}
function pfx_templates_dir_url(){
$dir = wp_upload_dir(NULL, false);
return $dir['baseurl'].'/popularfx-templates';
}
// Fix the image URLs for versions prior to 108
function pfx_fix_image_urls_108(){
$template = get_theme_mod('popularfx_template');
// Get list of pages and pagelayer templates to edit
$args = array(
'post_type' => ['page', 'pagelayer-template'],
);
$query = new WP_Query($args);
foreach($query->posts as $k => $v){
$v->post_content = str_replace(get_stylesheet_directory_uri().'/templates/'.$template.'/images/', pfx_templates_dir_url().'/'.$template.'/images/', $v->post_content);
// For fixing wwww.abc.com which may be abc.com only
if(preg_match('/'.preg_quote('/wp-content/themes/popularfx/templates/'.$template.'/images/', '/').'/is', $v->post_content)){
$v->post_content = str_replace('/wp-content/themes/popularfx/templates/'.$template.'/images/', '/wp-content/uploads/popularfx-templates/'.$template.'/images/', $v->post_content);
}
wp_update_post($v);
}
}
add_action('wp_loaded', 'pfx_woo_fix');
function pfx_woo_fix(){
if(class_exists( 'woocommerce' ) && function_exists('pagelayer_template_product_fix')){
pagelayer_template_product_fix();
}
}PK �f\��T�< < images/popularfx-logo.pngnu �[��� �PNG
IHDR <