• File: shortcodes.php
  • Full Path: /home/blwgracecity/jesusexp.org/wp-content/plugins/wp-file-manager/lib/js/commands/shortcodes.php
  • File size: 16 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

//////////////////////////////////////////////////////////////
//===========================================================
// class.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 !');
}

// NOTE :
// 1) There can be a holder or innterHTML for a tag. NOT BOTH
// 2) Groups can have 'html' but need the holder as well then
// 3) innerHTML defines the param to be saved in the shortcode as inner content

// Example of 'show' and 'req' prop attr
// NOTE : There can be only REQ or show
// First preference given to REQ
/*

// Single value
'show' => ['border_hover' => 'normal'],

// Two value i.e. when both the values are true
'show' => ['border_hover' => 'normal',
	'border_type' => 'solid',
],

// Exception i.e. prefix the param name with ! (exclamation)
'show' => ['!border_hover' => 'normal',
	'border_type' => 'solid',
],

// Support for MULTIPLE values of ONE parameter. 
// NOTE : This will be treated as OR for that parameter i.e. if the current value of that parameter is any ONE of the array given
'show' => ['border_hover' => ['normal', 'hover']],

*/

// Example of 'css' prop attr
/*

// Set the value to the parent element
'css' => 'background-color: {{val}}',

// Multiple vals
'css' => [
	'background-color: {{val}}',
	'-webkit-background-color: {{val}}',
	'-moz-background-color: {{val}}',
],

// Multiple vals with some selectors or direct element val
'css' => [
	'{{element}} .class' => 'background-color: {{val}}',
	'-webkit-background-color: {{val}}',
	'-moz-background-color: {{val}}',
],

*/

// Example of 'addAttr' or 'addClass'
/*

// Set the value to the parent element
'addAttr' => 'target="_blank"',

// Multiple vals
'addAttr' => [
	'target="_blank"',
	'href="/"',
	'rel="{{rel}}"',
],

// Multiple vals with some selectors or direct element val
'addAttr' => [
	'{{element}} .class' => 'target="_blank"',
	'href="/"',
	'rel="{{rel}}"',
],

// Define group and set default content if it has inner_row child
'has_group' => [
			'section' => 'params', 
			'prop' => 'elements',
		],
*/

////////////////////////
// Default Styles
////////////////////////
global $pagelayer;

$pagelayer->anim_in_options = array(
	'' => __pl('none'),
	__pl('fading') => [
		'fadeIn' => __pl('fadein'),
		'fadeInDown' => __pl('fadeindown'),
		'fadeInUp' => __pl('fadeinup'),
		'fadeInLeft' => __pl('fadeinleft'),
		'fadeInRight' => __pl('fadeinright'),
	],
	__pl('zooming') => [
		'zoomIn' => __pl('zoomin'),
		'zoomInDown' => __pl('zoomindown'),
		'zoomInUp' => __pl('zoominup'),
		'zoomInLeft' => __pl('zoominleft'),
		'zoomInRight' => __pl('zoominright'),
	],
	__pl('bounceing') => [
		'bounceIn' => __pl('bouncein'),
		'bounceInDown' => __pl('bounceindown'),
		'bounceInUp' => __pl('bounceinup'),
		'bounceInLeft' => __pl('bounceinleft'),
		'bounceInRight' => __pl('bounceinright'),
	],
	__pl('sliding') => [
		'slideInDown' => __pl('slideindown'),
		'slideInUp' => __pl('slideinup'),
		'slideInLeft' => __pl('slideinleft'),
		'slideInRight' => __pl('slideinright'),
	],
	__pl('rotating') => [
		'rotateIn' => __pl('rotatein'),
		'rotateInDown' => __pl('rotateindown'),
		'rotateInUp' => __pl('rotateinup'),
		'rotateInLeft' => __pl('rotateinleft'),
		'rotateInRight' => __pl('rotateinright'),
	],
	__pl('effects') => [
		'lightSpeedIn' => __pl('lightspeedin'),
		'bounce' => __pl('bounce'),
		'pulse' => __pl('pulse'),
		'rubberBand' => __pl('rubberband'),
		'flash' => __pl('flash'),
		'swing' => __pl('swing'),
		'jello' => __pl('jello'),
		'tada' => __pl('tada'),
		'wobble' => __pl('wobble'),
		'rollin' => __pl('rollin'),
		'headShake' => __pl('headshake'),
		'shake' => __pl('shake'),
	],
);

