| 1 |
<?php |
| 2 |
|
| 3 |
////////////////////////////////////////////////////////////// |
| 4 |
//=========================================================== |
| 5 |
// class.php |
| 6 |
//=========================================================== |
| 7 |
// PAGELAYER |
| 8 |
// Inspired by the DESIRE to be the BEST OF ALL |
| 9 |
// ---------------------------------------------------------- |
| 10 |
// Started by: Pulkit Gupta |
| 11 |
// Date: 23rd Jan 2017 |
| 12 |
// Time: 23:00 hrs |
| 13 |
// Site: http://pagelayer.com/wordpress (PAGELAYER) |
| 14 |
// ---------------------------------------------------------- |
| 15 |
// Please Read the Terms of use at http://pagelayer.com/tos |
| 16 |
// ---------------------------------------------------------- |
| 17 |
//=========================================================== |
| 18 |
// (c)Pagelayer Team |
| 19 |
//=========================================================== |
| 20 |
////////////////////////////////////////////////////////////// |
| 21 |
|
| 22 |
// Are we being accessed directly ? |
| 23 |
if(!defined('PAGELAYER_VERSION')) { |
| 24 |
exit('Hacking Attempt !'); |
| 25 |
} |
| 26 |
|
| 27 |
// NOTE : |
| 28 |
// 1) There can be a holder or innterHTML for a tag. NOT BOTH |
| 29 |
// 2) Groups can have 'html' but need the holder as well then |
| 30 |
// 3) innerHTML defines the param to be saved in the shortcode as inner content |
| 31 |
|
| 32 |
// Example of 'show' and 'req' prop attr |
| 33 |
// NOTE : There can be only REQ or show |
| 34 |
// First preference given to REQ |
| 35 |
/* |
| 36 |
|
| 37 |
// Single value |
| 38 |
'show' => ['border_hover' => 'normal'], |
| 39 |
|
| 40 |
// Two value i.e. when both the values are true |
| 41 |
'show' => ['border_hover' => 'normal', |
| 42 |
'border_type' => 'solid', |
| 43 |
], |
| 44 |
|
| 45 |
// Exception i.e. prefix the param name with ! (exclamation) |
| 46 |
'show' => ['!border_hover' => 'normal', |
| 47 |
'border_type' => 'solid', |
| 48 |
], |
| 49 |
|
| 50 |
// Support for MULTIPLE values of ONE parameter. |
| 51 |
// 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 |
| 52 |
'show' => ['border_hover' => ['normal', 'hover']], |
| 53 |
|
| 54 |
*/ |
| 55 |
|
| 56 |
// Example of 'css' prop attr |
| 57 |
/* |
| 58 |
|
| 59 |
// Set the value to the parent element |
| 60 |
'css' => 'background-color: {{val}}', |
| 61 |
|
| 62 |
// Multiple vals |
| 63 |
'css' => [ |
| 64 |
'background-color: {{val}}', |
| 65 |
'-webkit-background-color: {{val}}', |
| 66 |
'-moz-background-color: {{val}}', |
| 67 |
], |
| 68 |
|
| 69 |
// Multiple vals with some selectors or direct element val |
| 70 |
'css' => [ |
| 71 |
'{{element}} .class' => 'background-color: {{val}}', |
| 72 |
'-webkit-background-color: {{val}}', |
| 73 |
'-moz-background-color: {{val}}', |
| 74 |
], |
| 75 |
|
| 76 |
*/ |
| 77 |
|
| 78 |
// Example of 'addAttr' or 'addClass' |
| 79 |
/* |
| 80 |
|
| 81 |
// Set the value to the parent element |
| 82 |
'addAttr' => 'target="_blank"', |
| 83 |
|
| 84 |
// Multiple vals |
| 85 |
'addAttr' => [ |
| 86 |
'target="_blank"', |
| 87 |
'href="/"', |
| 88 |
'rel="{{rel}}"', |
| 89 |
], |
| 90 |
|
| 91 |
// Multiple vals with some selectors or direct element val |
| 92 |
'addAttr' => [ |
| 93 |
'{{element}} .class' => 'target="_blank"', |
| 94 |
'href="/"', |
| 95 |
'rel="{{rel}}"', |
| 96 |
], |
| 97 |
|
| 98 |
*/ |
| 99 |
|
| 100 |
//////////////////////// |
| 101 |
// Default Styles |
| 102 |
//////////////////////// |
| 103 |
global $pagelayer; |
| 104 |
|
| 105 |
$pagelayer->styles['ele_bg_styles'] = [ |
| 106 |
'ele_bg_hover' => [ |
| 107 |
'type' => 'radio', |
| 108 |
'label' => __pl('Background'), |
| 109 |
'default' => '', |
| 110 |
//'no_val' => 1,// Dont set any value to element |
| 111 |
'list' => [ |
| 112 |
'' => __pl('normal'), |
| 113 |
'hover' => __pl('hover'), |
| 114 |
], |
| 115 |
], |
| 116 |
'ele_bg_type' => [ |
| 117 |
'type' => 'radio', |
| 118 |
'label' => __pl('Background Type'), |
| 119 |
'default' => '', |
| 120 |
'list' => [ |
| 121 |
'' => __pl('none'), |
| 122 |
'color' => __pl('color'), |
| 123 |
'gradient' => __pl('gradient'), |
| 124 |
'image' => __pl('image'), |
| 125 |
], |
| 126 |
'show' => ['ele_bg_hover' => ''] |
| 127 |
], |
| 128 |
'ele_bg_color' => [ |
| 129 |
'type' => 'color', |
| 130 |
'label' => __pl('color'), |
| 131 |
'default' => '', |
| 132 |
'css' => 'background: {{val}};', |
| 133 |
'show' => ['ele_bg_hover' => ''], |
| 134 |
'req' => ['ele_bg_type' => 'color'] |
| 135 |
], |
| 136 |
'ele_bg_gradient' => [ |
| 137 |
'type' => 'gradient', |
| 138 |
'label' => '', |
| 139 |
'default' => '150,#44d3f6ff,23,#72e584ff,45,#2ca4ebff,100', |
| 140 |
'css' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);', |
| 141 |
'show' => ['ele_bg_hover' => ''], |
| 142 |
'req' => ['ele_bg_type' => 'gradient'] |
| 143 |
], |
| 144 |
'ele_img_color' => [ |
| 145 |
'type' => 'color', |
| 146 |
'label' => __pl('color'), |
| 147 |
'default' => '', |
| 148 |
'desc' => __pl('fallback background color if image is failed to load.'), |
| 149 |
'css' => 'background: {{val}};', |
| 150 |
'show' => ['ele_bg_hover' => ''], |
| 151 |
'req' => ['ele_bg_type' => 'image'] |
| 152 |
], |
| 153 |
'ele_bg_img' => [ |
| 154 |
'type' => 'image', |
| 155 |
'label' => __pl('Image'), |
| 156 |
'css' => 'background: url({{{ele_bg_img-url}}});', |
| 157 |
'show' => ['ele_bg_hover' => ''], |
| 158 |
'req' => ['ele_bg_type' => 'image'] |
| 159 |
], |
| 160 |
'ele_bg_attachment' => [ |
| 161 |
'type' => 'select', |
| 162 |
'label' => __pl('ele_bg_attachment'), |
| 163 |
'list' => [ |
| 164 |
'' => __pl('default'), |
| 165 |
'scroll' => __pl('scroll'), |
| 166 |
'fixed' => __pl('fixed') |
| 167 |
], |
| 168 |
'show' => ['ele_bg_hover' => ''], |
| 169 |
'css' => 'background-attachment: {{val}};', |
| 170 |
'req' => ['ele_bg_type' => 'image'] |
| 171 |
], |
| 172 |
'ele_bg_posx' => [ |
| 173 |
'type' => 'select', |
| 174 |
'label' => __pl('ele_bg_posx'), |
| 175 |
'list' => [ |
| 176 |
'' => __pl('default'), |
| 177 |
'center' => __pl('center'), |
| 178 |
'left' => __pl('left'), |
| 179 |
'right' => __pl('right') |
| 180 |
], |
| 181 |
'show' => ['ele_bg_hover' => ''], |
| 182 |
'css' => 'background-position-x: {{val}};', |
| 183 |
'req' => ['ele_bg_type' => 'image'] |
| 184 |
], |
| 185 |
'ele_bg_posy' => [ |
| 186 |
'type' => 'select', |
| 187 |
'label' => __pl('ele_bg_posy'), |
| 188 |
'list' => [ |
| 189 |
'' => __pl('default'), |
| 190 |
'center' => __pl('center'), |
| 191 |
'top' => __pl('top'), |
| 192 |
'bottom' => __pl('bottom') |
| 193 |
], |
| 194 |
'show' => ['ele_bg_hover' => ''], |
| 195 |
'css' => 'background-position-y: {{val}};', |
| 196 |
'req' => ['ele_bg_type' => 'image'] |
| 197 |
], |
| 198 |
'ele_bg_repeat' => [ |
| 199 |
'type' => 'select', |
| 200 |
'label' => __pl('ele_bg_repeat'), |
| 201 |
'css' => 'background-repeat: {{val}};', |
| 202 |
'list' => [ |
| 203 |
'' => __pl('default'), |
| 204 |
'repeat' => __pl('repeat'), |
| 205 |
'no-repeat' => __pl('no-repeat'), |
| 206 |
'repeat-x' => __pl('repeat-x'), |
| 207 |
'repeat-y' => __pl('repeat-y'), |
| 208 |
], |
| 209 |
'show' => ['ele_bg_hover' => ''], |
| 210 |
'req' => ['ele_bg_type' => 'image'] |
| 211 |
], |
| 212 |
'ele_bg_size' => [ |
| 213 |
'type' => 'select', |
| 214 |
'label' => __pl('ele_bg_size'), |
| 215 |
'css' => 'background-size: {{val}};', |
| 216 |
'list' => [ |
| 217 |
'' => __pl('default'), |
| 218 |
'cover' => __pl('cover'), |
| 219 |
'contain' => __pl('contain') |
| 220 |
], |
| 221 |
'show' => ['ele_bg_hover' => ''], |
| 222 |
'req' => ['ele_bg_type' => 'image'] |
| 223 |
], |
| 224 |
'ele_bg_hover_delay' => [ |
| 225 |
'type' => 'spinner', |
| 226 |
'label' => __pl('ele_bg_hover_delay'), |
| 227 |
'min' => 0, |
| 228 |
'step' => 100, |
| 229 |
'max' => 5000, |
| 230 |
'default' => 400, |
| 231 |
'css' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;', |
| 232 |
'show' => ['ele_bg_hover' => 'hover'] |
| 233 |
], |
| 234 |
'ele_bg_type_hover' => [ |
| 235 |
'type' => 'radio', |
| 236 |
'label' => __pl('background_type'), |
| 237 |
'default' => '', |
| 238 |
'list' => [ |
| 239 |
'' => __pl('none'), |
| 240 |
'color' => __pl('color'), |
| 241 |
'gradient' => __pl('gradient'), |
| 242 |
'image' => __pl('image'), |
| 243 |
], |
| 244 |
'show' => ['ele_bg_hover' => 'hover'] |
| 245 |
], |
| 246 |
'ele_bg_color_hover' => [ |
| 247 |
'type' => 'color', |
| 248 |
'label' => __pl('color_hover'), |
| 249 |
'default' => '', |
| 250 |
'css' => ['{{element}}:hover' => 'background: {{val}};'], |
| 251 |
'show' => ['ele_bg_hover' => 'hover'], |
| 252 |
'req' => ['ele_bg_type_hover' => 'color'] |
| 253 |
], |
| 254 |
'ele_bg_gradient_hover' => [ |
| 255 |
'type' => 'gradient', |
| 256 |
'label' => '', |
| 257 |
'default' => '150,#44d3f6ff,25,#72e584ff,75,#2ca4ebff,100', |
| 258 |
'css' => ['{{element}}:hover' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'], |
| 259 |
'show' => ['ele_bg_hover' => 'hover'], |
| 260 |
'req' => ['ele_bg_type_hover' => 'gradient'] |
| 261 |
], |
| 262 |
'ele_bg_img_hover' => [ |
| 263 |
'type' => 'image', |
| 264 |
'label' => __pl('Image Hover'), |
| 265 |
'css' => ['{{element}}:hover' => 'background: url({{{ele_bg_img_hover-url}}});'], |
| 266 |
'show' => ['ele_bg_hover' => 'hover'], |
| 267 |
'req' => ['ele_bg_type_hover' => 'image'] |
| 268 |
], |
| 269 |
'ele_bg_attachment_hover' => [ |
| 270 |
'type' => 'select', |
| 271 |
'label' => __pl('ele_bg_attachment_hover'), |
| 272 |
'list' => [ |
| 273 |
'' => __pl('default'), |
| 274 |
'scroll' => __pl('scroll'), |
| 275 |
'fixed' => __pl('fixed') |
| 276 |
], |
| 277 |
'show' => ['ele_bg_hover' => 'hover'], |
| 278 |
'css' => ['{{element}}:hover' => 'background-attachment: {{val}};'], |
| 279 |
'req' => ['ele_bg_type_hover' => 'image'] |
| 280 |
], |
| 281 |
'ele_bg_posx_hover' => [ |
| 282 |
'type' => 'select', |
| 283 |
'label' => __pl('ele_bg_posx_hover'), |
| 284 |
'list' => [ |
| 285 |
'' => __pl('default'), |
| 286 |
'center' => __pl('center'), |
| 287 |
'left' => __pl('left'), |
| 288 |
'right' => __pl('right') |
| 289 |
], |
| 290 |
'show' => ['ele_bg_hover' => 'hover'], |
| 291 |
'css' => ['{{element}}:hover' => 'background-position-x: {{val}};'], |
| 292 |
'req' => ['ele_bg_type_hover' => 'image'] |
| 293 |
], |
| 294 |
'ele_bg_posy_hover' => [ |
| 295 |
'type' => 'select', |
| 296 |
'label' => __pl('ele_bg_posy_hover'), |
| 297 |
'list' => [ |
| 298 |
'' => __pl('default'), |
| 299 |
'center' => __pl('center'), |
| 300 |
'top' => __pl('top'), |
| 301 |
'bottom' => __pl('bottom') |
| 302 |
], |
| 303 |
'show' => ['ele_bg_hover' => 'hover'], |
| 304 |
'css' => ['{{element}}:hover' => 'background-position-y: {{val}};'], |
| 305 |
'req' => ['ele_bg_type_hover' => 'image'] |
| 306 |
], |
| 307 |
'ele_bg_repeat_hover' => [ |
| 308 |
'type' => 'select', |
| 309 |
'label' => __pl('ele_bg_repeat_hover'), |
| 310 |
'css' => ['{{element}}:hover' => 'background-repeat: {{val}};'], |
| 311 |
'list' => [ |
| 312 |
'' => __pl('default'), |
| 313 |
'repeat' => __pl('repeat'), |
| 314 |
'no-repeat' => __pl('no-repeat'), |
| 315 |
'repeat-x' => __pl('repeat-x'), |
| 316 |
'repeat-y' => __pl('repeat-y'), |
| 317 |
], |
| 318 |
'show' => ['ele_bg_hover' => 'hover'], |
| 319 |
'req' => ['ele_bg_type_hover' => 'image'] |
| 320 |
], |
| 321 |
'ele_bg_size_hover' => [ |
| 322 |
'type' => 'select', |
| 323 |
'label' => __pl('ele_bg_size_hover'), |
| 324 |
'css' => ['{{element}}:hover' => 'background-size: {{val}};'], |
| 325 |
'list' => [ |
| 326 |
'' => __pl('default'), |
| 327 |
'cover' => __pl('cover'), |
| 328 |
'contain' => __pl('contain') |
| 329 |
], |
| 330 |
'show' => ['ele_bg_hover' => 'hover'], |
| 331 |
'req' => ['ele_bg_type_hover' => 'image'] |
| 332 |
] |
| 333 |
]; |
| 334 |
|
| 335 |
$pagelayer->styles['ele_styles'] = [ |
| 336 |
'ele_margin' => [ |
| 337 |
'type' => 'padding', |
| 338 |
'label' => __pl('margin'), |
| 339 |
'screen' => 1, |
| 340 |
'units' => ['px', 'em', '%'], |
| 341 |
'css' => 'margin-top: {{val[0]}}; margin-right: {{val[1]}}; margin-bottom: {{val[2]}}; margin-left: {{val[3]}}', |
| 342 |
], |
| 343 |
'ele_padding' => [ |
| 344 |
'type' => 'padding', |
| 345 |
'label' => __pl('padding'), |
| 346 |
'screen' => 1, |
| 347 |
'units' => ['px', 'em', '%'], |
| 348 |
'css' => 'padding-top: {{val[0]}}; padding-right: {{val[1]}}; padding-bottom: {{val[2]}}; padding-left: {{val[3]}}', |
| 349 |
], |
| 350 |
'ele_zindex' => [ |
| 351 |
'type' => 'slider', |
| 352 |
'label' => __pl('z-index'), |
| 353 |
'css' => 'z-index: {{val}}', |
| 354 |
], |
| 355 |
'ele_shadow' => [ |
| 356 |
'type' => 'shadow', |
| 357 |
'label' => __pl('shadow'), |
| 358 |
'css' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}} !important;', |
| 359 |
] |
| 360 |
]; |
| 361 |
|
| 362 |
$pagelayer->styles['border_styles'] = [ |
| 363 |
'border_hover' => [ |
| 364 |
'type' => 'radio', |
| 365 |
'label' => '', |
| 366 |
'default' => '', |
| 367 |
//'no_val' => 1,// Dont set any value to element |
| 368 |
'list' => [ |
| 369 |
'' => __pl('normal'), |
| 370 |
'hover' => __pl('hover'), |
| 371 |
], |
| 372 |
], |
| 373 |
'border_type' => [ |
| 374 |
'type' => 'select', |
| 375 |
'label' => __pl('border_type'), |
| 376 |
'list' => [ |
| 377 |
'' => __pl('none'), |
| 378 |
'solid' => __pl('solid'), |
| 379 |
'double' => __pl('double'), |
| 380 |
'dotted' => __pl('dotted'), |
| 381 |
'dashed' => __pl('dashed'), |
| 382 |
'groove' => __pl('groove'), |
| 383 |
], |
| 384 |
'show' => ['border_hover' => ''], |
| 385 |
'css' => 'border-style: {{val}}', |
| 386 |
], |
| 387 |
'border_width' => [ |
| 388 |
'type' => 'padding', |
| 389 |
'label' => __pl('border_width'), |
| 390 |
'default' => '1,1,1,1', |
| 391 |
'units' => ['px', 'em'], |
| 392 |
'show' => [ |
| 393 |
'border_hover' => '' |
| 394 |
], |
| 395 |
'req' => [ |
| 396 |
'!border_type' => '' |
| 397 |
], |
| 398 |
'css' => 'border-top-width: {{val[0]}}; border-right-width: {{val[1]}}; border-bottom-width: {{val[2]}}; border-left-width: {{val[3]}}', |
| 399 |
], |
| 400 |
'border_color' => [ |
| 401 |
'type' => 'color', |
| 402 |
'label' => __pl('border_color'), |
| 403 |
'default' => '#CCC', |
| 404 |
'show' => [ |
| 405 |
'border_hover' => '' |
| 406 |
], |
| 407 |
'req' => [ |
| 408 |
'!border_type' => '' |
| 409 |
], |
| 410 |
'css' => 'border-color: {{val}}', |
| 411 |
], |
| 412 |
'border_radius' => [ |
| 413 |
'type' => 'padding', |
| 414 |
'label' => __pl('border_radius'), |
| 415 |
'units' => ['px', 'em'], |
| 416 |
'show' => ['border_hover' => ''], |
| 417 |
'css' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};', |
| 418 |
], |
| 419 |
'border_shadow' => [ |
| 420 |
'type' => 'shadow', |
| 421 |
'label' => __pl('text_shadow'), |
| 422 |
'css' => ['{{element}}' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}} !important;'], |
| 423 |
'show' => ['border_hover' => ''], |
| 424 |
], |
| 425 |
'border_type_hover' => [ |
| 426 |
'type' => 'select', |
| 427 |
'label' => __pl('border_type'), |
| 428 |
'list' => [ |
| 429 |
'' => __pl('none'), |
| 430 |
'solid' => __pl('solid'), |
| 431 |
'double' => __pl('double'), |
| 432 |
'dotted' => __pl('dotted'), |
| 433 |
'dashed' => __pl('dashed'), |
| 434 |
'groove' => __pl('groove'), |
| 435 |
], |
| 436 |
'show' => ['border_hover' => 'hover'], |
| 437 |
'css' => ['{{element}}:hover' => 'border-style: {{val}}'], |
| 438 |
], |
| 439 |
'border_width_hover' => [ |
| 440 |
'type' => 'padding', |
| 441 |
'label' => __pl('border_width'), |
| 442 |
'units' => ['px', 'em'], |
| 443 |
'show' => [ |
| 444 |
'border_hover' => 'hover' |
| 445 |
], |
| 446 |
'req' => [ |
| 447 |
'!border_type_hover' => '' |
| 448 |
], |
| 449 |
'css' => ['{{element}}:hover' => 'border-top-width: {{val[0]}}; border-right-width: {{val[1]}}; border-bottom-width: {{val[2]}}; border-left-width: {{val[3]}}'], |
| 450 |
], |
| 451 |
'border_color_hover' => [ |
| 452 |
'type' => 'color', |
| 453 |
'label' => __pl('border_color'), |
| 454 |
'show' => [ |
| 455 |
'border_hover' => 'hover' |
| 456 |
], |
| 457 |
'req' => [ |
| 458 |
'!border_type_hover' => '' |
| 459 |
], |
| 460 |
'css' => ['{{element}}:hover' => 'border-color: {{val}}'], |
| 461 |
], |
| 462 |
'border_radius_hover' => [ |
| 463 |
'type' => 'padding', |
| 464 |
'label' => __pl('border_radius'), |
| 465 |
'units' => ['px', 'em'], |
| 466 |
'show' => ['border_hover' => 'hover'], |
| 467 |
'css' => ['{{element}}:hover' => 'border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}}; -webkit-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};-moz-border-radius: {{val[0]}} {{val[1]}} {{val[2]}} {{val[3]}};'], |
| 468 |
], |
| 469 |
'border_shadow_hover' => [ |
| 470 |
'type' => 'shadow', |
| 471 |
'label' => __pl('text_shadow'), |
| 472 |
'css' => ['{{element}}:hover' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}} !important;'], |
| 473 |
'show' => ['border_hover' => 'hover'], |
| 474 |
], |
| 475 |
]; |
| 476 |
|
| 477 |
$pagelayer->styles['animation_styles'] = [ |
| 478 |
'animation' => [ |
| 479 |
'type' => 'select', |
| 480 |
'label' => __pl('animation'), |
| 481 |
'default' => '', |
| 482 |
'addClass' => ['{{val}}',( !pagelayer_is_live() ? 'pagelayer-wow' : '' )], |
| 483 |
'list' => [ |
| 484 |
'' => __pl('none'), |
| 485 |
__pl('fading') => [ |
| 486 |
'fadeIn' => __pl('fadein'), |
| 487 |
'fadeInDown' => __pl('fadeindown'), |
| 488 |
'fadeInUp' => __pl('fadeinup'), |
| 489 |
'fadeInLeft' => __pl('fadeinleft'), |
| 490 |
'fadeInRight' => __pl('fadeinright'), |
| 491 |
], |
| 492 |
__pl('zooming') => [ |
| 493 |
'zoomIn' => __pl('zoomin'), |
| 494 |
'zoomInDown' => __pl('zoomindown'), |
| 495 |
'zoomInUp' => __pl('zoominup'), |
| 496 |
'zoomInLeft' => __pl('zoominleft'), |
| 497 |
'zoomInRight' => __pl('zoominright'), |
| 498 |
], |
| 499 |
__pl('bounceing') => [ |
| 500 |
'bounceIn' => __pl('bouncein'), |
| 501 |
'bounceInDown' => __pl('bounceindown'), |
| 502 |
'bounceInUp' => __pl('bounceinup'), |
| 503 |
'bounceInLeft' => __pl('bounceinleft'), |
| 504 |
'bounceInRight' => __pl('bounceinright'), |
| 505 |
], |
| 506 |
__pl('sliding') => [ |
| 507 |
'slideInDown' => __pl('slideindown'), |
| 508 |
'slideInUp' => __pl('slideinup'), |
| 509 |
'slideInLeft' => __pl('slideinleft'), |
| 510 |
'slideInRight' => __pl('slideinright'), |
| 511 |
], |
| 512 |
__pl('rotating') => [ |
| 513 |
'rotateIn' => __pl('rotatein'), |
| 514 |
'rotateInDown' => __pl('rotateindown'), |
| 515 |
'rotateInUp' => __pl('rotateinup'), |
| 516 |
'rotateInLeft' => __pl('rotateinleft'), |
| 517 |
'rotateInRight' => __pl('rotateinright'), |
| 518 |
], |
| 519 |
__pl('effects') => [ |
| 520 |
'lightSpeedIn' => __pl('lightspeedin'), |
| 521 |
'bounce' => __pl('bounce'), |
| 522 |
'pulse' => __pl('pulse'), |
| 523 |
'rubberBand' => __pl('rubberband'), |
| 524 |
'flash' => __pl('flash'), |
| 525 |
'swing' => __pl('swing'), |
| 526 |
'jello' => __pl('jello'), |
| 527 |
'tada' => __pl('tada'), |
| 528 |
'wobble' => __pl('wobble'), |
| 529 |
'rollin' => __pl('rollin'), |
| 530 |
'headShake' => __pl('headshake'), |
| 531 |
'shake' => __pl('shake'), |
| 532 |
], |
| 533 |
], |
| 534 |
], |
| 535 |
'animation_speed' => [ |
| 536 |
'type' => 'select', |
| 537 |
'label' => __pl('animate_speed'), |
| 538 |
'default' => '', |
| 539 |
'addClass' => 'pagelayer-anim-{{val}}', |
| 540 |
'list' => [ |
| 541 |
'' => __pl('normal'), |
| 542 |
'fast' => __pl('fast'), |
| 543 |
'slow' => __pl('slow'), |
| 544 |
'fastest' => __pl('fastest'), |
| 545 |
'slowest' => __pl('slowest'), |
| 546 |
], |
| 547 |
'req' => [ |
| 548 |
'!animation' => '' |
| 549 |
] |
| 550 |
], |
| 551 |
'animation_delay' => [ |
| 552 |
'type' => 'spinner', |
| 553 |
'label' => __pl('animation_delay'), |
| 554 |
'css' => '-webkit-animation-delay: {{val}}ms; animation-delay: {{val}}ms;', |
| 555 |
'default' => 600, |
| 556 |
'min' => 0, |
| 557 |
'max' => 90000, |
| 558 |
'step' => 100, |
| 559 |
'req' => [ |
| 560 |
'!animation' => '' |
| 561 |
] |
| 562 |
], |
| 563 |
]; |
| 564 |
|
| 565 |
// Resposive stuff |
| 566 |
$pagelayer->styles['responsive_styles'] = [ |
| 567 |
'hide_desktop' => [ |
| 568 |
'type' => 'checkbox', |
| 569 |
'label' => __pl('hide_desktop'), |
| 570 |
'addClass' => 'pagelayer-hide-desktop' |
| 571 |
], |
| 572 |
'hide_tablet' => [ |
| 573 |
'type' => 'checkbox', |
| 574 |
'label' => __pl('hide_tablet'), |
| 575 |
'addClass' => 'pagelayer-hide-tablet' |
| 576 |
], |
| 577 |
'hide_mobile' => [ |
| 578 |
'type' => 'checkbox', |
| 579 |
'label' => __pl('hide_mobile'), |
| 580 |
'addClass' => 'pagelayer-hide-mobile' |
| 581 |
], |
| 582 |
]; |
| 583 |
|
| 584 |
// Custom stuff |
| 585 |
$pagelayer->styles['custom_styles'] = [ |
| 586 |
'ele_id' => [ |
| 587 |
'type' => 'text', |
| 588 |
'label' => __pl('ele_id'), |
| 589 |
'desc' => __pl('ele_id_desc'), |
| 590 |
'addAttr' => 'id="{{ele_id}}"', |
| 591 |
], |
| 592 |
'ele_classes' => [ |
| 593 |
'type' => 'text', |
| 594 |
'label' => __pl('ele_classes'), |
| 595 |
'desc' => __pl('ele_classes_desc'), |
| 596 |
'addClass' => '{{val}}', |
| 597 |
], |
| 598 |
]; |
| 599 |
|
| 600 |
|
| 601 |
//////////////////////// |
| 602 |
// GRID Group |
| 603 |
//////////////////////// |
| 604 |
|
| 605 |
// ROW object |
| 606 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_row', array( |
| 607 |
'name' => __pl('row'), |
| 608 |
'group' => 'grid', |
| 609 |
'func' => 'pagelayer_sc_row', |
| 610 |
'html' => '<div if="{{bg_video_src}}" class="pagelayer-background-video">{{vid_src}}</div> |
| 611 |
<div if="{{parallax_img}}" class="pagelayer-parallax-window"> |
| 612 |
<img src="{{{parallax_img-url}}}"> |
| 613 |
</div> |
| 614 |
<div if="{{row_shape_position}}" class="pagelayer-row-shape"> |
| 615 |
<div class="pagelayer-row-svg"> |
| 616 |
<svg if="{{row_shape_type_top}}" class="pagelayer-svg-top">{{svg_top}}</svg> |
| 617 |
<svg if="{{row_shape_type_bottom}}" class="pagelayer-svg-bottom">{{svg_bottom}}</svg> |
| 618 |
</div> |
| 619 |
</div> |
| 620 |
<div if="{{overlay_type}}" class="pagelayer-background-overlay"></div> |
| 621 |
<div class="pagelayer-row-holder pagelayer-row pagelayer-auto"></div>', |
| 622 |
'holder' => '.pagelayer-row-holder', |
| 623 |
'params' => array( |
| 624 |
'stretch' => array( |
| 625 |
'type' => 'select', |
| 626 |
'label' => __pl('con_width'), |
| 627 |
'default' => 'auto', |
| 628 |
'list' => array( |
| 629 |
'auto' => __pl('auto'), |
| 630 |
'full' => __pl('full_width'), |
| 631 |
'fixed' => __pl('fixed_width') |
| 632 |
), |
| 633 |
'addClass' => 'pagelayer-row-stretch-{{val}}' |
| 634 |
), |
| 635 |
'row_width' => array( |
| 636 |
'type' => 'slider', |
| 637 |
'label' => __pl('row_width'), |
| 638 |
'default' => 500, |
| 639 |
'min' => 300, |
| 640 |
'max' => 3000, |
| 641 |
'step' => 1, |
| 642 |
'css' => ['{{element}}' => 'max-width: {{val}}px; margin-left: auto !important; margin-right: auto !important;'], |
| 643 |
'req' => array( |
| 644 |
'stretch' => 'fixed' |
| 645 |
) |
| 646 |
), |
| 647 |
'col_gap' => array( |
| 648 |
'type' => 'spinner', |
| 649 |
'label' => __pl('col_gap'), |
| 650 |
'default' => 10, |
| 651 |
'min' => 0, |
| 652 |
'step' => 1, |
| 653 |
'max' => 1000, |
| 654 |
'css' => ['{{element}} .pagelayer-col-holder' => 'padding: {{val}}px;'], |
| 655 |
), |
| 656 |
'width_content' => array( |
| 657 |
'type' => 'radio', |
| 658 |
'label' => __pl('Content Width'), |
| 659 |
'default' => 'auto', |
| 660 |
'list' => array( |
| 661 |
'auto' => __pl('auto_width'), |
| 662 |
'fixed' => __pl('fixed_width'), |
| 663 |
'full' => __pl('full_width') |
| 664 |
) |
| 665 |
), |
| 666 |
'fixed_width' => array( |
| 667 |
'type' => 'slider', |
| 668 |
'label' => __pl('fixed_width'), |
| 669 |
'default' => 500, |
| 670 |
'min' => 300, |
| 671 |
'max' => 3000, |
| 672 |
'step' => 1, |
| 673 |
'css' => ['{{element}} .pagelayer-row-holder' => 'max-width: {{val}}px; margin-left: auto; margin-right: auto;'], |
| 674 |
'req' => array( |
| 675 |
'width_content' => 'fixed' |
| 676 |
) |
| 677 |
), |
| 678 |
'row_height' => array( |
| 679 |
'type' => 'radio', |
| 680 |
'label' => __pl('row_height'), |
| 681 |
'default' => 'default', |
| 682 |
'addClass' => 'pagelayer-height-{{val}}', |
| 683 |
'list' => array( |
| 684 |
'default' => __pl('default'), |
| 685 |
'fit' => __pl('fit_to_screen'), |
| 686 |
'custom' => __pl('min_height') |
| 687 |
), |
| 688 |
), |
| 689 |
'min_height' => array( |
| 690 |
'type' => 'slider', |
| 691 |
'label' => __pl('min_height'), |
| 692 |
'min' => 0, |
| 693 |
'max' => 2000, |
| 694 |
'step' => 1, |
| 695 |
'css' => 'min-height: {{val}}px;', |
| 696 |
'req' => array( |
| 697 |
'row_height' => 'custom' |
| 698 |
) |
| 699 |
), |
| 700 |
'column_pos' => array( |
| 701 |
'type' => 'select', |
| 702 |
'label' => __pl('column_pos'), |
| 703 |
'default' => 'default', |
| 704 |
'css' => ['{{element}}' => '-webkit-box-align: {{val}}; -webkit-align-items: {{val}}; -ms-flex-align: {{val}}; align-items: {{val}};'], |
| 705 |
'list' => array( |
| 706 |
'' => __pl('default'), |
| 707 |
'flex-start' => __pl('top'), |
| 708 |
'center' => __pl('center'), |
| 709 |
'flex-end' => __pl('bottom'), |
| 710 |
'stretch' => __pl('Stretch') |
| 711 |
), |
| 712 |
), |
| 713 |
'content_pos' => array( |
| 714 |
'type' => 'select', |
| 715 |
'label' => __pl('content_pos'), |
| 716 |
'default' => 'default', |
| 717 |
'css' => ['{{element}} .pagelayer-row-holder' => '-webkit-box-align: {{val}}; -webkit-align-items: {{val}}; -ms-flex-align: {{val}}; align-items: {{val}};'], |
| 718 |
'list' => array( |
| 719 |
'' => __pl('default'), |
| 720 |
'baseline' => __pl('top'), |
| 721 |
'center' => __pl('center'), |
| 722 |
'end' => __pl('bottom'), |
| 723 |
'stretch' => __pl('Stretch') |
| 724 |
), |
| 725 |
), |
| 726 |
), |
| 727 |
'row_bg_styles' => [ |
| 728 |
'row_bg_type' => array( |
| 729 |
'type' => 'radio', |
| 730 |
'label' => __pl('row_bg_type'), |
| 731 |
'list' => array( |
| 732 |
'' => __pl('none'), |
| 733 |
'video' => __pl('video'), |
| 734 |
'parallax' => __pl('parallax'), |
| 735 |
), |
| 736 |
), |
| 737 |
'bg_video_src' => array( |
| 738 |
'type' => 'video', |
| 739 |
'label' => __pl('video_src_label'), |
| 740 |
'desc' => __pl('video_src_desc'), |
| 741 |
'req' => ['row_bg_type' => 'video'] |
| 742 |
), |
| 743 |
'parallax_img' => array( |
| 744 |
'type' => 'image', |
| 745 |
'label' => __pl('Image'), |
| 746 |
'req' => ['row_bg_type' => 'parallax'] |
| 747 |
), |
| 748 |
], |
| 749 |
'row_bg_overlay' => [ |
| 750 |
'overlay_state' => array( |
| 751 |
'type' => 'radio', |
| 752 |
'label' => __pl('Overlay'), |
| 753 |
'list' => array( |
| 754 |
'' => __pl('normal'), |
| 755 |
'hover' => __pl('hover'), |
| 756 |
), |
| 757 |
), |
| 758 |
'overlay_type' => array( |
| 759 |
'type' => 'radio', |
| 760 |
'label' => __pl('overlay_type'), |
| 761 |
'list' => array( |
| 762 |
'' => __pl('none'), |
| 763 |
'color' => __pl('color'), |
| 764 |
'image' => __pl('image'), |
| 765 |
'gradient' => __pl('gradient') |
| 766 |
), |
| 767 |
'show' => ['overlay_state' => ''], |
| 768 |
), |
| 769 |
'overlay_color' => array( |
| 770 |
'type' => 'color', |
| 771 |
'label' => __pl('color'), |
| 772 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-color: {{val}};'], |
| 773 |
'req' => ['overlay_type' => 'color'], |
| 774 |
'show' => ['overlay_state' => ''], |
| 775 |
), |
| 776 |
'overlay_gradient' => array( |
| 777 |
'type' => 'gradient', |
| 778 |
'label' => '', |
| 779 |
'default' => '150,#44d3f6ff,23,#72e584ff,45,#2ca4ebff,100', |
| 780 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'], |
| 781 |
'show' => ['overlay_state' => ''], |
| 782 |
'req' => ['overlay_type' => 'gradient'] |
| 783 |
), |
| 784 |
'overlay_img' => array( |
| 785 |
'type' => 'image', |
| 786 |
'label' => __pl('Image'), |
| 787 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background: url({{{overlay_img-url}}});'], |
| 788 |
'show' => ['overlay_state' => ''], |
| 789 |
'req' => ['overlay_type' => 'image'] |
| 790 |
), |
| 791 |
'overlay_img_attachment' => array( |
| 792 |
'type' => 'select', |
| 793 |
'label' => __pl('overlay_img_attachment'), |
| 794 |
'list' => [ |
| 795 |
'' => __pl('default'), |
| 796 |
'scroll' => __pl('scroll'), |
| 797 |
'fixed' => __pl('fixed') |
| 798 |
], |
| 799 |
'show' => ['overlay_state' => ''], |
| 800 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-attachment: {{val}};'], |
| 801 |
'req' => ['overlay_type' => 'image'] |
| 802 |
), |
| 803 |
'overlay_bg_posx' => array( |
| 804 |
'type' => 'select', |
| 805 |
'label' => __pl('overlay_bg_posx'), |
| 806 |
'list' => [ |
| 807 |
'' => __pl('default'), |
| 808 |
'center' => __pl('center'), |
| 809 |
'left' => __pl('left'), |
| 810 |
'right' => __pl('right') |
| 811 |
], |
| 812 |
'show' => ['overlay_state' => ''], |
| 813 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-position-x: {{val}};'], |
| 814 |
'req' => ['overlay_type' => 'image'] |
| 815 |
), |
| 816 |
'overlay_bg_posy' => array( |
| 817 |
'type' => 'select', |
| 818 |
'label' => __pl('overlay_bg_posy'), |
| 819 |
'list' => [ |
| 820 |
'' => __pl('default'), |
| 821 |
'center' => __pl('center'), |
| 822 |
'top' => __pl('top'), |
| 823 |
'bottom' => __pl('bottom') |
| 824 |
], |
| 825 |
'show' => ['overlay_state' => ''], |
| 826 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-position-y: {{val}};'], |
| 827 |
'req' => ['overlay_type' => 'image'] |
| 828 |
), |
| 829 |
'overlay_bg_repeat' => array( |
| 830 |
'type' => 'select', |
| 831 |
'label' => __pl('overlay_bg_repeat'), |
| 832 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-repeat: {{val}};'], |
| 833 |
'list' => [ |
| 834 |
'' => __pl('default'), |
| 835 |
'repeat' => __pl('repeat'), |
| 836 |
'no-repeat' => __pl('no-repeat'), |
| 837 |
'repeat-x' => __pl('repeat-x'), |
| 838 |
'repeat-y' => __pl('repeat-y'), |
| 839 |
], |
| 840 |
'show' => ['overlay_state' => ''], |
| 841 |
'req' => ['overlay_type' => 'image'] |
| 842 |
), |
| 843 |
'overlay_bg_size' => array( |
| 844 |
'type' => 'select', |
| 845 |
'label' => __pl('overlay_bg_size'), |
| 846 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-size: {{val}};'], |
| 847 |
'list' => [ |
| 848 |
'' => __pl('default'), |
| 849 |
'cover' => __pl('cover'), |
| 850 |
'contain' => __pl('contain') |
| 851 |
], |
| 852 |
'show' => ['overlay_state' => ''], |
| 853 |
'req' => ['overlay_type' => 'image'] |
| 854 |
), |
| 855 |
'overlay_transperancy' => array( |
| 856 |
'type' => 'slider', |
| 857 |
'label' => __pl('overlay_transperancy'), |
| 858 |
'default' => 0.5, |
| 859 |
'min' => 0, |
| 860 |
'max' => 1, |
| 861 |
'step' => 0.1, |
| 862 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'opacity: {{val}};'], |
| 863 |
'req' => array( |
| 864 |
'!overlay_type' => '', |
| 865 |
), |
| 866 |
'show' => ['overlay_state' => ''], |
| 867 |
), |
| 868 |
'overlay_hover_delay' => array( |
| 869 |
'type' => 'spinner', |
| 870 |
'label' => __pl('overlay_hover_delay'), |
| 871 |
'min' => 0, |
| 872 |
'step' => 100, |
| 873 |
'max' => 5000, |
| 874 |
'default' => 400, |
| 875 |
'css' => ['{{element}} .pagelayer-background-overlay' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'], |
| 876 |
'show' => array( |
| 877 |
'overlay_state' => 'hover' |
| 878 |
), |
| 879 |
), |
| 880 |
'overlay_type_hover' => array( |
| 881 |
'type' => 'radio', |
| 882 |
'label' => __pl('overlay_type_hover'), |
| 883 |
'list' => array( |
| 884 |
'' => __pl('none'), |
| 885 |
'color' => __pl('color'), |
| 886 |
'gradient' => __pl('gradient'), |
| 887 |
'image' => __pl('image'), |
| 888 |
), |
| 889 |
'show' => ['overlay_state' => 'hover'], |
| 890 |
), |
| 891 |
'overlay_color_hover' => array( |
| 892 |
'type' => 'color', |
| 893 |
'label' => __pl('color'), |
| 894 |
//'desc' => __pl('video_src_desc'), |
| 895 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background: {{val}};'], |
| 896 |
'req' => ['overlay_type_hover' => 'color'], |
| 897 |
'show' => ['overlay_state' => 'hover'], |
| 898 |
), |
| 899 |
'overlay_gradient_hover' => array( |
| 900 |
'type' => 'gradient', |
| 901 |
'label' => '', |
| 902 |
'default' => '150,#44d3f6ff,23,#72e584ff,45,#2ca4ebff,100', |
| 903 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'], |
| 904 |
'show' => ['overlay_state' => 'hover'], |
| 905 |
'req' => ['overlay_type_hover' => 'gradient'] |
| 906 |
), |
| 907 |
'overlay_img_hover' => array( |
| 908 |
'type' => 'image', |
| 909 |
'label' => __pl('Image'), |
| 910 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background: url({{{overlay_img_hover-url}}});'], |
| 911 |
'show' => ['overlay_state' => 'hover'], |
| 912 |
'req' => ['overlay_type_hover' => 'image'] |
| 913 |
), |
| 914 |
'overlay_img_attachment_hover' => array( |
| 915 |
'type' => 'select', |
| 916 |
'label' => __pl('overlay_img_attachment_hover'), |
| 917 |
'list' => [ |
| 918 |
'' => __pl('default'), |
| 919 |
'scroll' => __pl('scroll'), |
| 920 |
'fixed' => __pl('fixed') |
| 921 |
], |
| 922 |
'show' => ['overlay_state' => 'hover'], |
| 923 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-attachment: {{val}};'], |
| 924 |
'req' => ['overlay_type_hover' => 'image'] |
| 925 |
), |
| 926 |
'overlay_bg_posx_hover' => array( |
| 927 |
'type' => 'select', |
| 928 |
'label' => __pl('overlay_bg_posx_hover'), |
| 929 |
'list' => [ |
| 930 |
'' => __pl('default'), |
| 931 |
'center' => __pl('center'), |
| 932 |
'left' => __pl('left'), |
| 933 |
'right' => __pl('right') |
| 934 |
], |
| 935 |
'show' => ['overlay_state' => 'hover'], |
| 936 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-position-x: {{val}};'], |
| 937 |
'req' => ['overlay_type_hover' => 'image'] |
| 938 |
), |
| 939 |
'overlay_bg_posy_hover' => array( |
| 940 |
'type' => 'select', |
| 941 |
'label' => __pl('overlay_bg_posy_hover'), |
| 942 |
'list' => [ |
| 943 |
'' => __pl('default'), |
| 944 |
'center' => __pl('center'), |
| 945 |
'top' => __pl('top'), |
| 946 |
'bottom' => __pl('bottom') |
| 947 |
], |
| 948 |
'show' => ['overlay_state' => 'hover'], |
| 949 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-position-y: {{val}};'], |
| 950 |
'req' => ['overlay_type_hover' => 'image'] |
| 951 |
), |
| 952 |
'overlay_bg_repeat_hover' => array( |
| 953 |
'type' => 'select', |
| 954 |
'label' => __pl('overlay_bg_repeat_hover'), |
| 955 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-repeat: {{val}};'], |
| 956 |
'list' => [ |
| 957 |
'' => __pl('default'), |
| 958 |
'repeat' => __pl('repeat'), |
| 959 |
'no-repeat' => __pl('no-repeat'), |
| 960 |
'repeat-x' => __pl('repeat-x'), |
| 961 |
'repeat-y' => __pl('repeat-y'), |
| 962 |
], |
| 963 |
'show' => ['overlay_state' => 'hover'], |
| 964 |
'req' => ['overlay_type_hover' => 'image'] |
| 965 |
), |
| 966 |
'overlay_bg_size_hover' => array( |
| 967 |
'type' => 'select', |
| 968 |
'label' => __pl('overlay_bg_size_hover'), |
| 969 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-size: {{val}};'], |
| 970 |
'list' => [ |
| 971 |
'' => __pl('default'), |
| 972 |
'cover' => __pl('cover'), |
| 973 |
'contain' => __pl('contain') |
| 974 |
], |
| 975 |
'show' => ['overlay_state' => 'hover'], |
| 976 |
'req' => ['overlay_type_hover' => 'image'] |
| 977 |
), |
| 978 |
'overlay_transperancy_hover' => array( |
| 979 |
'type' => 'slider', |
| 980 |
'label' => __pl('overlay_transperancy_hover'), |
| 981 |
'min' => 0, |
| 982 |
'max' => 1, |
| 983 |
'step' => 0.1, |
| 984 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'opacity: {{val}};'], |
| 985 |
'req' => array( |
| 986 |
'overlay_type' => 'image', |
| 987 |
'overlay_type' => 'color' |
| 988 |
), |
| 989 |
'show' => ['overlay_state' => 'hover'], |
| 990 |
), |
| 991 |
], |
| 992 |
'shape_styles' => [ |
| 993 |
'row_shape_position' => array( |
| 994 |
'type' => 'radio', |
| 995 |
'label' => __pl('shape_position'), |
| 996 |
'list' => array( |
| 997 |
'top' => __pl('Top'), |
| 998 |
'bottom' => __pl('Bottom'), |
| 999 |
), |
| 1000 |
), |
| 1001 |
'row_shape_type_top' => array( |
| 1002 |
'type' => 'select', |
| 1003 |
'label' => __pl('shape_type'), |
| 1004 |
'default' => '', |
| 1005 |
'list' => array( |
| 1006 |
'' => __pl('none'), |
| 1007 |
'arrow' => __pl('Arrow'), |
| 1008 |
'bigTriangle' => __pl('BigTriangle'), |
| 1009 |
'bigTriangleShadow' => __pl('BigTriangle Shadow'), |
| 1010 |
'curve' => __pl('Curve'), |
| 1011 |
'clouds' => __pl('Clouds'), |
| 1012 |
'mountains' => __pl('Mountains'), |
| 1013 |
'pyramids' => __pl('Pyramids'), |
| 1014 |
'stamp' => __pl('Stamp'), |
| 1015 |
'slit' => __pl('Slit'), |
| 1016 |
'split' => __pl('Split'), |
| 1017 |
'tilt' => __pl('Tilt'), |
| 1018 |
'tiltOpacity' => __pl('Tilt Opacity'), |
| 1019 |
'waves' => __pl('Waves'), |
| 1020 |
'zigzag' => __pl('Zigzag'), |
| 1021 |
), |
| 1022 |
'show' => ['row_shape_position' => 'top'], |
| 1023 |
), |
| 1024 |
'row_shape_top_color' => array( |
| 1025 |
'type' => 'color', |
| 1026 |
'label' => __pl('shape_bg_color'), |
| 1027 |
'default' => '#fff', |
| 1028 |
'css' => ['{{element}} .pagelayer-svg-top .pagelayer-shape-fill' => 'fill:{{val}}'], |
| 1029 |
'show' => ['row_shape_position' => 'top'], |
| 1030 |
), |
| 1031 |
'row_shape_top_width' => array( |
| 1032 |
'type' => 'slider', |
| 1033 |
'label' => __pl('shape_width'), |
| 1034 |
'screen' => 1, |
| 1035 |
'default' => 100, |
| 1036 |
'min' => 100, |
| 1037 |
'max' => 500, |
| 1038 |
'css' => ['{{element}} .pagelayer-row-svg .pagelayer-svg-top' => 'width:{{val}}%'], |
| 1039 |
'show' => ['row_shape_position' => 'top'], |
| 1040 |
), |
| 1041 |
'row_shape_top_height' => array( |
| 1042 |
'type' => 'slider', |
| 1043 |
'label' => __pl('shape_height'), |
| 1044 |
'screen' => 1, |
| 1045 |
'default' => 100, |
| 1046 |
'min' => 10, |
| 1047 |
'max' => 500, |
| 1048 |
'css' => ['{{element}} .pagelayer-row-svg .pagelayer-svg-top' => 'height:{{val}}px'], |
| 1049 |
'show' => ['row_shape_position' => 'top'], |
| 1050 |
), |
| 1051 |
'row_shape_top_flip' => array( |
| 1052 |
'type' => 'checkbox', |
| 1053 |
'label' => __pl('shape_flip'), |
| 1054 |
'css' => ['{{element}} .pagelayer-row-svg .pagelayer-svg-top' => 'transform: rotateY(180deg);'], |
| 1055 |
'show' => ['row_shape_position' => 'top'], |
| 1056 |
), |
| 1057 |
'row_shape_type_bottom' => array( |
| 1058 |
'type' => 'select', |
| 1059 |
'label' => __pl('shape_type'), |
| 1060 |
'default' => '', |
| 1061 |
'list' => array( |
| 1062 |
'' => __pl('none'), |
| 1063 |
'arrow' => __pl('Arrow'), |
| 1064 |
'bigTriangle' => __pl('BigTriangle'), |
| 1065 |
'bigTriangleShadow' => __pl('BigTriangle Shadow'), |
| 1066 |
'curve' => __pl('Curve'), |
| 1067 |
'clouds' => __pl('Clouds'), |
| 1068 |
'mountains' => __pl('Mountains'), |
| 1069 |
'pyramids' => __pl('Pyramids'), |
| 1070 |
'stamp' => __pl('Stamp'), |
| 1071 |
'slit' => __pl('Slit'), |
| 1072 |
'split' => __pl('Split'), |
| 1073 |
'tilt' => __pl('Tilt'), |
| 1074 |
'tiltOpacity' => __pl('Tilt Opacity'), |
| 1075 |
'waves' => __pl('Waves'), |
| 1076 |
'zigzag' => __pl('Zigzag'), |
| 1077 |
), |
| 1078 |
'show' => ['row_shape_position' => 'bottom'], |
| 1079 |
), |
| 1080 |
'row_shape_bottom_color' => array( |
| 1081 |
'type' => 'color', |
| 1082 |
'label' => __pl('shape_bg_color'), |
| 1083 |
'default' => '#fff', |
| 1084 |
'css' => ['{{element}} .pagelayer-svg-bottom .pagelayer-shape-fill' => 'fill:{{val}}'], |
| 1085 |
'show' => ['row_shape_position' => 'bottom'], |
| 1086 |
), |
| 1087 |
'row_shape_bottom_width' => array( |
| 1088 |
'type' => 'slider', |
| 1089 |
'label' => __pl('shape_width'), |
| 1090 |
'screen' => 1, |
| 1091 |
'default' => 100, |
| 1092 |
'min' => 100, |
| 1093 |
'max' => 500, |
| 1094 |
'css' => ['{{element}} .pagelayer-row-svg .pagelayer-svg-bottom' => 'width:{{val}}%'], |
| 1095 |
'show' => ['row_shape_position' => 'bottom'], |
| 1096 |
), |
| 1097 |
'row_shape_bottom_height' => array( |
| 1098 |
'type' => 'slider', |
| 1099 |
'label' => __pl('shape_height'), |
| 1100 |
'screen' => 1, |
| 1101 |
'default' => 100, |
| 1102 |
'min' => 10, |
| 1103 |
'max' => 500, |
| 1104 |
'css' => ['{{element}} .pagelayer-row-svg .pagelayer-svg-bottom' => 'height:{{val}}px'], |
| 1105 |
'show' => ['row_shape_position' => 'bottom'], |
| 1106 |
), |
| 1107 |
'row_shape_bottom_flip' => array( |
| 1108 |
'type' => 'checkbox', |
| 1109 |
'label' => __pl('shape_flip'), |
| 1110 |
'css' => ['{{element}} .pagelayer-row-svg .pagelayer-svg-bottom' => 'transform: rotateY(180deg);'], |
| 1111 |
'show' => ['row_shape_position' => 'bottom'], |
| 1112 |
), |
| 1113 |
|
| 1114 |
], |
| 1115 |
'styles' => [ |
| 1116 |
'row_bg_styles' => __pl('row_bg_styles'), |
| 1117 |
'row_bg_overlay' => __pl('row_bg_overlay'), |
| 1118 |
'shape_styles' => __pl('shape_styles'), |
| 1119 |
], |
| 1120 |
) |
| 1121 |
); |
| 1122 |
|
| 1123 |
// Column object |
| 1124 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_col', array( |
| 1125 |
'name' => __pl('column'), |
| 1126 |
'group' => 'grid', |
| 1127 |
'func' => 'pagelayer_sc_col', |
| 1128 |
'html' => '<div if="{{bg_video_src}}" class="pagelayer-background-video">{{vid_src}}</div> |
| 1129 |
<div if="{{parallax_img}}" class="pagelayer-parallax-window"> |
| 1130 |
<img src="{{{parallax_img-url}}}"> |
| 1131 |
</div> |
| 1132 |
<div if="{{overlay_type}}" class="pagelayer-background-overlay"></div> |
| 1133 |
<div class="pagelayer-col-holder"></div>', |
| 1134 |
'holder' => '.pagelayer-col-holder', |
| 1135 |
'params' => array( |
| 1136 |
'content_pos' => array( |
| 1137 |
'type' => 'select', |
| 1138 |
'label' => __pl('content_pos'), |
| 1139 |
'default' => '', |
| 1140 |
'css' => ['{{element}}' => 'display:flex; -webkit-box-align: {{val}}; -webkit-align-items: {{val}}; -ms-flex-align: {{val}}; align-items: {{val}}; height: 100%;', |
| 1141 |
'{{element}} .pagelayer-col-holder' => 'width:100%'], |
| 1142 |
'list' => array( |
| 1143 |
'' => __pl('default'), |
| 1144 |
'flex-start' => __pl('top'), |
| 1145 |
'center' => __pl('center'), |
| 1146 |
'flex-end' => __pl('bottom') |
| 1147 |
) |
| 1148 |
), |
| 1149 |
'widget_space' => array( |
| 1150 |
'type' => 'spinner', |
| 1151 |
'label' => __pl('widget_space'), |
| 1152 |
'default' => get_option('pagelayer_between_widgets', 15), |
| 1153 |
'min' => -1000, |
| 1154 |
'step' => 1, |
| 1155 |
'max' => 1000, |
| 1156 |
'css' => ['{{element}} .pagelayer-col-holder > div:not(:last-child)' => 'margin-bottom: {{val}}px;'], |
| 1157 |
), |
| 1158 |
'col' => array( |
| 1159 |
'type' => 'select', |
| 1160 |
'label' => __pl('col_width'), |
| 1161 |
'addClass' => 'pagelayer-col-{{val}}', |
| 1162 |
'list' => array( |
| 1163 |
'1' => __pl('1'), |
| 1164 |
'2' => __pl('2'), |
| 1165 |
'3' => __pl('3'), |
| 1166 |
'4' => __pl('4'), |
| 1167 |
'5' => __pl('5'), |
| 1168 |
'6' => __pl('6'), |
| 1169 |
'7' => __pl('7'), |
| 1170 |
'8' => __pl('8'), |
| 1171 |
'9' => __pl('9'), |
| 1172 |
'10' => __pl('10'), |
| 1173 |
'11' => __pl('11'), |
| 1174 |
'12' => __pl('12'), |
| 1175 |
'' => __pl('custom'), |
| 1176 |
) |
| 1177 |
), |
| 1178 |
'col_width' => array( |
| 1179 |
'type' => 'spinner', |
| 1180 |
'label' => __pl('width_custom'), |
| 1181 |
'min' => 0, |
| 1182 |
'step' => 1, |
| 1183 |
'max' => 1000, |
| 1184 |
'css' => ( !pagelayer_is_live() ? 'width: {{val}}px;' : '' ), |
| 1185 |
'req' => ['col' => ''], |
| 1186 |
), |
| 1187 |
), |
| 1188 |
'col_bg_styles' => [ |
| 1189 |
'col_bg_type' => array( |
| 1190 |
'type' => 'radio', |
| 1191 |
'label' => __pl('col_bg_type'), |
| 1192 |
'list' => array( |
| 1193 |
'' => __pl('none'), |
| 1194 |
'video' => __pl('video'), |
| 1195 |
'parallax' => __pl('parallax'), |
| 1196 |
), |
| 1197 |
), |
| 1198 |
'bg_video_src' => array( |
| 1199 |
'type' => 'video', |
| 1200 |
'label' => __pl('video_src_label'), |
| 1201 |
'desc' => __pl('video_src_desc'), |
| 1202 |
'req' => ['col_bg_type' => 'video'] |
| 1203 |
), |
| 1204 |
'parallax_img' => array( |
| 1205 |
'type' => 'image', |
| 1206 |
'label' => __pl('Image'), |
| 1207 |
'req' => ['col_bg_type' => 'parallax'] |
| 1208 |
), |
| 1209 |
], |
| 1210 |
'col_bg_overlay' => [ |
| 1211 |
'overlay_state' => array( |
| 1212 |
'type' => 'radio', |
| 1213 |
'label' => '', |
| 1214 |
'list' => array( |
| 1215 |
'' => __pl('normal'), |
| 1216 |
'hover' => __pl('hover'), |
| 1217 |
), |
| 1218 |
), |
| 1219 |
'overlay_type' => array( |
| 1220 |
'type' => 'radio', |
| 1221 |
'label' => __pl('overlay_type'), |
| 1222 |
'list' => array( |
| 1223 |
'' => __pl('none'), |
| 1224 |
'color' => __pl('color'), |
| 1225 |
'image' => __pl('image'), |
| 1226 |
'gradient' => __pl('gradient') |
| 1227 |
), |
| 1228 |
'show' => ['overlay_state' => ''], |
| 1229 |
), |
| 1230 |
'overlay_color' => array( |
| 1231 |
'type' => 'color', |
| 1232 |
'label' => __pl('color'), |
| 1233 |
//'desc' => __pl('video_src_desc'), |
| 1234 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-color: {{val}};'], |
| 1235 |
'req' => ['overlay_type' => 'color'], |
| 1236 |
'show' => ['overlay_state' => ''], |
| 1237 |
), |
| 1238 |
'overlay_gradient' => array( |
| 1239 |
'type' => 'gradient', |
| 1240 |
'label' => '', |
| 1241 |
'default' => '150,#44d3f6ff,23,#72e584ff,45,#2ca4ebff,100', |
| 1242 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'], |
| 1243 |
'show' => ['overlay_state' => ''], |
| 1244 |
'req' => ['overlay_type' => 'gradient'] |
| 1245 |
), |
| 1246 |
'overlay_img' => array( |
| 1247 |
'type' => 'image', |
| 1248 |
'label' => __pl('Image'), |
| 1249 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background: url({{{overlay_img-url}}});'], |
| 1250 |
'show' => ['overlay_state' => ''], |
| 1251 |
'req' => ['overlay_type' => 'image'] |
| 1252 |
), |
| 1253 |
'overlay_img_attachment' => array( |
| 1254 |
'type' => 'select', |
| 1255 |
'label' => __pl('overlay_img_attachment'), |
| 1256 |
'list' => [ |
| 1257 |
'' => __pl('default'), |
| 1258 |
'scroll' => __pl('scroll'), |
| 1259 |
'fixed' => __pl('fixed') |
| 1260 |
], |
| 1261 |
'show' => ['overlay_state' => ''], |
| 1262 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-attachment: {{val}};'], |
| 1263 |
'req' => ['overlay_type' => 'image'] |
| 1264 |
), |
| 1265 |
'overlay_bg_posx' => array( |
| 1266 |
'type' => 'select', |
| 1267 |
'label' => __pl('overlay_bg_posx'), |
| 1268 |
'list' => [ |
| 1269 |
'' => __pl('default'), |
| 1270 |
'center' => __pl('center'), |
| 1271 |
'left' => __pl('left'), |
| 1272 |
'right' => __pl('right') |
| 1273 |
], |
| 1274 |
'show' => ['overlay_state' => ''], |
| 1275 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-position-x: {{val}};'], |
| 1276 |
'req' => ['overlay_type' => 'image'] |
| 1277 |
), |
| 1278 |
'overlay_bg_posy' => array( |
| 1279 |
'type' => 'select', |
| 1280 |
'label' => __pl('overlay_bg_posy'), |
| 1281 |
'list' => [ |
| 1282 |
'' => __pl('default'), |
| 1283 |
'center' => __pl('center'), |
| 1284 |
'top' => __pl('top'), |
| 1285 |
'bottom' => __pl('bottom') |
| 1286 |
], |
| 1287 |
'show' => ['overlay_state' => ''], |
| 1288 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-position-y: {{val}};'], |
| 1289 |
'req' => ['overlay_type' => 'image'] |
| 1290 |
), |
| 1291 |
'overlay_bg_repeat' => array( |
| 1292 |
'type' => 'select', |
| 1293 |
'label' => __pl('overlay_bg_repeat'), |
| 1294 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-repeat: {{val}};'], |
| 1295 |
'list' => [ |
| 1296 |
'' => __pl('default'), |
| 1297 |
'repeat' => __pl('repeat'), |
| 1298 |
'no-repeat' => __pl('no-repeat'), |
| 1299 |
'repeat-x' => __pl('repeat-x'), |
| 1300 |
'repeat-y' => __pl('repeat-y'), |
| 1301 |
], |
| 1302 |
'show' => ['overlay_state' => ''], |
| 1303 |
'req' => ['overlay_type' => 'image'] |
| 1304 |
), |
| 1305 |
'overlay_bg_size' => array( |
| 1306 |
'type' => 'select', |
| 1307 |
'label' => __pl('overlay_bg_size'), |
| 1308 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'background-size: {{val}};'], |
| 1309 |
'list' => [ |
| 1310 |
'' => __pl('default'), |
| 1311 |
'cover' => __pl('cover'), |
| 1312 |
'contain' => __pl('contain') |
| 1313 |
], |
| 1314 |
'show' => ['overlay_state' => ''], |
| 1315 |
'req' => ['overlay_type' => 'image'] |
| 1316 |
), |
| 1317 |
'overlay_transperancy' => array( |
| 1318 |
'type' => 'slider', |
| 1319 |
'label' => __pl('overlay_transperancy'), |
| 1320 |
'default' => 0.5, |
| 1321 |
'min' => 0, |
| 1322 |
'max' => 1, |
| 1323 |
'step' => 0.1, |
| 1324 |
'css' => ['{{element}} .pagelayer-background-overlay' => 'opacity: {{val}};'], |
| 1325 |
'req' => array( |
| 1326 |
'!overlay_type' => '', |
| 1327 |
), |
| 1328 |
'show' => ['overlay_state' => ''], |
| 1329 |
), |
| 1330 |
'overlay_hover_delay' => array( |
| 1331 |
'type' => 'spinner', |
| 1332 |
'label' => __pl('overlay_hover_delay'), |
| 1333 |
'min' => 0, |
| 1334 |
'step' => 100, |
| 1335 |
'max' => 5000, |
| 1336 |
'default' => 400, |
| 1337 |
'css' => ['{{element}} .pagelayer-background-overlay' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'], |
| 1338 |
'show' => array( |
| 1339 |
'overlay_state' => 'hover' |
| 1340 |
), |
| 1341 |
), |
| 1342 |
'overlay_type_hover' => array( |
| 1343 |
'type' => 'radio', |
| 1344 |
'label' => __pl('overlay_type_hover'), |
| 1345 |
'list' => array( |
| 1346 |
'' => __pl('none'), |
| 1347 |
'color' => __pl('color'), |
| 1348 |
'gradient' => __pl('gradient'), |
| 1349 |
'image' => __pl('image'), |
| 1350 |
), |
| 1351 |
'show' => ['overlay_state' => 'hover'], |
| 1352 |
), |
| 1353 |
'overlay_color_hover' => array( |
| 1354 |
'type' => 'color', |
| 1355 |
'label' => __pl('color'), |
| 1356 |
//'desc' => __pl('video_src_desc'), |
| 1357 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background: {{val}};'], |
| 1358 |
'req' => ['overlay_type_hover' => 'color'], |
| 1359 |
'show' => ['overlay_state' => 'hover'], |
| 1360 |
), |
| 1361 |
'overlay_gradient_hover' => array( |
| 1362 |
'type' => 'gradient', |
| 1363 |
'label' => '', |
| 1364 |
'default' => '150,#44d3f6ff,23,#72e584ff,45,#2ca4ebff,100', |
| 1365 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background: linear-gradient({{val[0]}}deg, {{val[1]}} {{val[2]}}%, {{val[3]}} {{val[4]}}%, {{val[5]}} {{val[6]}}%);'], |
| 1366 |
'show' => ['overlay_state' => 'hover'], |
| 1367 |
'req' => ['overlay_type_hover' => 'gradient'] |
| 1368 |
), |
| 1369 |
'overlay_img_hover' => array( |
| 1370 |
'type' => 'image', |
| 1371 |
'label' => __pl('Image'), |
| 1372 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background: url({{{overlay_img_hover-url}}});'], |
| 1373 |
'show' => ['overlay_state' => 'hover'], |
| 1374 |
'req' => ['overlay_type_hover' => 'image'] |
| 1375 |
), |
| 1376 |
'overlay_img_attachment_hover' => array( |
| 1377 |
'type' => 'select', |
| 1378 |
'label' => __pl('overlay_img_attachment_hover'), |
| 1379 |
'list' => [ |
| 1380 |
'' => __pl('default'), |
| 1381 |
'scroll' => __pl('scroll'), |
| 1382 |
'fixed' => __pl('fixed') |
| 1383 |
], |
| 1384 |
'show' => ['overlay_state' => 'hover'], |
| 1385 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-attachment: {{val}};'], |
| 1386 |
'req' => ['overlay_type_hover' => 'image'] |
| 1387 |
), |
| 1388 |
'overlay_bg_posx_hover' => array( |
| 1389 |
'type' => 'select', |
| 1390 |
'label' => __pl('overlay_bg_posx_hover'), |
| 1391 |
'list' => [ |
| 1392 |
'' => __pl('default'), |
| 1393 |
'center' => __pl('center'), |
| 1394 |
'left' => __pl('left'), |
| 1395 |
'right' => __pl('right') |
| 1396 |
], |
| 1397 |
'show' => ['overlay_state' => 'hover'], |
| 1398 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-position-x: {{val}};'], |
| 1399 |
'req' => ['overlay_type_hover' => 'image'] |
| 1400 |
), |
| 1401 |
'overlay_bg_posy_hover' => array( |
| 1402 |
'type' => 'select', |
| 1403 |
'label' => __pl('overlay_bg_posy_hover'), |
| 1404 |
'list' => [ |
| 1405 |
'' => __pl('default'), |
| 1406 |
'center' => __pl('center'), |
| 1407 |
'top' => __pl('top'), |
| 1408 |
'bottom' => __pl('bottom') |
| 1409 |
], |
| 1410 |
'show' => ['overlay_state' => 'hover'], |
| 1411 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-position-y: {{val}};'], |
| 1412 |
'req' => ['overlay_type_hover' => 'image'] |
| 1413 |
), |
| 1414 |
'overlay_bg_repeat_hover' => array( |
| 1415 |
'type' => 'select', |
| 1416 |
'label' => __pl('overlay_bg_repeat_hover'), |
| 1417 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-repeat: {{val}};'], |
| 1418 |
'list' => [ |
| 1419 |
'' => __pl('default'), |
| 1420 |
'repeat' => __pl('repeat'), |
| 1421 |
'no-repeat' => __pl('no-repeat'), |
| 1422 |
'repeat-x' => __pl('repeat-x'), |
| 1423 |
'repeat-y' => __pl('repeat-y'), |
| 1424 |
], |
| 1425 |
'show' => ['overlay_state' => 'hover'], |
| 1426 |
'req' => ['overlay_type_hover' => 'image'] |
| 1427 |
), |
| 1428 |
'overlay_bg_size_hover' => array( |
| 1429 |
'type' => 'select', |
| 1430 |
'label' => __pl('overlay_bg_size_hover'), |
| 1431 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'background-size: {{val}};'], |
| 1432 |
'list' => [ |
| 1433 |
'' => __pl('default'), |
| 1434 |
'cover' => __pl('cover'), |
| 1435 |
'contain' => __pl('contain') |
| 1436 |
], |
| 1437 |
'show' => ['overlay_state' => 'hover'], |
| 1438 |
'req' => ['overlay_type_hover' => 'image'] |
| 1439 |
), |
| 1440 |
'overlay_transperancy_hover' => array( |
| 1441 |
'type' => 'slider', |
| 1442 |
'label' => __pl('overlay_transperancy_hover'), |
| 1443 |
'default' => 0.5, |
| 1444 |
'min' => 0, |
| 1445 |
'max' => 1, |
| 1446 |
'step' => 0.1, |
| 1447 |
'css' => ['{{element}}:hover .pagelayer-background-overlay' => 'opacity: {{val}};'], |
| 1448 |
'req' => array( |
| 1449 |
'!overlay_type_hover' => '', |
| 1450 |
), |
| 1451 |
'show' => ['overlay_state' => 'hover'], |
| 1452 |
), |
| 1453 |
], |
| 1454 |
'styles' => [ |
| 1455 |
'col_bg_styles' => __pl('col_bg_styles'), |
| 1456 |
'col_bg_overlay' => __pl('col_bg_overlay'), |
| 1457 |
], |
| 1458 |
) |
| 1459 |
); |
| 1460 |
|
| 1461 |
//////////////////////// |
| 1462 |
// TEXT Group |
| 1463 |
//////////////////////// |
| 1464 |
|
| 1465 |
// Heading object |
| 1466 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_heading', array( |
| 1467 |
'name' => __pl('title'), |
| 1468 |
'group' => 'text', |
| 1469 |
'func' => 'pagelayer_sc_heading', |
| 1470 |
'innerHTML' => 'text', |
| 1471 |
'html' => '<a if-ext="{{link}}" href="{{link}}"> |
| 1472 |
<div class="pagelayer-heading-holder">{{text}}</div> |
| 1473 |
</a>', |
| 1474 |
'params' => array( |
| 1475 |
'text' => array( |
| 1476 |
'type' => 'textarea', |
| 1477 |
'label' => __pl('Edit Title'), |
| 1478 |
'default' => '<h2>Your Heading</h2>', |
| 1479 |
'desc' => __pl('Edit the heading here'), |
| 1480 |
'edit' => '.pagelayer-heading-holder', // Edit the text and also mirror the same |
| 1481 |
), |
| 1482 |
'link' => array( |
| 1483 |
'label' => __pl('image_link_label'), |
| 1484 |
'desc' => __pl('image_link_desc'), |
| 1485 |
'type' => 'link', |
| 1486 |
), |
| 1487 |
'target' => array( |
| 1488 |
'label' => __pl('open_link_in_new_window'), |
| 1489 |
'type' => 'checkbox', |
| 1490 |
'addAttr' => ['{{element}} a' => 'target="_blank"'], |
| 1491 |
'req' => array( |
| 1492 |
'!link' => '' |
| 1493 |
) |
| 1494 |
), |
| 1495 |
'align' => array( |
| 1496 |
'label' => __pl('obj_align_label'), |
| 1497 |
'type' => 'radio', |
| 1498 |
'addAttr' => 'align="{{align}}"', |
| 1499 |
'css' => ['{{element}}' => 'text-align: {{val}}'], |
| 1500 |
'list' => array( |
| 1501 |
'left' => __pl('left'), |
| 1502 |
'center' => __pl('center'), |
| 1503 |
'right' => __pl('right') |
| 1504 |
) |
| 1505 |
), |
| 1506 |
), |
| 1507 |
'heading_styles' => [ |
| 1508 |
'color' => array( |
| 1509 |
'type' => 'color', |
| 1510 |
'label' => __pl('color'), |
| 1511 |
'default' => '#111111ff', |
| 1512 |
'css' => ['{{element}} .pagelayer-heading-holder *' => 'color:{{val}}', '{{element}} .pagelayer-heading-holder' => 'color:{{val}}'], |
| 1513 |
), |
| 1514 |
'heading_typo' => array( |
| 1515 |
'type' => 'typography', |
| 1516 |
'label' => __pl('typography'), |
| 1517 |
'css' => ['{{element}} .pagelayer-heading-holder *' => '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;', |
| 1518 |
'{{element}} .pagelayer-heading-holder' => '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;'], |
| 1519 |
), |
| 1520 |
'heading_text_shadow' => array( |
| 1521 |
'type' => 'shadow', |
| 1522 |
'label' => __pl('text_shadow'), |
| 1523 |
'css' => ['{{element}} .pagelayer-heading-holder' => 'text-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}} !important;'], |
| 1524 |
), |
| 1525 |
], |
| 1526 |
'styles' => [ |
| 1527 |
'heading_styles' => __pl('heading_styles') |
| 1528 |
], |
| 1529 |
) |
| 1530 |
); |
| 1531 |
|
| 1532 |
// Rich Text object |
| 1533 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_text', array( |
| 1534 |
'name' => __pl('Rich Text'), |
| 1535 |
'group' => 'text', |
| 1536 |
'func' => 'pagelayer_sc_code', |
| 1537 |
'innerHTML' => 'text', |
| 1538 |
'html' => '<div class="pagelayer-text-holder">{{text}}</div>', |
| 1539 |
'params' => array( |
| 1540 |
'text' => array( |
| 1541 |
'type' => 'editor', |
| 1542 |
'label' => __pl('Edit Rich Text'), |
| 1543 |
'default' => 'Lorem ipsum dolor sit amet', |
| 1544 |
'desc' => __pl('Edit the content here or edit directly in the Editor'), |
| 1545 |
'edit' => '.pagelayer-text-holder', // Edit the text and also mirror the same |
| 1546 |
) |
| 1547 |
) |
| 1548 |
) |
| 1549 |
); |
| 1550 |
|
| 1551 |
// Quote |
| 1552 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_quote', array( |
| 1553 |
'name' => __pl('quote'), |
| 1554 |
'group' => 'text', |
| 1555 |
'innerHTML' => 'quote_content', |
| 1556 |
'html' => '<div class="pagelayer-quote-holder pagelayer-quote-{{quote_style}}"> |
| 1557 |
<i if="{{quotation_pos}}" class="fa fa-quote-left pagelayer-quotation-{{quotation_pos}}"></i> |
| 1558 |
<div if="{{quote_content}}" class="pagelayer-quote-content"> |
| 1559 |
<i if="{{double_indent}}" class="fa fa-quote-left"></i> |
| 1560 |
{{quote_content}} |
| 1561 |
<i if="{{double_indent}}" class="fa fa-quote-right"></i> |
| 1562 |
</div> |
| 1563 |
<div if="{{cite}}" class="pagelayer-quote-cite"> |
| 1564 |
<a if-ext="{{cite_url}}" href="{{cite_url}}"> |
| 1565 |
<span class="pagelayer-cite-holder">{{cite}}</span> |
| 1566 |
</a> |
| 1567 |
</div> |
| 1568 |
</div>', |
| 1569 |
'func' => 'pagelayer_sc_quote', |
| 1570 |
'params' => array( |
| 1571 |
'quote_content' => array( |
| 1572 |
'type' => 'textarea', |
| 1573 |
'label' => __pl('quotes_content_label'), |
| 1574 |
'default' => 'Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet.', |
| 1575 |
'edit' => '.pagelayer-quote-content', |
| 1576 |
), |
| 1577 |
'quote_background_color' => array( |
| 1578 |
'type' => 'color', |
| 1579 |
'label' => __pl('bg_color'), |
| 1580 |
'default' => '#eeeeee', |
| 1581 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'background-color: {{val}}'] |
| 1582 |
), |
| 1583 |
'quote_content_color' => array( |
| 1584 |
'type' => 'color', |
| 1585 |
'label' => __pl('quotes_content_color_label'), |
| 1586 |
'default' => '#050505', |
| 1587 |
'css' => ['{{element}} .pagelayer-quote-content' => 'color:{{val}}'], |
| 1588 |
), |
| 1589 |
'quote_content_typo' => array( |
| 1590 |
'type' => 'typography', |
| 1591 |
'label' => __pl('quote_content_typo'), |
| 1592 |
'css' => ['{{element}} .pagelayer-quote-content' => '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;'], |
| 1593 |
), |
| 1594 |
), |
| 1595 |
'qoute_styles' => [ |
| 1596 |
'quote_style' => array( |
| 1597 |
'type' => 'select', |
| 1598 |
'label' => __pl('style'), |
| 1599 |
'default' => 'quotation', |
| 1600 |
'list' => array( |
| 1601 |
'default' => __pl('default'), |
| 1602 |
'quotation' => __pl('quotation'), |
| 1603 |
'double' => __pl('double_quotation') |
| 1604 |
) |
| 1605 |
), |
| 1606 |
'quotation_pos' => array( |
| 1607 |
'type' => 'radio', |
| 1608 |
'label' => __pl('quotation_pos_label'), |
| 1609 |
'default' => 'default', |
| 1610 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'position: relative;', |
| 1611 |
'{{element}} .pagelayer-quote-content' => 'position: relative; z-index:1;', |
| 1612 |
'{{element}} .pagelayer-quote-cite' => 'position: relative; z-index:1;'], |
| 1613 |
'list' => array( |
| 1614 |
'default' => __pl('default'), |
| 1615 |
'overlay' => __pl('overlay') |
| 1616 |
), |
| 1617 |
'req' => array( |
| 1618 |
'quote_style' => 'quotation' |
| 1619 |
), |
| 1620 |
), |
| 1621 |
'quotation_size' => array( |
| 1622 |
'type' => 'slider', |
| 1623 |
'label' => __pl('quotation_size_label'), |
| 1624 |
'min' => 1, |
| 1625 |
'step' => 1, |
| 1626 |
'max' => 1000, |
| 1627 |
'default' => 70, |
| 1628 |
'screen' => 1, |
| 1629 |
'css' => ['{{element}} i' => 'font-size: {{val}}px;'], |
| 1630 |
'req' => array( |
| 1631 |
'quote_style' => ['quotation','double'] |
| 1632 |
) |
| 1633 |
), |
| 1634 |
'quotation_color' => array( |
| 1635 |
'type' => 'color', |
| 1636 |
'label' => __pl('quotation_color_label'), |
| 1637 |
'default' => '#dadadaff', |
| 1638 |
'css' => ['{{element}} i' => 'color:{{val}}'], |
| 1639 |
'req' => array( |
| 1640 |
'quote_style' => ['quotation','double'] |
| 1641 |
) |
| 1642 |
), |
| 1643 |
'quotation_top' => array( |
| 1644 |
'type' => 'slider', |
| 1645 |
'label' => __pl('quotation_top_label'), |
| 1646 |
'min' => 0, |
| 1647 |
'step' => 1, |
| 1648 |
'max' => 100, |
| 1649 |
'default' => 0, |
| 1650 |
'css' => ['{{element}} .pagelayer-quotation-overlay' => 'top: {{val}}%;'], |
| 1651 |
'req' => array( |
| 1652 |
'quote_style' => 'quotation', |
| 1653 |
'quotation_pos' => 'overlay' |
| 1654 |
) |
| 1655 |
), |
| 1656 |
'quotation_left' => array( |
| 1657 |
'type' => 'slider', |
| 1658 |
'label' => __pl('quotation_left_label'), |
| 1659 |
'min' => 0, |
| 1660 |
'step' => 1, |
| 1661 |
'max' => 100, |
| 1662 |
'css' => ['{{element}} .pagelayer-quotation-overlay' => 'left: {{val}}%;'], |
| 1663 |
'req' => array( |
| 1664 |
'quote_style' => 'quotation', |
| 1665 |
'quotation_pos' => 'overlay' |
| 1666 |
) |
| 1667 |
), |
| 1668 |
'double_indent' => array( |
| 1669 |
'type' => 'slider', |
| 1670 |
'label' => __pl('quotation_double_indent_label'), |
| 1671 |
'min' => 1, |
| 1672 |
'step' => 1, |
| 1673 |
'max' => 500, |
| 1674 |
'default' => 10, |
| 1675 |
'css' => ['{{element}} .fa-quote-right' => 'padding-left: {{val}}px;', |
| 1676 |
'{{element}} .fa-quote-left' => 'padding-right: {{val}}px;'], |
| 1677 |
'req' => array( |
| 1678 |
'quote_style' => 'double' |
| 1679 |
) |
| 1680 |
), |
| 1681 |
'align' => array( |
| 1682 |
'label' => __pl('obj_align_label'), |
| 1683 |
'type' => 'radio', |
| 1684 |
'default' => 'left', |
| 1685 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'text-align: {{val}};'], |
| 1686 |
'list' => array( |
| 1687 |
'left' => __pl('left'), |
| 1688 |
'center' => __pl('center'), |
| 1689 |
'right' => __pl('right') |
| 1690 |
) |
| 1691 |
) |
| 1692 |
], |
| 1693 |
'cite_styles' => [ |
| 1694 |
'cite' => array( |
| 1695 |
'type' => 'text', |
| 1696 |
'label' => __pl('quotes_cite_label'), |
| 1697 |
'default' => '- John Smith', |
| 1698 |
'desc' => __pl('quotes_cite_desc'), |
| 1699 |
'edit' => '.pagelayer-cite-holder', |
| 1700 |
), |
| 1701 |
'cite_url' => array( |
| 1702 |
'type' => 'link', |
| 1703 |
'label' => __pl('quotes_url_label'), |
| 1704 |
'desc' => __pl('quotes_url_desc'), |
| 1705 |
), |
| 1706 |
'cite_text_color' => array( |
| 1707 |
'type' => 'color', |
| 1708 |
'label' => __pl('quotes_cite_color_label'), |
| 1709 |
'default' => '#3f3f3f', |
| 1710 |
'css' => ['{{element}} .pagelayer-quote-cite span' => 'color:{{val}}'] |
| 1711 |
), |
| 1712 |
'cite_typo' => array( |
| 1713 |
'type' => 'typography', |
| 1714 |
'label' => __pl('cite_typo'), |
| 1715 |
'default' => ',16,italic,,,,solid,,,,', |
| 1716 |
'css' => ['{{element}} .pagelayer-quote-cite' => '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;'], |
| 1717 |
) |
| 1718 |
], |
| 1719 |
'border_style' => [ |
| 1720 |
'quote_border_width' => array( |
| 1721 |
'type' => 'spinner', |
| 1722 |
'label' => __pl('quote_left_border_width'), |
| 1723 |
'min' => 0, |
| 1724 |
'step' => 1, |
| 1725 |
'max' => 100, |
| 1726 |
'default' => 5, |
| 1727 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'border-left-width: {{val}}px; border-left-style: solid;'] |
| 1728 |
), |
| 1729 |
'quote_border_color' => array( |
| 1730 |
'type' => 'color', |
| 1731 |
'label' => __pl('quote_border_color'), |
| 1732 |
'default' => '#02CC90', |
| 1733 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'border-left-color: {{val}}'] |
| 1734 |
), |
| 1735 |
'quote_lpadding' => array( |
| 1736 |
'type' => 'spinner', |
| 1737 |
'label' => __pl('quote_left_padding'), |
| 1738 |
'min' => 1, |
| 1739 |
'step' => 1, |
| 1740 |
'max' => 100, |
| 1741 |
'default' => 30, |
| 1742 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'padding-left: {{val}}px; padding-right: 10px;'] |
| 1743 |
), |
| 1744 |
'quote_vpadding' => array( |
| 1745 |
'type' => 'spinner', |
| 1746 |
'label' => __pl('quote_vertical_padding'), |
| 1747 |
'min' => 1, |
| 1748 |
'step' => 1, |
| 1749 |
'max' => 100, |
| 1750 |
'default' => 20, |
| 1751 |
'css' => ['{{element}} .pagelayer-quote-holder' => 'padding-top: {{val}}px; padding-bottom: {{val}}px;'] |
| 1752 |
) |
| 1753 |
], |
| 1754 |
'styles' => [ |
| 1755 |
'qoute_styles' => __pl('qoute_styles'), |
| 1756 |
'cite_styles' => __pl('cite_styles'), |
| 1757 |
'border_style' => __pl('left_border'), |
| 1758 |
], |
| 1759 |
) |
| 1760 |
); |
| 1761 |
|
| 1762 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_list_item', array( |
| 1763 |
'name' => __pl('list_item'), |
| 1764 |
'group' => 'text', |
| 1765 |
'not_visible' => 1, |
| 1766 |
'func' => 'pagelayer_sc_list_item', |
| 1767 |
'innerHTML' => 'item', |
| 1768 |
'html' => '<li if="{{item}}" class="pagelayer-list-li"> |
| 1769 |
<a if-ext="{{item_url}}" class="pagelayer-list-url pagelayer-ele-link" href="{{item_url}}"> |
| 1770 |
<span class="pagelayer-list-icon-holder"> |
| 1771 |
<i if="{{show_icon}}" class="pagelayer-list-icon fa fa-{{icon}}"></i> |
| 1772 |
<span if="{{item}}" class="pagelayer-list-item">{{item}}</span> |
| 1773 |
</span> |
| 1774 |
</a> |
| 1775 |
</li>', |
| 1776 |
'params' => array( |
| 1777 |
'item' => array( |
| 1778 |
'type' => 'text', |
| 1779 |
'label' => __pl('list_items_label'), |
| 1780 |
'default' => __pl('list_items_default'), |
| 1781 |
), |
| 1782 |
'item_url' => array( |
| 1783 |
'type' => 'text', |
| 1784 |
'label' => __pl('list_item_url_label'), |
| 1785 |
'default' => '' |
| 1786 |
), |
| 1787 |
'show_icon' => array( |
| 1788 |
'type' => 'checkbox', |
| 1789 |
'label' => __pl('list_show_icon'), |
| 1790 |
'default' => 'true' |
| 1791 |
), |
| 1792 |
'icon' => array( |
| 1793 |
'type' => 'icon', |
| 1794 |
'label' => __pl('list_icon_label'), |
| 1795 |
'default' => 'star', |
| 1796 |
'req' => array( |
| 1797 |
'show_icon' => 'true' |
| 1798 |
) |
| 1799 |
) |
| 1800 |
) |
| 1801 |
) |
| 1802 |
); |
| 1803 |
|
| 1804 |
// List |
| 1805 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_list', array( |
| 1806 |
'name' => __pl('list'), |
| 1807 |
'group' => 'text', |
| 1808 |
'func' => 'pagelayer_sc_list', |
| 1809 |
'has_group' => [ |
| 1810 |
'section' => 'params', |
| 1811 |
'prop' => 'elements' |
| 1812 |
], |
| 1813 |
'holder' => '.pagelayer-list-ul', |
| 1814 |
'html' => '<ul class="pagelayer-list-ul pagelayer-list-type-{{list_type}}"> |
| 1815 |
</ul>', |
| 1816 |
'params' => array( |
| 1817 |
'elements' => array( |
| 1818 |
'type' => 'group', |
| 1819 |
'label' => __pl('List Item'), |
| 1820 |
'sc' => PAGELAYER_SC_PREFIX.'_list_item', |
| 1821 |
'item_label' => array( |
| 1822 |
'default' => __pl('List Item'), |
| 1823 |
'param' => 'item' |
| 1824 |
), |
| 1825 |
'count' => 2, |
| 1826 |
'text' => __pl('Add List Item'), |
| 1827 |
), |
| 1828 |
'list_type' => array( |
| 1829 |
'type' => 'select', |
| 1830 |
'label' => __pl('style'), |
| 1831 |
'default' => 'none', |
| 1832 |
'css' => ['{{element}} li' => 'list-style-type: {{val}};'], |
| 1833 |
'list' => array( |
| 1834 |
'none' => __pl('none'), |
| 1835 |
'circle' => __pl('list_list_type_circle'), |
| 1836 |
'disc' => __pl('list_list_type_disc'), |
| 1837 |
'square' => __pl('list_list_type_square'), |
| 1838 |
'armenian' => __pl('list_list_type_armenian'), |
| 1839 |
'georgian' => __pl('list_list_type_georgian'), |
| 1840 |
'decimal' => '1, 2, 3, 4', |
| 1841 |
'decimal-leading-zero' => '01, 02, 03, 04', |
| 1842 |
'lower-latin' => 'a, b, c, d', |
| 1843 |
'lower-roman' => 'i, ii, iii, iv', |
| 1844 |
'lower-greek' => 'α, β, γ, δ', |
| 1845 |
'upper-latin' => 'A, B, C, D', |
| 1846 |
'upper-roman' => 'I, II, III, IV' |
| 1847 |
) |
| 1848 |
), |
| 1849 |
'spacing' => array( |
| 1850 |
'type' => 'slider', |
| 1851 |
'label' => __pl('list_spacing_label'), |
| 1852 |
'min' => 0, |
| 1853 |
'step' => 1, |
| 1854 |
'max' => 100, |
| 1855 |
'default' => 10, |
| 1856 |
'css' => ['{{element}} .pagelayer-list_item:not(:last-child)' => 'padding-bottom: calc({{val}}px/2);', |
| 1857 |
'{{element}} .pagelayer-list_item:not(:first-child)' => 'margin-top: calc({{val}}px/2)'], |
| 1858 |
), |
| 1859 |
'side_spacing' => array( |
| 1860 |
'type' => 'slider', |
| 1861 |
'label' => __pl('list_side_spacing_label'), |
| 1862 |
'min' => 0, |
| 1863 |
'step' => 1, |
| 1864 |
'max' => 100, |
| 1865 |
'css' => ['{{element}} .pagelayer-list_item' => 'padding-left: {{val}}px; padding-right: {{val}}px;'], |
| 1866 |
), |
| 1867 |
), |
| 1868 |
'text_style' => [ |
| 1869 |
'list_color' => array( |
| 1870 |
'type' => 'color', |
| 1871 |
'label' => __pl('list_color_label'), |
| 1872 |
'default' => '#555555', |
| 1873 |
'css' => ['{{element}} li' => 'color:{{val}}'], |
| 1874 |
), |
| 1875 |
'list_typo' => array( |
| 1876 |
'type' => 'typography', |
| 1877 |
'label' => __pl('list_typo'), |
| 1878 |
'css' => [ |
| 1879 |
'{{element}} li' => '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;', |
| 1880 |
'{{element}} li > a' => '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;' |
| 1881 |
], |
| 1882 |
), |
| 1883 |
'item_indent' => array( |
| 1884 |
'type' => 'slider', |
| 1885 |
'label' => __pl('list_item_indent_label'), |
| 1886 |
'min' => 0, |
| 1887 |
'step' => 1, |
| 1888 |
'max' => 100, |
| 1889 |
'default' => 10, |
| 1890 |
'css' => ['{{element}} .pagelayer-list-item' => 'margin-left: {{val}}px;'], |
| 1891 |
), |
| 1892 |
], |
| 1893 |
'icon_style' => [ |
| 1894 |
'icon_color' => array( |
| 1895 |
'type' => 'color', |
| 1896 |
'label' => __pl('list_icon_color_label'), |
| 1897 |
'default' => '#3E8EF7', |
| 1898 |
'css' => ['{{element}} i' => 'color:{{val}}'], |
| 1899 |
), |
| 1900 |
'icon_size' => array( |
| 1901 |
'type' => 'slider', |
| 1902 |
'label' => __pl('list_icon_size_label'), |
| 1903 |
'min' => 0, |
| 1904 |
'step' => 1, |
| 1905 |
'max' => 150, |
| 1906 |
'css' => ['{{element}} i' => 'font-size: {{val}}px'], |
| 1907 |
), |
| 1908 |
], |
| 1909 |
'divider' => [ |
| 1910 |
'icon_border_type' => array( |
| 1911 |
'type' => 'select', |
| 1912 |
'label' => __pl('type'), |
| 1913 |
'css' => ['{{element}} .pagelayer-list_item:not(:last-child)' => 'border-bottom-style: {{val}};', |
| 1914 |
'{{element}} .pagelayer-ele-wrap:not(:last-child) .pagelayer-list_item' => 'border-bottom-style: {{val}};'], |
| 1915 |
'default' => 'solid', |
| 1916 |
'list' => [ |
| 1917 |
'' => __pl('none'), |
| 1918 |
'solid' => __pl('solid'), |
| 1919 |
'double' => __pl('double'), |
| 1920 |
'dotted' => __pl('dotted'), |
| 1921 |
'dashed' => __pl('dashed'), |
| 1922 |
'groove' => __pl('groove'), |
| 1923 |
], |
| 1924 |
), |
| 1925 |
'icon_border_color' => array( |
| 1926 |
'type' => 'color', |
| 1927 |
'label' => __pl('color'), |
| 1928 |
'default' => '#cbd2dc78', |
| 1929 |
'css' => ['{{element}} .pagelayer-list_item' => 'border-bottom-color: {{val}};'], |
| 1930 |
'req' => array( |
| 1931 |
'!icon_border_type' => '' |
| 1932 |
), |
| 1933 |
), |
| 1934 |
'icon_border_width' => array( |
| 1935 |
'type' => 'slider', |
| 1936 |
'label' => __pl('border_width'), |
| 1937 |
'min' => 0, |
| 1938 |
'step' => 1, |
| 1939 |
'max' => 100, |
| 1940 |
'default' => 3, |
| 1941 |
'css' => ['{{element}} .pagelayer-list_item' => 'border-bottom-width: {{val[0]}}px;'], |
| 1942 |
'req' => [ |
| 1943 |
'!icon_border_type' => '' |
| 1944 |
] |
| 1945 |
), |
| 1946 |
], |
| 1947 |
'styles' => [ |
| 1948 |
'text_style' => __pl('text_style'), |
| 1949 |
'icon_style' => __pl('icon_style'), |
| 1950 |
'divider' => __pl('divider'), |
| 1951 |
] |
| 1952 |
) |
| 1953 |
); |
| 1954 |
|
| 1955 |
// Icon |
| 1956 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_icon', array( |
| 1957 |
'name' => __pl('icon'), |
| 1958 |
'group' => 'text', |
| 1959 |
'func' => 'pagelayer_sc_icon', |
| 1960 |
'html' => '<div class="pagelayer-icon-holder"> |
| 1961 |
<a if-ext="{{link}}" class="pagelayer-ele-link" href="{{link}}"> |
| 1962 |
<i class="fa fa-{{icon}} {{bg_shape}} {{icon_size}} pagelayer-animation-{{anim_hover}}"></i> |
| 1963 |
</a> |
| 1964 |
</div>', |
| 1965 |
'params' => array( |
| 1966 |
'icon' => array( |
| 1967 |
'type' => 'icon', |
| 1968 |
'label' => __pl('list_icon_label'), |
| 1969 |
'default' => 'star', |
| 1970 |
), |
| 1971 |
'icon_background_size' => array( |
| 1972 |
'type' => 'spinner', |
| 1973 |
'label' => __pl('service_box_icon_background_size'), |
| 1974 |
'default' => 10, |
| 1975 |
'css' => ['{{element}} i' => 'padding: calc(0.5em + {{val}}px);'], |
| 1976 |
'min' => 1, |
| 1977 |
'max' => 500, |
| 1978 |
'step' => 1, |
| 1979 |
), |
| 1980 |
'link' => array( |
| 1981 |
'type' => 'link', |
| 1982 |
'label' => __pl('icon_link_field_label'), |
| 1983 |
'default' => '' |
| 1984 |
), |
| 1985 |
'target' => array( |
| 1986 |
'type' => 'checkbox', |
| 1987 |
'label' => __pl('open_link_in_new_window'), |
| 1988 |
'addAttr' => ['{{element}} a' => 'target="_blank"'] |
| 1989 |
), |
| 1990 |
'icon_alignment' => array( |
| 1991 |
'type' => 'radio', |
| 1992 |
'label' => __pl('alignment'), |
| 1993 |
'default' => 'center', |
| 1994 |
'css' => 'text-align: {{val}}', |
| 1995 |
'list' => array( |
| 1996 |
'left' => __pl('left'), |
| 1997 |
'center' => __pl('center'), |
| 1998 |
'right' => __pl('right'), |
| 1999 |
), |
| 2000 |
), |
| 2001 |
), |
| 2002 |
'icon_style' => [ |
| 2003 |
'icon_hover' => array( |
| 2004 |
'type' => 'radio', |
| 2005 |
'label' => '', |
| 2006 |
'default' => '', |
| 2007 |
'list' => array( |
| 2008 |
'' => __pl('normal'), |
| 2009 |
'hover' => __pl('hover'), |
| 2010 |
), |
| 2011 |
), |
| 2012 |
'icon_color_style' => array( |
| 2013 |
'type' => 'color', |
| 2014 |
'label' => __pl('service_box_icon_color_label'), |
| 2015 |
'css' => ['{{element}} i' => 'height: 1em; width: 1em; position: relative; color: {{val}};', |
| 2016 |
'{{element}} i:before' => 'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);'], |
| 2017 |
'default' => '#3e8ef7', |
| 2018 |
'show' => array( |
| 2019 |
'icon_hover' => '' |
| 2020 |
), |
| 2021 |
), |
| 2022 |
'bg_shape' => array( |
| 2023 |
'type' => 'select', |
| 2024 |
'label' => __pl('icon_background_shape'), |
| 2025 |
'default' => '', |
| 2026 |
'list' => array( |
| 2027 |
'' => __pl('icon_shape_none'), |
| 2028 |
'pagelayer-icon-circle' => __pl('icon_shape_circle'), |
| 2029 |
'pagelayer-icon-square' => __pl('icon_shape_square'), |
| 2030 |
'pagelayer-icon-rounded' => __pl('icon_shape_rounded') |
| 2031 |
), |
| 2032 |
'show' => array( |
| 2033 |
'icon_hover' => '' |
| 2034 |
), |
| 2035 |
), |
| 2036 |
'icon_size' => array( |
| 2037 |
'type' => 'select', |
| 2038 |
'label' => __pl('obj_size_label'), |
| 2039 |
'default' => 'pagelayer-icon-large', |
| 2040 |
'list' => array( |
| 2041 |
'pagelayer-icon-mini' => __pl('mini'), |
| 2042 |
'pagelayer-icon-small' => __pl('small'), |
| 2043 |
'pagelayer-icon-large' => __pl('large'), |
| 2044 |
'pagelayer-icon-extra-large' => __pl('extra_large'), |
| 2045 |
'pagelayer-icon-double-large' => __pl('double_large'), |
| 2046 |
'pagelayer-icon-custom' => __pl('custom'), |
| 2047 |
), |
| 2048 |
'show' => array( |
| 2049 |
'icon_hover' => '' |
| 2050 |
), |
| 2051 |
), |
| 2052 |
'icon_size_custom' => array( |
| 2053 |
'type' => 'spinner', |
| 2054 |
'label' => __pl('service_box_icon_custom_size_label'), |
| 2055 |
'desc' => __pl('service_box_icon_custom_size_desc'), |
| 2056 |
'min' => 1, |
| 2057 |
'step' => 1, |
| 2058 |
'max' => 500, |
| 2059 |
'default' => 26, |
| 2060 |
'css' => ['{{element}} i' => 'font-size: {{val}}px'], |
| 2061 |
'req' => array( |
| 2062 |
'icon_size' => 'pagelayer-icon-custom' |
| 2063 |
), |
| 2064 |
'show' => array( |
| 2065 |
'icon_hover' => '' |
| 2066 |
), |
| 2067 |
), |
| 2068 |
'icon_rotate' => array( |
| 2069 |
'type' => 'spinner', |
| 2070 |
'label' => __pl('service_box_icon_rotate'), |
| 2071 |
'default' => 0, |
| 2072 |
'css' => ['{{element}} i' => 'transform: rotate({{val}}deg)'], |
| 2073 |
'min' => 0, |
| 2074 |
'max' => 360, |
| 2075 |
'step' => 1, |
| 2076 |
'show' => array( |
| 2077 |
'icon_hover' => '' |
| 2078 |
), |
| 2079 |
), |
| 2080 |
'bg_color' => array( |
| 2081 |
'type' => 'color', |
| 2082 |
'label' => __pl('service_box_icon_background_color_label'), |
| 2083 |
'default' => '#42414f', |
| 2084 |
'css' => ['{{element}} i' => 'background-color: {{val}};'], |
| 2085 |
'req' => array( |
| 2086 |
'!bg_shape' => '' |
| 2087 |
), |
| 2088 |
'show' => array( |
| 2089 |
'icon_hover' => '' |
| 2090 |
), |
| 2091 |
), |
| 2092 |
'icon_hover_delay' => array( |
| 2093 |
'type' => 'spinner', |
| 2094 |
'label' => __pl('animation_delay'), |
| 2095 |
'min' => 0, |
| 2096 |
'step' => 100, |
| 2097 |
'max' => 5000, |
| 2098 |
'default' => 400, |
| 2099 |
'css' => ['{{element}} i' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'], |
| 2100 |
'show' => array( |
| 2101 |
'icon_hover' => 'hover' |
| 2102 |
), |
| 2103 |
), |
| 2104 |
'icon_color_style_hover' => array( |
| 2105 |
'type' => 'color', |
| 2106 |
'label' => __pl('service_box_icon_color_label'), |
| 2107 |
'css' => ['{{element}} i:hover' => 'height: 1em; width: 1em; position: relative; color: {{val}}', |
| 2108 |
'{{element}} i:before' => 'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);'], |
| 2109 |
'show' => array( |
| 2110 |
'icon_hover' => 'hover' |
| 2111 |
), |
| 2112 |
), |
| 2113 |
'icon_size_custom_hover' => array( |
| 2114 |
'type' => 'spinner', |
| 2115 |
'label' => __pl('service_box_icon_custom_size_label'), |
| 2116 |
'desc' => __pl('service_box_icon_custom_size_desc'), |
| 2117 |
'min' => 1, |
| 2118 |
'step' => 1, |
| 2119 |
'max' => 500, |
| 2120 |
'css' => ['{{element}} i:hover' => 'font-size: {{val}}px'], |
| 2121 |
'req' => array( |
| 2122 |
'icon_size' => 'pagelayer-icon-custom' |
| 2123 |
), |
| 2124 |
'show' => array( |
| 2125 |
'icon_hover' => 'hover' |
| 2126 |
), |
| 2127 |
), |
| 2128 |
'anim_hover' => array( |
| 2129 |
'type' => 'select', |
| 2130 |
'label' => __pl('icon_animation'), |
| 2131 |
'list' => [ |
| 2132 |
'' => __pl('none'), |
| 2133 |
'grow' => __pl('Grow'), |
| 2134 |
'shrink' => __pl('Shrink'), |
| 2135 |
'pulse' => __pl('Pulse'), |
| 2136 |
'pulse-grow' => __pl('Pulse Grow'), |
| 2137 |
'pulse-shrink' => __pl('Pulse Shrink'), |
| 2138 |
'push' => __pl('Push'), |
| 2139 |
'pop' => __pl('Pop'), |
| 2140 |
'buzz' => __pl('Buzz'), |
| 2141 |
'buzz-out' => __pl('Buzz Out'), |
| 2142 |
'float' => __pl('Float'), |
| 2143 |
'sink' => __pl('Sink'), |
| 2144 |
'bob' => __pl('Bob'), |
| 2145 |
'hang' => __pl('Hang'), |
| 2146 |
'bounce-in' => __pl('Bounce In'), |
| 2147 |
'bounce-out' => __pl('Bounce Out'), |
| 2148 |
'rotate' => __pl('Rotate'), |
| 2149 |
'grow-rotate' => __pl('Grow Rotate'), |
| 2150 |
'skew-forward' => __pl('Skew Forward'), |
| 2151 |
'skew-backward' => __pl('Skew Backward'), |
| 2152 |
'wobble-vertical' => __pl('Wobble Vertical'), |
| 2153 |
'wobble-horizontal' => __pl('Wobble Horizontal'), |
| 2154 |
'wobble-bottom-to-right' => __pl('Wobble Bottom To Right'), |
| 2155 |
'wobble-top-to-right' => __pl('Wobble Top To Right'), |
| 2156 |
'wobble-top' => __pl('Wobble Top'), |
| 2157 |
'wobble-bottom' => __pl('Wobble Bottom'), |
| 2158 |
'wobble-skew' => __pl('Wobble Skew'), |
| 2159 |
], |
| 2160 |
'show' => array( |
| 2161 |
'icon_hover' => 'hover', |
| 2162 |
), |
| 2163 |
), |
| 2164 |
'icon_rotate_hover' => array( |
| 2165 |
'type' => 'spinner', |
| 2166 |
'label' => __pl('service_box_icon_rotate'), |
| 2167 |
'default' => 0, |
| 2168 |
'css' => ['{{element}} i:hover' => 'transform: rotate({{val}}deg)'], |
| 2169 |
'min' => 0, |
| 2170 |
'max' => 360, |
| 2171 |
'step' => 1, |
| 2172 |
'show' => array( |
| 2173 |
'icon_hover' => 'hover' |
| 2174 |
), |
| 2175 |
), |
| 2176 |
'bg_color_hover' => array( |
| 2177 |
'type' => 'color', |
| 2178 |
'label' => __pl('service_box_icon_background_color_label'), |
| 2179 |
'css' => ['{{element}} i:hover' => 'background-color: {{val}};'], |
| 2180 |
'req' => array( |
| 2181 |
'!bg_shape' => '' |
| 2182 |
), |
| 2183 |
'show' => array( |
| 2184 |
'icon_hover' => 'hover' |
| 2185 |
), |
| 2186 |
), |
| 2187 |
'icon_background_size_hover' => array( |
| 2188 |
'type' => 'spinner', |
| 2189 |
'label' => __pl('service_box_icon_background_size'), |
| 2190 |
'css' => ['{{element}} i:hover' => 'padding: calc(0.5em + {{val}}px)'], |
| 2191 |
'min' => 1, |
| 2192 |
'max' => 500, |
| 2193 |
'step' => 1, |
| 2194 |
'req' => array( |
| 2195 |
'!bg_shape' => '' |
| 2196 |
), |
| 2197 |
'show' => array( |
| 2198 |
'icon_hover' => 'hover' |
| 2199 |
), |
| 2200 |
) |
| 2201 |
], |
| 2202 |
'border_style' => [ |
| 2203 |
'border_hover' => array( |
| 2204 |
'type' => 'radio', |
| 2205 |
'label' => '', |
| 2206 |
'default' => '', |
| 2207 |
'list' => array( |
| 2208 |
'' => __pl('normal'), |
| 2209 |
'hover' => __pl('hover'), |
| 2210 |
), |
| 2211 |
), |
| 2212 |
'icon_border_type' => array( |
| 2213 |
'type' => 'select', |
| 2214 |
'label' => __pl('border_type'), |
| 2215 |
'css' => ['{{element}} i' => 'border-style: {{val}}'], |
| 2216 |
'list' => [ |
| 2217 |
'' => __pl('none'), |
| 2218 |
'solid' => __pl('solid'), |
| 2219 |
'double' => __pl('double'), |
| 2220 |
'dotted' => __pl('dotted'), |
| 2221 |
'dashed' => __pl('dashed'), |
| 2222 |
'groove' => __pl('groove'), |
| 2223 |
], |
| 2224 |
'show' => array( |
| 2225 |
'border_hover' => '' |
| 2226 |
), |
| 2227 |
), |
| 2228 |
'icon_border_color' => array( |
| 2229 |
'type' => 'color', |
| 2230 |
'label' => __pl('service_box_icon_border_color_label'), |
| 2231 |
'default' => '#3e8ef7', |
| 2232 |
'css' => ['{{element}} i' => 'border-color: {{val}};'], |
| 2233 |
'req' => array( |
| 2234 |
'!icon_border_type' => '' |
| 2235 |
), |
| 2236 |
'show' => array( |
| 2237 |
'border_hover' => '' |
| 2238 |
), |
| 2239 |
), |
| 2240 |
'icon_border_width' => array( |
| 2241 |
'type' => 'padding', |
| 2242 |
'label' => __pl('border_width'), |
| 2243 |
'css' => ['{{element}} 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'], |
| 2244 |
'req' => [ |
| 2245 |
'!icon_border_type' => '' |
| 2246 |
], |
| 2247 |
'show' => array( |
| 2248 |
'border_hover' => '' |
| 2249 |
), |
| 2250 |
), |
| 2251 |
'icon_border_radius' => array( |
| 2252 |
'type' => 'padding', |
| 2253 |
'label' => __pl('border_radius'), |
| 2254 |
'css' => ['{{element}} 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;'], |
| 2255 |
'req' => array( |
| 2256 |
'!icon_border_type' => '' |
| 2257 |
), |
| 2258 |
'show' => array( |
| 2259 |
'border_hover' => '' |
| 2260 |
), |
| 2261 |
), |
| 2262 |
'icon_border_type_hover' => array( |
| 2263 |
'type' => 'select', |
| 2264 |
'label' => __pl('border_type'), |
| 2265 |
'css' => ['{{element}} i:hover' => 'border-style: {{val}}'], |
| 2266 |
'list' => [ |
| 2267 |
'' => __pl('none'), |
| 2268 |
'solid' => __pl('solid'), |
| 2269 |
'double' => __pl('double'), |
| 2270 |
'dotted' => __pl('dotted'), |
| 2271 |
'dashed' => __pl('dashed'), |
| 2272 |
'groove' => __pl('groove'), |
| 2273 |
], |
| 2274 |
'show' => array( |
| 2275 |
'border_hover' => 'hover' |
| 2276 |
), |
| 2277 |
), |
| 2278 |
'icon_border_color_hover' => array( |
| 2279 |
'type' => 'color', |
| 2280 |
'label' => __pl('service_box_icon_border_color_label'), |
| 2281 |
'css' => ['{{element}} i:hover' => 'border-color: {{val}};'], |
| 2282 |
'default' => '#3e8ef7', |
| 2283 |
'req' => array( |
| 2284 |
'!icon_border_type' => '' |
| 2285 |
), |
| 2286 |
'show' => array( |
| 2287 |
'border_hover' => 'hover' |
| 2288 |
), |
| 2289 |
), |
| 2290 |
'icon_border_width_hover' => array( |
| 2291 |
'type' => 'padding', |
| 2292 |
'label' => __pl('border_width'), |
| 2293 |
'css' => ['{{element}} i: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'], |
| 2294 |
'req' => [ |
| 2295 |
'!icon_border_type' => '' |
| 2296 |
], |
| 2297 |
'show' => array( |
| 2298 |
'border_hover' => 'hover' |
| 2299 |
), |
| 2300 |
), |
| 2301 |
'icon_border_radius_hover' => array( |
| 2302 |
'type' => 'padding', |
| 2303 |
'label' => __pl('border_radius'), |
| 2304 |
'css' => ['{{element}} i: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;'], |
| 2305 |
'req' => array( |
| 2306 |
'!icon_border_type' => '' |
| 2307 |
), |
| 2308 |
'show' => array( |
| 2309 |
'border_hover' => 'hover' |
| 2310 |
), |
| 2311 |
), |
| 2312 |
], |
| 2313 |
'styles' => [ |
| 2314 |
'icon_style' => __pl('icon_style_hover'), |
| 2315 |
'border_style' => __pl('border'), |
| 2316 |
] |
| 2317 |
) |
| 2318 |
); |
| 2319 |
|
| 2320 |
// Badge |
| 2321 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_badge', array( |
| 2322 |
'name' => __pl('Badge'), |
| 2323 |
'group' => 'text', |
| 2324 |
'func' => 'pagelayer_sc_badge', |
| 2325 |
'innerHTML' => 'title', |
| 2326 |
'html' => '<div class="pagelayer-badge-span"> |
| 2327 |
<span if="{{text}}" class="pagelayer-badge-text">{{text}}</span> |
| 2328 |
<a if-ext="{{badge_url}}" class="pagelayer-ele-link" href="{{badge_url}}"> |
| 2329 |
<span if="{{badge_text}}" class="pagelayer-badge-title pagelayer-badge-details pagelayer-badge-{{badge_notification_type}} pagelayer-badge-{{badge_style_type}}">{{badge_text}}</span> |
| 2330 |
</a> |
| 2331 |
</div> |
| 2332 |
<a if-ext="{{badge_url}}" class="pagelayer-ele-link" href="{{badge_url}}"> |
| 2333 |
<button class="pagelayer-badge-title pagelayer-badge-btn pagelayer-btn-{{badge_btn_type}}"> |
| 2334 |
<span if="{{text}}" class="pagelayer-badge-text">{{text}}</span> |
| 2335 |
<span if="{{badge_text}}" class="pagelayer-badge-details pagelayer-badge-{{badge_notification_type}} pagelayer-badge-{{badge_style_type}}">{{badge_text}}</span> |
| 2336 |
</button> |
| 2337 |
</a>', |
| 2338 |
'params' => array( |
| 2339 |
'badge_text' => array( |
| 2340 |
'type' => 'text', |
| 2341 |
'label' => __pl('badge_text'), |
| 2342 |
'default' => 'Badge', |
| 2343 |
), |
| 2344 |
'badge_url' => array( |
| 2345 |
'type' => 'link', |
| 2346 |
'label' => __pl('badge_url_label'), |
| 2347 |
'default' => '', |
| 2348 |
), |
| 2349 |
'badge_notification_type' => array( |
| 2350 |
'type' => 'select', |
| 2351 |
'label' => __pl('badge_notification_type'), |
| 2352 |
'default' => 'primary', |
| 2353 |
'list' => [ |
| 2354 |
'primary' => __pl('Primary'), |
| 2355 |
'secondary' => __pl('Secondary'), |
| 2356 |
'success' => __pl('Success'), |
| 2357 |
'warning' => __pl('Warning'), |
| 2358 |
'danger' => __pl('Danger'), |
| 2359 |
'info' => __pl('Info'), |
| 2360 |
'light' => __pl('Light'), |
| 2361 |
'dark' => __pl('Dark'), |
| 2362 |
'custom' => __pl('Custom'), |
| 2363 |
], |
| 2364 |
), |
| 2365 |
'badge_style_type' => array( |
| 2366 |
'type' => 'select', |
| 2367 |
'label' => __pl('badge_style'), |
| 2368 |
'default' => 'normal', |
| 2369 |
'list' => [ |
| 2370 |
'normal' => __pl('Normal'), |
| 2371 |
'pills' => __pl('Pills'), |
| 2372 |
], |
| 2373 |
), |
| 2374 |
'badge_vertical_align' => array( |
| 2375 |
'type' => 'select', |
| 2376 |
'label' => __pl('badge_vertical_align'), |
| 2377 |
'css' => ['{{element}} .pagelayer-badge-details' => 'vertical-align:{{val}};'], |
| 2378 |
'list' => [ |
| 2379 |
'' => __pl('none'), |
| 2380 |
'top' => __pl('Top'), |
| 2381 |
'bottom' => __pl('Bottom'), |
| 2382 |
], |
| 2383 |
'req' => array( |
| 2384 |
'badge_button' => '', |
| 2385 |
) |
| 2386 |
), |
| 2387 |
), |
| 2388 |
'text_style' => [ |
| 2389 |
'text' => array( |
| 2390 |
'type' => 'text', |
| 2391 |
'label' => __pl('text'), |
| 2392 |
'default' => 'Your custom text', |
| 2393 |
), |
| 2394 |
'text_color' => array( |
| 2395 |
'type' => 'color', |
| 2396 |
'label' => __pl('badge_text_color_label'), |
| 2397 |
'default' => '#000000', |
| 2398 |
'css' => ['{{element}} .pagelayer-badge-text' => 'color:{{val}};'], |
| 2399 |
), |
| 2400 |
'text_style' => array( |
| 2401 |
'type' => 'typography', |
| 2402 |
'label' => __pl('text_size'), |
| 2403 |
'default' => ',25,,400,,,,,,,', |
| 2404 |
'css' => ['{{element}} .pagelayer-badge-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;'], |
| 2405 |
), |
| 2406 |
], |
| 2407 |
'badge_style' => [ |
| 2408 |
'badge_text_color' => array( |
| 2409 |
'type' => 'color', |
| 2410 |
'label' => __pl('badge_text_color_label'), |
| 2411 |
'default' => '#ffffff', |
| 2412 |
'css' => ['{{element}} .pagelayer-badge-custom' => 'color:{{val}};'], |
| 2413 |
'req' => ['badge_notification_type' => 'custom'], |
| 2414 |
), |
| 2415 |
'badge_spacing' => array( |
| 2416 |
'type' => 'slider', |
| 2417 |
'label' => __pl('badge_spacing'), |
| 2418 |
'default' => 2, |
| 2419 |
'min' => 1, |
| 2420 |
'max' => 100, |
| 2421 |
'css' => ['{{element}} .pagelayer-badge-details' => 'margin-left:{{val}}px;'], |
| 2422 |
), |
| 2423 |
'badge_background_color' => array( |
| 2424 |
'type' => 'color', |
| 2425 |
'label' => __pl('badge_text_background_label'), |
| 2426 |
'default' => '#4982eeff', |
| 2427 |
'css' => ['{{element}} .pagelayer-badge-custom' => 'background-color:{{val}};'], |
| 2428 |
'req' => ['badge_notification_type' => 'custom'], |
| 2429 |
), |
| 2430 |
'badge_vspacing' => array( |
| 2431 |
'type' => 'slider', |
| 2432 |
'label' => __pl('quote_vertical_padding'), |
| 2433 |
'default' => 2, |
| 2434 |
'min' => 0, |
| 2435 |
'max' => 100, |
| 2436 |
'css' => ['{{element}} .pagelayer-badge-details' => 'padding-top:{{val}}px; padding-bottom:{{val}}px;'], |
| 2437 |
), |
| 2438 |
'badge_hspacing' => array( |
| 2439 |
'type' => 'slider', |
| 2440 |
'label' => __pl('horizontal_spacing'), |
| 2441 |
'default' => 2, |
| 2442 |
'min' => 0, |
| 2443 |
'max' => 100, |
| 2444 |
'css' => ['{{element}} .pagelayer-badge-details' => 'padding-left:{{val}}px; padding-right:{{val}}px;'], |
| 2445 |
), |
| 2446 |
'badge_text_style' => array( |
| 2447 |
'type' => 'typography', |
| 2448 |
'label' => __pl('badge_text_size'), |
| 2449 |
'default' => ',16,,400,,,,,,,', |
| 2450 |
'css' => ['{{element}} .pagelayer-badge-details' => '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;'], |
| 2451 |
), |
| 2452 |
], |
| 2453 |
'btn_badge' => [ |
| 2454 |
'badge_button' => array( |
| 2455 |
'type' => 'checkbox', |
| 2456 |
'label' => __pl('button_badge'), |
| 2457 |
'css' => ['{{element}} .pagelayer-badge-btn '=> 'display : block;', |
| 2458 |
'{{element}} .pagelayer-badge-span'=> 'display : none;', |
| 2459 |
], |
| 2460 |
), |
| 2461 |
'badge_btn_type' => array( |
| 2462 |
'type' => 'select', |
| 2463 |
'label' => __pl('badge_btn_type'), |
| 2464 |
'default' => 'warning', |
| 2465 |
'list' => [ |
| 2466 |
'primary' => __pl('Primary'), |
| 2467 |
'secondary' => __pl('Secondary'), |
| 2468 |
'success' => __pl('Success'), |
| 2469 |
'warning' => __pl('Warning'), |
| 2470 |
'danger' => __pl('Danger'), |
| 2471 |
'info' => __pl('Info'), |
| 2472 |
'light' => __pl('Light'), |
| 2473 |
'dark' => __pl('Dark'), |
| 2474 |
'custom' => __pl('Custom'), |
| 2475 |
], |
| 2476 |
'req' => array( |
| 2477 |
'badge_button' => 'true', |
| 2478 |
) |
| 2479 |
), |
| 2480 |
'badge_btn_hover' => array( |
| 2481 |
'type' => 'radio', |
| 2482 |
'label' => '', |
| 2483 |
'default' => '', |
| 2484 |
'list' => array( |
| 2485 |
'' => __pl('normal'), |
| 2486 |
'hover' => __pl('hover'), |
| 2487 |
), |
| 2488 |
'req' => array( |
| 2489 |
'badge_button' => 'true', |
| 2490 |
'badge_btn_type' => 'custom', |
| 2491 |
), |
| 2492 |
), |
| 2493 |
'badge_btn_background_color' => array( |
| 2494 |
'type' => 'color', |
| 2495 |
'label' => __pl('badge_btn_background_label'), |
| 2496 |
'default' => '#4982eeff', |
| 2497 |
'css' => ['{{element}} .pagelayer-badge-btn' => 'background-color:{{val}};'], |
| 2498 |
'req' => [ |
| 2499 |
'badge_btn_type' => 'custom', |
| 2500 |
'badge_button' => 'true', |
| 2501 |
], |
| 2502 |
'show' => ['badge_btn_hover' => ''], |
| 2503 |
), |
| 2504 |
'badge_btn_background_color_hover' => array( |
| 2505 |
'type' => 'color', |
| 2506 |
'label' => __pl('badge_btn_background_label'), |
| 2507 |
'default' => '#4982eeff', |
| 2508 |
'css' => ['{{element}} .pagelayer-badge-btn:hover' => 'background-color:{{val}};'], |
| 2509 |
'show' => ['badge_btn_hover' => 'hover'], |
| 2510 |
), |
| 2511 |
], |
| 2512 |
'styles' => [ |
| 2513 |
'text_style' => __pl('text'), |
| 2514 |
'badge_style' => __pl('badge_style'), |
| 2515 |
'btn_badge' => __pl('btn_badge'), |
| 2516 |
] |
| 2517 |
) |
| 2518 |
); |
| 2519 |
|
| 2520 |
// Tooltip |
| 2521 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_tooltip', array( |
| 2522 |
'name' => __pl('Tooltip'), |
| 2523 |
'group' => 'text', |
| 2524 |
'func' => 'pagelayer_sc_tooltip', |
| 2525 |
'innerHTML' => 'tooltip_text', |
| 2526 |
'html' => '<div class="pagelayer-tooltip-container"> |
| 2527 |
<span if="{{tooltip_icon}}" class="pagelayer-tooltip-icon"><i class="fa fa-{{tooltip_icon}}"></i></span> |
| 2528 |
<span if="{{text}}" class="pagelayer-tooltip-title">{{text}}</span> |
| 2529 |
<div if="{{tooltip_text}}" class="pagelayer-tooltip-text pagelayer-tooltip-{{tooltip_position}}"> |
| 2530 |
<span>{{tooltip_text}}</span> |
| 2531 |
</div> |
| 2532 |
</div>', |
| 2533 |
'params' => array( |
| 2534 |
'text' => array( |
| 2535 |
'type' => 'text', |
| 2536 |
'label' => __pl('text'), |
| 2537 |
'default' => __pl('hover_me'), |
| 2538 |
'edit' => '.pagelayer-tooltip-title', |
| 2539 |
), |
| 2540 |
'tooltip_text' => array( |
| 2541 |
'type' => 'editor', |
| 2542 |
'label' => __pl('tooltip_text'), |
| 2543 |
'default' => 'Hey there, I have an amazing tooltip !', |
| 2544 |
'edit' => '.pagelayer-tooltip', |
| 2545 |
), |
| 2546 |
), |
| 2547 |
'text_style' => [ |
| 2548 |
'tooltip_align' => array( |
| 2549 |
'label' => __pl('tooltip_align'), |
| 2550 |
'type' => 'select', |
| 2551 |
'default' => 'center', |
| 2552 |
'css' => 'text-align: {{val}};', |
| 2553 |
'list' => array( |
| 2554 |
'left' => __pl('left'), |
| 2555 |
'center' => __pl('center'), |
| 2556 |
'right' => __pl('right'), |
| 2557 |
) |
| 2558 |
), |
| 2559 |
'text_color' => array( |
| 2560 |
'type' => 'color', |
| 2561 |
'label' => __pl('tooltip_title_color'), |
| 2562 |
'css' => ['{{element}} .pagelayer-tooltip-title' => 'color:{{val}};'], |
| 2563 |
), |
| 2564 |
'text_size' => array( |
| 2565 |
'type' => 'typography', |
| 2566 |
'label' => __pl('tooltip_title_size'), |
| 2567 |
'default' => ',25,,400,,,,,,,', |
| 2568 |
'css' => ['{{element}} .pagelayer-tooltip-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;', |
| 2569 |
'{{element}} .pagelayer-tooltip-icon .fa' => 'font-size: {{val[1]}}px !important;'], |
| 2570 |
), |
| 2571 |
'tooltip_text_shadow' => array( |
| 2572 |
'type' => 'shadow', |
| 2573 |
'label' => __pl('tooltip_text_shadow'), |
| 2574 |
'css' => ['{{element}} .pagelayer-tooltip-title' => 'text-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}};', |
| 2575 |
'{{element}} .pagelayer-tooltip-icon .fa' => 'text-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}};'], |
| 2576 |
), |
| 2577 |
], |
| 2578 |
'tooltip_style' => [ |
| 2579 |
'tooltip_position' => array( |
| 2580 |
'type' => 'select', |
| 2581 |
'label' => __pl('tooltip_positon'), |
| 2582 |
'default' => 'top', |
| 2583 |
'list' => [ |
| 2584 |
'top' => __pl('Top'), |
| 2585 |
'right' => __pl('Right'), |
| 2586 |
'bottom' => __pl('Bottom'), |
| 2587 |
'left' => __pl('Left'), |
| 2588 |
], |
| 2589 |
), |
| 2590 |
'tooltip_width' => array( |
| 2591 |
'label' => __pl('tooltip-width'), |
| 2592 |
'type' => 'slider', |
| 2593 |
'min' => 100, |
| 2594 |
'max' => 500, |
| 2595 |
'default' => 200, |
| 2596 |
'css' => ['{{element}} .pagelayer-tooltip-text' => 'width:{{val}}px;'], |
| 2597 |
), |
| 2598 |
'tooltip_spacing' => array( |
| 2599 |
'label' => __pl('tooltip_spacing'), |
| 2600 |
'type' => 'slider', |
| 2601 |
'min' => 0, |
| 2602 |
'max' => 100, |
| 2603 |
'default' => 10, |
| 2604 |
'css' => ['{{element}} .pagelayer-tooltip-text' => 'padding:{{val}}px;'], |
| 2605 |
), |
| 2606 |
'tooltip_background' => array( |
| 2607 |
'type' => 'color', |
| 2608 |
'label' => __pl('tooltip_background_color'), |
| 2609 |
'default' => '#333333', |
| 2610 |
'css' => ['{{element}} .pagelayer-tooltip-text' => 'background-color:{{val}};', |
| 2611 |
'{{element}} .pagelayer-tooltip-top:after' => 'border-top-color:{{val}};', |
| 2612 |
'{{element}} .pagelayer-tooltip-right:after' => 'border-right-color:{{val}};', |
| 2613 |
'{{element}} .pagelayer-tooltip-bottom:after' => 'border-bottom-color:{{val}};', |
| 2614 |
'{{element}} .pagelayer-tooltip-left:after' => 'border-left-color:{{val}};', |
| 2615 |
], |
| 2616 |
), |
| 2617 |
'tooltip_color' => array( |
| 2618 |
'type' => 'color', |
| 2619 |
'label' => __pl('tooltip_text_color'), |
| 2620 |
'default' => '#ffffff', |
| 2621 |
'css' => ['{{element}} .pagelayer-tooltip-text' => 'color:{{val}};'], |
| 2622 |
), |
| 2623 |
'tooltip_text_size' => array( |
| 2624 |
'type' => 'typography', |
| 2625 |
'label' => __pl('tooltip_text_size'), |
| 2626 |
'default' => ',18,,400,,,,,,,', |
| 2627 |
'css' => ['{{element}} .pagelayer-tooltip-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;'], |
| 2628 |
), |
| 2629 |
'tooltip_shadow' => array( |
| 2630 |
'type' => 'shadow', |
| 2631 |
'label' => __pl('tooltip_shadow'), |
| 2632 |
'css' => ['{{element}} .pagelayer-tooltip-text' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}};'], |
| 2633 |
), |
| 2634 |
], |
| 2635 |
'icon_style' => [ |
| 2636 |
'show_icon' => array( |
| 2637 |
'type' => 'checkbox', |
| 2638 |
'label' => __pl('show_icon'), |
| 2639 |
), |
| 2640 |
'tooltip_icon' => array( |
| 2641 |
'type' => 'icon', |
| 2642 |
'label' => __pl('tooltip_icon'), |
| 2643 |
'default' => 'exclamation-circle', |
| 2644 |
'req' => array( |
| 2645 |
'show_icon' => 'true', |
| 2646 |
) |
| 2647 |
), |
| 2648 |
'icon_color' => array( |
| 2649 |
'type' => 'color', |
| 2650 |
'label' => __pl('tooltip_icon_color'), |
| 2651 |
'default' => '#3E8EF7', |
| 2652 |
'css' => ['{{element}} .pagelayer-tooltip-icon' => 'color:{{val}};'], |
| 2653 |
'req' => array( |
| 2654 |
'show_icon' => 'true', |
| 2655 |
) |
| 2656 |
), |
| 2657 |
'icon_spacing' => array( |
| 2658 |
'label' => __pl('icon_space'), |
| 2659 |
'type' => 'slider', |
| 2660 |
'min' => 0, |
| 2661 |
'max' => 100, |
| 2662 |
'default' => 4, |
| 2663 |
'css' => ['{{element}} .pagelayer-tooltip-icon' => 'margin-left:{{val}}px; margin-right:{{val}}px;'], |
| 2664 |
'req' => array( |
| 2665 |
'show_icon' => 'true', |
| 2666 |
) |
| 2667 |
), |
| 2668 |
'tooltip_icon_alignment' => array( |
| 2669 |
'label' => __pl('tooltip_icon_alignment'), |
| 2670 |
'type' => 'radio', |
| 2671 |
'default' => 'right', |
| 2672 |
'css' => ['{{element}} .pagelayer-tooltip-icon' => 'float: {{val}};'], |
| 2673 |
'list' => array( |
| 2674 |
'left' => __pl('left'), |
| 2675 |
'right' => __pl('right'), |
| 2676 |
), |
| 2677 |
'req' => array( |
| 2678 |
'show_icon' => 'true', |
| 2679 |
) |
| 2680 |
) |
| 2681 |
], |
| 2682 |
'styles' => [ |
| 2683 |
'icon_style' => __pl('icon'), |
| 2684 |
'text_style' => __pl('text_style'), |
| 2685 |
'tooltip_style' => __pl('tooltip_style'), |
| 2686 |
] |
| 2687 |
) |
| 2688 |
); |
| 2689 |
|
| 2690 |
|
| 2691 |
//////////////////////// |
| 2692 |
// Image Group |
| 2693 |
//////////////////////// |
| 2694 |
|
| 2695 |
// Image |
| 2696 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_image', array( |
| 2697 |
'name' => __pl('image'), |
| 2698 |
'group' => 'image', |
| 2699 |
'func' => 'pagelayer_sc_image', |
| 2700 |
'innerHTML' => 'text', |
| 2701 |
'html' => '<div class="pagelayer-image-holder"> |
| 2702 |
<a if-ext="{{link_type}}" class="pagelayer-ele-link" href="{{func_link}}" pagelayer-image-link-type="{{link_type}}"> |
| 2703 |
<img src="{{func_id}}" title="{{{id-title}}}" alt="{{{id-alt}}}" /> |
| 2704 |
<div if="{{overlay}}" class="pagelayer-image-overlay {{content_position}}"> |
| 2705 |
<div class="pagelayer-image-overlay-content"> |
| 2706 |
<i if="{{icon}}" class="pagelayer-image-overlay-icon fa fa-{{icon}}"></i> |
| 2707 |
<div if="{{text}}" class="pagelayer-image-overlay-text">{{text}}</div> |
| 2708 |
</div> |
| 2709 |
</div> |
| 2710 |
</a> |
| 2711 |
</div> |
| 2712 |
<p if="{{caption}}" class="pagelayer-image-caption">{{caption}}</p>', |
| 2713 |
'params' => array( |
| 2714 |
'id' => array( |
| 2715 |
'label' => __pl('image_src_label'), |
| 2716 |
'desc' => __pl('image_src_desc'), |
| 2717 |
'type' => 'image', |
| 2718 |
'default' => PAGELAYER_URL.'/images/default-image.png', |
| 2719 |
), |
| 2720 |
'id-size' => array( |
| 2721 |
'label' => __pl('obj_image_size_label'), |
| 2722 |
'type' => 'select', |
| 2723 |
'default' => 'full', |
| 2724 |
'list' => array( |
| 2725 |
'full' => __pl('full'), |
| 2726 |
'large' => __pl('large'), |
| 2727 |
'medium' => __pl('medium'), |
| 2728 |
'thumbnail' => __pl('thumbnail'), |
| 2729 |
'custom' => __pl('custom') |
| 2730 |
) |
| 2731 |
), |
| 2732 |
'custom_size' => array( |
| 2733 |
'label' => __pl('image_custom_size_label'), |
| 2734 |
'type' => 'text', |
| 2735 |
'default' => '100x100', |
| 2736 |
'sep' => 'x', |
| 2737 |
'css' => ['{{element}} img' => 'width: {{val[0]}}px; height: {{val[1]}}px;'], |
| 2738 |
'req' => array( |
| 2739 |
'id-size' => 'custom' |
| 2740 |
), |
| 2741 |
), |
| 2742 |
'align' => array( |
| 2743 |
'label' => __pl('obj_align_label'), |
| 2744 |
'type' => 'radio', |
| 2745 |
'default' => 'center', |
| 2746 |
'addAttr' => 'align="{{align}}"', |
| 2747 |
'css' => ['{{element}} .pagelayer-image-holder' => 'text-align: {{val}}', '{{element}} .pagelayer-image-holder .pagelayer-image-overlay-content' => 'text-align: {{val}}'], |
| 2748 |
'list' => array( |
| 2749 |
'left' => __pl('left'), |
| 2750 |
'center' => __pl('center'), |
| 2751 |
'right' => __pl('right') |
| 2752 |
) |
| 2753 |
), |
| 2754 |
'max-width' => array( |
| 2755 |
'label' => __pl('max-width-percent'), |
| 2756 |
'type' => 'slider', |
| 2757 |
'min' => 0, |
| 2758 |
'max' => 100, |
| 2759 |
), |
| 2760 |
'img_filter' => array( |
| 2761 |
'type' => 'filter', |
| 2762 |
'label' => __pl('filter'), |
| 2763 |
'default' => '0,100,100,0,0,100,100', |
| 2764 |
'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]}}%)'], |
| 2765 |
), |
| 2766 |
'img_shadow' => array( |
| 2767 |
'type' => 'shadow', |
| 2768 |
'label' => __pl('shadow'), |
| 2769 |
'css' => ['{{element}} img' => 'box-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}} !important;'], |
| 2770 |
), |
| 2771 |
), |
| 2772 |
// Image related Styles |
| 2773 |
'link_settings' => [ |
| 2774 |
'link_type' => array( |
| 2775 |
'label' => __pl('image_link_label'), |
| 2776 |
'type' => 'select', |
| 2777 |
'default' => '', |
| 2778 |
'list' => array( |
| 2779 |
'' => __pl('none'), |
| 2780 |
'custom_url' => __pl('custom_url'), |
| 2781 |
'media_file' => __pl('media_file'), |
| 2782 |
'lightbox' => __pl('lightbox') |
| 2783 |
) |
| 2784 |
), |
| 2785 |
'link' => array( |
| 2786 |
'label' => __pl('image_link_label'), |
| 2787 |
'desc' => __pl('image_link_desc'), |
| 2788 |
'type' => 'link', |
| 2789 |
'req' => array( |
| 2790 |
'link_type' => 'custom_url' |
| 2791 |
) |
| 2792 |
), |
| 2793 |
'rel' => array( |
| 2794 |
'label' => __pl('image_rel_label'), |
| 2795 |
'type' => 'text', |
| 2796 |
'default' => '', |
| 2797 |
'addAttr' => ['{{element}} a' => 'rel="{{rel}}"'], |
| 2798 |
'req' => array( |
| 2799 |
'link_type' => 'media_file' |
| 2800 |
) |
| 2801 |
), |
| 2802 |
'target' => array( |
| 2803 |
'label' => __pl('open_link_in_new_window'), |
| 2804 |
'type' => 'checkbox', |
| 2805 |
'addAttr' => ['{{element}} a' => 'target="_blank"'], |
| 2806 |
'req' => array( |
| 2807 |
'link_type' => ['custom_url', 'media_file'] |
| 2808 |
) |
| 2809 |
), |
| 2810 |
], |
| 2811 |
// Caption related Styles |
| 2812 |
'caption_style' => [ |
| 2813 |
'caption' => array( |
| 2814 |
'label' => __pl('gallery_grid_caption_label'), |
| 2815 |
'desc' => __pl('gallery_grid_caption_desc'), |
| 2816 |
'type' => 'text', |
| 2817 |
'edit' => '.pagelayer-image-caption' |
| 2818 |
), |
| 2819 |
'caption_color' => array( |
| 2820 |
'label' => __pl('Caption Color'), |
| 2821 |
'type' => 'color', |
| 2822 |
'default' => '#3E8EF7', |
| 2823 |
'css' => ['{{element}} .pagelayer-image-caption' => 'color: {{val}}'], |
| 2824 |
) |
| 2825 |
], |
| 2826 |
'overlay_style' => [ |
| 2827 |
'overlay' => array( |
| 2828 |
'label' => __pl('image_overlay_effect_label'), |
| 2829 |
'desc' => __pl('image_overlay_effect_desc'), |
| 2830 |
'type' => 'checkbox', |
| 2831 |
), |
| 2832 |
'icon' => array( |
| 2833 |
'label' => __pl('icon'), |
| 2834 |
'type' => 'icon', |
| 2835 |
'default' => 'star', |
| 2836 |
'req' => array( |
| 2837 |
'overlay' => 'true' |
| 2838 |
) |
| 2839 |
), |
| 2840 |
'icon_color' => array( |
| 2841 |
'label' => __pl('icon_color'), |
| 2842 |
'type' => 'color', |
| 2843 |
'default' => '#e6cf03', |
| 2844 |
'css' => ['{{element}} .pagelayer-image-overlay-icon' => 'color: {{val}}'], |
| 2845 |
'req' => array( |
| 2846 |
'overlay' => 'true' |
| 2847 |
) |
| 2848 |
), |
| 2849 |
'icon_size' => array( |
| 2850 |
'label' => __pl('icon_custom_size'), |
| 2851 |
'desc' => __pl('icon_custom_size_desc'), |
| 2852 |
'type' => 'spinner', |
| 2853 |
'min' => 0, |
| 2854 |
'step' => 1, |
| 2855 |
'max' => 500, |
| 2856 |
'default' => 50, |
| 2857 |
'css' => ['{{element}} .pagelayer-image-overlay-icon' => 'font-size: {{val}}px'], |
| 2858 |
'req' => array( |
| 2859 |
'overlay' => 'true' |
| 2860 |
) |
| 2861 |
), |
| 2862 |
'text' => array( |
| 2863 |
'label' => __pl('content'), |
| 2864 |
'type' => 'editor', |
| 2865 |
'default' => '<p>Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s.</p>', |
| 2866 |
'text' => __pl('open_in_pleditor'), |
| 2867 |
'req' => array( |
| 2868 |
'overlay' => 'true' |
| 2869 |
) |
| 2870 |
), |
| 2871 |
'overlay_bg' => array( |
| 2872 |
'label' => __pl('image_overlay_background'), |
| 2873 |
'type' => 'color', |
| 2874 |
'default' => 'rgba(0,0,0,.6)', |
| 2875 |
'css' => ['{{element}} .pagelayer-image-overlay' => 'background: {{val}}'], |
| 2876 |
'req' => array( |
| 2877 |
'overlay' => 'true' |
| 2878 |
) |
| 2879 |
), |
| 2880 |
'content_position' => array( |
| 2881 |
'label' => __pl('Overlay Content Position'), |
| 2882 |
'type' => 'radio', |
| 2883 |
'default' => 'center', |
| 2884 |
'css' => ['{{element}} .pagelayer-image-overlay' => 'display:-webkit-flex;display:flex;-webkit-align-items:{{val}}; align-items:{{val}};'], |
| 2885 |
'list' => array( |
| 2886 |
'flex-start' => __pl('Top'), |
| 2887 |
'center' => __pl('Middle'), |
| 2888 |
'flex-end' => __pl('Bottom'), |
| 2889 |
), |
| 2890 |
'req' => array( |
| 2891 |
'overlay' => 'true' |
| 2892 |
) |
| 2893 |
), |
| 2894 |
'show_always' => array( |
| 2895 |
'label' => __pl('image_show_always'), |
| 2896 |
'type' => 'checkbox', |
| 2897 |
'css' => ['{{element}} .pagelayer-image-overlay' => 'opacity:1;'], |
| 2898 |
'req' => array( |
| 2899 |
'overlay' => 'true' |
| 2900 |
) |
| 2901 |
) |
| 2902 |
], |
| 2903 |
'styles' => [ |
| 2904 |
'link_settings' => __pl('link_settings'), |
| 2905 |
'caption_style' => __pl('caption_style'), |
| 2906 |
'overlay_style' => __pl('overlay_style'), |
| 2907 |
], |
| 2908 |
) |
| 2909 |
); |
| 2910 |
|
| 2911 |
// Image Slider |
| 2912 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_image_slider', array( |
| 2913 |
'name' => __pl('Image Slider'), |
| 2914 |
'group' => 'image', |
| 2915 |
'html' => '<div class="pagelayer-image-slider-div"> |
| 2916 |
<ul class="pagelayer-image-slider-ul">{{ul}}</ul> |
| 2917 |
</div>', |
| 2918 |
'func' => 'pagelayer_sc_image_slider', |
| 2919 |
'settings' => [ |
| 2920 |
'params' => __pl('Image Slider'), |
| 2921 |
'slider_options' => __pl('slider_options'), |
| 2922 |
], |
| 2923 |
'params' => array( |
| 2924 |
'ids' => array( |
| 2925 |
'type' => 'multi_image', |
| 2926 |
'label' => __pl('image_slider_ids_label'), |
| 2927 |
'desc' => __pl('media_library_images_ids_desc'), |
| 2928 |
'text' => __pl('image_slider_ids_text'), |
| 2929 |
), |
| 2930 |
'size' => array( |
| 2931 |
'type' => 'select', |
| 2932 |
'label' => __pl('obj_image_size_label'), |
| 2933 |
'default' => 'full', |
| 2934 |
'list' => array( |
| 2935 |
'full' => __pl('full'), |
| 2936 |
'large' => __pl('large'), |
| 2937 |
'medium' => __pl('medium'), |
| 2938 |
'thumbnail' => __pl('thumbnail'), |
| 2939 |
'custom' => __pl('custom') |
| 2940 |
) |
| 2941 |
), |
| 2942 |
'custom_size' => array( |
| 2943 |
'type' => 'dimension', |
| 2944 |
'label' => __pl('image_custom_size_label'), |
| 2945 |
'default' => '200,200', |
| 2946 |
'css' => ['{{element}} .pagelayer-image-slider-ul' => 'width: {{val[0]}}px; height: {{val[1]}}px;'], |
| 2947 |
'req' => array( |
| 2948 |
'size' => 'custom' |
| 2949 |
), |
| 2950 |
), |
| 2951 |
'link_type' => array( |
| 2952 |
'label' => __pl('image_link_label'), |
| 2953 |
'type' => 'select', |
| 2954 |
'list' => array( |
| 2955 |
'' => __pl('none'), |
| 2956 |
'custom_url' => __pl('custom_url'), |
| 2957 |
'media_file' => __pl('media_file'), |
| 2958 |
) |
| 2959 |
), |
| 2960 |
'link' => array( |
| 2961 |
'label' => __pl('image_link_url'), |
| 2962 |
'desc' => __pl('image_link_desc'), |
| 2963 |
'type' => 'link', |
| 2964 |
'req' => array( |
| 2965 |
'link_type' => 'custom_url' |
| 2966 |
) |
| 2967 |
), |
| 2968 |
'target' => array( |
| 2969 |
'label' => __pl('open_link_in_new_window'), |
| 2970 |
'type' => 'checkbox', |
| 2971 |
'addAttr' => ['{{element}} a' => 'target="_blank"'], |
| 2972 |
'req' => array( |
| 2973 |
'link_type' => ['custom_url', 'media_file'] |
| 2974 |
) |
| 2975 |
), |
| 2976 |
), |
| 2977 |
'slider_options' => [ |
| 2978 |
'controls' => array( |
| 2979 |
'type' => 'select', |
| 2980 |
'label' => __pl('slider_controls'), |
| 2981 |
'list' => array( |
| 2982 |
'' => __pl('Arrows and Pager'), |
| 2983 |
'arrows' => __pl('Arrows'), |
| 2984 |
'pager' => __pl('Pager'), |
| 2985 |
'none' => __pl('none'), |
| 2986 |
) |
| 2987 |
), |
| 2988 |
'slider_animation' => [ |
| 2989 |
'type' => 'select', |
| 2990 |
'label' => __pl('image_slider_animation'), |
| 2991 |
'desc' => __pl('image_slider_animation_desc'), |
| 2992 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-transition="{{slider_animation}}"'], |
| 2993 |
'list' => array( |
| 2994 |
'' => __pl('Fade'), |
| 2995 |
'horizontal' => __pl('horizontal'), |
| 2996 |
'vertical' => __pl('vertical'), |
| 2997 |
'kenburns' => __pl('kenburns'), |
| 2998 |
) |
| 2999 |
], |
| 3000 |
'pause' => array( |
| 3001 |
'type' => 'slider', |
| 3002 |
'label' => __pl('image_slider_slideshow_speed_label'), |
| 3003 |
'default' => 5000, |
| 3004 |
'min' => 200, |
| 3005 |
'max' => 10000, |
| 3006 |
'step' => 100, |
| 3007 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-pause="{{pause}}"'], |
| 3008 |
), |
| 3009 |
'speed' => array( |
| 3010 |
'type' => 'slider', |
| 3011 |
'label' => __pl('slider_animation_speed'), |
| 3012 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-speed="{{speed}}"'], |
| 3013 |
'default' => 800, |
| 3014 |
'min' => 200, |
| 3015 |
'max' => 10000, |
| 3016 |
'step' => 100 |
| 3017 |
), |
| 3018 |
'loop' => array( |
| 3019 |
'type' => 'checkbox', |
| 3020 |
'label' => __pl('image_slider_loop'), |
| 3021 |
'desc' => __pl('image_slider_loop_desc'), |
| 3022 |
'default' => 'true', |
| 3023 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-loop="{{loop}}"'], |
| 3024 |
), |
| 3025 |
'adaptive_height' => array( |
| 3026 |
'type' => 'checkbox', |
| 3027 |
'label' => __pl('slider_height'), |
| 3028 |
'desc' => __pl('slider_height_desc'), |
| 3029 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-adaptiveHeight="{{adaptive_height}}"'], |
| 3030 |
), |
| 3031 |
'auto' => array( |
| 3032 |
'type' => 'checkbox', |
| 3033 |
'label' => __pl('image_slider_auto'), |
| 3034 |
'desc' => __pl('image_slider_auto_desc'), |
| 3035 |
'default' => 'true', |
| 3036 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-auto="{{auto}}"'], |
| 3037 |
), |
| 3038 |
'auto_hover' => [ |
| 3039 |
'type' => 'checkbox', |
| 3040 |
'label' => __pl('auto_hover'), |
| 3041 |
'desc' => __pl('auto_hover_desc'), |
| 3042 |
'default' => 'true', |
| 3043 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-autoHover="{{auto_hover}}"'], |
| 3044 |
], |
| 3045 |
'auto_direction' => [ |
| 3046 |
'type' => 'select', |
| 3047 |
'label' => __pl('slider_auto_direction'), |
| 3048 |
'desc' => __pl('slider_auto_direction_desc'), |
| 3049 |
'addAttr' => ['.pagelayer-image-slider-ul' => 'data-autoDirection="{{auto_direction}}"'], |
| 3050 |
'list' =>[ |
| 3051 |
'' => __pl('Next'), |
| 3052 |
'prev' => __pl('Previous'), |
| 3053 |
] |
| 3054 |
], |
| 3055 |
] |
| 3056 |
) |
| 3057 |
); |
| 3058 |
|
| 3059 |
// Grid Gallery |
| 3060 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_grid_gallery', array( |
| 3061 |
'name' => __pl('Grid Gallery'), |
| 3062 |
'group' => 'image', |
| 3063 |
'func' => 'pagelayer_sc_grid_gallery', |
| 3064 |
'html' => '<div class="pagelayer-grid-gallery-container"> |
| 3065 |
{{ul}} |
| 3066 |
</div>', |
| 3067 |
'params' => array( |
| 3068 |
'ids' => array( |
| 3069 |
'type' => 'multi_image', |
| 3070 |
'label' => __pl('grid_gallery_images'), |
| 3071 |
'desc' => __pl('media_library_images_ids_desc'), |
| 3072 |
'text' => __pl('image_slider_ids_text'), |
| 3073 |
), |
| 3074 |
'columns' => array( |
| 3075 |
'type' => 'select', |
| 3076 |
'label' => __pl('columns_count'), |
| 3077 |
'default' => 3, |
| 3078 |
'list' => array( |
| 3079 |
1 => __pl('1'), |
| 3080 |
2 => __pl('2'), |
| 3081 |
3 => __pl('3'), |
| 3082 |
4 => __pl('4'), |
| 3083 |
5 => __pl('5'), |
| 3084 |
6 => __pl('6'), |
| 3085 |
7=> __pl('7'), |
| 3086 |
8 => __pl('8'), |
| 3087 |
9 => __pl('9'), |
| 3088 |
10 => __pl('10') |
| 3089 |
) |
| 3090 |
), |
| 3091 |
'size' => array( |
| 3092 |
'type' => 'select', |
| 3093 |
'label' => __pl('obj_image_size_label'), |
| 3094 |
'default' => 'thumbnail', |
| 3095 |
'list' => array( |
| 3096 |
'full' => __pl('full'), |
| 3097 |
'large' => __pl('large'), |
| 3098 |
'medium' => __pl('medium'), |
| 3099 |
'thumbnail' => __pl('thumbnail'), |
| 3100 |
'custom' => __pl('custom') |
| 3101 |
) |
| 3102 |
), |
| 3103 |
'custom_size' => array( |
| 3104 |
'type' => 'dimension', |
| 3105 |
'desc' => __pl('image_custom_size_label'), |
| 3106 |
'req' => array( |
| 3107 |
'size' => 'custom' |
| 3108 |
), |
| 3109 |
'css' => ['{{element}} .pagelayer-gallery-item img' => 'height: {{val[0]}}px; width: {{val[1]}}px;'], |
| 3110 |
), |
| 3111 |
'link_to' => array( |
| 3112 |
'type' => 'select', |
| 3113 |
'label' => __pl('image_link_label'), |
| 3114 |
'default' => 'lightbox', |
| 3115 |
'list' => array( |
| 3116 |
'' => __pl('none'), |
| 3117 |
'media_file' => __pl('media_file'), |
| 3118 |
'attachment' => __pl('attachment_page'), |
| 3119 |
'lightbox' => __pl('lightbox'), |
| 3120 |
) |
| 3121 |
), |
| 3122 |
'rel' => array( |
| 3123 |
'type' => 'text', |
| 3124 |
'label' => __pl('image_rel_label'), |
| 3125 |
'default' => '', |
| 3126 |
'addAttr' => ['{{element}} a' => 'rel="{{rel}}"'], |
| 3127 |
'req' => array( |
| 3128 |
'link_to' => 'media_file' |
| 3129 |
) |
| 3130 |
), |
| 3131 |
'target' => array( |
| 3132 |
'type' => 'checkbox', |
| 3133 |
'label' => __pl('open_link_in_new_window'), |
| 3134 |
'addAttr' => ['{{element}} a' => 'target="_blank"'], |
| 3135 |
'req' => array( |
| 3136 |
'!link_to' => ['lightbox', ''] |
| 3137 |
) |
| 3138 |
), |
| 3139 |
'caption' => array( |
| 3140 |
'type' => 'checkbox', |
| 3141 |
'label' => __pl('gallery_grid_caption_label'), |
| 3142 |
'desc' => __pl('gallery_grid_caption_desc'), |
| 3143 |
'default' => '', |
| 3144 |
), |
| 3145 |
'align' => array( |
| 3146 |
'label' => __pl('obj_align_label'), |
| 3147 |
'type' => 'radio', |
| 3148 |
'default' => 'left', |
| 3149 |
'addAttr' => 'align="{{align}}"', |
| 3150 |
'css' => ['{{element}} .pagelayer-grid-gallery-container' => 'text-align: {{val}}', '{{element}} .pagelayer-grid-gallery-container .pagelayer-grid-gallery-ul' => 'text-align: {{val}}'], |
| 3151 |
'list' => array( |
| 3152 |
'left' => __pl('left'), |
| 3153 |
'center' => __pl('center'), |
| 3154 |
'right' => __pl('right') |
| 3155 |
) |
| 3156 |
), |
| 3157 |
'caption_color' => array( |
| 3158 |
'label' => __pl('Caption Color'), |
| 3159 |
'type' => 'color', |
| 3160 |
'default' => '#e6cf03', |
| 3161 |
'css' => ['{{element}} .pagelayer-grid-gallery-caption' => 'color: {{val}}'], |
| 3162 |
'req' => array( |
| 3163 |
'caption' => 'true' |
| 3164 |
) |
| 3165 |
) |
| 3166 |
) |
| 3167 |
) |
| 3168 |
); |
| 3169 |
|
| 3170 |
|
| 3171 |
|
| 3172 |
//////////////////////// |
| 3173 |
// Button Group |
| 3174 |
//////////////////////// |
| 3175 |
|
| 3176 |
// Button |
| 3177 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_btn', array( |
| 3178 |
'name' => __pl('button'), |
| 3179 |
'group' => 'button', |
| 3180 |
'func' => 'pagelayer_sc_btn', |
| 3181 |
'html' => '<a class="pagelayer-btn-holder pagelayer-ele-link {{type}} {{size}} {{icon_position}}"> |
| 3182 |
<i if="{{icon}}" class="fa fa-{{icon}} pagelayer-btn-icon"></i> |
| 3183 |
<span if="{{text}}" class="pagelayer-btn-text">{{text}}</span> |
| 3184 |
<i if="{{icon}}" class="fa fa-{{icon}} pagelayer-btn-icon"></i> |
| 3185 |
</a>', |
| 3186 |
'params' => array( |
| 3187 |
'text' => array( |
| 3188 |
'type' => 'text', |
| 3189 |
'label' => __pl('button_text_label'), |
| 3190 |
'default' => __pl('button_name') |
| 3191 |
), |
| 3192 |
'link' => array( |
| 3193 |
'type' => 'link', |
| 3194 |
'label' => __pl('button_link_label'), |
| 3195 |
'desc' => __pl('button_link_desc'), |
| 3196 |
'addAttr' => ['{{element}} .pagelayer-btn-holder' => 'href="{{link}}"'] |
| 3197 |
), |
| 3198 |
'target' => array( |
| 3199 |
'type' => 'checkbox', |
| 3200 |
'label' => __pl('open_link_in_new_window'), |
| 3201 |
'addAttr' => ['{{element}} a' => 'target="_blank"'] |
| 3202 |
), |
| 3203 |
'full_width' => array( |
| 3204 |
'type' => 'checkbox', |
| 3205 |
'label' => __pl('stretch'), |
| 3206 |
'css' => ['{{element}} a' => 'width: 100%; text-align: center;'] |
| 3207 |
), |
| 3208 |
'btn_typo' => array( |
| 3209 |
'type' => 'typography', |
| 3210 |
'label' => __pl('quote_content_typo'), |
| 3211 |
'css' => [ |
| 3212 |
'{{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;', |
| 3213 |
'{{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;', |
| 3214 |
], |
| 3215 |
), |
| 3216 |
'align' => array( |
| 3217 |
'type' => 'radio', |
| 3218 |
'label' => __pl('obj_align_label'), |
| 3219 |
'default' => 'left', |
| 3220 |
'css' => 'text-align: {{val}}', |
| 3221 |
'list' => array( |
| 3222 |
'left' => __pl('left'), |
| 3223 |
'center' => __pl('center'), |
| 3224 |
'right' => __pl('right') |
| 3225 |
), |
| 3226 |
'req' => array( |
| 3227 |
'full_width' => '' |
| 3228 |
) |
| 3229 |
), |
| 3230 |
), |
| 3231 |
'icon_style' => [ |
| 3232 |
'icon' => array( |
| 3233 |
'type' => 'icon', |
| 3234 |
'label' => __pl('service_box_font_icon_label'), |
| 3235 |
'default' => '', |
| 3236 |
), |
| 3237 |
'icon_position' => array( |
| 3238 |
'type' => 'radio', |
| 3239 |
'label' => __pl('alignment'), |
| 3240 |
'default' => 'pagelayer-btn-icon-left', |
| 3241 |
'list' => array( |
| 3242 |
'pagelayer-btn-icon-left' => __pl('left'), |
| 3243 |
'pagelayer-btn-icon-right' => __pl('right') |
| 3244 |
), |
| 3245 |
), |
| 3246 |
'icon_spacing' => array( |
| 3247 |
'type' => 'slider', |
| 3248 |
'label' => __pl('icon_spacing'), |
| 3249 |
'min' => 1, |
| 3250 |
'step' => 1, |
| 3251 |
'max' => 100, |
| 3252 |
'default' => 5, |
| 3253 |
'css' => ['{{element}} .pagelayer-btn-icon' => 'padding: 0 {{val}}px;'], |
| 3254 |
'req' => array( |
| 3255 |
'!icon' => 'none' |
| 3256 |
), |
| 3257 |
), |
| 3258 |
], |
| 3259 |
'btn_style' => [ |
| 3260 |
'type' => array( |
| 3261 |
'type' => 'select', |
| 3262 |
'label' => __pl('button_type_label'), |
| 3263 |
'default' => 'pagelayer-btn-default', |
| 3264 |
//'addClass' => ['{{element}} .pagelayer-btn-holder' => '{{val}}'], |
| 3265 |
'list' => array( |
| 3266 |
'pagelayer-btn-default' => __pl('btn_type_default'), |
| 3267 |
'pagelayer-btn-primary' => __pl('btn_type_primary'), |
| 3268 |
'pagelayer-btn-secondary' => __pl('btn_type_secondary'), |
| 3269 |
'pagelayer-btn-success' => __pl('btn_type_success'), |
| 3270 |
'pagelayer-btn-info' => __pl('btn_type_info'), |
| 3271 |
'pagelayer-btn-warning' => __pl('btn_type_warning'), |
| 3272 |
'pagelayer-btn-danger' => __pl('btn_type_danger'), |
| 3273 |
'pagelayer-btn-dark' => __pl('btn_type_dark'), |
| 3274 |
'pagelayer-btn-light' => __pl('btn_type_light'), |
| 3275 |
'pagelayer-btn-link' => __pl('btn_type_link'), |
| 3276 |
'pagelayer-btn-custom' => __pl('btn_type_custom') |
| 3277 |
), |
| 3278 |
), |
| 3279 |
'size' => array( |
| 3280 |
'type' => 'select', |
| 3281 |
'label' => __pl('button_size_label'), |
| 3282 |
'default' => 'pagelayer-btn-large', |
| 3283 |
'list' => array( |
| 3284 |
'pagelayer-btn-mini' => __pl('mini'), |
| 3285 |
'pagelayer-btn-small' => __pl('small'), |
| 3286 |
'pagelayer-btn-large' => __pl('large'), |
| 3287 |
'pagelayer-btn-extra-large' => __pl('extra_large'), |
| 3288 |
'pagelayer-btn-double-large' => __pl('double_large'), |
| 3289 |
'pagelayer-btn-custom' => __pl('custom'), |
| 3290 |
) |
| 3291 |
), |
| 3292 |
'btn_custom_size' => array( |
| 3293 |
'type' => 'spinner', |
| 3294 |
'label' => __pl('btn_custom_size'), |
| 3295 |
'min' => 1, |
| 3296 |
'step' => 1, |
| 3297 |
'max' => 100, |
| 3298 |
'default' => 5, |
| 3299 |
'css' => ['{{element}} .pagelayer-btn-holder' => 'padding: calc({{val}}px / 2) {{val}}px;'], |
| 3300 |
'req' => array( |
| 3301 |
'size' => 'pagelayer-btn-custom' |
| 3302 |
), |
| 3303 |
), |
| 3304 |
'btn_hover' => array( |
| 3305 |
'type' => 'radio', |
| 3306 |
'label' => __pl('state'), |
| 3307 |
'default' => '', |
| 3308 |
//'no_val' => 1,// Dont set any value to element |
| 3309 |
'list' => array( |
| 3310 |
'' => __pl('normal'), |
| 3311 |
'hover' => __pl('hover'), |
| 3312 |
), |
| 3313 |
'req' => array( |
| 3314 |
'type' => 'pagelayer-btn-custom', |
| 3315 |
), |
| 3316 |
), |
| 3317 |
'btn_bg_color' => array( |
| 3318 |
'type' => 'color', |
| 3319 |
'label' => __pl('btn_bg_color_label'), |
| 3320 |
'default' => '#3e8ef7', |
| 3321 |
'css' => ['{{element}} .pagelayer-btn-holder' => 'background-color: {{val}};'], |
| 3322 |
'req' => array( |
| 3323 |
'type' => 'pagelayer-btn-custom', |
| 3324 |
), |
| 3325 |
'show' => array( |
| 3326 |
'btn_hover' => '' |
| 3327 |
), |
| 3328 |
), |
| 3329 |
'btn_color' => array( |
| 3330 |
'type' => 'color', |
| 3331 |
'label' => __pl('btn_color_label'), |
| 3332 |
'default' => '#ffffff', |
| 3333 |
'css' => ['{{element}} .pagelayer-btn-holder' => 'color: {{val}};'], |
| 3334 |
'req' => array( |
| 3335 |
'type' => 'pagelayer-btn-custom', |
| 3336 |
), |
| 3337 |
'show' => array( |
| 3338 |
'btn_hover' => '' |
| 3339 |
), |
| 3340 |
), |
| 3341 |
'btn_hover_delay' => array( |
| 3342 |
'type' => 'spinner', |
| 3343 |
'label' => __pl('btn_hover_delay_label'), |
| 3344 |
'desc' => __pl('btn_hover_delay_desc'), |
| 3345 |
'min' => 0, |
| 3346 |
'step' => 100, |
| 3347 |
'max' => 5000, |
| 3348 |
'default' => 400, |
| 3349 |
'css' => ['{{element}} .pagelayer-btn-holder' => '-webkit-transition: all {{val}}ms !important; transition: all {{val}}ms !important;'], |
| 3350 |
'show' => array( |
| 3351 |
'btn_hover' => 'hover' |
| 3352 |
), |
| 3353 |
), |
| 3354 |
'btn_bg_color_hover' => array( |
| 3355 |
'type' => 'color', |
| 3356 |
'label' => __pl('btn_bg_color_hover_label'), |
| 3357 |
'default' => '', |
| 3358 |
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'background-color: {{val}};'], |
| 3359 |
'req' => array( |
| 3360 |
'type' => 'pagelayer-btn-custom', |
| 3361 |
), |
| 3362 |
'show' => array( |
| 3363 |
'btn_hover' => 'hover' |
| 3364 |
), |
| 3365 |
), |
| 3366 |
'btn_color_hover' => array( |
| 3367 |
'type' => 'color', |
| 3368 |
'label' => __pl('btn_color_hover_label'), |
| 3369 |
'default' => '', |
| 3370 |
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'color: {{val}};'], |
| 3371 |
'req' => array( |
| 3372 |
'type' => 'pagelayer-btn-custom', |
| 3373 |
), |
| 3374 |
'show' => array( |
| 3375 |
'btn_hover' => 'hover' |
| 3376 |
), |
| 3377 |
), |
| 3378 |
], |
| 3379 |
'border_style' => [ |
| 3380 |
'btn_bor_hover' => array( |
| 3381 |
'type' => 'radio', |
| 3382 |
'label' => __pl('state'), |
| 3383 |
'default' => '', |
| 3384 |
//'no_val' => 1,// Dont set any value to element |
| 3385 |
'list' => array( |
| 3386 |
'' => __pl('normal'), |
| 3387 |
'hover' => __pl('hover'), |
| 3388 |
) |
| 3389 |
), |
| 3390 |
'btn_border_type' => array( |
| 3391 |
'type' => 'select', |
| 3392 |
'label' => __pl('border_type'), |
| 3393 |
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-style: {{val}}'], |
| 3394 |
'list' => [ |
| 3395 |
'' => __pl('none'), |
| 3396 |
'solid' => __pl('solid'), |
| 3397 |
'double' => __pl('double'), |
| 3398 |
'dotted' => __pl('dotted'), |
| 3399 |
'dashed' => __pl('dashed'), |
| 3400 |
'groove' => __pl('groove'), |
| 3401 |
], |
| 3402 |
'show' => array( |
| 3403 |
'btn_bor_hover' => '' |
| 3404 |
), |
| 3405 |
), |
| 3406 |
'btn_border_color' => array( |
| 3407 |
'type' => 'color', |
| 3408 |
'label' => __pl('border_color_label'), |
| 3409 |
'default' => '#42414f', |
| 3410 |
'css' => ['{{element}} .pagelayer-btn-holder' => 'border-color: {{val}};'], |
| 3411 |
'req' => array( |
| 3412 |
'!btn_border_type' => '' |
| 3413 |
), |
| 3414 |
'show' => array( |
| 3415 |
'btn_bor_hover' => '' |
| 3416 |
), |
| 3417 |
), |
| 3418 |
'btn_border_width' => array( |
| 3419 |
'type' => 'padding', |
| 3420 |
'label' => __pl('border_width'), |
| 3421 |
'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'], |
| 3422 |
'req' => [ |
| 3423 |
'!btn_border_type' => '' |
| 3424 |
], |
| 3425 |
'show' => array( |
| 3426 |
'btn_bor_hover' => '' |
| 3427 |
), |
| 3428 |
), |
| 3429 |
'btn_border_radius' => array( |
| 3430 |
'type' => 'padding', |
| 3431 |
'label' => __pl('border_radius'), |
| 3432 |
'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;'], |
| 3433 |
'req' => array( |
| 3434 |
'!btn_border_type' => '' |
| 3435 |
), |
| 3436 |
'show' => array( |
| 3437 |
'btn_bor_hover' => '' |
| 3438 |
), |
| 3439 |
), |
| 3440 |
'btn_border_type_hover' => array( |
| 3441 |
'type' => 'select', |
| 3442 |
'label' => __pl('border_type'), |
| 3443 |
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-style: {{val}}'], |
| 3444 |
'list' => [ |
| 3445 |
'' => __pl('none'), |
| 3446 |
'solid' => __pl('solid'), |
| 3447 |
'double' => __pl('double'), |
| 3448 |
'dotted' => __pl('dotted'), |
| 3449 |
'dashed' => __pl('dashed'), |
| 3450 |
'groove' => __pl('groove'), |
| 3451 |
], |
| 3452 |
'show' => array( |
| 3453 |
'btn_bor_hover' => 'hover' |
| 3454 |
), |
| 3455 |
), |
| 3456 |
'btn_border_color_hover' => array( |
| 3457 |
'type' => 'color', |
| 3458 |
'label' => __pl('border_color_hover_label'), |
| 3459 |
'default' => '#42414f', |
| 3460 |
'css' => ['{{element}} .pagelayer-btn-holder:hover' => 'border-color: {{val}};'], |
| 3461 |
'req' => array( |
| 3462 |
'!btn_border_type_hover' => '' |
| 3463 |
), |
| 3464 |
'show' => array( |
| 3465 |
'btn_bor_hover' => 'hover' |
| 3466 |
), |
| 3467 |
), |
| 3468 |
'btn_border_width_hover' => array( |
| 3469 |
'type' => 'padding', |
| 3470 |
'label' => __pl('border_width_hover'), |
| 3471 |
'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'], |
| 3472 |
'req' => [ |
| 3473 |
'!btn_border_type_hover' => '' |
| 3474 |
], |
| 3475 |
'show' => array( |
| 3476 |
'btn_bor_hover' => 'hover' |
| 3477 |
), |
| 3478 |
), |
| 3479 |
'btn_border_radius_hover' => array( |
| 3480 |
'type' => 'padding', |
| 3481 |
'label' => __pl('border_radius_hover'), |
| 3482 |
'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;'], |
| 3483 |
'req' => array( |
| 3484 |
'!btn_border_type_hover' => '' |
| 3485 |
), |
| 3486 |
'show' => array( |
| 3487 |
'btn_bor_hover' => 'hover' |
| 3488 |
), |
| 3489 |
), |
| 3490 |
], |
| 3491 |
'styles' => [ |
| 3492 |
'btn_style' => __pl('btn_style'), |
| 3493 |
'icon_style' => __pl('icon'), |
| 3494 |
'border_style' => __pl('border_style'), |
| 3495 |
] |
| 3496 |
) |
| 3497 |
); |
| 3498 |
|
| 3499 |
|
| 3500 |
// Social Profile Item |
| 3501 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_social', array( |
| 3502 |
'name' => __pl('Social Profile'), |
| 3503 |
'group' => 'button', |
| 3504 |
'func' => 'pagelayer_sc_social', |
| 3505 |
'not_visible' => 1, |
| 3506 |
'html' => '<div class="pagelayer-icon-holder pagelayer-{{icon}}-icon"> |
| 3507 |
<a if-ext="{{social_url}}" class="pagelayer-ele-link" href="{{social_url}}"> |
| 3508 |
<i class="pagelayer-social-fa fa fa-{{icon}}"></i> |
| 3509 |
</a> |
| 3510 |
</div>', |
| 3511 |
'params' => array( |
| 3512 |
'icon' => array( |
| 3513 |
'type' => 'icon', |
| 3514 |
'label' => __pl('list_icon_label'), |
| 3515 |
'default' => 'facebook-official', |
| 3516 |
'list' => ['facebook', 'facebook-official', 'facebook-square', 'twitter', 'twitter-square', 'google-plus', 'google-plus-square', 'instagram', 'linkedin', 'linkedin-square', 'behance', 'behance-square', 'pinterest', 'pinterest-p', 'pinterest-square', 'reddit-alien', 'reddit-square', 'reddit', 'rss', 'rss-square', 'skype', 'slideshare', 'snapchat', 'snapchat-ghost', 'snapchat-square', 'soundcloud', 'spotify', 'stack-overflow', 'steam', 'steam-square', 'stumbleupon', 'telegram', 'thumb-tack', 'tripadvisor', 'tumblr', 'tumblr-square', 'twitch', 'vimeo', 'vimeo-square', 'vk', 'weibo', 'weixin', 'whatsapp', 'wordpress', 'xing', 'xing-square', 'yelp', 'youtube', 'youtube-square', 'youtube-play', '500px', 'flickr', 'android', 'github', 'github-square', 'gitlab', 'apple', 'jsfiddle', 'houzz', 'bitbucket', 'bitbucket-square', 'codepen', 'delicious', 'medium', 'meetup', 'mixcloud', 'dribbble', 'foursquare'], |
| 3517 |
), |
| 3518 |
'social_url' => array( |
| 3519 |
'type' => 'link', |
| 3520 |
'label' => __pl('social_url_label') |
| 3521 |
) |
| 3522 |
) |
| 3523 |
) |
| 3524 |
); |
| 3525 |
|
| 3526 |
// Social Profile |
| 3527 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_social_grp', array( |
| 3528 |
'name' => __pl('Social Profile'), |
| 3529 |
'group' => 'button', |
| 3530 |
'func' => 'pagelayer_sc_social_grp', |
| 3531 |
'has_group' => [ |
| 3532 |
'section' => 'params', |
| 3533 |
'prop' => 'elements' |
| 3534 |
], |
| 3535 |
'params' => array( |
| 3536 |
'elements' => array( |
| 3537 |
'type' => 'group', |
| 3538 |
'label' => __pl('social'), |
| 3539 |
'sc' => PAGELAYER_SC_PREFIX.'_social', |
| 3540 |
'item_label' => array( |
| 3541 |
'default' => __pl('social'), |
| 3542 |
'param' => 'icon' |
| 3543 |
), |
| 3544 |
'count' => 3, |
| 3545 |
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('social_name'))), |
| 3546 |
), |
| 3547 |
), |
| 3548 |
'layout_style' => [ |
| 3549 |
'bg_shape' => array( |
| 3550 |
'type' => 'select', |
| 3551 |
'label' => __pl('icon_background_shape'), |
| 3552 |
'default' => '', |
| 3553 |
'css' => ['{{element}} .fa' => 'height:1em; width:1em; position: absolute; top: 50%; left: 50%; transform: translate(-50% , -50%);', |
| 3554 |
'{{element}} .pagelayer-icon-holder' => 'position: relative; min-height: 1em; min-width: 1em;'], |
| 3555 |
'addClass' => '{{val}}', |
| 3556 |
'list' => array( |
| 3557 |
'' => __pl('icon_shape_none'), |
| 3558 |
'pagelayer-social-shape-circle' => __pl('icon_shape_circle'), |
| 3559 |
'pagelayer-social-shape-square' => __pl('icon_shape_square'), |
| 3560 |
'pagelayer-social-shape-rounded' => __pl('icon_shape_rounded') |
| 3561 |
), |
| 3562 |
), |
| 3563 |
'bg_size' => array( |
| 3564 |
'type' => 'spinner', |
| 3565 |
'label' => __pl('social_grp_size_label'), |
| 3566 |
'css' => ['{{element}} .pagelayer-icon-holder' => 'padding: calc(0.5em + {{val}}px);'], |
| 3567 |
'min' => 1, |
| 3568 |
'step' => 1, |
| 3569 |
'max' => 500, |
| 3570 |
'default' => 10, |
| 3571 |
'req' => array( |
| 3572 |
'!bg_shape' => '' |
| 3573 |
) |
| 3574 |
), |
| 3575 |
'align' => array( |
| 3576 |
'type' => 'radio', |
| 3577 |
'label' => __pl('obj_align_label'), |
| 3578 |
'default' => 'center', |
| 3579 |
'css' => 'text-align: {{val}}', |
| 3580 |
'list' => array( |
| 3581 |
'left' => __pl('left'), |
| 3582 |
'center' => __pl('center'), |
| 3583 |
'right' => __pl('right') |
| 3584 |
) |
| 3585 |
), |
| 3586 |
'group_layout' => array( |
| 3587 |
'type' => 'radio', |
| 3588 |
'label' => __pl('layout'), |
| 3589 |
'default' => 'pagelayer-btn-grp-horizontal', |
| 3590 |
'css' => ['{{element}} > div' => 'display: inline-block;'], |
| 3591 |
'list' => array( |
| 3592 |
'pagelayer-btn-grp-horizontal' => __pl('horizontal'), |
| 3593 |
'' => __pl('vertical') |
| 3594 |
) |
| 3595 |
), |
| 3596 |
'icon_spacing' => array( |
| 3597 |
'type' => 'spinner', |
| 3598 |
'label' => __pl('icon_spacing'), |
| 3599 |
'css' => ['{{element}} .pagelayer-social' => 'padding: {{val}}px;'], |
| 3600 |
'min' => 0, |
| 3601 |
'step' => 1, |
| 3602 |
'max' => 100, |
| 3603 |
'default' => 3, |
| 3604 |
) |
| 3605 |
], |
| 3606 |
'icon_style' => [ |
| 3607 |
'icon_size' => array( |
| 3608 |
'type' => 'spinner', |
| 3609 |
'label' => __pl('social_grp_size_label'), |
| 3610 |
'css' => ['{{element}} .pagelayer-social-fa' => 'font-size: {{val}}px;', |
| 3611 |
'{{element}} .pagelayer-icon-holder' => 'font-size: {{val}}px;'], |
| 3612 |
'min' => 1, |
| 3613 |
'step' => 1, |
| 3614 |
'max' => 500, |
| 3615 |
'default' => 40, |
| 3616 |
), |
| 3617 |
'color_scheme' => array( |
| 3618 |
'type' => 'select', |
| 3619 |
'label' => __pl('color'), |
| 3620 |
'default' => 'pagelayer-scheme-official', |
| 3621 |
'addClass' => '{{val}}', |
| 3622 |
'list' => array( |
| 3623 |
'' => __pl('custom'), |
| 3624 |
'pagelayer-scheme-official' => __pl('official') |
| 3625 |
) |
| 3626 |
), |
| 3627 |
'social_hover' => array( |
| 3628 |
'type' => 'radio', |
| 3629 |
'label' => __pl('state'), |
| 3630 |
'default' => '', |
| 3631 |
//'no_val' => 1,// Dont set any value to element |
| 3632 |
'list' => array( |
| 3633 |
'' => __pl('normal'), |
| 3634 |
'hover' => __pl('hover'), |
| 3635 |
) |
| 3636 |
), |
| 3637 |
'icon_color' => array( |
| 3638 |
'type' => 'color', |
| 3639 |
'label' => __pl('social_color_label'), |
| 3640 |
'default' => '#333333', |
| 3641 |
'css' => ['{{element}} .pagelayer-social-fa' => 'color: {{val}} !important;'], |
| 3642 |
'req' => array( |
| 3643 |
'color_scheme' => '' |
| 3644 |
), |
| 3645 |
'show' => ['social_hover' => ''] |
| 3646 |
), |
| 3647 |
'icon_bg_color' => array( |
| 3648 |
'type' => 'color', |
| 3649 |
'label' => __pl('social_bg_color_label'), |
| 3650 |
'default' => '#3E8EF7', |
| 3651 |
'css' => ['{{element}} .pagelayer-icon-holder' => 'background-color: {{val}} !important;'], |
| 3652 |
'req' => array( |
| 3653 |
'!bg_shape' => '', |
| 3654 |
'color_scheme' => '' |
| 3655 |
), |
| 3656 |
'show' => ['social_hover' => ''] |
| 3657 |
), |
| 3658 |
'icon_border_type' => array( |
| 3659 |
'type' => 'select', |
| 3660 |
'label' => __pl('border_type'), |
| 3661 |
'css' => ['{{element}} .pagelayer-icon-holder' => 'border-style: {{val}}'], |
| 3662 |
'list' => [ |
| 3663 |
'' => __pl('none'), |
| 3664 |
'solid' => __pl('solid'), |
| 3665 |
'double' => __pl('double'), |
| 3666 |
'dotted' => __pl('dotted'), |
| 3667 |
'dashed' => __pl('dashed'), |
| 3668 |
'groove' => __pl('groove'), |
| 3669 |
], |
| 3670 |
'show' => ['social_hover' => ''] |
| 3671 |
), |
| 3672 |
'icon_border_color' => array( |
| 3673 |
'type' => 'color', |
| 3674 |
'label' => __pl('service_box_icon_border_color_label'), |
| 3675 |
'default' => '#42414f', |
| 3676 |
'css' => ['{{element}} .pagelayer-icon-holder' => 'border-color: {{val}};'], |
| 3677 |
'req' => array( |
| 3678 |
'!icon_border_type' => '' |
| 3679 |
), |
| 3680 |
'show' => ['social_hover' => ''] |
| 3681 |
), |
| 3682 |
'icon_border_width' => array( |
| 3683 |
'type' => 'padding', |
| 3684 |
'label' => __pl('border_width'), |
| 3685 |
'css' => ['{{element}} .pagelayer-icon-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'], |
| 3686 |
'req' => [ |
| 3687 |
'!icon_border_type' => '' |
| 3688 |
], |
| 3689 |
'show' => ['social_hover' => ''] |
| 3690 |
), |
| 3691 |
'icon_border_radius' => array( |
| 3692 |
'type' => 'padding', |
| 3693 |
'label' => __pl('border_radius'), |
| 3694 |
'css' => ['{{element}} .pagelayer-icon-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;'], |
| 3695 |
'req' => array( |
| 3696 |
'!icon_border_type' => '' |
| 3697 |
), |
| 3698 |
'show' => ['social_hover' => ''] |
| 3699 |
), |
| 3700 |
'social_hover_delay' => array( |
| 3701 |
'type' => 'spinner', |
| 3702 |
'label' => __pl('btn_hover_delay_label'), |
| 3703 |
'desc' => __pl('btn_hover_delay_desc'), |
| 3704 |
'min' => 0, |
| 3705 |
'step' => 100, |
| 3706 |
'max' => 5000, |
| 3707 |
'default' => 400, |
| 3708 |
'css' => ['{{element}} .pagelayer-icon-holder' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;', |
| 3709 |
'{{element}} .pagelayer-social-fa' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'], |
| 3710 |
'show' => array( |
| 3711 |
'social_hover' => 'hover' |
| 3712 |
), |
| 3713 |
), |
| 3714 |
'anim_hover' => array( |
| 3715 |
'type' => 'select', |
| 3716 |
'label' => __pl('icon_animation'), |
| 3717 |
'list' => [ |
| 3718 |
'' => __pl('none'), |
| 3719 |
'grow' => __pl('Grow'), |
| 3720 |
'shrink' => __pl('Shrink'), |
| 3721 |
'pulse' => __pl('Pulse'), |
| 3722 |
'pulse-grow' => __pl('Pulse Grow'), |
| 3723 |
'pulse-shrink' => __pl('Pulse Shrink'), |
| 3724 |
'push' => __pl('Push'), |
| 3725 |
'pop' => __pl('Pop'), |
| 3726 |
'buzz' => __pl('Buzz'), |
| 3727 |
'buzz-out' => __pl('Buzz Out'), |
| 3728 |
'float' => __pl('Float'), |
| 3729 |
'sink' => __pl('Sink'), |
| 3730 |
'bob' => __pl('Bob'), |
| 3731 |
'hang' => __pl('Hang'), |
| 3732 |
'bounce-in' => __pl('Bounce In'), |
| 3733 |
'bounce-out' => __pl('Bounce Out'), |
| 3734 |
'rotate' => __pl('Rotate'), |
| 3735 |
'grow-rotate' => __pl('Grow Rotate'), |
| 3736 |
'skew-forward' => __pl('Skew Forward'), |
| 3737 |
'skew-backward' => __pl('Skew Backward'), |
| 3738 |
'wobble-vertical' => __pl('Wobble Vertical'), |
| 3739 |
'wobble-horizontal' => __pl('Wobble Horizontal'), |
| 3740 |
'wobble-bottom-to-right' => __pl('Wobble Bottom To Right'), |
| 3741 |
'wobble-top-to-right' => __pl('Wobble Top To Right'), |
| 3742 |
'wobble-top' => __pl('Wobble Top'), |
| 3743 |
'wobble-bottom' => __pl('Wobble Bottom'), |
| 3744 |
'wobble-skew' => __pl('Wobble Skew'), |
| 3745 |
], |
| 3746 |
'show' => array( |
| 3747 |
'social_hover' => 'hover', |
| 3748 |
), |
| 3749 |
'addAttr' => 'pagelayer-animation="{{anim_hover}}"', |
| 3750 |
), |
| 3751 |
'icon_color_hover' => array( |
| 3752 |
'type' => 'color', |
| 3753 |
'label' => __pl('social_color_label'), |
| 3754 |
'default' => '#ffffff', |
| 3755 |
'css' => ['{{element}} .pagelayer-icon-holder:hover .pagelayer-social-fa' => 'color: {{val}} !important;'], |
| 3756 |
'req' => array( |
| 3757 |
'color_scheme' => '' |
| 3758 |
), |
| 3759 |
'show' => ['social_hover' => 'hover'] |
| 3760 |
), |
| 3761 |
'icon_bg_color_hover' => array( |
| 3762 |
'type' => 'color', |
| 3763 |
'label' => __pl('social_bg_color_label'), |
| 3764 |
'default' => '#3E8EF7', |
| 3765 |
'css' => ['{{element}} .pagelayer-icon-holder:hover' => 'background-color: {{val}} !important;'], |
| 3766 |
'req' => array( |
| 3767 |
'!bg_shape' => '', |
| 3768 |
'color_scheme' => '' |
| 3769 |
), |
| 3770 |
'show' => ['social_hover' => 'hover'] |
| 3771 |
), |
| 3772 |
'icon_border_type_hover' => array( |
| 3773 |
'type' => 'select', |
| 3774 |
'label' => __pl('border_type'), |
| 3775 |
'css' => ['{{element}} .pagelayer-icon-holder:hover' => 'border-style: {{val}}'], |
| 3776 |
'list' => [ |
| 3777 |
'' => __pl('none'), |
| 3778 |
'solid' => __pl('solid'), |
| 3779 |
'double' => __pl('double'), |
| 3780 |
'dotted' => __pl('dotted'), |
| 3781 |
'dashed' => __pl('dashed'), |
| 3782 |
'groove' => __pl('groove'), |
| 3783 |
], |
| 3784 |
'show' => ['social_hover' => 'hover'] |
| 3785 |
), |
| 3786 |
'icon_border_color_hover' => array( |
| 3787 |
'type' => 'color', |
| 3788 |
'label' => __pl('border_color_hover_label'), |
| 3789 |
'default' => '#42414f', |
| 3790 |
'css' => ['{{element}} .pagelayer-icon-holder:hover' => 'border-color: {{val}};'], |
| 3791 |
'req' => array( |
| 3792 |
'!icon_border_type_hover' => '' |
| 3793 |
), |
| 3794 |
'show' => ['social_hover' => 'hover'] |
| 3795 |
), |
| 3796 |
'icon_border_width_hover' => array( |
| 3797 |
'type' => 'padding', |
| 3798 |
'label' => __pl('border_width_hover'), |
| 3799 |
'css' => ['{{element}} .pagelayer-icon-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'], |
| 3800 |
'req' => [ |
| 3801 |
'!icon_border_type_hover' => '' |
| 3802 |
], |
| 3803 |
'show' => ['social_hover' => 'hover'] |
| 3804 |
), |
| 3805 |
'icon_border_radius_hover' => array( |
| 3806 |
'type' => 'padding', |
| 3807 |
'label' => __pl('border_radius_hover'), |
| 3808 |
'css' => ['{{element}} .pagelayer-icon-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;'], |
| 3809 |
'req' => array( |
| 3810 |
'!icon_border_type_hover' => '' |
| 3811 |
), |
| 3812 |
'show' => ['social_hover' => 'hover'] |
| 3813 |
), |
| 3814 |
], |
| 3815 |
'styles' => [ |
| 3816 |
'layout_style' => __pl('layout_style'), |
| 3817 |
'icon_style' => __pl('icon'), |
| 3818 |
] |
| 3819 |
) |
| 3820 |
); |
| 3821 |
|
| 3822 |
//////////////////////// |
| 3823 |
// Media Group |
| 3824 |
//////////////////////// |
| 3825 |
|
| 3826 |
// Video |
| 3827 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_video', array( |
| 3828 |
'name' => __pl('video'), |
| 3829 |
'group' => 'media', |
| 3830 |
'func' => 'pagelayer_sc_video', |
| 3831 |
'html' => '<div class="pagelayer-video-holder pagelayer-video-{{video_ratio}}"> |
| 3832 |
<iframe if="{{src}}" id="embed_video" class="pagelayer-video-iframe" width="100%" height="auto" src="{{vid_src}}"></iframe> |
| 3833 |
<a if-ext={{lightbox}} href="{{{src-url}}}"> |
| 3834 |
<div if={{overlay}} class="pagelayer-video-overlay" style="background-image:url({{video_overlay_image-url}});"> |
| 3835 |
<i class="fa fa-{{play_icon}}" aria-hidden="true"></i> |
| 3836 |
</div> |
| 3837 |
</a> |
| 3838 |
</div>', |
| 3839 |
'params' => array( |
| 3840 |
'src' => array( |
| 3841 |
'type' => 'video', |
| 3842 |
'label' => __pl('video_src_label'), |
| 3843 |
'default' => 'https://www.youtube.com/watch?v=VT7WfVp1owQ', |
| 3844 |
'desc' => __pl('video_src_desc'), |
| 3845 |
), |
| 3846 |
'lightbox' => array( |
| 3847 |
'type' => 'checkbox', |
| 3848 |
'label' => __pl('Lightbox'), |
| 3849 |
'desc' => __pl('Open the video on Lightbox'), |
| 3850 |
'default' => '', |
| 3851 |
), |
| 3852 |
'autoplay' => array( |
| 3853 |
'type' => 'checkbox', |
| 3854 |
'label' => __pl('Autoplay'), |
| 3855 |
'req' => [ |
| 3856 |
'!overlay' => 'true', |
| 3857 |
'!lightbox' => 'true', |
| 3858 |
], |
| 3859 |
), |
| 3860 |
'mute' => array( |
| 3861 |
'type' => 'checkbox', |
| 3862 |
'label' => __pl('Mute'), |
| 3863 |
), |
| 3864 |
'loop' => array( |
| 3865 |
'type' => 'checkbox', |
| 3866 |
'label' => __pl('loop'), |
| 3867 |
), |
| 3868 |
'video_ratio' => array( |
| 3869 |
'type' => 'select', |
| 3870 |
'label' => __pl('video aspect ratio'), |
| 3871 |
'default' => 'aspect-8-5', |
| 3872 |
'list' => array( |
| 3873 |
'aspect-1-1' => __pl('1:1'), |
| 3874 |
'aspect-3-2' => __pl('3:2'), |
| 3875 |
'aspect-4-3' => __pl('4:3'), |
| 3876 |
'aspect-8-5' => __pl('8:5'), |
| 3877 |
'aspect-16-9' => __pl('16:9'), |
| 3878 |
), |
| 3879 |
), |
| 3880 |
), |
| 3881 |
'overlay_style' =>[ |
| 3882 |
'overlay' => array( |
| 3883 |
'type' => 'checkbox', |
| 3884 |
'label' => __pl('Overlay'), |
| 3885 |
'desc' => __pl('Enable this option to set the picture as overlay'), |
| 3886 |
'default' => '', |
| 3887 |
), |
| 3888 |
'video_overlay_image' => array( |
| 3889 |
'type' => 'image', |
| 3890 |
'label' => __pl('Custom thumbnail'), |
| 3891 |
'default' => PAGELAYER_URL.'/images/default-image.png', |
| 3892 |
'desc' => __pl('Use this option to set a picture from the media library'), |
| 3893 |
'req' => array( |
| 3894 |
'overlay' => 'true', |
| 3895 |
), |
| 3896 |
), |
| 3897 |
'play_icon' => array( |
| 3898 |
'type' => 'icon', |
| 3899 |
'label' => __pl('list_icon_label'), |
| 3900 |
'default' => 'play-circle', |
| 3901 |
'req' => array( |
| 3902 |
'overlay' => 'true' |
| 3903 |
) |
| 3904 |
), |
| 3905 |
'icon_color' => array( |
| 3906 |
'type' => 'color', |
| 3907 |
'label' => __pl('service_heading_color'), |
| 3908 |
'default' => '#3e8ef7', |
| 3909 |
'css' => ['{{element}} .pagelayer-video-overlay i' => 'color:{{val}}'], |
| 3910 |
'req' => array( |
| 3911 |
'overlay' => 'true' |
| 3912 |
) |
| 3913 |
), |
| 3914 |
'icon_size' => array( |
| 3915 |
'type' => 'spinner', |
| 3916 |
'label' => __pl('size'), |
| 3917 |
'min' => '0', |
| 3918 |
'max' => '700', |
| 3919 |
'screen' => 1, |
| 3920 |
'default' => '80', |
| 3921 |
'css' => ['{{element}} .pagelayer-video-overlay i' => 'font-size:{{val}}px;'], |
| 3922 |
'req' => array( |
| 3923 |
'overlay' => 'true' |
| 3924 |
) |
| 3925 |
), |
| 3926 |
'tooltip_text_shadow' => array( |
| 3927 |
'type' => 'shadow', |
| 3928 |
'label' => __pl('tooltip_text_shadow'), |
| 3929 |
'css' => ['{{element}} .pagelayer-video-overlay i' => 'text-shadow: {{val[0]}}px {{val[1]}}px {{val[2]}}px {{val[3]}};'], |
| 3930 |
'req' => array( |
| 3931 |
'overlay' => 'true' |
| 3932 |
) |
| 3933 |
), |
| 3934 |
], |
| 3935 |
'styles' => [ |
| 3936 |
'overlay_style' => __pl('overlay_style'), |
| 3937 |
], |
| 3938 |
) |
| 3939 |
); |
| 3940 |
|
| 3941 |
|
| 3942 |
//////////////////////// |
| 3943 |
// Other Group |
| 3944 |
//////////////////////// |
| 3945 |
|
| 3946 |
// Service Box |
| 3947 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_service', array( |
| 3948 |
'name' => __pl('Image Box'), |
| 3949 |
'group' => 'other', |
| 3950 |
'func' => 'pagelayer_sc_service', |
| 3951 |
'innerHTML' => 'service_text', |
| 3952 |
'html' => '<div class="pagelayer-service-container pagelayer-service-align-{{service_alignment}} pagelayer-service-vertical-{{service_vertical_alignment}}"> |
| 3953 |
<div if="{{service_image}}" class="pagelayer-service-image"> |
| 3954 |
<img class="pagelayer-animation-{{anim_hover}}" src="{{func_image}}"> |
| 3955 |
</div> |
| 3956 |
<div class="pagelayer-service-details"> |
| 3957 |
<div if={{service_heading}} class="pagelayer-service-heading">{{service_heading}}</div> |
| 3958 |
<div if={{service_text}} class="pagelayer-service-text">{{service_text}}</div> |
| 3959 |
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn {{service_button_type}} pagelayer-ele-link pagelayer-button {{service_button_size}}">{{service_button_text}}</a> |
| 3960 |
</div> |
| 3961 |
</div>', |
| 3962 |
'params' => [ |
| 3963 |
'service_image' => array( |
| 3964 |
'type' => 'image', |
| 3965 |
'label' => __pl('service_box_image_icon_label'), |
| 3966 |
'default' => PAGELAYER_URL.'/images/default-image.png', |
| 3967 |
), |
| 3968 |
'service_image_size' => array( |
| 3969 |
'type' => 'radio', |
| 3970 |
'label' => __pl('service_box_image_icon_size_label'), |
| 3971 |
'default' => 'full', |
| 3972 |
'list' => array( |
| 3973 |
'full' => __pl('full'), |
| 3974 |
'thumbnail' => __pl('thumbnail'), |
| 3975 |
'custom' => __pl('custom'), |
| 3976 |
) |
| 3977 |
), |
| 3978 |
'service_image_custom_size' => array( |
| 3979 |
'type' => 'slider', |
| 3980 |
'label' => __pl('service_img_custom_size_label'), |
| 3981 |
'min' => '0', |
| 3982 |
'max' => '2000', |
| 3983 |
'screen' => 1, |
| 3984 |
'default' => '200', |
| 3985 |
'css' => ['{{element}} .pagelayer-service-image img' => 'width:{{val}}px; height: auto;'], |
| 3986 |
'req' => array( |
| 3987 |
'service_image_size' => 'custom', |
| 3988 |
) |
| 3989 |
), |
| 3990 |
'anim_hover' => array( |
| 3991 |
'type' => 'select', |
| 3992 |
'label' => __pl('icon_animation'), |
| 3993 |
'list' => [ |
| 3994 |
'' => __pl('none'), |
| 3995 |
'grow' => __pl('Grow'), |
| 3996 |
'shrink' => __pl('Shrink'), |
| 3997 |
'pulse' => __pl('Pulse'), |
| 3998 |
'pulse-grow' => __pl('Pulse Grow'), |
| 3999 |
'pulse-shrink' => __pl('Pulse Shrink'), |
| 4000 |
'push' => __pl('Push'), |
| 4001 |
'pop' => __pl('Pop'), |
| 4002 |
'buzz' => __pl('Buzz'), |
| 4003 |
'buzz-out' => __pl('Buzz Out'), |
| 4004 |
'float' => __pl('Float'), |
| 4005 |
'sink' => __pl('Sink'), |
| 4006 |
'bob' => __pl('Bob'), |
| 4007 |
'hang' => __pl('Hang'), |
| 4008 |
'bounce-in' => __pl('Bounce In'), |
| 4009 |
'bounce-out' => __pl('Bounce Out'), |
| 4010 |
'rotate' => __pl('Rotate'), |
| 4011 |
'grow-rotate' => __pl('Grow Rotate'), |
| 4012 |
'skew-forward' => __pl('Skew Forward'), |
| 4013 |
'skew-backward' => __pl('Skew Backward'), |
| 4014 |
'wobble-vertical' => __pl('Wobble Vertical'), |
| 4015 |
'wobble-horizontal' => __pl('Wobble Horizontal'), |
| 4016 |
'wobble-bottom-to-right' => __pl('Wobble Bottom To Right'), |
| 4017 |
'wobble-top-to-right' => __pl('Wobble Top To Right'), |
| 4018 |
'wobble-top' => __pl('Wobble Top'), |
| 4019 |
'wobble-bottom' => __pl('Wobble Bottom'), |
| 4020 |
'wobble-skew' => __pl('Wobble Skew'), |
| 4021 |
], |
| 4022 |
) |
| 4023 |
], |
| 4024 |
'service_img_style' => [ |
| 4025 |
'service_alignment' => array( |
| 4026 |
'type' => 'radio', |
| 4027 |
'label' => __pl('service_box_media_alignment'), |
| 4028 |
'default' => 'top', |
| 4029 |
'list' => array( |
| 4030 |
'left' => __pl('left'), |
| 4031 |
'top' => __pl('top'), |
| 4032 |
'right' => __pl('right'), |
| 4033 |
), |
| 4034 |
), |
| 4035 |
'service_vertical_alignment' => array( |
| 4036 |
'type' => 'radio', |
| 4037 |
'label' => __pl('service_box_media_vertical_alignment'), |
| 4038 |
'default' => 'top', |
| 4039 |
'list' => array( |
| 4040 |
'top' => __pl('top'), |
| 4041 |
'middle' => __pl('middle'), |
| 4042 |
'bottom' => __pl('bottom'), |
| 4043 |
), |
| 4044 |
'req' => ['!service_alignment' => 'top'] |
| 4045 |
), |
| 4046 |
'service_image_spacing' => array( |
| 4047 |
'type' => 'padding', |
| 4048 |
'label' => __pl('service_image_spacing'), |
| 4049 |
'css' => ['{{element}} .pagelayer-service-image img' => 'margin-top:{{val[0]}}px; margin-right:{{val[1]}}px; margin-bottom:{{val[2]}}px; margin-left:{{val[3]}}px;'], |
| 4050 |
), |
| 4051 |
], |
| 4052 |
'service_heading_style' => [ |
| 4053 |
'service_heading' => array( |
| 4054 |
'type' => 'textarea', |
| 4055 |
'label' => __pl('service_box_heading_label'), |
| 4056 |
'default' => 'This is an Image Box', |
| 4057 |
'text' => __pl('open_in_wpeditor'), |
| 4058 |
), |
| 4059 |
'service_heading_spacing' => array( |
| 4060 |
'type' => 'slider', |
| 4061 |
'label' => __pl('service_heading_spacing'), |
| 4062 |
'min' => '0', |
| 4063 |
'max' => '200', |
| 4064 |
'default' => '10', |
| 4065 |
'css' => ['{{element}} .pagelayer-service-heading' => 'margin-bottom: {{val}}px !important;'], |
| 4066 |
), |
| 4067 |
'service_heading_color' => array( |
| 4068 |
'type' => 'color', |
| 4069 |
'label' => __pl('service_heading_color'), |
| 4070 |
'default' => '#3e8ef7', |
| 4071 |
'css' => ['{{element}} .pagelayer-service-heading' => 'color:{{val}}'], |
| 4072 |
), |
| 4073 |
'service_heading_typo' => array( |
| 4074 |
'type' => 'typography', |
| 4075 |
'label' => __pl('service_heading_typo'), |
| 4076 |
'default' => ',28,,600,,,,,,,', |
| 4077 |
'css' => ['{{element}} .pagelayer-service-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;'], |
| 4078 |
), |
| 4079 |
], |
| 4080 |
//service content style |
| 4081 |
'service_content_style' =>[ |
| 4082 |
'service_text_alignment' => array( |
| 4083 |
'type' => 'select', |
| 4084 |
'label' => __pl('service_box_text_alignment'), |
| 4085 |
'default' => 'center', |
| 4086 |
'list' => array( |
| 4087 |
'left' => __pl('left'), |
| 4088 |
'center' => __pl('center'), |
| 4089 |
'right' => __pl('right'), |
| 4090 |
'justify' => __pl('justify'), |
| 4091 |
), |
| 4092 |
'css' => ['{{element}} .pagelayer-service-details' => 'text-align:{{val}};'], |
| 4093 |
), |
| 4094 |
'service_text' => array( |
| 4095 |
'type' => 'editor', |
| 4096 |
'label' => __pl('service_box_text_label'), |
| 4097 |
'default' => 'Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', |
| 4098 |
'text' => __pl('open_in_wpeditor'), |
| 4099 |
) |
| 4100 |
], |
| 4101 |
//service button style |
| 4102 |
'service_btn_style' =>[ |
| 4103 |
'service_button' => array( |
| 4104 |
'type' => 'checkbox', |
| 4105 |
'label' => __pl('show_btn') |
| 4106 |
), |
| 4107 |
'service_button_type' => array( |
| 4108 |
'type' => 'select', |
| 4109 |
'label' => __pl('type'), |
| 4110 |
'default' => 'pagelayer-btn-default', |
| 4111 |
'list' => array( |
| 4112 |
'pagelayer-btn-default' => __pl('btn_type_default'), |
| 4113 |
'pagelayer-btn-primary' => __pl('btn_type_primary'), |
| 4114 |
'pagelayer-btn-secondary' => __pl('btn_type_secondary'), |
| 4115 |
'pagelayer-btn-success' => __pl('btn_type_success'), |
| 4116 |
'pagelayer-btn-info' => __pl('btn_type_info'), |
| 4117 |
'pagelayer-btn-warning' => __pl('btn_type_warning'), |
| 4118 |
'pagelayer-btn-danger' => __pl('btn_type_danger'), |
| 4119 |
'pagelayer-btn-dark' => __pl('btn_type_dark'), |
| 4120 |
'pagelayer-btn-light' => __pl('btn_type_light'), |
| 4121 |
'pagelayer-btn-link' => __pl('btn_type_link'), |
| 4122 |
'pagelayer-btn-custom' => __pl('btn_type_custom') |
| 4123 |
), |
| 4124 |
'req' => array( |
| 4125 |
'service_button' => 'true' |
| 4126 |
), |
| 4127 |
), |
| 4128 |
'service_button_size' => array( |
| 4129 |
'type' => 'select', |
| 4130 |
'label' => __pl('button_size_label'), |
| 4131 |
'default' => 'pagelayer-btn-small', |
| 4132 |
'list' => array( |
| 4133 |
'pagelayer-btn-mini' => __pl('mini'), |
| 4134 |
'pagelayer-btn-small' => __pl('small'), |
| 4135 |
'pagelayer-btn-large' => __pl('large'), |
| 4136 |
'pagelayer-btn-extra-large' => __pl('extra_large'), |
| 4137 |
'pagelayer-btn-double-large' => __pl('double_large'), |
| 4138 |
//'pagelayer-btn-custom' => __pl('custom'), |
| 4139 |
), |
| 4140 |
'req' => array( |
| 4141 |
'service_button' => 'true' |
| 4142 |
) |
| 4143 |
), |
| 4144 |
'service_button_url' => array( |
| 4145 |
'type' => 'link', |
| 4146 |
'label' => __pl('service_btn_url_label'), |
| 4147 |
'req' => array( |
| 4148 |
'service_button' => 'true' |
| 4149 |
), |
| 4150 |
), |
| 4151 |
'service_button_text' => array( |
| 4152 |
'type' => 'text', |
| 4153 |
'label' => __pl('service_button_text_label'), |
| 4154 |
'default' => 'Click Here!', |
| 4155 |
'req' => array( |
| 4156 |
'service_button' => 'true' |
| 4157 |
), |
| 4158 |
), |
| 4159 |
'service_btn_spacing' => array( |
| 4160 |
'type' => 'slider', |
| 4161 |
'label' => __pl('service_btn_spacing'), |
| 4162 |
'min' => '0', |
| 4163 |
'max' => '200', |
| 4164 |
'default' => '10', |
| 4165 |
'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top: {{val}}px;'], |
| 4166 |
'req' => [ |
| 4167 |
'service_button' => 'true', |
| 4168 |
] |
| 4169 |
), |
| 4170 |
'service_button_font_size' => array( |
| 4171 |
'type' => 'slider', |
| 4172 |
'label' => __pl('iconbox_btn_text_size'), |
| 4173 |
'min' => '0', |
| 4174 |
'max' => '50', |
| 4175 |
'css' => ['{{element}} .pagelayer-service-btn' => 'font-size:{{val}}px;'], |
| 4176 |
'req' => [ |
| 4177 |
'service_button' => 'true', |
| 4178 |
'iconbox_button_type' => 'pagelayer-btn-custom', |
| 4179 |
] |
| 4180 |
), |
| 4181 |
'service_btn_state' => array( |
| 4182 |
'type' => 'radio', |
| 4183 |
'label' => __pl('button_state'), |
| 4184 |
'default' => 'normal', |
| 4185 |
'list' => array( |
| 4186 |
'normal' => __pl('Normal'), |
| 4187 |
'hover' => __pl('Hover'), |
| 4188 |
), |
| 4189 |
'req' => array( |
| 4190 |
'service_button' => 'true', |
| 4191 |
'service_button_type' => 'pagelayer-btn-custom' |
| 4192 |
), |
| 4193 |
), |
| 4194 |
'service_button_color' => array( |
| 4195 |
'type' => 'color', |
| 4196 |
'label' => __pl('iconbox_button_color'), |
| 4197 |
'default' => '#ffffff', |
| 4198 |
'css' => ['{{element}} .pagelayer-service-btn' => 'color:{{val}};'], |
| 4199 |
'req' => [ |
| 4200 |
'service_button' => 'true', |
| 4201 |
'service_button_type' => 'pagelayer-btn-custom', |
| 4202 |
], |
| 4203 |
'show' => ['service_btn_state' => 'normal'] |
| 4204 |
), |
| 4205 |
'service_button_bg_color' => array( |
| 4206 |
'type' => 'color', |
| 4207 |
'label' => __pl('service_button_bg_color'), |
| 4208 |
'default' => '#3e8ef7', |
| 4209 |
'css' => ['{{element}} .pagelayer-service-btn' => 'background-color:{{val}};'], |
| 4210 |
'req' => [ |
| 4211 |
'service_button' => 'true', |
| 4212 |
'service_button_type' => 'pagelayer-btn-custom', |
| 4213 |
], |
| 4214 |
'show' => ['service_btn_state' => 'normal'] |
| 4215 |
), |
| 4216 |
'service_btn_hover_delay' => array( |
| 4217 |
'type' => 'spinner', |
| 4218 |
'label' => __pl('service_btn_hover_delay'), |
| 4219 |
'min' => 0, |
| 4220 |
'step' => 100, |
| 4221 |
'max' => 5000, |
| 4222 |
'default' => 400, |
| 4223 |
'css' => ['{{element}} .pagelayer-service-btn' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'], |
| 4224 |
'show' => ['service_btn_state' => 'hover'], |
| 4225 |
), |
| 4226 |
'service_button_color_hover' => array( |
| 4227 |
'type' => 'color', |
| 4228 |
'label' => __pl('iconbox_button_color'), |
| 4229 |
'default' => '', |
| 4230 |
'css' => ['{{element}} .pagelayer-service-btn:hover' => 'color:{{val}};'], |
| 4231 |
'show' => ['service_btn_state' => 'hover'], |
| 4232 |
), |
| 4233 |
'service_button_bg_color_hover' => array( |
| 4234 |
'type' => 'color', |
| 4235 |
'label' => __pl('service_button_bg_color_hover'), |
| 4236 |
'default' => '', |
| 4237 |
'css' => ['{{element}} .pagelayer-service-btn:hover' => 'background-color:{{val}};'], |
| 4238 |
'show' => ['service_btn_state' => 'hover'], |
| 4239 |
), |
| 4240 |
], |
| 4241 |
'styles' => [ |
| 4242 |
'service_img_style' => __pl('service_img_style'), |
| 4243 |
'service_heading_style' => __pl('service_heading_style'), |
| 4244 |
'service_content_style' => __pl('service_content_style'), |
| 4245 |
'service_btn_style' => __pl('service_btn_style'), |
| 4246 |
], |
| 4247 |
) |
| 4248 |
); |
| 4249 |
|
| 4250 |
// Icon Box |
| 4251 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_iconbox', array( |
| 4252 |
'name' => __pl('Icon Box'), |
| 4253 |
'group' => 'other', |
| 4254 |
'func' => 'pagelayer_sc_iconbox', |
| 4255 |
'innerHTML' => 'service_text', |
| 4256 |
'html' => '<div class="pagelayer-service-container pagelayer-service-align-{{service_alignment}} pagelayer-service-vertical-{{service_vertical_alignment}}"> |
| 4257 |
<div class="pagelayer-service-icon pagelayer-service-{{service_icon_view}}"> |
| 4258 |
<i class="fa fa-{{service_icon}} pagelayer-icon-{{service_icon_shape_type}} pagelayer-animation-{{anim_hover}}" aria-hidden="true"></i> |
| 4259 |
</div> |
| 4260 |
<div class="pagelayer-service-details"> |
| 4261 |
<div if="{{service_heading}}" class="pagelayer-service-heading">{{service_heading}}</div> |
| 4262 |
<div if="{{service_text}}" class="pagelayer-service-text">{{service_text}}</div> |
| 4263 |
<a if="{{service_button}}" href="{{service_button_url}}" class="pagelayer-service-btn pagelayer-button pagelayer-ele-link {{iconbox_button_type}} {{service_button_size}}"> |
| 4264 |
<span if="{{service_button_text}}">{{service_button_text}}</span> |
| 4265 |
</a> |
| 4266 |
</div> |
| 4267 |
</div>', |
| 4268 |
'params' => array( |
| 4269 |
'service_icon' => array( |
| 4270 |
'type' => 'icon', |
| 4271 |
'label' => __pl('iconbox_font_icon_label'), |
| 4272 |
'default' => 'exclamation-circle', |
| 4273 |
), |
| 4274 |
'service_alignment' => array( |
| 4275 |
'type' => 'radio', |
| 4276 |
'label' => __pl('iconbox_box_media_alignment'), |
| 4277 |
'default' => 'top', |
| 4278 |
'list' => array( |
| 4279 |
'left' => __pl('left'), |
| 4280 |
'top' => __pl('top'), |
| 4281 |
'right' => __pl('right'), |
| 4282 |
), |
| 4283 |
), |
| 4284 |
'service_vertical_alignment' => array( |
| 4285 |
'type' => 'radio', |
| 4286 |
'label' => __pl('iconbox_box_media_vertical_alignment'), |
| 4287 |
'default' => 'middle', |
| 4288 |
'list' => array( |
| 4289 |
'top' => __pl('top'), |
| 4290 |
'middle' => __pl('middle'), |
| 4291 |
'bottom' => __pl('bottom'), |
| 4292 |
), |
| 4293 |
'req' => array( |
| 4294 |
'!service_alignment' => 'top' |
| 4295 |
) |
| 4296 |
), |
| 4297 |
), |
| 4298 |
// icon style |
| 4299 |
'service_icon_style' => [ |
| 4300 |
'service_icon_view' => array( |
| 4301 |
'type' => 'select', |
| 4302 |
'label' => __pl('iconbox_icon_view'), |
| 4303 |
'default' => 'default', |
| 4304 |
'list' =>array( |
| 4305 |
'default' => __pl('Default'), |
| 4306 |
'stacked' => __pl('Stacked'), |
| 4307 |
'framed' => __pl('Framed'), |
| 4308 |
), |
| 4309 |
), |
| 4310 |
'service_icon_shape_type' => array( |
| 4311 |
'type' => 'select', |
| 4312 |
'label' => __pl('iconbox_icon_shape_label'), |
| 4313 |
'default' => '', |
| 4314 |
'list' =>array( |
| 4315 |
'square' => __pl('Square'), |
| 4316 |
'circle' => __pl('Circle'), |
| 4317 |
), |
| 4318 |
'req' => ['!service_icon_view' => 'default'], |
| 4319 |
), |
| 4320 |
'service_icon_padding' => array( |
| 4321 |
'type' => 'slider', |
| 4322 |
'label' => __pl('service_icon_padding'), |
| 4323 |
'min' => '0', |
| 4324 |
'max' => '200', |
| 4325 |
'default' => '15', |
| 4326 |
'css' => ['{{element}} .pagelayer-service-icon i' => 'padding: calc(0.5em + {{val}}px);'], |
| 4327 |
'req' => ['!service_icon_view' => 'default'], |
| 4328 |
), |
| 4329 |
'service_icon_spacing' => array( |
| 4330 |
'type' => 'padding', |
| 4331 |
'label' => __pl('service_icon_spacing'), |
| 4332 |
'css' => ['{{element}} .pagelayer-service-icon' => 'padding-top:{{val[0]}}px; padding-right:{{val[1]}}px; padding-bottom:{{val[2]}}px; padding-left:{{val[3]}}px;'], |
| 4333 |
), |
| 4334 |
'service_icon_state' => array( |
| 4335 |
'type' => 'radio', |
| 4336 |
'label' => __pl('icon_state'), |
| 4337 |
'default' => 'normal', |
| 4338 |
'list' => array( |
| 4339 |
'normal' => __pl('Normal'), |
| 4340 |
'hover' => __pl('Hover'), |
| 4341 |
), |
| 4342 |
), |
| 4343 |
'service_icon_color' => array( |
| 4344 |
'type' => 'color', |
| 4345 |
'label' => __pl('iconbox_icon_color'), |
| 4346 |
'default' => '#3e8ef7', |
| 4347 |
'css' => ['{{element}} .pagelayer-service-icon i' => 'color:{{val}};'], |
| 4348 |
'show' => ['service_icon_state' => 'normal'], |
| 4349 |
), |
| 4350 |
'service_icon_background_color' => array( |
| 4351 |
'type' => 'color', |
| 4352 |
'label' => __pl('service_icon_background_color'), |
| 4353 |
'default' => '#eff0f0ff', |
| 4354 |
'css' => ['{{element}} .pagelayer-service-icon.pagelayer-service-stacked i' => 'background-color:{{val}};'], |
| 4355 |
'show' => ['service_icon_state' => 'normal'], |
| 4356 |
'req' => ['service_icon_view' => 'stacked'] |
| 4357 |
), |
| 4358 |
'service_icon_font_size' => array( |
| 4359 |
'type' => 'slider', |
| 4360 |
'label' => __pl('service_icon_size'), |
| 4361 |
'min' => '0', |
| 4362 |
'max' => '300', |
| 4363 |
'default' => '75', |
| 4364 |
'css' => ['{{element}} .pagelayer-service-icon' => 'font-size:{{val}}px;'], |
| 4365 |
'show' => ['service_icon_state' => 'normal'], |
| 4366 |
), |
| 4367 |
'service_rotate' => array( |
| 4368 |
'type' => 'slider', |
| 4369 |
'label' => __pl('service_icon_rotate'), |
| 4370 |
'min' => '0', |
| 4371 |
'max' => '360', |
| 4372 |
'default' => '0', |
| 4373 |
'css' => ['{{element}} .pagelayer-service-icon i' => 'transform: rotate({{val}}deg);'], |
| 4374 |
'show' => ['service_icon_state' => 'normal'], |
| 4375 |
), |
| 4376 |
'service_icon_hover_delay' => array( |
| 4377 |
'type' => 'spinner', |
| 4378 |
'label' => __pl('service_icon_hover_delay'), |
| 4379 |
'min' => 0, |
| 4380 |
'step' => 100, |
| 4381 |
'max' => 5000, |
| 4382 |
'default' => 400, |
| 4383 |
'css' => ['{{element}} .pagelayer-service-icon i' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'], |
| 4384 |
'show' => ['service_icon_state' => 'hover'], |
| 4385 |
), |
| 4386 |
'anim_hover' => array( |
| 4387 |
'type' => 'select', |
| 4388 |
'label' => __pl('icon_animation'), |
| 4389 |
'list' => [ |
| 4390 |
'' => __pl('none'), |
| 4391 |
'grow' => __pl('Grow'), |
| 4392 |
'shrink' => __pl('Shrink'), |
| 4393 |
'pulse' => __pl('Pulse'), |
| 4394 |
'pulse-grow' => __pl('Pulse Grow'), |
| 4395 |
'pulse-shrink' => __pl('Pulse Shrink'), |
| 4396 |
'push' => __pl('Push'), |
| 4397 |
'pop' => __pl('Pop'), |
| 4398 |
'buzz' => __pl('Buzz'), |
| 4399 |
'buzz-out' => __pl('Buzz Out'), |
| 4400 |
'float' => __pl('Float'), |
| 4401 |
'sink' => __pl('Sink'), |
| 4402 |
'bob' => __pl('Bob'), |
| 4403 |
'hang' => __pl('Hang'), |
| 4404 |
'bounce-in' => __pl('Bounce In'), |
| 4405 |
'bounce-out' => __pl('Bounce Out'), |
| 4406 |
'rotate' => __pl('Rotate'), |
| 4407 |
'grow-rotate' => __pl('Grow Rotate'), |
| 4408 |
'skew-forward' => __pl('Skew Forward'), |
| 4409 |
'skew-backward' => __pl('Skew Backward'), |
| 4410 |
'wobble-vertical' => __pl('Wobble Vertical'), |
| 4411 |
'wobble-horizontal' => __pl('Wobble Horizontal'), |
| 4412 |
'wobble-bottom-to-right' => __pl('Wobble Bottom To Right'), |
| 4413 |
'wobble-top-to-right' => __pl('Wobble Top To Right'), |
| 4414 |
'wobble-top' => __pl('Wobble Top'), |
| 4415 |
'wobble-bottom' => __pl('Wobble Bottom'), |
| 4416 |
'wobble-skew' => __pl('Wobble Skew'), |
| 4417 |
], |
| 4418 |
'show' => array( |
| 4419 |
'service_icon_state' => 'hover', |
| 4420 |
), |
| 4421 |
), |
| 4422 |
'service_icon_color_hover' => array( |
| 4423 |
'type' => 'color', |
| 4424 |
'label' => __pl('service_icon_color_hover'), |
| 4425 |
'css' => ['{{element}}:hover .pagelayer-service-icon i' => 'color:{{val}};'], |
| 4426 |
'show' => ['service_icon_state' => 'hover'], |
| 4427 |
), |
| 4428 |
'service_icon_background_color_hover' => array( |
| 4429 |
'type' => 'color', |
| 4430 |
'label' => __pl('service_icon_background_color_hover'), |
| 4431 |
'default' => '', |
| 4432 |
'css' => ['{{element}}:hover .pagelayer-service-icon.pagelayer-service-stacked i' => 'background-color:{{val}};'], |
| 4433 |
'show' => ['service_icon_state' => 'hover'], |
| 4434 |
'req' => ['service_icon_view' => 'stacked'] |
| 4435 |
), |
| 4436 |
'service_icon_size_hover' => array( |
| 4437 |
'type' => 'slider', |
| 4438 |
'label' => __pl('service_icon_size_hover'), |
| 4439 |
'min' => '0', |
| 4440 |
'max' => '300', |
| 4441 |
'css' => ['{{element}}:hover .pagelayer-service-icon' => 'font-size:{{val}}px;'], |
| 4442 |
'show' => ['service_icon_state' => 'hover'], |
| 4443 |
), |
| 4444 |
'service_rotate_hover' => array( |
| 4445 |
'type' => 'slider', |
| 4446 |
'label' => __pl('service_rotate_hover'), |
| 4447 |
'min' => '0', |
| 4448 |
'max' => '360', |
| 4449 |
'css' => ['{{element}}:hover .pagelayer-service-icon i' => 'transform: rotate({{val}}deg);'], |
| 4450 |
'show' => ['service_icon_state' => 'hover'], |
| 4451 |
), |
| 4452 |
], |
| 4453 |
'service_icon_border' => [ |
| 4454 |
'service_bor_state' => array( |
| 4455 |
'type' => 'radio', |
| 4456 |
'label' => __pl('icon_state'), |
| 4457 |
'default' => 'normal', |
| 4458 |
'list' => array( |
| 4459 |
'normal' => __pl('Normal'), |
| 4460 |
'hover' => __pl('Hover'), |
| 4461 |
), |
| 4462 |
), |
| 4463 |
'service_icon_border_type' => array( |
| 4464 |
'type' => 'select', |
| 4465 |
'label' => __pl('icon_border_type'), |
| 4466 |
'css' => ['{{element}} .pagelayer-service-icon i' =>'border-style: {{val}};'], |
| 4467 |
'list' => [ |
| 4468 |
'' => __pl('none'), |
| 4469 |
'solid' => __pl('solid'), |
| 4470 |
'double' => __pl('double'), |
| 4471 |
'dotted' => __pl('dotted'), |
| 4472 |
'dashed' => __pl('dashed'), |
| 4473 |
'groove' => __pl('groove'), |
| 4474 |
], |
| 4475 |
'show' => ['service_bor_state' => 'normal'], |
| 4476 |
), |
| 4477 |
'service_icon_border_color' => array( |
| 4478 |
'type' => 'color', |
| 4479 |
'label' => __pl('icon_border_color_label'), |
| 4480 |
'default' => '#3e8ef7', |
| 4481 |
'css' => ['{{element}} .pagelayer-service-icon i' => 'border-color: {{val}};'], |
| 4482 |
'req' => [ |
| 4483 |
'!service_icon_border_type' => '', |
| 4484 |
], |
| 4485 |
'show' => ['service_bor_state' => 'normal'], |
| 4486 |
), |
| 4487 |
'service_icon_border_width' => array( |
| 4488 |
'type' => 'padding', |
| 4489 |
'label' => __pl('icon_border_width'), |
| 4490 |
'css' => ['{{element}} .pagelayer-service-icon 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;'], |
| 4491 |
'req' => [ |
| 4492 |
'!service_icon_border_type' => '', |
| 4493 |
], |
| 4494 |
'show' => ['service_bor_state' => 'normal'], |
| 4495 |
), |
| 4496 |
'service_icon_border_radius' => array( |
| 4497 |
'type' => 'padding', |
| 4498 |
'label' => __pl('border_radius'), |
| 4499 |
'css' => ['{{element}} .pagelayer-service-icon 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;'], |
| 4500 |
'req' => [ |
| 4501 |
'!service_icon_border_type' => '', |
| 4502 |
], |
| 4503 |
'show' => ['service_bor_state' => 'normal'], |
| 4504 |
), |
| 4505 |
'service_icon_border_type_hover' => array( |
| 4506 |
'type' => 'select', |
| 4507 |
'label' => __pl('icon_border_type_hover'), |
| 4508 |
'css' => ['{{element}}:hover .pagelayer-service-icon i' =>'border-style: {{val}};'], |
| 4509 |
'list' => [ |
| 4510 |
'' => __pl('none'), |
| 4511 |
'solid' => __pl('solid'), |
| 4512 |
'double' => __pl('double'), |
| 4513 |
'dotted' => __pl('dotted'), |
| 4514 |
'dashed' => __pl('dashed'), |
| 4515 |
'groove' => __pl('groove'), |
| 4516 |
], |
| 4517 |
'show' => ['service_bor_state' => 'hover'], |
| 4518 |
), |
| 4519 |
'service_icon_border_color_hover' => array( |
| 4520 |
'type' => 'color', |
| 4521 |
'label' => __pl('icon_border_color_hover_label'), |
| 4522 |
'default' => '#3e8ef7', |
| 4523 |
'css' => ['{{element}}:hover .pagelayer-service-icon i' => 'border-color: {{val}};'], |
| 4524 |
'req' => [ |
| 4525 |
'!service_icon_border_type_hover' => '', |
| 4526 |
], |
| 4527 |
'show' => ['service_bor_state' => 'hover'], |
| 4528 |
), |
| 4529 |
'service_icon_border_width_hover' => array( |
| 4530 |
'type' => 'padding', |
| 4531 |
'label' => __pl('icon_border_width_hover'), |
| 4532 |
'css' => ['{{element}}:hover .pagelayer-service-icon 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;'], |
| 4533 |
'req' => [ |
| 4534 |
'!service_icon_border_type_hover' => '', |
| 4535 |
], |
| 4536 |
'show' => ['service_bor_state' => 'hover'], |
| 4537 |
), |
| 4538 |
'service_icon_border_radius_hover' => array( |
| 4539 |
'type' => 'padding', |
| 4540 |
'label' => __pl('border_radius'), |
| 4541 |
'css' => ['{{element}}:hover .pagelayer-service-icon 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;'], |
| 4542 |
'req' => [ |
| 4543 |
'!service_icon_border_type_hover' => '', |
| 4544 |
], |
| 4545 |
'show' => ['service_bor_state' => 'hover'], |
| 4546 |
), |
| 4547 |
], |
| 4548 |
'service_heading_style' =>[ |
| 4549 |
'service_heading' => array( |
| 4550 |
'type' => 'textarea', |
| 4551 |
'label' => __pl('iconbox_box_heading_label'), |
| 4552 |
'default' => 'This is Icon Box', |
| 4553 |
'text' => __pl('open_in_wpeditor'), |
| 4554 |
), |
| 4555 |
'service_heading_spacing' => array( |
| 4556 |
'type' => 'slider', |
| 4557 |
'label' => __pl('service_heading_spacing'), |
| 4558 |
'min' => '0', |
| 4559 |
'max' => '200', |
| 4560 |
'default' => '10', |
| 4561 |
'css' => ['{{element}} .pagelayer-service-heading' => 'margin-bottom: {{val}}px;'], |
| 4562 |
), |
| 4563 |
'service_heading_color' => array( |
| 4564 |
'type' => 'color', |
| 4565 |
'label' => __pl('service_heading_color'), |
| 4566 |
'default' => '#3e8ef7', |
| 4567 |
'css' => ['{{element}} .pagelayer-service-heading' => 'color:{{val}}'], |
| 4568 |
), |
| 4569 |
'service_heading_typo' => array( |
| 4570 |
'type' => 'typography', |
| 4571 |
'label' => __pl('service_heading_typo'), |
| 4572 |
'default' => ',28,,600,,,,,,,', |
| 4573 |
'css' => ['{{element}} .pagelayer-service-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;'], |
| 4574 |
), |
| 4575 |
], |
| 4576 |
//service content style |
| 4577 |
'service_content_style' =>[ |
| 4578 |
'service_text_alignment' => array( |
| 4579 |
'type' => 'select', |
| 4580 |
'label' => __pl('iconbox_box_text_alignment'), |
| 4581 |
'default' => 'center', |
| 4582 |
'list' => array( |
| 4583 |
'left' => __pl('left'), |
| 4584 |
'center' => __pl('center'), |
| 4585 |
'right' => __pl('right'), |
| 4586 |
'justify' => __pl('justify'), |
| 4587 |
), |
| 4588 |
'css' => ['{{element}} .pagelayer-service-details' => 'text-align:{{val}};'], |
| 4589 |
), |
| 4590 |
'service_text' => array( |
| 4591 |
'type' => 'editor', |
| 4592 |
'label' => __pl('iconbox_box_text_label'), |
| 4593 |
'default' => 'Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', |
| 4594 |
'text' => __pl('open_in_wpeditor'), |
| 4595 |
), |
| 4596 |
], |
| 4597 |
//service button style |
| 4598 |
'service_btn_style' =>[ |
| 4599 |
'service_button' => array( |
| 4600 |
'type' => 'checkbox', |
| 4601 |
'label' => __pl('show_btn'), |
| 4602 |
), |
| 4603 |
'iconbox_button_type' => array( |
| 4604 |
'type' => 'select', |
| 4605 |
'label' => __pl('Button Type'), |
| 4606 |
'default' => 'pagelayer-btn-primary', |
| 4607 |
'list' => array( |
| 4608 |
'pagelayer-btn-default' => __pl('btn_type_default'), |
| 4609 |
'pagelayer-btn-primary' => __pl('btn_type_primary'), |
| 4610 |
'pagelayer-btn-secondary' => __pl('btn_type_secondary'), |
| 4611 |
'pagelayer-btn-success' => __pl('btn_type_success'), |
| 4612 |
'pagelayer-btn-info' => __pl('btn_type_info'), |
| 4613 |
'pagelayer-btn-warning' => __pl('btn_type_warning'), |
| 4614 |
'pagelayer-btn-danger' => __pl('btn_type_danger'), |
| 4615 |
'pagelayer-btn-dark' => __pl('btn_type_dark'), |
| 4616 |
'pagelayer-btn-light' => __pl('btn_type_light'), |
| 4617 |
'pagelayer-btn-link' => __pl('btn_type_link'), |
| 4618 |
'pagelayer-btn-custom' => __pl('btn_type_custom') |
| 4619 |
), |
| 4620 |
'req' => array( |
| 4621 |
'service_button' => 'true' |
| 4622 |
), |
| 4623 |
), |
| 4624 |
'service_button_size' => array( |
| 4625 |
'type' => 'select', |
| 4626 |
'label' => __pl('button_size_label'), |
| 4627 |
'default' => 'pagelayer-btn-small', |
| 4628 |
'list' => array( |
| 4629 |
'pagelayer-btn-mini' => __pl('mini'), |
| 4630 |
'pagelayer-btn-small' => __pl('small'), |
| 4631 |
'pagelayer-btn-large' => __pl('large'), |
| 4632 |
'pagelayer-btn-extra-large' => __pl('extra_large'), |
| 4633 |
'pagelayer-btn-double-large' => __pl('double_large'), |
| 4634 |
//'pagelayer-btn-custom' => __pl('custom'), |
| 4635 |
), |
| 4636 |
'req' => array( |
| 4637 |
'service_button' => 'true' |
| 4638 |
) |
| 4639 |
), |
| 4640 |
'service_button_url' => array( |
| 4641 |
'type' => 'link', |
| 4642 |
'label' => __pl('iconbox_btn_url_label'), |
| 4643 |
'req' => array( |
| 4644 |
'service_button' => 'true' |
| 4645 |
), |
| 4646 |
), |
| 4647 |
'service_button_text' => array( |
| 4648 |
'type' => 'text', |
| 4649 |
'label' => __pl('iconbox_button_text_label'), |
| 4650 |
'default' => 'Click Here!', |
| 4651 |
'req' => array( |
| 4652 |
'service_button' => 'true' |
| 4653 |
), |
| 4654 |
), |
| 4655 |
'service_btn_spacing' => array( |
| 4656 |
'type' => 'slider', |
| 4657 |
'label' => __pl('service_btn_spacing'), |
| 4658 |
'min' => '0', |
| 4659 |
'max' => '200', |
| 4660 |
'default' => '10', |
| 4661 |
'css' => ['{{element}} .pagelayer-service-btn' => 'margin-top: {{val}}px;'], |
| 4662 |
'req' => [ |
| 4663 |
'service_button' => 'true', |
| 4664 |
] |
| 4665 |
), |
| 4666 |
'service_button_font_size' => array( |
| 4667 |
'type' => 'slider', |
| 4668 |
'label' => __pl('iconbox_btn_text_size'), |
| 4669 |
'min' => '0', |
| 4670 |
'max' => '50', |
| 4671 |
'css' => ['{{element}} .pagelayer-service-btn' => 'font-size:{{val}}px;'], |
| 4672 |
'req' => [ |
| 4673 |
'service_button' => 'true', |
| 4674 |
'iconbox_button_type' => 'pagelayer-btn-custom', |
| 4675 |
] |
| 4676 |
), |
| 4677 |
'service_btn_state' => array( |
| 4678 |
'type' => 'radio', |
| 4679 |
'label' => __pl('button_state'), |
| 4680 |
'default' => 'normal', |
| 4681 |
'list' => array( |
| 4682 |
'normal' => __pl('Normal'), |
| 4683 |
'hover' => __pl('Hover'), |
| 4684 |
), |
| 4685 |
'req' => array( |
| 4686 |
'service_button' => 'true', |
| 4687 |
'iconbox_button_type' => 'pagelayer-btn-custom' |
| 4688 |
), |
| 4689 |
), |
| 4690 |
'service_button_color' => array( |
| 4691 |
'type' => 'color', |
| 4692 |
'label' => __pl('iconbox_button_color'), |
| 4693 |
'default' => '#ffffff', |
| 4694 |
'css' => ['{{element}} .pagelayer-service-btn' => 'color:{{val}};'], |
| 4695 |
'req' => [ |
| 4696 |
'service_button' => 'true', |
| 4697 |
'iconbox_button_type' => 'pagelayer-btn-custom', |
| 4698 |
], |
| 4699 |
'show' => ['service_btn_state' => 'normal'] |
| 4700 |
), |
| 4701 |
'service_button_bg_color' => array( |
| 4702 |
'type' => 'color', |
| 4703 |
'label' => __pl('service_button_bg_color'), |
| 4704 |
'default' => '#3e8ef7', |
| 4705 |
'css' => ['{{element}} .pagelayer-service-btn' => 'background-color:{{val}};'], |
| 4706 |
'req' => [ |
| 4707 |
'service_button' => 'true', |
| 4708 |
'iconbox_button_type' => 'pagelayer-btn-custom', |
| 4709 |
], |
| 4710 |
'show' => ['service_btn_state' => 'normal'] |
| 4711 |
), |
| 4712 |
'service_btn_hover_delay' => array( |
| 4713 |
'type' => 'spinner', |
| 4714 |
'label' => __pl('service_btn_hover_delay'), |
| 4715 |
'min' => 0, |
| 4716 |
'step' => 100, |
| 4717 |
'max' => 5000, |
| 4718 |
'default' => 400, |
| 4719 |
'css' => ['{{element}} .pagelayer-service-btn' => '-webkit-transition: all {{val}}ms; transition: all {{val}}ms;'], |
| 4720 |
'show' => ['service_btn_state' => 'hover'], |
| 4721 |
), |
| 4722 |
'service_button_color_hover' => array( |
| 4723 |
'type' => 'color', |
| 4724 |
'label' => __pl('iconbox_button_color'), |
| 4725 |
'default' => '', |
| 4726 |
'css' => ['{{element}} .pagelayer-service-btn:hover' => 'color:{{val}};'], |
| 4727 |
'show' => ['service_btn_state' => 'hover'], |
| 4728 |
), |
| 4729 |
'service_button_bg_color_hover' => array( |
| 4730 |
'type' => 'color', |
| 4731 |
'label' => __pl('service_button_bg_color_hover'), |
| 4732 |
'default' => '', |
| 4733 |
'css' => ['{{element}} .pagelayer-service-btn:hover' => 'background-color:{{val}};'], |
| 4734 |
'show' => ['service_btn_state' => 'hover'], |
| 4735 |
), |
| 4736 |
], |
| 4737 |
'styles' => [ |
| 4738 |
'service_icon_style' => __pl('service_icon_style'), |
| 4739 |
'service_icon_border' => __pl('service_icon_border'), |
| 4740 |
'service_heading_style' => __pl('service_heading_style'), |
| 4741 |
'service_content_style' => __pl('service_content_style'), |
| 4742 |
'service_btn_style' => __pl('service_btn_style'), |
| 4743 |
], |
| 4744 |
) |
| 4745 |
); |
| 4746 |
|
| 4747 |
// Tabs |
| 4748 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_tabs', array( |
| 4749 |
'name' => __pl('tabs'), |
| 4750 |
'group' => 'other', |
| 4751 |
'func' => 'pagelayer_sc_tabs', |
| 4752 |
'has_group' => [ |
| 4753 |
'section' => 'params', |
| 4754 |
'prop' => 'elements' |
| 4755 |
], |
| 4756 |
'holder' => '.pagelayer-tabcontainer', |
| 4757 |
'html' => '<div class="pagelayer-tabs-holder"></div> |
| 4758 |
<div class="pagelayer-tabcontainer"></div>', |
| 4759 |
'params' => array( |
| 4760 |
'elements' => array( |
| 4761 |
'type' => 'group', |
| 4762 |
'label' => __pl('Tabs list'), |
| 4763 |
'sc' => PAGELAYER_SC_PREFIX.'_tab', |
| 4764 |
'item_label' => array( |
| 4765 |
'default' => __pl('tab'), |
| 4766 |
'param' => 'title', |
| 4767 |
), |
| 4768 |
'count' => 2, |
| 4769 |
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('tab_name'))), |
| 4770 |
), |
| 4771 |
'vertical' => array( |
| 4772 |
'type' => 'checkbox', |
| 4773 |
'label' => __pl('tabs_vertical'), |
| 4774 |
), |
| 4775 |
'vertical_width' => array( |
| 4776 |
'type' => 'slider', |
| 4777 |
'label' => __pl('Tabs container width'), |
| 4778 |
'default' => 30, |
| 4779 |
'min' => 0, |
| 4780 |
'max' => 70, |
| 4781 |
'step' => 1, |
| 4782 |
'css' => ['{{element}}' => 'width:100%; display: -webkit-flex; |
| 4783 |
display: flex;', '{{element}} .pagelayer-tabs-holder' => '-webkit-flex-basis: {{val}}%; flex-basis:{{val}}%', '{{element}} .pagelayer-tabcontainer' => '-webkit-flex-basis: calc(100% - {{val}}%); flex-basis:calc(100% - {{val}}%)', '{{element}} .pagelayer-tabs-holder .pagelayer-tablinks' => 'width: 100%;'], |
| 4784 |
'req' => array( |
| 4785 |
'vertical' => 'true', |
| 4786 |
) |
| 4787 |
), |
| 4788 |
'rotate' => array( |
| 4789 |
'type' => 'radio', |
| 4790 |
'label' => __pl('tabs_rotate'), |
| 4791 |
'list' => array( |
| 4792 |
'' => __pl('disable'), |
| 4793 |
'3000' => '3', |
| 4794 |
'5000' => '5', |
| 4795 |
'10000' => '10', |
| 4796 |
'15000' => '15', |
| 4797 |
), |
| 4798 |
'addAttr' => 'pagelayer-tabs-rotate="{{rotate}}"' |
| 4799 |
) |
| 4800 |
), |
| 4801 |
'tabs_holder_styles' => [ |
| 4802 |
'tabs_holder_bg_color' => array( |
| 4803 |
'type' => 'color', |
| 4804 |
'label' => __pl('Background color'), |
| 4805 |
'default' => '#f1f1f1', |
| 4806 |
'css' => ['{{element}} .pagelayer-tabs-holder' => 'background-color:{{val}}'], |
| 4807 |
), |
| 4808 |
'tabs_border_type' => array( |
| 4809 |
'type' => 'select', |
| 4810 |
'label' => __pl('border_type'), |
| 4811 |
'default' => 'solid', |
| 4812 |
'list' => [ |
| 4813 |
'' => __pl('none'), |
| 4814 |
'solid' => __pl('solid'), |
| 4815 |
'double' => __pl('double'), |
| 4816 |
'dotted' => __pl('dotted'), |
| 4817 |
'dashed' => __pl('dashed'), |
| 4818 |
'groove' => __pl('groove'), |
| 4819 |
], |
| 4820 |
'css' => ['{{element}} .pagelayer-tabcontainer' => 'border-style: {{val}}', '{{element}} .pagelayer-tabs-holder' =>'border-style: {{val}}'], |
| 4821 |
), |
| 4822 |
'tabs_border_color' => array( |
| 4823 |
'type' => 'color', |
| 4824 |
'label' => __pl('border_color'), |
| 4825 |
'default' => '#cccccc', |
| 4826 |
'req' => [ |
| 4827 |
'!tabs_border_type' => '' |
| 4828 |
], |
| 4829 |
'css' => ['{{element}} .pagelayer-tabcontainer' => 'border-color: {{val}}','{{element}} .pagelayer-tabs-holder' => 'border-color: {{val}}'], |
| 4830 |
), |
| 4831 |
'tabs_holder_border_width' => array( |
| 4832 |
'type' => 'padding', |
| 4833 |
'label' => __pl('Border Width'), |
| 4834 |
'default' => '1,1,0,1', |
| 4835 |
'req' => [ |
| 4836 |
'!tabs_border_type' => '' |
| 4837 |
], |
| 4838 |
'css' => ['{{element}} .pagelayer-tabs-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'], |
| 4839 |
), |
| 4840 |
'tabs_holder_border_radius' => array( |
| 4841 |
'type' => 'padding', |
| 4842 |
'label' => __pl('Border Radius'), |
| 4843 |
'default' => '1,1,0,1', |
| 4844 |
'req' => [ |
| 4845 |
'!tabs_border_type' => '' |
| 4846 |
], |
| 4847 |
'css' => ['{{element}} .pagelayer-tabs-holder' => 'border-top-left-radius: {{val[0]}}px; border-top-right-radius: {{val[1]}}px; border-bottom-right-radius: {{val[2]}}px; border-bottom-left-radius: {{val[3]}}px'], |
| 4848 |
), |
| 4849 |
], |
| 4850 |
'tabs_styles' => [ |
| 4851 |
'tabs_holder_align' => array( |
| 4852 |
'type' => 'radio', |
| 4853 |
'label' => __pl('alignment'), |
| 4854 |
'default' => 'left', |
| 4855 |
'list' => array( |
| 4856 |
'left' => __pl('Left'), |
| 4857 |
'center' => __pl('Center'), |
| 4858 |
'right' => __pl('Right'), |
| 4859 |
), |
| 4860 |
'css' => ['{{element}} .pagelayer-tabs-holder' => 'text-align:{{val}}'], |
| 4861 |
), |
| 4862 |
'tabs_color' => array( |
| 4863 |
'type' => 'color', |
| 4864 |
'label' => __pl('Color '), |
| 4865 |
'default' => '#444', |
| 4866 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks' => 'color:{{val}}'], |
| 4867 |
), |
| 4868 |
'tabs_bg_color' => array( |
| 4869 |
'type' => 'color', |
| 4870 |
'label' => __pl('Background color'), |
| 4871 |
'default' => '#f1f1f1', |
| 4872 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks' => 'background-color:{{val}}'], |
| 4873 |
), |
| 4874 |
'tabs_active_color' => array( |
| 4875 |
'type' => 'color', |
| 4876 |
'label' => __pl('Active Tab Color'), |
| 4877 |
'default' => '#fff', |
| 4878 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks.active' => 'color:{{val}}', '{{element}} .pagelayer-tabs-holder .pagelayer-tablinks:hover' => 'color:{{val}}'], |
| 4879 |
), |
| 4880 |
'tabs_active_bg_color' => array( |
| 4881 |
'type' => 'color', |
| 4882 |
'label' => __pl('Active Tab Background Color'), |
| 4883 |
'default' => '#3e8ef7', |
| 4884 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks.active'=> 'background-color:{{val}}', '{{element}} .pagelayer-tabs-holder .pagelayer-tablinks:hover' => 'background-color:{{val}}'], |
| 4885 |
), |
| 4886 |
'tab_title_typo' => array( |
| 4887 |
'type' => 'typography', |
| 4888 |
'label' => __pl('tab_title_typo'), |
| 4889 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks' => '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;'], |
| 4890 |
), |
| 4891 |
'tabs_icon_align' => array( |
| 4892 |
'type' => 'radio', |
| 4893 |
'label' => __pl('Icon Position'), |
| 4894 |
'default' => 'left', |
| 4895 |
'list' => array( |
| 4896 |
'left' => __pl('Left'), |
| 4897 |
'right' => __pl('Right'), |
| 4898 |
), |
| 4899 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks .fa'=> 'float:{{val}};'], |
| 4900 |
), |
| 4901 |
'tabs_icon_spacing' => array( |
| 4902 |
'type' => 'slider', |
| 4903 |
'label' => __pl('tabs_icon_spacing'), |
| 4904 |
'default' => 10, |
| 4905 |
'max' => 50, |
| 4906 |
'min' => 0, |
| 4907 |
'steps' => 1, |
| 4908 |
'css' => ['{{element}} .pagelayer-tabs-holder .pagelayer-tablinks .fa'=> 'padding:0px {{val}}px;padding-{{tabs_icon_align}}:0px;'], |
| 4909 |
), |
| 4910 |
], |
| 4911 |
'content_styles' => [ |
| 4912 |
'tabs_content_typo' => array( |
| 4913 |
'type' => 'typography', |
| 4914 |
'label' => __pl('tab_content_typo'), |
| 4915 |
'css' => ['{{element}} .pagelayer-tabcontainer' => '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;'], |
| 4916 |
), |
| 4917 |
'tabs_content_color' => array( |
| 4918 |
'type' => 'color', |
| 4919 |
'label' => __pl('Color'), |
| 4920 |
'default' => '#000000', |
| 4921 |
'css' => ['{{element}} .pagelayer-tab' => 'color:{{val}}'], |
| 4922 |
), |
| 4923 |
'tabs_content_bg_color' => array( |
| 4924 |
'type' => 'color', |
| 4925 |
'label' => __pl('Background Color'), |
| 4926 |
'default' => '#fff', |
| 4927 |
'css' => ['{{element}} .pagelayer-tab'=> 'background-color:{{val}}'], |
| 4928 |
), |
| 4929 |
'tab_padding' => array( |
| 4930 |
'type' => 'slider', |
| 4931 |
'label' => __pl('tabs_padding_label'), |
| 4932 |
'default' => 15, |
| 4933 |
'min' => 0, |
| 4934 |
'max' => 50, |
| 4935 |
'step' => 1, |
| 4936 |
'css' => ['{{element}}.pagelayer-tabs .pagelayer-tabcontainer [pagelayer-id]' => 'padding: {{val}}px;'], |
| 4937 |
), |
| 4938 |
'tabs_content_border_width' => array( |
| 4939 |
'type' => 'padding', |
| 4940 |
'label' => __pl('border_width'), |
| 4941 |
'default' => '1,1,1,1', |
| 4942 |
'req' => [ |
| 4943 |
'!tabs_border_type' => '' |
| 4944 |
], |
| 4945 |
'css' => ['{{element}} .pagelayer-tabcontainer' => 'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px'], |
| 4946 |
), |
| 4947 |
'tabs_content_border_radius' => array( |
| 4948 |
'type' => 'padding', |
| 4949 |
'label' => __pl('border_radius'), |
| 4950 |
'req' => [ |
| 4951 |
'!tabs_border_type' => '' |
| 4952 |
], |
| 4953 |
'css' => ['{{element}} .pagelayer-tabcontainer' => 'border-top-left-radius: {{val[0]}}px; border-top-right-radius: {{val[1]}}px; border-bottom-right-radius: {{val[2]}}px; border-bottom-left-radius: {{val[3]}}px'], |
| 4954 |
), |
| 4955 |
], |
| 4956 |
'styles' => [ |
| 4957 |
'tabs_holder_styles' => __pl('tabs_holder_styles'), |
| 4958 |
'tabs_styles' => __pl('Tabs'), |
| 4959 |
'content_styles' => __pl('content'), |
| 4960 |
], |
| 4961 |
) |
| 4962 |
); |
| 4963 |
|
| 4964 |
|
| 4965 |
// Tab |
| 4966 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_tab', array( |
| 4967 |
'name' => __pl('tab'), |
| 4968 |
'group' => 'other', |
| 4969 |
'not_visible' => 1, |
| 4970 |
'func' => 'pagelayer_sc_tab', |
| 4971 |
'innerHTML' => 'text', |
| 4972 |
'html' => '<div class="pagelayer-tabcontent">{{text}}</div>', |
| 4973 |
'params' => array( |
| 4974 |
'default_active' => array( |
| 4975 |
'type' => 'checkbox', |
| 4976 |
'label' => __pl('Default active tab'), |
| 4977 |
'addAttr' => 'pagelayer-default_active="1"' |
| 4978 |
), |
| 4979 |
'tab_icon' => array( |
| 4980 |
'type' => 'icon', |
| 4981 |
'label' => __pl('icon'), |
| 4982 |
'addAttr' => 'pagelayer-tab-icon="{{tab_icon}}"', |
| 4983 |
), |
| 4984 |
'title' => array( |
| 4985 |
'type' => 'text', |
| 4986 |
'label' => __pl('title'), |
| 4987 |
'default' => 'Lorem', |
| 4988 |
'addAttr' => 'pagelayer-tab-title="{{title}}"' |
| 4989 |
), |
| 4990 |
'text' => array( |
| 4991 |
'type' => 'editor', |
| 4992 |
'label' => __pl('Edit Rich Text'), |
| 4993 |
'default' => 'Lorem ipsum dolor sit amet', |
| 4994 |
'desc' => __pl('Edit the content here or edit directly in the Editor'), |
| 4995 |
'edit' => '.pagelayer-text-holder', |
| 4996 |
), |
| 4997 |
) |
| 4998 |
) |
| 4999 |
); |
| 5000 |
|
| 5001 |
// Accordion |
| 5002 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_accordion', array( |
| 5003 |
'name' => __pl('accordion'), |
| 5004 |
'group' => 'other', |
| 5005 |
'func' => 'pagelayer_sc_accordion', |
| 5006 |
'has_group' => [ |
| 5007 |
'section' => 'params', |
| 5008 |
'prop' => 'elements' |
| 5009 |
], |
| 5010 |
'holder' => '.pagelayer-accordion-holder', |
| 5011 |
'html' => '<div class="pagelayer-accordion-holder" data-icon="{{icon}}" data-active_icon="{{active_icon}}"></div>', |
| 5012 |
'params' => array( |
| 5013 |
'elements' => array( |
| 5014 |
'type' => 'group', |
| 5015 |
'label' => __pl('Accordions'), |
| 5016 |
'sc' => PAGELAYER_SC_PREFIX.'_accordion_item', |
| 5017 |
'item_label' => array( |
| 5018 |
'default' => __pl('accordion_item_title_label'), |
| 5019 |
'param' => 'title' |
| 5020 |
), |
| 5021 |
'count' => 2, |
| 5022 |
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('accordion_name'))), |
| 5023 |
), |
| 5024 |
'acc_space' => array( |
| 5025 |
'type' => 'slider', |
| 5026 |
'label' => __pl('Space Between'), |
| 5027 |
'default' => 0, |
| 5028 |
'min' => 0, |
| 5029 |
'max' => 50, |
| 5030 |
'step' => 1, |
| 5031 |
'css' => ['{{element}} .pagelayer-accordion_item' => 'margin-bottom:{{val}}px;'], |
| 5032 |
), |
| 5033 |
), |
| 5034 |
'icon_styles' => [ |
| 5035 |
'icon' => array( |
| 5036 |
'type' => 'icon', |
| 5037 |
'label' => __pl('list_icon_label'), |
| 5038 |
'default' => 'plus', |
| 5039 |
), |
| 5040 |
'active_icon' => array( |
| 5041 |
'type' => 'icon', |
| 5042 |
'label' => __pl('Active Icon'), |
| 5043 |
'default' => 'minus', |
| 5044 |
), |
| 5045 |
'icon_align' => array( |
| 5046 |
'type' => 'radio', |
| 5047 |
'label' => __pl('Alignment'), |
| 5048 |
'default' => 'left', |
| 5049 |
'css' => ['{{element}} .pagelayer-accordion-tabs span' => 'float:{{val}}'], |
| 5050 |
'list' => array( |
| 5051 |
'left' => __pl('left'), |
| 5052 |
'right' => __pl('right'), |
| 5053 |
) |
| 5054 |
|
| 5055 |
), |
| 5056 |
'icon_padding' => array( |
| 5057 |
'type' => 'slider', |
| 5058 |
'label' => __pl('Spacing'), |
| 5059 |
'default' => 10, |
| 5060 |
'min' => 0, |
| 5061 |
'max' => 50, |
| 5062 |
'step' => 1, |
| 5063 |
'css' => ['{{element}} .pagelayer-accordion-tabs span' => 'padding:0px {{val}}px; padding-{{icon_align}}:0px;'], |
| 5064 |
), |
| 5065 |
], |
| 5066 |
'tabs_styles' => [ |
| 5067 |
'tabs_color' => array( |
| 5068 |
'type' => 'color', |
| 5069 |
'label' => __pl('Color '), |
| 5070 |
'default' => '#444444', |
| 5071 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => 'color:{{val}}'], |
| 5072 |
), |
| 5073 |
'tabs_bg_color' => array( |
| 5074 |
'type' => 'color', |
| 5075 |
'label' => __pl('Background Color '), |
| 5076 |
'default' => '#eeeeee', |
| 5077 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => 'background-color:{{val}}'], |
| 5078 |
), |
| 5079 |
'tabs_active_color' => array( |
| 5080 |
'type' => 'color', |
| 5081 |
'label' => __pl('Active Tab Color '), |
| 5082 |
'default' => '#ffffff', |
| 5083 |
'css' => ['{{element}} .pagelayer-accordion-tabs.active' => 'color:{{val}}', '{{element}} .pagelayer-accordion-tabs:hover' => 'color:{{val}}'], |
| 5084 |
), |
| 5085 |
'tabs_active_bg_color' => array( |
| 5086 |
'type' => 'color', |
| 5087 |
'label' => __pl('Active Tab Background Color '), |
| 5088 |
'default' => '#3e8ef7', |
| 5089 |
'css' => ['{{element}} .pagelayer-accordion-tabs.active'=> 'background-color:{{val}}', '{{element}} .pagelayer-accordion-tabs:hover' => 'background-color:{{val}}'], |
| 5090 |
), |
| 5091 |
'tab_padding' => array( |
| 5092 |
'type' => 'slider', |
| 5093 |
'label' => __pl('tabs_padding_label'), |
| 5094 |
'default' => 15, |
| 5095 |
'min' => 0, |
| 5096 |
'max' => 50, |
| 5097 |
'step' => 1, |
| 5098 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => 'padding: {{val}}px;'], |
| 5099 |
), |
| 5100 |
'accordion_title_typo' => array( |
| 5101 |
'type' => 'typography', |
| 5102 |
'label' => __pl('accordion_title_typo'), |
| 5103 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => '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;'], |
| 5104 |
), |
| 5105 |
], |
| 5106 |
'content_styles' => [ |
| 5107 |
'tabs_content_bg_color' => array( |
| 5108 |
'type' => 'color', |
| 5109 |
'label' => __pl('Background Color'), |
| 5110 |
'default' => '#fff', |
| 5111 |
'css' => ['{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel'=> 'background-color:{{val}}'], |
| 5112 |
), |
| 5113 |
'acc_content_typo' => array( |
| 5114 |
'type' => 'typography', |
| 5115 |
'label' => __pl('accordion_content_typo'), |
| 5116 |
'css' => ['{{element}} .pagelayer-accordion-panel' => '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;'], |
| 5117 |
), |
| 5118 |
'acc_border_type' => array( |
| 5119 |
'type' => 'select', |
| 5120 |
'label' => __pl('border_type'), |
| 5121 |
'list' => [ |
| 5122 |
'' => __pl('none'), |
| 5123 |
'solid' => __pl('solid'), |
| 5124 |
'double' => __pl('double'), |
| 5125 |
'dotted' => __pl('dotted'), |
| 5126 |
'dashed' => __pl('dashed'), |
| 5127 |
'groove' => __pl('groove'), |
| 5128 |
], |
| 5129 |
'css' => ['{{element}} .pagelayer-accordion_item' => 'border-style: {{val}}', '{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel' =>'border-style: {{val}}'], |
| 5130 |
), |
| 5131 |
'acc_border_color' => array( |
| 5132 |
'type' => 'color', |
| 5133 |
'label' => __pl('border_color'), |
| 5134 |
'default' => '#cccccc', |
| 5135 |
'req' => [ |
| 5136 |
'!acc_border_type' => '' |
| 5137 |
], |
| 5138 |
'css' => ['{{element}} .pagelayer-accordion_item' => 'border-color: {{val}}', '{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel' =>'border-color: {{val}}'], |
| 5139 |
), |
| 5140 |
'acc_border_width' => array( |
| 5141 |
'type' => 'padding', |
| 5142 |
'label' => __pl('border_width'), |
| 5143 |
'default' => '1,1,1,1', |
| 5144 |
'req' => [ |
| 5145 |
'!acc_border_type' => '' |
| 5146 |
], |
| 5147 |
'css' => ['{{element}} .pagelayer-accordion_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', '{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel' => 'border-width: {{val[0]}}px 0 0 0'], |
| 5148 |
) |
| 5149 |
], |
| 5150 |
'styles' => [ |
| 5151 |
'icon_styles' => __pl('icon'), |
| 5152 |
'tabs_styles' => __pl('Tabs'), |
| 5153 |
'content_styles' => __pl('Content'), |
| 5154 |
], |
| 5155 |
) |
| 5156 |
); |
| 5157 |
|
| 5158 |
// Accordion item |
| 5159 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_accordion_item', array( |
| 5160 |
'name' => __pl('Accordion item'), |
| 5161 |
'group' => 'other', |
| 5162 |
'not_visible' => 1, |
| 5163 |
'func' => 'pagelayer_sc_accordion_item', |
| 5164 |
'innerHTML' => 'text', |
| 5165 |
'html' => '<a if="{{title}}" class="pagelayer-accordion-tabs">{{title}}<span class="pagelayer-accordion-icon"><i></i></span></a> |
| 5166 |
<div if="{{text}}" class="pagelayer-accordion-panel">{{text}}</div>', |
| 5167 |
'params' => array( |
| 5168 |
'default_active' => array( |
| 5169 |
'type' => 'checkbox', |
| 5170 |
'label' => __pl('Default active tab'), |
| 5171 |
), |
| 5172 |
'title' => array( |
| 5173 |
'type' => 'text', |
| 5174 |
'label' => __pl('title'), |
| 5175 |
'default' => 'Lorem', |
| 5176 |
'desc' => __pl(''), |
| 5177 |
), |
| 5178 |
'text' => array( |
| 5179 |
'type' => 'editor', |
| 5180 |
'label' => __pl('Edit Rich Text'), |
| 5181 |
'default' => 'Lorem ipsum dolor sit amet', |
| 5182 |
'desc' => __pl('Edit the content here or edit directly in the Editor'), |
| 5183 |
'edit' => '.pagelayer-text-holder', |
| 5184 |
), |
| 5185 |
) |
| 5186 |
) |
| 5187 |
); |
| 5188 |
|
| 5189 |
// Toggle / Collapse |
| 5190 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_collapse', array( |
| 5191 |
'name' => __pl('Collapse'), |
| 5192 |
'group' => 'other', |
| 5193 |
'func' => 'pagelayer_sc_collapse', |
| 5194 |
'has_group' => [ |
| 5195 |
'section' => 'params', |
| 5196 |
'prop' => 'elements' |
| 5197 |
], |
| 5198 |
'holder' => '.pagelayer-collapse-holder', |
| 5199 |
'html' => '<div class="pagelayer-collapse-holder" data-icon="{{icon}}" data-active_icon="{{active_icon}}"></div>', |
| 5200 |
'params' => array( |
| 5201 |
'elements' => array( |
| 5202 |
'type' => 'group', |
| 5203 |
'label' => __pl('Collapse Items'), |
| 5204 |
'sc' => PAGELAYER_SC_PREFIX.'_accordion_item', |
| 5205 |
'item_label' => array( |
| 5206 |
'default' => __pl('tab'), |
| 5207 |
'param' => 'title', |
| 5208 |
), |
| 5209 |
'count' => 2, |
| 5210 |
'text' => strtr(__pl('add_new_item'), array('%name%' => __pl('tab_name'))), |
| 5211 |
), |
| 5212 |
'acc_space' => array( |
| 5213 |
'type' => 'slider', |
| 5214 |
'label' => __pl('Space Between'), |
| 5215 |
'default' => 0, |
| 5216 |
'min' => 0, |
| 5217 |
'max' => 50, |
| 5218 |
'step' => 1, |
| 5219 |
'css' => ['{{element}} .pagelayer-accordion_item' => 'margin-bottom:{{val}}px;'], |
| 5220 |
), |
| 5221 |
|
| 5222 |
), |
| 5223 |
'icon_style' => [ |
| 5224 |
'icon' => array( |
| 5225 |
'type' => 'icon', |
| 5226 |
'label' => __pl('list_icon_label'), |
| 5227 |
'default' => 'plus', |
| 5228 |
), |
| 5229 |
'active_icon' => array( |
| 5230 |
'type' => 'icon', |
| 5231 |
'label' => __pl('Active icon'), |
| 5232 |
'default' => 'minus' |
| 5233 |
), |
| 5234 |
'icon_align' => array( |
| 5235 |
'type' => 'radio', |
| 5236 |
'label' => __pl('Alignment'), |
| 5237 |
'default' => 'left', |
| 5238 |
'css' => ['{{element}} .pagelayer-accordion-tabs span' => 'float:{{val}}'], |
| 5239 |
'list' => array( |
| 5240 |
'left' => __pl('left'), |
| 5241 |
'right' => __pl('right'), |
| 5242 |
) |
| 5243 |
|
| 5244 |
), |
| 5245 |
'icon_padding' => array( |
| 5246 |
'type' => 'slider', |
| 5247 |
'label' => __pl('Spacing'), |
| 5248 |
'default' => 10, |
| 5249 |
'min' => 0, |
| 5250 |
'max' => 50, |
| 5251 |
'step' => 1, |
| 5252 |
'css' => ['{{element}} .pagelayer-accordion-tabs span' => 'padding:0px {{val}}px; padding-{{icon_align}}:0px;'], |
| 5253 |
), |
| 5254 |
], |
| 5255 |
'tabs_styles' => [ |
| 5256 |
'tabs_color' => array( |
| 5257 |
'type' => 'color', |
| 5258 |
'label' => __pl('Color '), |
| 5259 |
'default' => '#444', |
| 5260 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => 'color:{{val}}'], |
| 5261 |
), |
| 5262 |
'tabs_bg_color' => array( |
| 5263 |
'type' => 'color', |
| 5264 |
'label' => __pl('Background Color '), |
| 5265 |
'default' => '#eee', |
| 5266 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => 'background-color:{{val}}'], |
| 5267 |
), |
| 5268 |
'tabs_active_color' => array( |
| 5269 |
'type' => 'color', |
| 5270 |
'label' => __pl('Active Tab Color '), |
| 5271 |
'default' => '#fff', |
| 5272 |
'css' => ['{{element}} .pagelayer-accordion-tabs.active' => 'color:{{val}}', '{{element}} .pagelayer-accordion-tabs:hover' => 'color:{{val}}'], |
| 5273 |
), |
| 5274 |
'tabs_active_bg_color' => array( |
| 5275 |
'type' => 'color', |
| 5276 |
'label' => __pl('Active Tab Background Color '), |
| 5277 |
'default' => '#3e8ef7', |
| 5278 |
'css' => ['{{element}} .pagelayer-accordion-tabs.active'=> 'background-color:{{val}}', '{{element}} .pagelayer-accordion-tabs:hover' => 'background-color:{{val}}'], |
| 5279 |
), |
| 5280 |
'tab_padding' => array( |
| 5281 |
'type' => 'slider', |
| 5282 |
'label' => __pl('tabs_padding_label'), |
| 5283 |
'default' => 15, |
| 5284 |
'min' => 0, |
| 5285 |
'max' => 50, |
| 5286 |
'step' => 1, |
| 5287 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => 'padding: {{val}}px;'], |
| 5288 |
), |
| 5289 |
'collapse_title_typo' => array( |
| 5290 |
'type' => 'typography', |
| 5291 |
'label' => __pl('collapsse_title_typo'), |
| 5292 |
'css' => ['{{element}} .pagelayer-accordion-tabs' => '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;'], |
| 5293 |
), |
| 5294 |
], |
| 5295 |
'content_styles' => [ |
| 5296 |
'tabs_content_bg_color' => array( |
| 5297 |
'type' => 'color', |
| 5298 |
'label' => __pl('Background Color '), |
| 5299 |
'default' => '#ffffff', |
| 5300 |
'css' => ['{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel'=> 'background-color:{{val}}'], |
| 5301 |
), |
| 5302 |
'acc_border_type' => array( |
| 5303 |
'type' => 'select', |
| 5304 |
'label' => __pl('border_type'), |
| 5305 |
'list' => [ |
| 5306 |
'' => __pl('none'), |
| 5307 |
'solid' => __pl('solid'), |
| 5308 |
'double' => __pl('double'), |
| 5309 |
'dotted' => __pl('dotted'), |
| 5310 |
'dashed' => __pl('dashed'), |
| 5311 |
'groove' => __pl('groove'), |
| 5312 |
], |
| 5313 |
'show' => ['border_hover' => ''], |
| 5314 |
'css' => ['{{element}} .pagelayer-accordion_item' => 'border-style: {{val}}', '{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel' =>'border-style: {{val}}'], |
| 5315 |
), |
| 5316 |
'acc_border_width' => array( |
| 5317 |
'type' => 'padding', |
| 5318 |
'label' => __pl('border_width'), |
| 5319 |
'default' => '1,1,1,1', |
| 5320 |
'req' => [ |
| 5321 |
'!acc_border_type' => '' |
| 5322 |
], |
| 5323 |
'css' => ['{{element}} .pagelayer-accordion_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', '{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel' => 'border-width: {{val[0]}}px 0 0 0'], |
| 5324 |
), |
| 5325 |
'acc_border_color' => array( |
| 5326 |
'type' => 'color', |
| 5327 |
'label' => __pl('border_color'), |
| 5328 |
'default' => '#cccccc', |
| 5329 |
'req' => [ |
| 5330 |
'!acc_border_type' => '' |
| 5331 |
], |
| 5332 |
'css' => ['{{element}} .pagelayer-accordion_item' => 'border-color: {{val}}', '{{element}} .pagelayer-accordion_item .pagelayer-accordion-panel' =>'border-color: {{val}}'], |
| 5333 |
), |
| 5334 |
], |
| 5335 |
'styles' => [ |
| 5336 |
'icon_style' => __pl('icon'), |
| 5337 |
'tabs_styles' => __pl('Tabs'), |
| 5338 |
'content_styles' => __pl('Content'), |
| 5339 |
], |
| 5340 |
) |
| 5341 |
); |
| 5342 |
|
| 5343 |
// Space |
| 5344 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_space', array( |
| 5345 |
'name' => __pl('space'), |
| 5346 |
'group' => 'other', |
| 5347 |
'func' => 'pagelayer_sc_space', |
| 5348 |
'html' => '<div class="pagelayer-space-holder"></div>', |
| 5349 |
'params' => array( |
| 5350 |
'height' => array( |
| 5351 |
'type' => 'slider', |
| 5352 |
'label' => __pl('Space Height'), |
| 5353 |
'screen' => 1, |
| 5354 |
'css' => ['{{element}} .pagelayer-space-holder' => 'height: {{val}}px;'], |
| 5355 |
'default' => '10', |
| 5356 |
'min' => 0, |
| 5357 |
'max' => 1000, |
| 5358 |
'step' => 1 |
| 5359 |
) |
| 5360 |
) |
| 5361 |
) |
| 5362 |
); |
| 5363 |
|
| 5364 |
// Embed |
| 5365 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_embed', array( |
| 5366 |
'name' => __pl('embed'), |
| 5367 |
'group' => 'other', |
| 5368 |
'func' => 'pagelayer_sc_embed', |
| 5369 |
'innerHTML' => 'data', |
| 5370 |
'html' => '<div if={{data}} class="pagelayer-embed-container">{{data}}</div>', |
| 5371 |
'params' => array( |
| 5372 |
'data' => array( |
| 5373 |
'type' => 'textarea', |
| 5374 |
'label' => __pl('embed_paste_code'), |
| 5375 |
'default' => '<p>Paste HTML code here...</P>', |
| 5376 |
'desc' => '', |
| 5377 |
), |
| 5378 |
) |
| 5379 |
) |
| 5380 |
); |
| 5381 |
|
| 5382 |
// Shortcodes |
| 5383 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_shortcodes', array( |
| 5384 |
'name' => __pl('shortcodes'), |
| 5385 |
'group' => 'other', |
| 5386 |
'func' => 'pagelayer_sc_shortcodes', |
| 5387 |
'innerHTML' => 'data', |
| 5388 |
'holder' => '.pagelayer-shortcodes-container', |
| 5389 |
'html' => '<div class="pagelayer-shortcodes-container">{{{shortcode}}}</div>', |
| 5390 |
'params' => array( |
| 5391 |
'data' => array( |
| 5392 |
'type' => 'textarea', |
| 5393 |
'label' => __pl('shortcodes_paste_code'), |
| 5394 |
'desc' => 'Paste short codes here', |
| 5395 |
), |
| 5396 |
) |
| 5397 |
) |
| 5398 |
); |
| 5399 |
|
| 5400 |
// Google Maps |
| 5401 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_google_maps', array( |
| 5402 |
'name' => __pl('Google Maps'), |
| 5403 |
'group' => 'other', |
| 5404 |
'func' => 'pagelayer_sc_google_maps', |
| 5405 |
'innerHTML' => 'address', |
| 5406 |
'html' => '<div class="pagelayer-google-maps-holder"> |
| 5407 |
<iframe marginheight="0" scrolling="no" marginwidth="0" frameborder="0" src="https://maps.google.com/maps?q={{address}}&t=m&z={{zoom}}&output=embed&iwloc=near" aria-label="{{address}}"></iframe> |
| 5408 |
</div>', |
| 5409 |
'params' => array( |
| 5410 |
'address' => array( |
| 5411 |
'type' => 'text', |
| 5412 |
'label' => __pl('google_map_address_label'), |
| 5413 |
'default' => 'New York, New York, USA', |
| 5414 |
'desc' => __pl('google_map_address_desc') |
| 5415 |
), |
| 5416 |
'noscroll' => array( |
| 5417 |
'type' => 'checkbox', |
| 5418 |
'label' => __pl('google_map_noscroll'), |
| 5419 |
'css' => ['{{element}} iframe' => 'pointer-events: none;'], |
| 5420 |
), |
| 5421 |
'zoom' => array( |
| 5422 |
'type' => 'slider', |
| 5423 |
'label' => __pl('google_map_zoom_label'), |
| 5424 |
'default' => 10, |
| 5425 |
'min' => 0, |
| 5426 |
'max' => 20 |
| 5427 |
), |
| 5428 |
'height' => array( |
| 5429 |
'type' => 'slider', |
| 5430 |
'label' => __pl('google_map_height'), |
| 5431 |
'screen' => 1, |
| 5432 |
'default' => 300, |
| 5433 |
'min' => 100, |
| 5434 |
'max' => 1000, |
| 5435 |
'css' => ['{{element}} iframe' => 'height: {{val}}px'], |
| 5436 |
), |
| 5437 |
) |
| 5438 |
) |
| 5439 |
); |
| 5440 |
|
| 5441 |
// Testimonial |
| 5442 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_testimonial', array( |
| 5443 |
'name' => __pl('testimonial'), |
| 5444 |
'group' => 'other', |
| 5445 |
'func' => 'pagelayer_sc_testimonial', |
| 5446 |
'innerHTML' => 'quote_content', |
| 5447 |
'html' => '<div if="{{quote_content}}" class="pagelayer-testimonial-content">{{quote_content}}</div> |
| 5448 |
<div class="pagelayer-testimonial-author-details"> |
| 5449 |
<div class="pagelayer-{{image_position}}"> |
| 5450 |
<img if="{{avatar}}" class="pagelayer-testimonial-image pagelayer-testimonial-{{img_shape}}" src="{{func_image}}" /> |
| 5451 |
</div> |
| 5452 |
<div class="pagelayer-{{image_position}}"> |
| 5453 |
<div if="{{cite}}" class="pagelayer-testimonial-cite"> |
| 5454 |
<a if-ext="{{cite_url}}" class="pagelayer-ele-link" href="{{cite_url}}"> |
| 5455 |
<span class="pagelayer-testimonial-author">{{cite}}</span> |
| 5456 |
</a> |
| 5457 |
<span if="{{designation}}" class="pagelayer-testimonial-author-title"> |
| 5458 |
{{designation}} |
| 5459 |
</span> |
| 5460 |
</div> |
| 5461 |
</div> |
| 5462 |
</div>', |
| 5463 |
'params' => array( |
| 5464 |
'image_position' => array( |
| 5465 |
'type' => 'select', |
| 5466 |
'label' => __pl('image_position'), |
| 5467 |
'default' => 'aside-position', |
| 5468 |
'list' =>array( |
| 5469 |
'aside-position' => __pl('aside'), |
| 5470 |
'top-position' => __pl('top') |
| 5471 |
), |
| 5472 |
), |
| 5473 |
'alignment' => array( |
| 5474 |
'type' => 'radio', |
| 5475 |
'label' => __pl('testimonial_alignment_label'), |
| 5476 |
'default' => 'center', |
| 5477 |
'css' =>'text-align:{{val}};', |
| 5478 |
'list' => array( |
| 5479 |
'left' => __pl('left'), |
| 5480 |
'center' => __pl('center'), |
| 5481 |
'right' => __pl('right'), |
| 5482 |
), |
| 5483 |
), |
| 5484 |
'author-spacing' => array( |
| 5485 |
'type' => 'slider', |
| 5486 |
'label' => __pl('author_spacing'), |
| 5487 |
'min' => '0', |
| 5488 |
'max' => '100', |
| 5489 |
'default' => '20', |
| 5490 |
'css' => ['{{element}} .pagelayer-testimonial-author-details' => 'margin-top:{{val}}px;'], |
| 5491 |
), |
| 5492 |
), |
| 5493 |
// Styles |
| 5494 |
'content_style' => [ |
| 5495 |
'quote_content' => array( |
| 5496 |
'type' => 'editor', |
| 5497 |
'label' => __pl('testimonial_content_label'), |
| 5498 |
'text' => __pl('Edit Testimonial content'), |
| 5499 |
'edit' => '.pagelayer-testimonial-content', |
| 5500 |
'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.' |
| 5501 |
) |
| 5502 |
], |
| 5503 |
'avatar_style' => [ |
| 5504 |
'avatar' => array( |
| 5505 |
'type' => 'image', |
| 5506 |
'label' => __pl('testimonial_image_label'), |
| 5507 |
'desc' => __pl('testimonial_image_desc'), |
| 5508 |
'default' => PAGELAYER_URL.'/images/default-image.png', |
| 5509 |
), |
| 5510 |
'testimonial_image_size' => array( |
| 5511 |
'label' => __pl('testimonial_image_sizes'), |
| 5512 |
'type' => 'slider', |
| 5513 |
'min' => 0, |
| 5514 |
'max' => 500, |
| 5515 |
'default' => 100, |
| 5516 |
'css' => ['{{element}} .pagelayer-testimonial-image' => 'width:{{val}}px; height:{{val}}px; '], |
| 5517 |
), |
| 5518 |
'img_shape' => array( |
| 5519 |
'type' => 'select', |
| 5520 |
'label' => __pl('image_shape'), |
| 5521 |
'default' => 'circle', |
| 5522 |
'list' =>array( |
| 5523 |
'square' => __pl('square'), |
| 5524 |
'circle' => __pl('circle'), |
| 5525 |
), |
| 5526 |
), |
| 5527 |
'testimonial_border_type' => array( |
| 5528 |
'type' => 'select', |
| 5529 |
'label' => __pl('border_type'), |
| 5530 |
'css' => ['{{element}} .pagelayer-testimonial-image' =>'border-style: {{val}};'], |
| 5531 |
'list' => [ |
| 5532 |
'' => __pl('none'), |
| 5533 |
'solid' => __pl('solid'), |
| 5534 |
'double' => __pl('double'), |
| 5535 |
'dotted' => __pl('dotted'), |
| 5536 |
'dashed' => __pl('dashed'), |
| 5537 |
'groove' => __pl('groove'), |
| 5538 |
] |
| 5539 |
), |
| 5540 |
'testimonial_border_color' => array( |
| 5541 |
'type' => 'color', |
| 5542 |
'label' => __pl('testimonial_border_color_label'), |
| 5543 |
'default' => '#42414f', |
| 5544 |
'css' => ['{{element}} .pagelayer-testimonial-image' => 'border-color: {{val}};'], |
| 5545 |
'req' => ['!testimonial_border_type' => ''] |
| 5546 |
), |
| 5547 |
'testimonial_border_width' => array( |
| 5548 |
'type' => 'padding', |
| 5549 |
'label' => __pl('border_width'), |
| 5550 |
'css' => ['{{element}} .pagelayer-testimonial-image' =>'border-top-width: {{val[0]}}px; border-right-width: {{val[1]}}px; border-bottom-width: {{val[2]}}px; border-left-width: {{val[3]}}px;'], |
| 5551 |
'req' => ['!testimonial_border_type' => ''] |
| 5552 |
), |
| 5553 |
'testimonial_border_radius' => array( |
| 5554 |
'type' => 'padding', |
| 5555 |
'label' => __pl('border_radius'), |
| 5556 |
'css' => ['{{element}} .pagelayer-testimonial-image' => '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;'], |
| 5557 |
'req' => ['!testimonial_border_type' => ''] |
| 5558 |
), |
| 5559 |
], |
| 5560 |
'cite_style' => [ |
| 5561 |
'cite' => array( |
| 5562 |
'type' => 'text', |
| 5563 |
'label' => __pl('testimonial_cite_label'), |
| 5564 |
'default' => 'John Smith', |
| 5565 |
'desc' => __pl('testimonial_cite_desc'), |
| 5566 |
'edit' => '.pagelayer-testimonial-author', |
| 5567 |
), |
| 5568 |
'cite_color' => array( |
| 5569 |
'type' => 'color', |
| 5570 |
'label' => __pl('testimonial_name_color_label'), |
| 5571 |
'default' => '#426870ff', |
| 5572 |
'css' => ['{{element}} .pagelayer-testimonial-author ' => 'color:{{val}}'], |
| 5573 |
), |
| 5574 |
'cite_style' => array( |
| 5575 |
'type' => 'typography', |
| 5576 |
'label' => __pl('cite_style'), |
| 5577 |
'default' => ',20,,100,,none,,,,,', |
| 5578 |
'css' => ['{{element}} .pagelayer-testimonial-author' => '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;'], |
| 5579 |
), |
| 5580 |
'cite_url' => array( |
| 5581 |
'type' => 'link', |
| 5582 |
'label' => __pl('testimonial_url_label'), |
| 5583 |
'default' => '', |
| 5584 |
'desc' => __pl('testimonial_url_desc'), |
| 5585 |
), |
| 5586 |
'cite_spacing' => array( |
| 5587 |
'type' => 'padding', |
| 5588 |
'label' => __pl('cite_spacing'), |
| 5589 |
'css' => ['{{element}} .pagelayer-testimonial-cite' => 'margin-top: {{val[0]}}px; margin-right: {{val[1]}}px; margin-bottom: {{val[2]}}px; margin-left: {{val[3]}}px'], |
| 5590 |
), |
| 5591 |
], |
| 5592 |
'designation_style' => [ |
| 5593 |
'designation' => array( |
| 5594 |
'type' => 'text', |
| 5595 |
'label' => __pl('testimonial_designation_label'), |
| 5596 |
'default' => 'Web Developer', |
| 5597 |
'desc' => __pl('testimonial_cite_title_size_desc'), |
| 5598 |
'edit' => '.pagelayer-testimonial-author-title', |
| 5599 |
), |
| 5600 |
'designation_color' => array( |
| 5601 |
'type' => 'color', |
| 5602 |
'label' => __pl('testimonial_title_color_label'), |
| 5603 |
'default' => '#9cafc0ff', |
| 5604 |
'css' => ['{{element}} .pagelayer-testimonial-author-title' => 'color:{{val}}'], |
| 5605 |
), |
| 5606 |
'cite_designation_style' => array( |
| 5607 |
'type' => 'typography', |
| 5608 |
'label' => __pl('cite_designation_style'), |
| 5609 |
'default' => ',16,,100,,,,,,,', |
| 5610 |
'css' => ['{{element}} .pagelayer-testimonial-author-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;'], |
| 5611 |
), |
| 5612 |
], |
| 5613 |
'styles' => [ |
| 5614 |
'avatar_style' => __pl('avatar_style'), |
| 5615 |
'cite_style' => __pl('cite'), |
| 5616 |
'designation_style' => __pl('designation'), |
| 5617 |
'content_style' => __pl('content_style'), |
| 5618 |
], |
| 5619 |
|
| 5620 |
) |
| 5621 |
); |
| 5622 |
|
| 5623 |
// Progress object - Make a group |
| 5624 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_progress', array( |
| 5625 |
'name' => __pl('Progress Bars'), |
| 5626 |
'group' => 'other', |
| 5627 |
'func' => 'pagelayer_sc_progress', |
| 5628 |
'innerHTML' => 'progress_text', |
| 5629 |
'html' =>'<div if="{{title}}" class="pagelayer-progress-title">{{title}}</div> |
| 5630 |
<div class="pagelayer-progress-container"> |
| 5631 |
<div if="{{progress_percentage}}" class="pagelayer-progress-bar pagelayer-progress-{{progress_type}}" style="width:{{progress_percentage}}%;"> |
| 5632 |
<span if="{{progress_text}}" class="pagelayer-progress-text">{{progress_text}}</span> |
| 5633 |
<span if="{{progress_percentage}}" class="pagelayer-progress-percent"></span> |
| 5634 |
</div> |
| 5635 |
</div>', |
| 5636 |
'params' => array( |
| 5637 |
'progress_type' => array( |
| 5638 |
'type' => 'select', |
| 5639 |
'label' => __pl('progress_type'), |
| 5640 |
'default' => 'primary', |
| 5641 |
'list' => [ |
| 5642 |
'primary' => __pl('Primary'), |
| 5643 |
'secondary' => __pl('Secondary'), |
| 5644 |
'success' => __pl('Success'), |
| 5645 |
'warning' => __pl('Warning'), |
| 5646 |
'danger' => __pl('Danger'), |
| 5647 |
'' => __pl('custom') |
| 5648 |
], |
| 5649 |
), |
| 5650 |
'progress_color' => array( |
| 5651 |
'type' => 'color', |
| 5652 |
'label' => __pl('progress_bar_color'), |
| 5653 |
'default' => '#3e8ef7', |
| 5654 |
'css' => ['{{element}} .pagelayer-progress-bar' => 'background-color:{{val}};'], |
| 5655 |
'req' => ['progress_type' => ''] |
| 5656 |
), |
| 5657 |
'progress_height' => array( |
| 5658 |
'type' => 'slider', |
| 5659 |
'label' => __pl('progress_height'), |
| 5660 |
'min' => 0, |
| 5661 |
'max' => 100, |
| 5662 |
'step' => 1, |
| 5663 |
'css' => ['{{element}} .pagelayer-progress-bar' => 'height:{{val}}px;', |
| 5664 |
'{{element}} .pagelayer-progress-percent' => 'line-height:{{val}}px; font-size: calc({{val}}px / 2);', |
| 5665 |
'{{element}} .pagelayer-progress-text' => 'line-height:{{val}}px; font-size: calc({{val}}px / 2);', |
| 5666 |
], |
| 5667 |
'default' => 40, |
| 5668 |
), |
| 5669 |
), |
| 5670 |
// Styles |
| 5671 |
'heading_style' => [ |
| 5672 |
'title' => array( |
| 5673 |
'type' => 'text', |
| 5674 |
'label' => __pl('progress_title'), |
| 5675 |
'default' => 'Progress', |
| 5676 |
), |
| 5677 |
'title_color' => array( |
| 5678 |
'type' => 'color', |
| 5679 |
'label' => __pl('title_color'), |
| 5680 |
'default' => '#768589ff', |
| 5681 |
'css' => ['{{element}} .pagelayer-progress-title' => 'color:{{val}};'], |
| 5682 |
), |
| 5683 |
'title_style' => array( |
| 5684 |
'type' => 'typography', |
| 5685 |
'label' => __pl('title_size'), |
| 5686 |
'default' => ',25,,100,,,,,,,', |
| 5687 |
'css' => ['{{element}} .pagelayer-progress-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;'], |
| 5688 |
), |
| 5689 |
], |
| 5690 |
'percentage_style' => [ |
| 5691 |
'progress_text'=> array( |
| 5692 |
'type' => 'text', |
| 5693 |
'label' => __pl('progress_text'), |
| 5694 |
'default' => 'Designing', |
| 5695 |
), |
| 5696 |
'progress_text_color' => array( |
| 5697 |
'type' => 'color', |
| 5698 |
'label' => __pl('progress_text_color'), |
| 5699 |
'default' => '#ffffff', |
| 5700 |
'css' => ['{{element}} .pagelayer-progress-text' => 'color:{{val}};'], |
| 5701 |
), |
| 5702 |
'progress_percentage' => array( |
| 5703 |
'type' => 'slider', |
| 5704 |
'label' => __pl('percentage'), |
| 5705 |
'min' => 0, |
| 5706 |
'max' => 100, |
| 5707 |
'css' => ['{{element}} .pagelayer-progress-container > .pagelayer-progress-bar:after' => 'width:{{val}}%;',], |
| 5708 |
'addAttr' => ['{{element}} .pagelayer-progress-bar' => 'pagelayer-progress-width="{{progress_percentage}}"'], |
| 5709 |
'default' => 75, |
| 5710 |
), |
| 5711 |
'progress_percent_color' => array( |
| 5712 |
'type' => 'color', |
| 5713 |
'label' => __pl('progress_percent_color'), |
| 5714 |
'default' => '#ffffff', |
| 5715 |
'css' => ['{{element}} .pagelayer-progress-percent' => 'color:{{val}};'], |
| 5716 |
), |
| 5717 |
'hide_percentage' => array( |
| 5718 |
'type' => 'checkbox', |
| 5719 |
'label' => __pl('hide_percentage'), |
| 5720 |
'default' => '', |
| 5721 |
'css' => ['{{element}} .pagelayer-progress-percent' => 'display: none;'] |
| 5722 |
), |
| 5723 |
], |
| 5724 |
'styles' => [ |
| 5725 |
'heading_style' => __pl('heading_style'), |
| 5726 |
'percentage_style' => __pl('percentage'), |
| 5727 |
] |
| 5728 |
) |
| 5729 |
); |
| 5730 |
|
| 5731 |
// Color Block |
| 5732 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_block', array( |
| 5733 |
'name' => __pl('Color Block'), |
| 5734 |
'group' => 'other', |
| 5735 |
'func' => 'pagelayer_sc_block', |
| 5736 |
'params' => array( |
| 5737 |
'block_color' => array( |
| 5738 |
'type' => 'color', |
| 5739 |
'label' => __pl('block_color'), |
| 5740 |
'default' => '#CCC', |
| 5741 |
'css' => ['{{element}}' => 'background:{{val}}'], |
| 5742 |
), |
| 5743 |
'block_height' => array( |
| 5744 |
'type' => 'spinner', |
| 5745 |
'label' => __pl('block_height'), |
| 5746 |
'default' => '200', |
| 5747 |
'screen' => 1, |
| 5748 |
'min' => 1, |
| 5749 |
'max' => 1000, |
| 5750 |
'step' => 1, |
| 5751 |
'css' => ['{{element}}' => 'height:{{val}}px'], |
| 5752 |
), |
| 5753 |
) |
| 5754 |
) |
| 5755 |
); |
| 5756 |
|
| 5757 |
// Alert |
| 5758 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_alert', array( |
| 5759 |
'name' => __pl('Alert'), |
| 5760 |
'group' => 'other', |
| 5761 |
'func' => 'pagelayer_sc_alert', |
| 5762 |
'innerHTML' => 'alert_content', |
| 5763 |
'html' => '<div class="pagelayer-alert-content"> |
| 5764 |
<i if="{{alert_icon}}" class="pagelayer-alert-icon fa fa-{{alert_icon}}"></i> |
| 5765 |
<div if="{{alert_title}}" class="pagelayer-alert-title">{{alert_title}}</div> |
| 5766 |
<div if="{{is_dismissible}}" class="pagelayer-alert-close" onclick="pagelayer_dismiss_alert(this);"></div> |
| 5767 |
</div> |
| 5768 |
<span if="{{alert_content}}" class="pagelayer-alert-text">{{alert_content}}</span>', |
| 5769 |
'params' => array( |
| 5770 |
'alert_type' => array( |
| 5771 |
'type' => 'select', |
| 5772 |
'label' => __pl('Type'), |
| 5773 |
'default' => 'alert-primary', |
| 5774 |
'addClass' => 'pagelayer-{{val}}', |
| 5775 |
'list' => array( |
| 5776 |
'alert-primary' => __pl('alert_type_primary'), |
| 5777 |
'alert-secondary' => __pl('alert_type_secondary'), |
| 5778 |
'alert-success' => __pl('alert_type_success'), |
| 5779 |
'alert-info' => __pl('alert_type_info'), |
| 5780 |
'alert-warning' => __pl('alert_type_warning'), |
| 5781 |
'alert-danger' => __pl('alert_type_danger'), |
| 5782 |
'alert-dark' => __pl('alert_type_dark'), |
| 5783 |
'alert-custom' => __pl('alert_type_custom'), |
| 5784 |
) |
| 5785 |
), |
| 5786 |
'alert_bg_color' => array( |
| 5787 |
'type' => 'color', |
| 5788 |
'label' => __pl('alert_bg_color'), |
| 5789 |
'css' => 'background-color: {{val}}', |
| 5790 |
'req' => ['alert_type' => 'alert-custom'] |
| 5791 |
), |
| 5792 |
'is_dismissible' => array( |
| 5793 |
'type' => 'checkbox', |
| 5794 |
'label' => __pl('is_dismissible'), |
| 5795 |
'default' => 'true', |
| 5796 |
'addClass' => 'pagelayer-alert-dismissible' |
| 5797 |
) |
| 5798 |
), |
| 5799 |
'icon_style' => [ |
| 5800 |
'alert_icon' => array( |
| 5801 |
'type' => 'icon', |
| 5802 |
'label' => __pl('alert_icon'), |
| 5803 |
'default' => 'exclamation', |
| 5804 |
), |
| 5805 |
'alert_icon_color' => array( |
| 5806 |
'type' => 'color', |
| 5807 |
'label' => __pl('alert_icon_color'), |
| 5808 |
'css' => ['{{element}} .pagelayer-alert-icon' => 'color: {{val}}'], |
| 5809 |
), |
| 5810 |
'alert_font_size' => array( |
| 5811 |
'label' => __pl('alert_font_size'), |
| 5812 |
'type' => 'slider', |
| 5813 |
'min' => 0, |
| 5814 |
'max' => 500, |
| 5815 |
'default' => 30, |
| 5816 |
'css' => ['{{element}} .pagelayer-alert-icon' => 'font-size:{{val}}px;'], |
| 5817 |
), |
| 5818 |
'alert_icon_spacing' => array( |
| 5819 |
'label' => __pl('alert_icon_spacing'), |
| 5820 |
'type' => 'slider', |
| 5821 |
'min' => 0, |
| 5822 |
'max' => 200, |
| 5823 |
'default' => 5, |
| 5824 |
'css' => ['{{element}} .pagelayer-alert-icon' => 'margin-right:{{val}}px;'], |
| 5825 |
), |
| 5826 |
], |
| 5827 |
'title_style' => [ |
| 5828 |
'alert_title' => array( |
| 5829 |
'type' => 'text', |
| 5830 |
'label' => __pl('alert_title'), |
| 5831 |
'default' => 'This is an Alert', |
| 5832 |
'edit' => '.pagelayer-alert-title', |
| 5833 |
), |
| 5834 |
'alert_title_color' => array( |
| 5835 |
'type' => 'color', |
| 5836 |
'label' => __pl('alert_title_color'), |
| 5837 |
'default' => '', |
| 5838 |
'css' => ['{{element}} .pagelayer-alert-title' => 'color:{{val}}'], |
| 5839 |
), |
| 5840 |
'title_typo' => array( |
| 5841 |
'type' => 'typography', |
| 5842 |
'label' => __pl('title_typo'), |
| 5843 |
'default' => ',22,,600,,,,,,,', |
| 5844 |
'css' => ['{{element}} .pagelayer-alert-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;'], |
| 5845 |
), |
| 5846 |
], |
| 5847 |
'content_style' => [ |
| 5848 |
'alert_content' => array( |
| 5849 |
'type' => 'textarea', |
| 5850 |
'label' => __pl('alert_content'), |
| 5851 |
'default' => 'Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet.', |
| 5852 |
'edit' => '.pagelayer-alert-text', |
| 5853 |
), |
| 5854 |
'alert_content_color' => array( |
| 5855 |
'type' => 'color', |
| 5856 |
'label' => __pl('alert_content_color'), |
| 5857 |
'default' => '', |
| 5858 |
'css' => ['{{element}} .pagelayer-alert-text' => 'color:{{val}}', |
| 5859 |
'{{element}} .pagelayer-alert-text *' => 'color:{{val}}'], |
| 5860 |
'req' => ['!alert_content' => ''], |
| 5861 |
), |
| 5862 |
'content_typo' => array( |
| 5863 |
'type' => 'typography', |
| 5864 |
'label' => __pl('title_typo'), |
| 5865 |
'default' => ',13,,,,,,,,,', |
| 5866 |
'css' => ['{{element}} .pagelayer-alert-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;'], |
| 5867 |
), |
| 5868 |
], |
| 5869 |
'styles' => [ |
| 5870 |
'icon_style' => __pl('icon'), |
| 5871 |
'title_style' => __pl('title_style'), |
| 5872 |
'content_style' => __pl('content_style'), |
| 5873 |
], |
| 5874 |
) |
| 5875 |
); |
| 5876 |
|
| 5877 |
// Anchor |
| 5878 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_anchor', array( |
| 5879 |
'name' => __pl('Anchor'), |
| 5880 |
'group' => 'other', |
| 5881 |
'func' => 'pagelayer_sc_anchor', |
| 5882 |
'html' => '<div id="{{title}}" class="pagelayer-anchor-holder"></div>', |
| 5883 |
'params' => array( |
| 5884 |
'title' => array( |
| 5885 |
'type' => 'text', |
| 5886 |
'label' => __pl('Anchor ID'), |
| 5887 |
'desc' => __pl('Note : Please enter the name of Unique ID that you want to use as an Anchor (Without #)'), |
| 5888 |
), |
| 5889 |
) |
| 5890 |
) |
| 5891 |
); |
| 5892 |
|
| 5893 |
// Star object |
| 5894 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_stars', array( |
| 5895 |
'name' => __pl('Stars'), |
| 5896 |
'group' => 'other', |
| 5897 |
'func' => 'pagelayer_sc_stars', |
| 5898 |
'html' => '<span if="{{rating_title}}" class="pagelayer-stars-title">{{rating_title}}</span> |
| 5899 |
<div class="pagelayer-stars-container" title="{{number_of_ratings}}/{{number_of_stars}}" pagelayer-stars-value="{{number_of_ratings}}" pagelayer-stars-count="{{number_of_stars}}"> |
| 5900 |
</div>', |
| 5901 |
'params' => array( |
| 5902 |
'number_of_stars' => array( |
| 5903 |
'type' => 'spinner', |
| 5904 |
'label' => __pl('stars_count'), |
| 5905 |
'min' => 0, |
| 5906 |
'max' => 10, |
| 5907 |
'step' => 1, |
| 5908 |
'default' => 5, |
| 5909 |
), |
| 5910 |
'number_of_ratings' => array( |
| 5911 |
'type' => 'spinner', |
| 5912 |
'label' => __pl('stars_rating'), |
| 5913 |
'min' => 0, |
| 5914 |
'max' => 10, |
| 5915 |
'step' => .1, |
| 5916 |
'default' => 2.5, |
| 5917 |
), |
| 5918 |
'ratings_align' => array( |
| 5919 |
'type' => 'radio', |
| 5920 |
'label' => __pl('alignment'), |
| 5921 |
'css' => ['{{element}}' => 'text-align: {{val}}'], |
| 5922 |
'list' => array( |
| 5923 |
'left' => 'Left', |
| 5924 |
'center' => 'Center', |
| 5925 |
'right' => 'Right' |
| 5926 |
), |
| 5927 |
), |
| 5928 |
), |
| 5929 |
'title_style' => [ |
| 5930 |
'rating_title' => array( |
| 5931 |
'type' => 'text', |
| 5932 |
'label' => __pl('rating_title'), |
| 5933 |
'default' => 'Rate us', |
| 5934 |
), |
| 5935 |
'title_color' => array( |
| 5936 |
'type' => 'color', |
| 5937 |
'label' => __pl('title_color'), |
| 5938 |
'default' => '#3e8ef7', |
| 5939 |
'css' => ['{{element}} .pagelayer-stars-title' => 'color: {{val}}'], |
| 5940 |
), |
| 5941 |
'title_style' => array( |
| 5942 |
'type' => 'typography', |
| 5943 |
'label' => __pl('counter_number_size'), |
| 5944 |
'default' => ',25,,600,,,solid,,,,', |
| 5945 |
'css' => ['{{element}} .pagelayer-stars-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;'], |
| 5946 |
), |
| 5947 |
], |
| 5948 |
'stars_style' => [ |
| 5949 |
'stars_color' => array( |
| 5950 |
'type' => 'color', |
| 5951 |
'label' => __pl('stars_color'), |
| 5952 |
'default' => '#3e8ef7', |
| 5953 |
'css' => ['{{element}} .pagelayer-stars-icon:before' => 'color: {{val}}'], |
| 5954 |
), |
| 5955 |
'unmarked_stars_color' => array( |
| 5956 |
'type' => 'color', |
| 5957 |
'label' => __pl('unmarked_star_color'), |
| 5958 |
'default' => '#ccd6df', |
| 5959 |
'css' => ['{{element}} .pagelayer-stars-container' => 'color: {{val}}'], |
| 5960 |
), |
| 5961 |
'stars_font_size' => array( |
| 5962 |
'label' => __pl('stars_font_size'), |
| 5963 |
'type' => 'slider', |
| 5964 |
'min' => 0, |
| 5965 |
'max' => 100, |
| 5966 |
'default' => 30, |
| 5967 |
'css' => ['{{element}} .pagelayer-stars-container' => 'font-size:{{val}}px;'], |
| 5968 |
), |
| 5969 |
'stars_spacing' => array( |
| 5970 |
'label' => __pl('stars_spacing'), |
| 5971 |
'type' => 'slider', |
| 5972 |
'min' => 0, |
| 5973 |
'max' => 100, |
| 5974 |
'default' => 10, |
| 5975 |
'css' => ['{{element}} .pagelayer-stars-icon' => 'margin-left:{{val}}px;'], |
| 5976 |
), |
| 5977 |
], |
| 5978 |
'styles' => [ |
| 5979 |
'title_style' => __pl('title_style'), |
| 5980 |
'stars_style' => __pl('stars_style'), |
| 5981 |
], |
| 5982 |
) |
| 5983 |
); |
| 5984 |
|
| 5985 |
// Divider |
| 5986 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_divider', array( |
| 5987 |
'name' => __pl('Divider'), |
| 5988 |
'group' => 'other', |
| 5989 |
'func' => 'pagelayer_sc_divider', |
| 5990 |
'html' => '<div class="pagelayer-divider-holder"> |
| 5991 |
<span class="pagelayer-divider-seperator"></span> |
| 5992 |
</div>', |
| 5993 |
'params' => array( |
| 5994 |
'divider_style' => array( |
| 5995 |
'type' => 'select', |
| 5996 |
'label' => __pl('divider_border_type'), |
| 5997 |
'css' => ['{{element}} .pagelayer-divider-seperator' =>'border-top-style: {{val}};'], |
| 5998 |
'default' => 'solid', |
| 5999 |
'list' => [ |
| 6000 |
'solid' => __pl('solid'), |
| 6001 |
'double' => __pl('double'), |
| 6002 |
'dotted' => __pl('dotted'), |
| 6003 |
'dashed' => __pl('dashed'), |
| 6004 |
'groove' => __pl('groove'), |
| 6005 |
], |
| 6006 |
), |
| 6007 |
'divider_color' => array( |
| 6008 |
'type' => 'color', |
| 6009 |
'label' => __pl('divider_color'), |
| 6010 |
'default' => '#3E8EF7', |
| 6011 |
'css' => ['{{element}} .pagelayer-divider-seperator' => 'border-top-color: {{val}};'], |
| 6012 |
), |
| 6013 |
'divider_weight' => array( |
| 6014 |
'type' => 'slider', |
| 6015 |
'label' => __pl('divider_border_weight'), |
| 6016 |
'min' => 1, |
| 6017 |
'max' => 30, |
| 6018 |
'default' => 3, |
| 6019 |
'css' => ['{{element}} .pagelayer-divider-seperator' =>'border-top-width: {{val}}px;'], |
| 6020 |
), |
| 6021 |
'divider_widht' => array( |
| 6022 |
'type' => 'slider', |
| 6023 |
'label' => __pl('divider_border_width'), |
| 6024 |
'min' => 1, |
| 6025 |
'max' => 100, |
| 6026 |
'default' => 50, |
| 6027 |
'css' => ['{{element}} .pagelayer-divider-seperator' =>'width: {{val}}%;'], |
| 6028 |
), |
| 6029 |
'divider_gap' => array( |
| 6030 |
'type' => 'slider', |
| 6031 |
'label' => __pl('divider_gap'), |
| 6032 |
'min' => 1, |
| 6033 |
'max' => 100, |
| 6034 |
'default' => 10, |
| 6035 |
'css' => ['{{element}} .pagelayer-divider-holder' =>'padding-top: {{val}}px; padding-bottom: {{val}}px;'], |
| 6036 |
), |
| 6037 |
'divider_alignment' => array( |
| 6038 |
'type' => 'radio', |
| 6039 |
'label' => __pl('divider_alignment'), |
| 6040 |
'default' => 'center', |
| 6041 |
'screen' => 1, |
| 6042 |
'css' => ['{{element}} .pagelayer-divider-holder' => 'text-align: {{val}};'], |
| 6043 |
'list' => array( |
| 6044 |
'left' => __pl('left'), |
| 6045 |
'center' => __pl('center'), |
| 6046 |
'right' => __pl('right'), |
| 6047 |
) |
| 6048 |
), |
| 6049 |
), |
| 6050 |
) |
| 6051 |
); |
| 6052 |
|
| 6053 |
// Counter |
| 6054 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_counter', array( |
| 6055 |
'name' => __pl('Counter'), |
| 6056 |
'group' => 'other', |
| 6057 |
'func' => 'pagelayer_sc_counter', |
| 6058 |
'html' => '<div class="pagelayer-counter-holder"> |
| 6059 |
<div if="{{counter_start_number}}" class="pagelayer-counter-content"> |
| 6060 |
<span if="{{number_prefix}}">{{number_prefix}}</span><span class="pagelayer-counter-display">{{counter_start_number}}</span><span if="{{number_suffix}}">{{number_suffix}}</span> |
| 6061 |
</div> |
| 6062 |
<span if="{{counter_text}}" class="pagelayer-counter-info">{{counter_text}}</span> |
| 6063 |
</div>', |
| 6064 |
'params' => array( |
| 6065 |
'counter_start_number' => array( |
| 6066 |
'type' => 'spinner', |
| 6067 |
'label' => __pl('starting_number'), |
| 6068 |
'min' => '0', |
| 6069 |
'default' => '1', |
| 6070 |
'addAttr' => ['{{element}} .pagelayer-counter-display' => 'pagelayer-counter-initial-value="{{counter_start_number}}"'], |
| 6071 |
), |
| 6072 |
'counter_end_number' => array( |
| 6073 |
'type' => 'spinner', |
| 6074 |
'label' => __pl('Ending_number'), |
| 6075 |
'min' => '0', |
| 6076 |
'default' => '200', |
| 6077 |
'addAttr' => ['{{element}} .pagelayer-counter-display' => 'pagelayer-counter-last-value="{{counter_end_number}}"'], |
| 6078 |
), |
| 6079 |
'animation_duration' => array( |
| 6080 |
'type' => 'spinner', |
| 6081 |
'label' => __pl('counter_animation_duration'), |
| 6082 |
'min' => '500', |
| 6083 |
'max' => '500000', |
| 6084 |
'default' =>'2000', |
| 6085 |
'addAttr' => ['{{element}} .pagelayer-counter-display' => 'pagelayer-counter-animation-duration="{{animation_duration}}"'], |
| 6086 |
), |
| 6087 |
'counter_align' => array( |
| 6088 |
'type' => 'radio', |
| 6089 |
'label' => __pl('counter_align'), |
| 6090 |
'default' => 'center', |
| 6091 |
'css' => 'text-align: {{val}};', |
| 6092 |
'list' => [ |
| 6093 |
'left' => __pl('left'), |
| 6094 |
'center' => __pl('center'), |
| 6095 |
'right' => __pl('right'), |
| 6096 |
] |
| 6097 |
), |
| 6098 |
), |
| 6099 |
// Styles |
| 6100 |
'counter_style' => [ |
| 6101 |
'counter_number_color' => array( |
| 6102 |
'type' => 'color', |
| 6103 |
'label' => __pl('counter_number_color_label'), |
| 6104 |
'default' => '#3E8EF7', |
| 6105 |
'css' => ['{{element}} .pagelayer-counter-content' => 'color:{{val}};'], |
| 6106 |
), |
| 6107 |
'number_prefix' => array( |
| 6108 |
'type' => 'text', |
| 6109 |
'label' => __pl('number_prefix'), |
| 6110 |
), |
| 6111 |
'number_suffix' => array( |
| 6112 |
'type' => 'text', |
| 6113 |
'label' => __pl('number_suffix'), |
| 6114 |
), |
| 6115 |
'thousand_seperator' => array( |
| 6116 |
'type' => 'checkbox', |
| 6117 |
'label' => __pl('thousand_seperator'), |
| 6118 |
'addAttr' => ['{{element}} .pagelayer-counter-display' => 'pagelayer-counter-seperator="{{thousand_seperator}}"'], |
| 6119 |
), |
| 6120 |
'thousand_seperator_type' => array( |
| 6121 |
'type' => 'select', |
| 6122 |
'label' => __pl('thousand_seperator_type'), |
| 6123 |
'default' => ',', |
| 6124 |
'list' => [ |
| 6125 |
',' => __pl('Default'), |
| 6126 |
'.' => __pl('Dot'), |
| 6127 |
' ' => __pl('Space'), |
| 6128 |
], |
| 6129 |
'addAttr' => ['{{element}} .pagelayer-counter-display' => 'pagelayer-counter-seperator-type="{{thousand_seperator_type}}"'], |
| 6130 |
'req' => array( |
| 6131 |
'thousand_seperator' => 'true', |
| 6132 |
), |
| 6133 |
), |
| 6134 |
'counter_number_style' => array( |
| 6135 |
'type' => 'typography', |
| 6136 |
'label' => __pl('counter_number_size'), |
| 6137 |
'default' => ',60,,600,,,solid,,,,', |
| 6138 |
'css' => ['{{element}} .pagelayer-counter-content' => '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;'], |
| 6139 |
), |
| 6140 |
], |
| 6141 |
'counter_label_style' => [ |
| 6142 |
'counter_text' => array( |
| 6143 |
'type' => 'text', |
| 6144 |
'label' => __pl('counter_text'), |
| 6145 |
'default' => 'Counter', |
| 6146 |
'edit' => '.pagelayer-counter-info' |
| 6147 |
), |
| 6148 |
'counter_text_color' => array( |
| 6149 |
'type' => 'color', |
| 6150 |
'label' => __pl('counter_text_color_label'), |
| 6151 |
'default' => '#333333', |
| 6152 |
'css' => ['{{element}} .pagelayer-counter-info' => 'color:{{val}};'], |
| 6153 |
), |
| 6154 |
'counter_text_style' => array( |
| 6155 |
'type' => 'typography', |
| 6156 |
'label' => __pl('counter_text_style'), |
| 6157 |
'default' => ',25,,400,,,solid,,,,', |
| 6158 |
'css' => ['{{element}} .pagelayer-counter-info' => '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;'], |
| 6159 |
), |
| 6160 |
], |
| 6161 |
'styles' => [ |
| 6162 |
'counter_label_style' => __pl('counter_label_style'), |
| 6163 |
'counter_style' => __pl('counter_style'), |
| 6164 |
], |
| 6165 |
) |
| 6166 |
); |
| 6167 |
|
| 6168 |
|
| 6169 |
|
| 6170 |
//////////////////////// |
| 6171 |
// WordPress Group |
| 6172 |
//////////////////////// |
| 6173 |
|
| 6174 |
// Make a list of Widget Items |
| 6175 |
global $wp_registered_sidebars; |
| 6176 |
$pagelayer_wp_widgets = array(); |
| 6177 |
$pagelayer_wp_widget_default = ''; |
| 6178 |
|
| 6179 |
if(!empty($wp_registered_sidebars)){ |
| 6180 |
foreach($wp_registered_sidebars as $v){ |
| 6181 |
if(empty($pagelayer_wp_widget_default)){ |
| 6182 |
$pagelayer_wp_widget_default = $v['id']; |
| 6183 |
} |
| 6184 |
$pagelayer_wp_widgets[$v['id']] = $v['name']; |
| 6185 |
} |
| 6186 |
}else{ |
| 6187 |
$pagelayer_wp_widgets['no'] = __pl('wp_widgets_area_no_sidebars'); |
| 6188 |
} |
| 6189 |
|
| 6190 |
// Widgets Area |
| 6191 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_wp_widgets', array( |
| 6192 |
'name' => __pl('Sidebars / Widget Area'), |
| 6193 |
'group' => 'wordpress', |
| 6194 |
'func' => 'pagelayer_sc_wp_widgets', |
| 6195 |
'html' => '<div class="pagelayer-wp-sidebar-title">{{title}}</div> |
| 6196 |
<div class="pagelayer-wp-sidebar-holder">{{{data}}}</div>', |
| 6197 |
'params' => array( |
| 6198 |
'title' => array( |
| 6199 |
'type' => 'text', |
| 6200 |
'label' => __pl('parameters_title'), |
| 6201 |
'default' => 'Title', |
| 6202 |
'desc' => __pl('wp_widgets_area_description') |
| 6203 |
), |
| 6204 |
'sidebar' => array( |
| 6205 |
'type' => 'select', |
| 6206 |
'label' => __pl('wp_widgets_area_select'), |
| 6207 |
'default' => $pagelayer_wp_widget_default, |
| 6208 |
'desc' => '', |
| 6209 |
'list' => $pagelayer_wp_widgets |
| 6210 |
) |
| 6211 |
) |
| 6212 |
) |
| 6213 |
); |
| 6214 |
|
| 6215 |
// Load the wordpress widgets, IF ALLOWED ! |
| 6216 |
if(current_user_can('edit_theme_options')){ |
| 6217 |
|
| 6218 |
// Include the widgets |
| 6219 |
//include_once(ABSPATH . 'wp-admin/includes/widgets.php'); |
| 6220 |
|
| 6221 |
//pagelayer_print($GLOBALS['wp_widget_factory']->widgets);die(); |
| 6222 |
|
| 6223 |
foreach($GLOBALS['wp_widget_factory']->widgets as $widget_key => $widget){ |
| 6224 |
|
| 6225 |
pagelayer_add_shortcode(PAGELAYER_SC_PREFIX.'_wp_'.$widget->id_base, array( |
| 6226 |
'name' => $widget->name, |
| 6227 |
'group' => 'wordpress', |
| 6228 |
'func' => 'pagelayer_does_not_exist', |
| 6229 |
'innerHTML' => 'widget_data', |
| 6230 |
'widget' => $widget_key |
| 6231 |
) |
| 6232 |
); |
| 6233 |
|
| 6234 |
} |
| 6235 |
} |
| 6236 |
|
| 6237 |
// Its premium |
| 6238 |
if(defined('PAGELAYER_PREMIUM')){ |
| 6239 |
include_once(dirname(__FILE__).'/premium.php'); |
| 6240 |
} |
| 6241 |
|