$pagelayer->anim_out_options = array(
	'' => __pl('none'),
	__pl('fading') => [
		'fadeOut' => __pl('fadeout'),
		'fadeOutDown' => __pl('fadeoutdown'),
		'fadeOutUp' => __pl('fadeoutup'),
		'fadeOutLeft' => __pl('fadeoutleft'),
		'fadeOutRight' => __pl('fadeoutright'),
	],
	__pl('zooming') => [
		'zoomOut' => __pl('zoomout'),
		'zoomOutDown' => __pl('zoomoutdown'),
		'zoomOutUp' => __pl('zoomoutup'),
		'zoomOutLeft' => __pl('zoomoutleft'),
		'zoomOutRight' => __pl('zoomoutright'),
	],
	__pl('bounceing') => [
		'bounceOut' => __pl('bounceout'),
		'bounceOutDown' => __pl('bounceoutdown'),
		'bounceOutUp' => __pl('bounceoutup'),
		'bounceOutLeft' => __pl('bounceoutleft'),
		'bounceOutRight' => __pl('bounceoutright'),
	],
	__pl('sliding') => [
		'slideOutDown' => __pl('slideoutdown'),
		'slideOutUp' => __pl('slideoutup'),
		'slideOutLeft' => __pl('slideoutleft'),
		'slideOutRight' => __pl('slideoutright'),
	],
	__pl('rotating') => [
		'rotateOut' => __pl('rotateout'),
		'rotateOutDown' => __pl('rotateoutdown'),
		'rotateOutUp' => __pl('rotateoutup'),
		'rotateOutLeft' => __pl('rotateoutleft'),
		'rotateOutRight' => __pl('rotateoutright'),
	],
	__pl('effects') => [
		'lightSpeedIn' => __pl('lightspeedin'),
		'bounce' => __pl('bounce'),
		'pulse' => __pl('pulse'),
		'rubberBand' => __pl('rubberband'),
		'flash' => __pl('flash'),
		'swing' => __pl('swing'),
		'jello' => __pl('jello'),
		'tada' => __pl('tada'),
		'wobble' => __pl('wobble'),
		'rollin' => __pl('rollin'),
		'headShake' => __pl('headshake'),
		'shake' => __pl('shake'),
	],
);

$pagelayer->slider_arrow_styles = [
	'arrows_bg' => array(
		'type' => 'color',
		'label' => __pl('bg_color'),
		'default' => '#6a6969',
		'css' => [
			'{{element}} .pagelayer-owl-prev' => 'background-color: {{val}} !important',
			'{{element}} .pagelayer-owl-next' => 'background-color: {{val}} !important',
		]
	),
	'arraow_color' => array(
		'type' => 'color',
		'label' => __pl('color'),
		'default' => '#ffffff',
		'css' => [
			'{{element}} .pagelayer-owl-prev' => 'color: {{val}} !important',
			'{{element}} .pagelayer-owl-next' => 'color: {{val}} !important',
		]
	),
	'nav_size' => array(
		'type' => 'slider',
		'label' => __pl('arraow_size'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-prev span' => 'font-size: {{val}}px !important;',
			'{{element}} .pagelayer-owl-next span' => 'font-size: {{val}}px !important;'
		]
	),
	'arraow_bg_size' => array(
		'type' => 'spinner',
		'label' => __pl('background_size'),
		'min' => 0,
		'step' => 1,
		'max' => 500,
		'default' => 20,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-prev' => 'width: {{val}}px; height: {{val}}px',
			'{{element}} .pagelayer-owl-next' => 'width: {{val}}px; height: {{val}}px'
		]
	),
	'arraow_bg_shape' => array(
		'type' => 'spinner',
		'label' => __pl('background_shape'),
		'min' => 0,
		'step' => 1,
		'max' => 100,
		'default' => 20,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-prev' => 'border-radius: {{val}}% !important;',
			'{{element}} .pagelayer-owl-next' => 'border-radius: {{val}}% !important;',
		]
	),
	'arrow_pos_type' => array(
		'type' => 'select',
		'label' => __pl('position'),
		'list' => array(
			'' => __pl('default'),
			'custom' => __pl('custom'),
			'top' => __pl('top'),
			'bottom' => __pl('bottom')
		),
	),
	'arrow_pos_top' => array(
		'label' => __pl('alignment'),
		'type' => 'radio',
		'list' => array(
			'left' => __pl('left'),
			'center' => __pl('center'),
			'right' => __pl('right'),
		),
		'default' => 'center',
		'req' => [ 'arrow_pos_type' => 'top'],
		'addClass' => ['pagelayer-slide-arrow-pos-top'],
		'css' => ['{{element}} .pagelayer-owl-nav' => 'justify-content:{{arrow_pos_top}}']
	),
	'arrow_pos_bottom' => array(
			'label' => __pl('alignment'),
			'type' => 'radio',
			'list' => array(
				'left' => __pl('left'),
				'center' => __pl('center'),
				'right' => __pl('right'),
			),
			'default' => 'center',
			'req' => ['arrow_pos_type' => 'bottom'],
			'addClass' => ['pagelayer-slide-arrow-pos-bottom'],
			'css' => [
				'{{element}} .pagelayer-owl-nav' => 'justify-content:{{arrow_pos_bottom}}'
			]
	),
	'arrow_icon_type' => array(
		'type' => 'select',
		'label' => __pl('icon_type'),
		'list' => array(
			'' => __pl('default'),
			'custom' => __pl('custom'),
		),
	), 
	'arrow_icon' => array(
		'type' => 'icon',
		'label' => __pl('list_icon_label'),
		'show' => ['arrow_icon_style' => ''],
		'default' => 'fas fa-angle-left',
		'addAttr' => ['{{element}} .pagelayer-owl-holder' => 'data-slides-navText="{{arrow_icon}}"'],
		'list' => ['angle-double-left', 'arrow-alt-circle-left', 'arrow-circle-left', 'arrow-left', 'long-arrow-alt-left', 'arrow-alt-circle-left', 'angle-double-left', 'angle-left'],
		'css' => [
			'{{element}} .pagelayer-owl-prev i' => 'font-size: {{nav_size}}px !important;',
			'{{element}} .pagelayer-owl-next i' => 'font-size: {{nav_size}}px !important;' 
		],
		'req' => ['!arrow_icon_type' => '']
	),
	'arrow_pos_style' => array(
		'type' => 'radio',
		'label' => __pl('arrow_pos'),
		'list' => array(
			'' => __pl('left_arrow'),
			'right' => __pl('right_arrow'),
		),
		'show' => ['arrow_pos_type' => 'custom']
	),
	'arrow_left_horizontal_pos' => array(
		'type' => 'slider',
		'label' => __pl('horizontal_pos'),
		'min' => 0,
		'step' => 1,
		'max' => 100,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-prev' => 'left: {{val}}% !important;',
		],
		'req' => ['arrow_pos_type' => 'custom'],
		'show' => ['arrow_pos_style' => ''],
	),
	'arrow_right_horizontal_pos' => array(
		'type' => 'slider',
		'label' => __pl('horizontal_pos'),
		'min' => 0,
		'step' => 1,
		'max' => 100,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-next' => 'right: {{val}}% !important;',
		],
		'req' => ['arrow_pos_type' => 'custom'],
		'show' => ['!arrow_pos_style' => ''],
	),
	'arrow_vertical_pos' => array(
		'type' => 'slider',
		'label' => __pl('vertical_pos'),
		'min' => 0,
		'step' => 1,
		'max' => 100,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-prev' => 'top: {{val}}% !important;',
			'{{element}} .pagelayer-owl-next' => 'top: {{val}}% !important;',
		],
		'req' => ['arrow_pos_type' => 'custom'],
	),
];

$pagelayer->slider_pager_styles = [
	'show_num' => array(
		'type' => 'checkbox',
		'label' => __pl('show_num'),
		'addClass' => ['pagelayer-slide-dot-number'],
		'css' => ['{{element}} .pagelayer-owl-dot span::before' => 'line-height: {{dot_height}}px;'],
	),
	'dot_state' => array(
		'type' => 'radio',
		'label' => __pl('dot_state'),
		'list' => array(
			'' => __pl('normal'),
			'active' => __pl('active'),
		),
	),
	'pager_color' => array(
		'type' => 'color',
		'label' => __pl('color'),
		'css' => ['{{element}} .pagelayer-owl-dot span' => 'background-color: {{val}} !important'],
		'show' => ['dot_state' => ''],
	),
	'dot_num_color' => array(
		'type' => 'color',
		'label' => __pl('number_color'),
		'css' => ['{{element}} .pagelayer-owl-dot span::before' => 'color:{{val}}'],
		'req' => ['!show_num' => ''],
		'show' => ['dot_state' => ''],
	),
	'dot_size' => array(
		'type' => 'slider',
		'label' => __pl('dot_size'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot span' => 'width: {{val}}px !important; height: {{val}}px !important;'
		],
		'show' => ['dot_state' => ''],
	),
	'dot_width' => array(
		'type' => 'slider',
		'label' => __pl('dot_width'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot span' => 'width: {{val}}px !important;'
		],
		'show' => ['dot_state' => ''],
	),
	'dot_height' => array(
		'type' => 'slider',
		'label' => __pl('dot_height'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot span' => 'height: {{val}}px !important;'
		],
		'show' => ['dot_state' => ''],
	),
	'dot_radius' => array(
		'type' => 'padding',
		'label' => __pl('dot_radius'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot span' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px !important;'
		],
		'show' => ['dot_state' => ''],
	),
	'active_pager_color' => array(
		'type' => 'color',
		'label' => __pl('active_pager_color'),
		'css' => ['{{element}} .pagelayer-owl-dot.active span' => 'background-color: {{val}} !important'],
		'show' => ['!dot_state' => ''],
	),
	'active_dot_num_color' => array(
		'type' => 'color',
		'label' => __pl('number_color'),
		'css' => ['{{element}} .pagelayer-owl-dot.active span::before' => 'color:{{val}}'],
		'req' => ['!show_num' => ''],
		'show' => ['!dot_state' => ''],
	),
	'active_dot_size' => array(
		'type' => 'slider',
		'label' => __pl('active_dot_size'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot.active span' => 'width: {{val}}px !important; height: {{val}}px !important;'
		],
		'show' => ['!dot_state' => ''],
	),
	'active_dot_width' => array(
		'type' => 'slider',
		'label' => __pl('dot_width'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot.active span' => 'width: {{val}}px !important;'
		],
		'show' => ['!dot_state' => ''],
	),
	'active_dot_height' => array(
		'type' => 'slider',
		'label' => __pl('dot_height'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot.active span' => 'height: {{val}}px !important;'
		],
		'show' => ['!dot_state' => ''],
	),
	'active_dot_radius' => array(
		'type' => 'padding',
		'label' => __pl('dot_radius'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dot.active span' => 'border-radius: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px !important;'
		],
		'show' => ['!dot_state' => ''],
	),
	'dot_border_type' => array(
		'type' => 'select',
		'label' => __pl('border_type'),
		'list' => [
			'' => __pl('none'),
			'solid' => __pl('solid'),
			'double' => __pl('double'),
			'dotted' => __pl('dotted'),
			'dashed' => __pl('dashed'),
			'groove' => __pl('groove'),
		],
		'css' => [ '{{element}} .pagelayer-owl-dot span' => 'border-style: {{val}};' ],
	),
	'dot_border_width' => array(
		'type' => 'padding',
		'label' => __pl('border_width'),
		'screen' => 1,
		'css' => [ '{{element}} .pagelayer-owl-dot span' => 'border-width: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}}px;' ],
		'req' => ['!dot_border_type' => ''],
	),
	'dot_border_color' => array(
		'type' => 'color',
		'label' => __pl('border_color'),
		'css' => [ '{{element}} .pagelayer-owl-dot span' => 'border-color: {{val}};' ],
		'req' => ['!dot_border_type' => ''],
	),
	'dot_pos' => array(
		'type' => 'select',
		'label' => __pl('position'),
		'list' => array(
			'' => __pl('bottom'),
			'top' => __pl('top'),
			'right' => __pl('right'),
			'left' => __pl('left'),
		),
		'addClass' => ['pagelayer-slide-dot-pos-{{val}}'],
		'css' => ['{{element}} .pagelayer-owl-dots' => '{{val}}: 10px'],
	),
	'pager_top_space' => array(
		'type' => 'slider',
		'label' => __pl('service_btn_spacing'),
		'min' => 0,
		'step' => 1,
		'max' => 200,
		'screen' => 1,
		'css' => [
			'{{element}} .pagelayer-owl-dots' => 'margin-top: {{val}}px !important;'
		]
	)
];

$p