| 1 |
<?php |
| 2 |
namespace ULTP\blocks; |
| 3 |
|
| 4 |
defined('ABSPATH') || exit; |
| 5 |
|
| 6 |
class Taxonomy{ |
| 7 |
public function __construct() { |
| 8 |
add_action('init', array($this, 'register')); |
| 9 |
} |
| 10 |
public function get_attributes($default = false) { |
| 11 |
|
| 12 |
$attributes = array( |
| 13 |
'blockId' => [ |
| 14 |
'type' => 'string', |
| 15 |
'default' => '', |
| 16 |
], |
| 17 |
'previewImg' => [ |
| 18 |
'type' => 'string', |
| 19 |
'default' => '', |
| 20 |
], |
| 21 |
//-------------------------- |
| 22 |
// Layout |
| 23 |
//-------------------------- |
| 24 |
'layout' => [ |
| 25 |
'type' => 'string', |
| 26 |
'default' => '1', |
| 27 |
], |
| 28 |
|
| 29 |
//-------------------------- |
| 30 |
// Query Setting |
| 31 |
//-------------------------- |
| 32 |
'taxType' => [ |
| 33 |
'type' => 'string', |
| 34 |
'default' => 'regular', |
| 35 |
], |
| 36 |
'taxSlug' => [ |
| 37 |
'type' => 'string', |
| 38 |
'default' => 'category', |
| 39 |
], |
| 40 |
'taxValue' => [ |
| 41 |
'type' => 'string', |
| 42 |
'default' => '[]', |
| 43 |
'style' => [ |
| 44 |
(object)[ |
| 45 |
'depends' => [ |
| 46 |
(object)['key'=>'taxType','condition'=>'!=','value'=>['parent','regular']], |
| 47 |
], |
| 48 |
], |
| 49 |
], |
| 50 |
], |
| 51 |
'queryNumber' => [ |
| 52 |
'type' => 'string', |
| 53 |
'default' => 6, |
| 54 |
'style' => [ |
| 55 |
(object)[ |
| 56 |
'depends' => [ |
| 57 |
(object)['key'=>'taxType','condition'=>'!=','value'=>'custom'], |
| 58 |
], |
| 59 |
], |
| 60 |
], |
| 61 |
], |
| 62 |
//-------------------------- |
| 63 |
// General Setting |
| 64 |
//-------------------------- |
| 65 |
'taxGridEn' => [ |
| 66 |
'type' => 'boolean', |
| 67 |
'default' => true, |
| 68 |
], |
| 69 |
'columns' => [ |
| 70 |
'type' => 'object', |
| 71 |
'default' => (object)['lg' =>'1'], |
| 72 |
'style' => [ |
| 73 |
(object)[ |
| 74 |
'depends' => [ |
| 75 |
(object)['key'=>'taxGridEn','condition'=>'==','value'=>true], |
| 76 |
], |
| 77 |
'selector'=>'{{ULTP}}.wp-block-ultimate-post-ultp-taxonomy .ultp-block-items-wrap .ultp-taxonomy-items { grid-template-columns: repeat({{columns}}, 1fr); }' |
| 78 |
], |
| 79 |
], |
| 80 |
], |
| 81 |
'columnGridGap' => [ |
| 82 |
'type' => 'object', |
| 83 |
'default' => (object)['lg' =>'20', 'unit' =>'px'], |
| 84 |
'style' => [ |
| 85 |
(object)[ |
| 86 |
'depends' => [ |
| 87 |
(object)['key'=>'taxGridEn','condition'=>'==','value'=>true], |
| 88 |
], |
| 89 |
'selector'=>'{{ULTP}} .ultp-block-items-wrap .ultp-taxonomy-items { grid-column-gap: {{columnGridGap}}; } {{ULTP}} .ultp-taxonomy-items .ultp-taxonomy-item { margin-bottom: 0; }' |
| 90 |
], |
| 91 |
], |
| 92 |
], |
| 93 |
'rowGap' => [ |
| 94 |
'type' => 'object', |
| 95 |
'default' => (object)['lg' =>'20', 'unit' =>'px'], |
| 96 |
'style' => [ |
| 97 |
(object)[ |
| 98 |
'depends' => [ |
| 99 |
(object)['key'=>'taxGridEn','condition'=>'==','value'=>true], |
| 100 |
], |
| 101 |
'selector'=>'{{ULTP}} .ultp-block-items-wrap .ultp-taxonomy-items { grid-row-gap: {{rowGap}}; }' |
| 102 |
], |
| 103 |
], |
| 104 |
], |
| 105 |
'titleShow' => [ |
| 106 |
'type' => 'boolean', |
| 107 |
'default' => true, |
| 108 |
], |
| 109 |
'headingShow' => [ |
| 110 |
'type' => 'boolean', |
| 111 |
'default' => true, |
| 112 |
], |
| 113 |
'excerptShow' => [ |
| 114 |
'type' => 'boolean', |
| 115 |
'default' => false |
| 116 |
], |
| 117 |
'countShow' => [ |
| 118 |
'type' => 'boolean', |
| 119 |
'default' => true |
| 120 |
], |
| 121 |
// 'showImage' => [ |
| 122 |
// 'type' => 'boolean', |
| 123 |
// 'default' => true, |
| 124 |
// 'style' => [ |
| 125 |
// (object)[ |
| 126 |
// 'depends' => [ |
| 127 |
// (object)['key'=>'layout','condition'=>'!=','value'=>'1'], |
| 128 |
// ], |
| 129 |
// ], |
| 130 |
// ], |
| 131 |
// ], |
| 132 |
'openInTab' => [ |
| 133 |
'type' => 'boolean', |
| 134 |
'default' => false, |
| 135 |
], |
| 136 |
'notFoundMessage' => [ |
| 137 |
'type' => 'string', |
| 138 |
'default' => 'No Taxonomy Found.' |
| 139 |
], |
| 140 |
|
| 141 |
|
| 142 |
//-------------------------- |
| 143 |
// Heading Setting/Style |
| 144 |
//-------------------------- |
| 145 |
'headingText' => [ |
| 146 |
'type' => 'string', |
| 147 |
'default' => 'Post Taxonomy', |
| 148 |
], |
| 149 |
'headingURL' => [ |
| 150 |
'type' => 'string', |
| 151 |
'default' => '', |
| 152 |
], |
| 153 |
'headingBtnText' => [ |
| 154 |
'type' => 'string', |
| 155 |
'default' => 'View More', |
| 156 |
'style' => [ |
| 157 |
(object)[ |
| 158 |
'depends' => [ |
| 159 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], |
| 160 |
], |
| 161 |
], |
| 162 |
], |
| 163 |
], |
| 164 |
'headingStyle' => [ |
| 165 |
'type' => 'string', |
| 166 |
'default' => 'style9', |
| 167 |
], |
| 168 |
'headingTag' => [ |
| 169 |
'type' => 'string', |
| 170 |
'default' => 'h2', |
| 171 |
], |
| 172 |
'headingAlign' => [ |
| 173 |
'type' => 'string', |
| 174 |
'default' => 'left', |
| 175 |
'style' => [ |
| 176 |
(object) [ |
| 177 |
'selector' => '{{ULTP}} .ultp-heading-inner, {{ULTP}} .ultp-sub-heading-inner{ text-align:{{headingAlign}}; }' |
| 178 |
] |
| 179 |
] |
| 180 |
], |
| 181 |
'headingTypo' => [ |
| 182 |
'type' => 'object', |
| 183 |
'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '20', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none', 'transform' => '', 'family'=>'','weight'=>'700'], |
| 184 |
'style' => [(object)['selector' => '{{ULTP}} .ultp-heading-wrap .ultp-heading-inner']] |
| 185 |
], |
| 186 |
'headingColor' => [ |
| 187 |
'type' => 'string', |
| 188 |
'default' => '#0e1523', |
| 189 |
'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { color:{{headingColor}}; }']], |
| 190 |
], |
| 191 |
'headingBorderBottomColor' => [ |
| 192 |
'type' => 'string', |
| 193 |
'default' => '#0e1523', |
| 194 |
'style' => [ |
| 195 |
(object)[ |
| 196 |
'depends' => [ |
| 197 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], |
| 198 |
], |
| 199 |
'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-color:{{headingBorderBottomColor}}; }' |
| 200 |
], |
| 201 |
(object)[ |
| 202 |
'depends' => [ |
| 203 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], |
| 204 |
], |
| 205 |
'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }' |
| 206 |
], |
| 207 |
(object)[ |
| 208 |
'depends' => [ |
| 209 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'], |
| 210 |
], |
| 211 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color: {{headingBorderBottomColor}}; }' |
| 212 |
], |
| 213 |
(object)[ |
| 214 |
'depends' => [ |
| 215 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'], |
| 216 |
], |
| 217 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before, {{ULTP}} .ultp-heading-inner span:after { background-color: {{headingBorderBottomColor}}; }' |
| 218 |
], |
| 219 |
(object)[ |
| 220 |
'depends' => [ |
| 221 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'], |
| 222 |
], |
| 223 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }' |
| 224 |
], |
| 225 |
(object)[ |
| 226 |
'depends' => [ |
| 227 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'], |
| 228 |
], |
| 229 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' |
| 230 |
], |
| 231 |
(object)[ |
| 232 |
'depends' => [ |
| 233 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'], |
| 234 |
], |
| 235 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' |
| 236 |
], |
| 237 |
(object)[ |
| 238 |
'depends' => [ |
| 239 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], |
| 240 |
], |
| 241 |
'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }' |
| 242 |
], |
| 243 |
(object)[ |
| 244 |
'depends' => [ |
| 245 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'], |
| 246 |
], |
| 247 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' |
| 248 |
], |
| 249 |
(object)[ |
| 250 |
'depends' => [ |
| 251 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'], |
| 252 |
], |
| 253 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }' |
| 254 |
], |
| 255 |
(object)[ |
| 256 |
'depends' => [ |
| 257 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'], |
| 258 |
], |
| 259 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }' |
| 260 |
], |
| 261 |
(object)[ |
| 262 |
'depends' => [ |
| 263 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'], |
| 264 |
], |
| 265 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' |
| 266 |
], |
| 267 |
(object)[ |
| 268 |
'depends' => [ |
| 269 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], |
| 270 |
], |
| 271 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }' |
| 272 |
], |
| 273 |
(object)[ |
| 274 |
'depends' => [ |
| 275 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], |
| 276 |
], |
| 277 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { border-color:{{headingBorderBottomColor}}; }' |
| 278 |
], |
| 279 |
], |
| 280 |
], |
| 281 |
'headingBorderBottomColor2' => [ |
| 282 |
'type' => 'string', |
| 283 |
'default' => '#e5e5e5', |
| 284 |
'style' => [ |
| 285 |
(object)[ |
| 286 |
'depends' => [ |
| 287 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'], |
| 288 |
], |
| 289 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor2}}; }' |
| 290 |
], |
| 291 |
(object)[ |
| 292 |
'depends' => [ |
| 293 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'], |
| 294 |
], |
| 295 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }' |
| 296 |
], |
| 297 |
(object)[ |
| 298 |
'depends' => [ |
| 299 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'], |
| 300 |
], |
| 301 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }' |
| 302 |
], |
| 303 |
(object)[ |
| 304 |
'depends' => [ |
| 305 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], |
| 306 |
], |
| 307 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }' |
| 308 |
], |
| 309 |
], |
| 310 |
], |
| 311 |
'headingBg' => [ |
| 312 |
'type' => 'string', |
| 313 |
'default' => '#037fff', |
| 314 |
'style' => [ |
| 315 |
(object)[ |
| 316 |
'depends' => [ |
| 317 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'], |
| 318 |
], |
| 319 |
'selector'=>'{{ULTP}} .ultp-heading-style5 .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' |
| 320 |
], |
| 321 |
(object)[ |
| 322 |
'depends' => [ |
| 323 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'], |
| 324 |
], |
| 325 |
'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' |
| 326 |
], |
| 327 |
(object)[ |
| 328 |
'depends' => [ |
| 329 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style21'], |
| 330 |
], |
| 331 |
'selector'=>'{{ULTP}} .ultp-heading-inner span, {{ULTP}} .ultp-heading-inner span:after { background-color:{{headingBg}}; }' |
| 332 |
], |
| 333 |
(object)[ |
| 334 |
'depends' => [ |
| 335 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], |
| 336 |
], |
| 337 |
'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' |
| 338 |
], |
| 339 |
(object)[ |
| 340 |
'depends' => [ |
| 341 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], |
| 342 |
], |
| 343 |
'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' |
| 344 |
], |
| 345 |
(object)[ |
| 346 |
'depends' => [ |
| 347 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], |
| 348 |
], |
| 349 |
'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' |
| 350 |
], |
| 351 |
(object)[ |
| 352 |
'depends' => [ |
| 353 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], |
| 354 |
], |
| 355 |
'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }' |
| 356 |
], |
| 357 |
(object)[ |
| 358 |
'depends' => [ |
| 359 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'], |
| 360 |
], |
| 361 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }' |
| 362 |
], |
| 363 |
], |
| 364 |
], |
| 365 |
'headingBg2' => [ |
| 366 |
'type' => 'string', |
| 367 |
'default' => '#e5e5e5', |
| 368 |
'style' => [ |
| 369 |
(object)[ |
| 370 |
'depends' => [ |
| 371 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], |
| 372 |
], |
| 373 |
'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg2}}; }' |
| 374 |
], |
| 375 |
], |
| 376 |
], |
| 377 |
'headingBtnTypo' => [ |
| 378 |
'type' => 'object', |
| 379 |
'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '14', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none','family'=>''], |
| 380 |
'style' => [ |
| 381 |
(object)[ |
| 382 |
'depends' => [ |
| 383 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], |
| 384 |
], |
| 385 |
'selector'=>'{{ULTP}} .ultp-block-wrapper .ultp-heading-wrap .ultp-heading-btn' |
| 386 |
], |
| 387 |
], |
| 388 |
], |
| 389 |
'headingBtnColor' => [ |
| 390 |
'type' => 'string', |
| 391 |
'default' => '#037fff', |
| 392 |
'style' => [ |
| 393 |
(object)[ |
| 394 |
'depends' => [ |
| 395 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], |
| 396 |
], |
| 397 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn { color:{{headingBtnColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn svg { fill:{{headingBtnColor}}; }' |
| 398 |
], |
| 399 |
], |
| 400 |
], |
| 401 |
'headingBtnHoverColor' => [ |
| 402 |
'type' => 'string', |
| 403 |
'default' => '#0a31da', |
| 404 |
'style' => [ |
| 405 |
(object)[ |
| 406 |
'depends' => [ |
| 407 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], |
| 408 |
], |
| 409 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover { color:{{headingBtnHoverColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover svg { fill:{{headingBtnHoverColor}}; }' |
| 410 |
], |
| 411 |
], |
| 412 |
], |
| 413 |
|
| 414 |
'headingBorder' => [ |
| 415 |
'type' => 'string', |
| 416 |
'default' => '3', |
| 417 |
'style' => [ |
| 418 |
(object)[ |
| 419 |
'depends' => [ |
| 420 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], |
| 421 |
], |
| 422 |
'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-width:{{headingBorder}}px; }' |
| 423 |
], |
| 424 |
(object)[ |
| 425 |
'depends' => [ |
| 426 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], |
| 427 |
], |
| 428 |
'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }' |
| 429 |
], |
| 430 |
(object)[ |
| 431 |
'depends' => [ |
| 432 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'], |
| 433 |
], |
| 434 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { width:{{headingBorder}}px; }' |
| 435 |
], |
| 436 |
(object)[ |
| 437 |
'depends' => [ |
| 438 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'], |
| 439 |
], |
| 440 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before, {{ULTP}} .ultp-heading-inner span:after { height:{{headingBorder}}px; }' |
| 441 |
], |
| 442 |
(object)[ |
| 443 |
'depends' => [ |
| 444 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'], |
| 445 |
], |
| 446 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }' |
| 447 |
], |
| 448 |
(object)[ |
| 449 |
'depends' => [ |
| 450 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'], |
| 451 |
], |
| 452 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }' |
| 453 |
], |
| 454 |
(object)[ |
| 455 |
'depends' => [ |
| 456 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'], |
| 457 |
], |
| 458 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }' |
| 459 |
], |
| 460 |
(object)[ |
| 461 |
'depends' => [ |
| 462 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], |
| 463 |
], |
| 464 |
'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }' |
| 465 |
], |
| 466 |
(object)[ |
| 467 |
'depends' => [ |
| 468 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'], |
| 469 |
], |
| 470 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }' |
| 471 |
], |
| 472 |
(object)[ |
| 473 |
'depends' => [ |
| 474 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'], |
| 475 |
], |
| 476 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }' |
| 477 |
], |
| 478 |
(object)[ |
| 479 |
'depends' => [ |
| 480 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'], |
| 481 |
], |
| 482 |
'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }' |
| 483 |
], |
| 484 |
(object)[ |
| 485 |
'depends' => [ |
| 486 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'], |
| 487 |
], |
| 488 |
'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }' |
| 489 |
], |
| 490 |
(object)[ |
| 491 |
'depends' => [ |
| 492 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], |
| 493 |
], |
| 494 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }' |
| 495 |
], |
| 496 |
(object)[ |
| 497 |
'depends' => [ |
| 498 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], |
| 499 |
], |
| 500 |
'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }' |
| 501 |
], |
| 502 |
], |
| 503 |
], |
| 504 |
'headingSpacing' => [ |
| 505 |
'type' => 'object', |
| 506 |
'default' => (object)['lg'=>20, 'sm'=>10, 'unit'=>'px'], |
| 507 |
'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap {margin-top:0; margin-bottom:{{headingSpacing}}; }']] |
| 508 |
], |
| 509 |
'headingRadius' => [ |
| 510 |
'type' => 'object', |
| 511 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']], |
| 512 |
'style' => [ |
| 513 |
(object)[ |
| 514 |
'depends' => [ |
| 515 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'], |
| 516 |
], |
| 517 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }' |
| 518 |
], |
| 519 |
(object)[ |
| 520 |
'depends' => [ |
| 521 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], |
| 522 |
], |
| 523 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }' |
| 524 |
], |
| 525 |
(object)[ |
| 526 |
'depends' => [ |
| 527 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], |
| 528 |
], |
| 529 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' |
| 530 |
], |
| 531 |
(object)[ |
| 532 |
'depends' => [ |
| 533 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'], |
| 534 |
], |
| 535 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }' |
| 536 |
], |
| 537 |
(object)[ |
| 538 |
'depends' => [ |
| 539 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], |
| 540 |
], |
| 541 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' |
| 542 |
], |
| 543 |
(object)[ |
| 544 |
'depends' => [ |
| 545 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], |
| 546 |
], |
| 547 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' |
| 548 |
], |
| 549 |
(object)[ |
| 550 |
'depends' => [ |
| 551 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], |
| 552 |
], |
| 553 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' |
| 554 |
], |
| 555 |
(object)[ |
| 556 |
'depends' => [ |
| 557 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'], |
| 558 |
], |
| 559 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' |
| 560 |
], |
| 561 |
] |
| 562 |
], |
| 563 |
'headingPadding' => [ |
| 564 |
'type' => 'object', |
| 565 |
'default' => (object)['lg' =>(object)['unit' =>'px']], |
| 566 |
'style' => [ |
| 567 |
(object)[ |
| 568 |
'depends' => [ |
| 569 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'], |
| 570 |
], |
| 571 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 572 |
], |
| 573 |
(object)[ |
| 574 |
'depends' => [ |
| 575 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], |
| 576 |
], |
| 577 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 578 |
], |
| 579 |
(object)[ |
| 580 |
'depends' => [ |
| 581 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], |
| 582 |
], |
| 583 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 584 |
], |
| 585 |
(object)[ |
| 586 |
'depends' => [ |
| 587 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'], |
| 588 |
], |
| 589 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 590 |
], |
| 591 |
(object)[ |
| 592 |
'depends' => [ |
| 593 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'], |
| 594 |
], |
| 595 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 596 |
], |
| 597 |
(object)[ |
| 598 |
'depends' => [ |
| 599 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], |
| 600 |
], |
| 601 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 602 |
], |
| 603 |
(object)[ |
| 604 |
'depends' => [ |
| 605 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], |
| 606 |
], |
| 607 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 608 |
], |
| 609 |
(object)[ |
| 610 |
'depends' => [ |
| 611 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], |
| 612 |
], |
| 613 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 614 |
], |
| 615 |
(object)[ |
| 616 |
'depends' => [ |
| 617 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], |
| 618 |
], |
| 619 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 620 |
], |
| 621 |
(object)[ |
| 622 |
'depends' => [ |
| 623 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'], |
| 624 |
], |
| 625 |
'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 626 |
], |
| 627 |
(object)[ |
| 628 |
'depends' => [ |
| 629 |
(object)['key'=>'headingStyle','condition'=>'==','value'=>'style21'], |
| 630 |
], |
| 631 |
'selector'=>'{{ULTP}} .ultp-heading-inner span { padding:{{headingPadding}}; }' |
| 632 |
], |
| 633 |
] |
| 634 |
], |
| 635 |
'subHeadingShow' => [ |
| 636 |
'type' => 'boolean', |
| 637 |
'default' => false, |
| 638 |
], |
| 639 |
'subHeadingText' => [ |
| 640 |
'type' => 'string', |
| 641 |
'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut sem augue. Sed at felis ut enim dignissim sodales.', |
| 642 |
'style' => [ |
| 643 |
(object)[ |
| 644 |
'depends' => [ |
| 645 |
(object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], |
| 646 |
], |
| 647 |
], |
| 648 |
], |
| 649 |
], |
| 650 |
'subHeadingTypo' => [ |
| 651 |
'type' => 'object', |
| 652 |
'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'16', 'unit'=>'px'], 'spacing'=>(object)[ 'lg'=>'0', 'unit'=>'px'], 'height'=>(object)[ 'lg'=>'27', 'unit'=>'px'],'decoration'=>'none','transform' => '','family'=>'','weight'=>'500'], |
| 653 |
'style' => [ |
| 654 |
(object)[ |
| 655 |
'depends' => [ |
| 656 |
(object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], |
| 657 |
], |
| 658 |
'selector'=>'{{ULTP}} .ultp-sub-heading div' |
| 659 |
], |
| 660 |
], |
| 661 |
], |
| 662 |
'subHeadingColor' => [ |
| 663 |
'type' => 'string', |
| 664 |
'default' => '#989898', |
| 665 |
'style' => [ |
| 666 |
(object)[ |
| 667 |
'depends' => [ |
| 668 |
(object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], |
| 669 |
], |
| 670 |
'selector'=>'{{ULTP}} .ultp-sub-heading div{ color:{{subHeadingColor}}; }' |
| 671 |
], |
| 672 |
], |
| 673 |
], |
| 674 |
'subHeadingSpacing' => [ |
| 675 |
'type' => 'object', |
| 676 |
'default' => (object)['lg' =>(object)['top' => '8', 'unit' =>'px']], |
| 677 |
'style' => [ |
| 678 |
(object)[ |
| 679 |
'depends' => [ |
| 680 |
(object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], |
| 681 |
], |
| 682 |
'selector'=>'{{ULTP}} div.ultp-sub-heading-inner{ margin:{{subHeadingSpacing}}; }' |
| 683 |
], |
| 684 |
], |
| 685 |
], |
| 686 |
|
| 687 |
//-------------------------- |
| 688 |
// Title Setting/Style |
| 689 |
//-------------------------- |
| 690 |
'titleTag' => [ |
| 691 |
'type' => 'string', |
| 692 |
'default' => 'span', |
| 693 |
], |
| 694 |
'contentTitleAlign' => [ |
| 695 |
'type' => 'string', |
| 696 |
'default' => 'left', |
| 697 |
'style' => [ |
| 698 |
(object) [ |
| 699 |
'depends' => [ |
| 700 |
(object)['key'=>'layout','condition'=>'==','value'=> '1'], |
| 701 |
(object)['key'=>'countShow','condition'=>'==','value'=> false], |
| 702 |
], |
| 703 |
'selector' => '{{ULTP}} .ultp-block-items-wrap ul li a { justify-content: {{contentTitleAlign}};}' |
| 704 |
] |
| 705 |
] |
| 706 |
], |
| 707 |
'titlePosition' => [ |
| 708 |
'type' => 'boolean', |
| 709 |
'default' => true, |
| 710 |
], |
| 711 |
'customTaxTitleColor' => [ |
| 712 |
'type' => 'boolean', |
| 713 |
'default' => false, |
| 714 |
'style' => [ |
| 715 |
(object)[ |
| 716 |
'depends' => [ |
| 717 |
(object)['key'=>'layout','condition'=>'!=','value'=>['2','3','6']], |
| 718 |
] |
| 719 |
] |
| 720 |
] |
| 721 |
], |
| 722 |
'seperatorTaxTitleLink' => [ |
| 723 |
'type' => 'string', |
| 724 |
'default' => admin_url( 'edit-tags.php?taxonomy=category' ), |
| 725 |
'style' => [ |
| 726 |
(object)[ |
| 727 |
'depends' => [ |
| 728 |
(object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>true], |
| 729 |
(object)['key'=>'layout','condition'=>'!=','value'=>['2','3','6']], |
| 730 |
] |
| 731 |
] |
| 732 |
] |
| 733 |
], |
| 734 |
'titleColor' => [ |
| 735 |
'type' => 'string', |
| 736 |
'default' => '', |
| 737 |
'style' => [ |
| 738 |
(object)[ |
| 739 |
'depends' => [ |
| 740 |
(object)['key'=>'layout','condition'=>'==','value'=>['7','8']], |
| 741 |
], |
| 742 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { color:{{titleColor}}; }' |
| 743 |
], |
| 744 |
(object)[ |
| 745 |
'depends' => [ |
| 746 |
(object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>false], |
| 747 |
], |
| 748 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { color:{{titleColor}}; }' |
| 749 |
], |
| 750 |
|
| 751 |
], |
| 752 |
], |
| 753 |
'TitleBgColor' => [ |
| 754 |
'type' => 'string', |
| 755 |
'default' => '#f2f2f2', |
| 756 |
'style' => [ |
| 757 |
(object)[ |
| 758 |
'depends' => [ |
| 759 |
(object)['key'=>'layout','condition'=>'==','value'=>['7','8']], |
| 760 |
(object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>false], |
| 761 |
], |
| 762 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-7 li a .ultp-taxonomy-name, {{ULTP}} .ultp-taxonomy-layout-8 li a .ultp-taxonomy-name { background:{{TitleBgColor}}; }' |
| 763 |
], |
| 764 |
], |
| 765 |
], |
| 766 |
'TitleBgHoverColor' => [ |
| 767 |
'type' => 'string', |
| 768 |
'default' => '#c5c5c5', |
| 769 |
'style' => [ |
| 770 |
(object)[ |
| 771 |
'depends' => [ |
| 772 |
(object)['key'=>'layout','condition'=>'==','value'=>['7','8']], |
| 773 |
(object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>false], |
| 774 |
], |
| 775 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-7 li a:hover .ultp-taxonomy-name, {{ULTP}} .ultp-taxonomy-layout-8 li a:hover .ultp-taxonomy-name { background:{{TitleBgHoverColor}}; }' |
| 776 |
], |
| 777 |
], |
| 778 |
], |
| 779 |
'titleHoverColor' => [ |
| 780 |
'type' => 'string', |
| 781 |
'default' => '', |
| 782 |
'style' => [ |
| 783 |
(object)[ |
| 784 |
'selector'=>'{{ULTP}} .ultp-block-item a:hover .ultp-taxonomy-name, {{ULTP}} .ultp-block-item a:hover .ultp-taxonomy-count { color:{{titleHoverColor}}!important; }' |
| 785 |
], |
| 786 |
], |
| 787 |
], |
| 788 |
'titleTypo' => [ |
| 789 |
'type' => 'object', |
| 790 |
'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'14', 'unit'=>'px'], 'spacing'=>(object)[ 'lg'=>'0', 'unit'=>'px'], 'height'=>(object)['lg'=>'22', 'unit'=>'px'],'transform' => '', 'decoration'=>'none','family'=>'','weight'=>''], |
| 791 |
'style' => [ |
| 792 |
(object)[ |
| 793 |
'depends' => [ |
| 794 |
(object)['key'=>'titleShow','condition'=>'==','value'=>true], |
| 795 |
], |
| 796 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name' |
| 797 |
], |
| 798 |
], |
| 799 |
], |
| 800 |
'titleDotColor' => [ |
| 801 |
'type' => 'string', |
| 802 |
'default' => '#cacaca', |
| 803 |
'style' => [ |
| 804 |
(object)[ |
| 805 |
'depends' => [ |
| 806 |
(object)['key'=>'layout','condition'=>'==','value'=>['2','3']], |
| 807 |
], |
| 808 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-2 li a .ultp-taxonomy-bar, {{ULTP}} .ultp-taxonomy-layout-3 li a .ultp-taxonomy-bar { border-bottom-color:{{titleDotColor}}; }' |
| 809 |
], |
| 810 |
], |
| 811 |
], |
| 812 |
'titleDotSize' => [ |
| 813 |
'type' => 'string', |
| 814 |
'default' => 'solid', |
| 815 |
'style' => [ |
| 816 |
(object)[ |
| 817 |
'depends' => [ |
| 818 |
(object)['key'=>'layout','condition'=>'==','value'=>['2','3']], |
| 819 |
], |
| 820 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-2 li a .ultp-taxonomy-bar, {{ULTP}} .ultp-taxonomy-layout-3 li a .ultp-taxonomy-bar { border-bottom-width:{{titleDotSize}}px; }' |
| 821 |
], |
| 822 |
], |
| 823 |
], |
| 824 |
'titleDotStyle' => [ |
| 825 |
'type' => 'string', |
| 826 |
'default' => (object)['lg'=>'1'], |
| 827 |
'style' => [ |
| 828 |
(object)[ |
| 829 |
'depends' => [ |
| 830 |
(object)['key'=>'layout','condition'=>'==','value'=>['2','3']], |
| 831 |
], |
| 832 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-2 li a .ultp-taxonomy-bar, {{ULTP}} .ultp-taxonomy-layout-3 li a .ultp-taxonomy-bar { border-bottom-style: {{titleDotStyle}}; }' |
| 833 |
], |
| 834 |
], |
| 835 |
], |
| 836 |
'titlePadding' => [ |
| 837 |
'type' => 'object', |
| 838 |
'default' => (object)['lg'=>(object)['unit'=>'px']], |
| 839 |
'style' => [ |
| 840 |
(object)[ |
| 841 |
'depends' => [ |
| 842 |
(object)['key'=>'titleShow','condition'=>'==','value'=>true], |
| 843 |
], |
| 844 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { padding:{{titlePadding}}; }' |
| 845 |
], |
| 846 |
], |
| 847 |
], |
| 848 |
'titleRadius' => [ |
| 849 |
'type' => 'object', |
| 850 |
'default' => (object)['lg'=>'20', 'unit'=>'px'], |
| 851 |
'style' => [ |
| 852 |
(object)[ |
| 853 |
'depends' => [ |
| 854 |
(object)['key'=>'titleShow','condition'=>'==','value'=>true], |
| 855 |
(object)['key'=>'layout','condition'=>'==','value'=>['7','8']], |
| 856 |
], |
| 857 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { border-radius:{{titleRadius}}; }' |
| 858 |
], |
| 859 |
], |
| 860 |
], |
| 861 |
|
| 862 |
//-------------------------- |
| 863 |
// Content Setting/Style |
| 864 |
//-------------------------- |
| 865 |
'excerptLimit' => [ |
| 866 |
'type' => 'string', |
| 867 |
'default' => 30, |
| 868 |
], |
| 869 |
'excerptColor' => [ |
| 870 |
'type' => 'string', |
| 871 |
'default' => '', |
| 872 |
'style' => [ |
| 873 |
(object)[ |
| 874 |
'depends' => [ |
| 875 |
(object)['key'=>'excerptShow','condition'=>'==','value'=>true], |
| 876 |
], |
| 877 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-desc { color:{{excerptColor}}; }' |
| 878 |
], |
| 879 |
], |
| 880 |
], |
| 881 |
'excerptTypo' => [ |
| 882 |
'type' => 'object', |
| 883 |
'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>'22', 'unit' =>'px'], 'decoration' => 'none','family'=>''], |
| 884 |
'style' => [ |
| 885 |
(object)[ |
| 886 |
'depends' => [ |
| 887 |
(object)['key'=>'excerptShow','condition'=>'==','value'=>true], |
| 888 |
], |
| 889 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-desc' |
| 890 |
], |
| 891 |
], |
| 892 |
], |
| 893 |
'excerptPadding' => [ |
| 894 |
'type' => 'object', |
| 895 |
'default' => (object)['lg' =>(object)['top' => '0','bottom' => '', 'unit' =>'px']], |
| 896 |
'style' => [ |
| 897 |
(object)[ |
| 898 |
'depends' => [ |
| 899 |
(object)['key'=>'excerptShow','condition'=>'==','value'=>true], |
| 900 |
], |
| 901 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-desc { padding: {{excerptPadding}}; }' |
| 902 |
], |
| 903 |
], |
| 904 |
], |
| 905 |
|
| 906 |
|
| 907 |
//-------------------------- |
| 908 |
// Count Style Setting/Style |
| 909 |
//-------------------------- |
| 910 |
'counterTypo' => [ |
| 911 |
'type' => 'object', |
| 912 |
'default' => (object)['openTypography' => 1, 'size' => (object)['lg' =>14, 'unit' =>'px'], 'height' => (object)['lg' =>'22', 'unit' =>'px'], 'spacing' => (object)['lg' =>0, 'unit' =>'px'], 'transform' => '', 'weight' => '400', 'decoration' => 'none','family'=>'' ], |
| 913 |
'style' => [ |
| 914 |
(object)[ |
| 915 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count' |
| 916 |
], |
| 917 |
], |
| 918 |
], |
| 919 |
'counterColor' => [ |
| 920 |
'type' => 'string', |
| 921 |
'default' => '', |
| 922 |
'style' => [ |
| 923 |
(object)[ |
| 924 |
'selector' => '{{ULTP}} .ultp-block-item .ultp-taxonomy-count { color:{{counterColor}}; }' |
| 925 |
], |
| 926 |
] |
| 927 |
], |
| 928 |
'counterBgColor' => [ |
| 929 |
'type' => 'object', |
| 930 |
'default' => (object)['openColor' => 1,'type' => 'color', 'color' => ''], |
| 931 |
'style' => [ |
| 932 |
(object)[ |
| 933 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count' |
| 934 |
], |
| 935 |
], |
| 936 |
], |
| 937 |
'counterWidth' => [ |
| 938 |
'type' => 'string', |
| 939 |
'default' => '', |
| 940 |
'style' => [ |
| 941 |
(object)[ |
| 942 |
'selector' => '{{ULTP}} .ultp-block-item .ultp-taxonomy-count { width:{{counterWidth}}px; }' |
| 943 |
], |
| 944 |
] |
| 945 |
], |
| 946 |
'counterHeight' => [ |
| 947 |
'type' => 'string', |
| 948 |
'default' => '', |
| 949 |
'style' => [ |
| 950 |
(object)[ |
| 951 |
'selector' => '{{ULTP}} .ultp-block-item .ultp-taxonomy-count { height:{{counterHeight}}px; line-height:{{counterHeight}}px !important; }' |
| 952 |
], |
| 953 |
] |
| 954 |
], |
| 955 |
'counterBorder' => [ |
| 956 |
'type' => 'object', |
| 957 |
'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], |
| 958 |
'style' => [ |
| 959 |
(object)[ |
| 960 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count' |
| 961 |
], |
| 962 |
], |
| 963 |
], |
| 964 |
'counterRadius' => [ |
| 965 |
'type' => 'object', |
| 966 |
'default' => (object)['lg' =>'', 'unit' =>'px'], |
| 967 |
'style' => [ |
| 968 |
(object)[ |
| 969 |
'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count { border-radius:{{counterRadius}}; }' |
| 970 |
], |
| 971 |
], |
| 972 |
], |
| 973 |
|
| 974 |
//-------------------------- |
| 975 |
// Inner Content Setting/Style |
| 976 |
//-------------------------- |
| 977 |
'contentWrapBg' => [ |
| 978 |
'type' => 'string', |
| 979 |
'default' => '', |
| 980 |
'style' => [ |
| 981 |
(object)[ |
| 982 |
'depends' => [ |
| 983 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 984 |
], |
| 985 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-item a .ultp-taxonomy-lt5-content { background:{{contentWrapBg}}; }' |
| 986 |
], |
| 987 |
], |
| 988 |
], |
| 989 |
'contentWrapHoverBg' => [ |
| 990 |
'type' => 'string', |
| 991 |
'style' => [ |
| 992 |
(object)[ |
| 993 |
'depends' => [ |
| 994 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 995 |
], |
| 996 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-item a:hover .ultp-taxonomy-lt5-content { background:{{contentWrapHoverBg}}; }' |
| 997 |
], |
| 998 |
], |
| 999 |
], |
| 1000 |
'contentWrapBorder' => [ |
| 1001 |
'type' => 'object', |
| 1002 |
'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], |
| 1003 |
'style' => [ |
| 1004 |
(object)[ |
| 1005 |
'depends' => [ |
| 1006 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1007 |
], |
| 1008 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a' |
| 1009 |
], |
| 1010 |
], |
| 1011 |
], |
| 1012 |
'contentWrapHoverBorder' => [ |
| 1013 |
'type' => 'object', |
| 1014 |
'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], |
| 1015 |
'style' => [ |
| 1016 |
(object)[ |
| 1017 |
'depends' => [ |
| 1018 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1019 |
], |
| 1020 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a:hover' |
| 1021 |
], |
| 1022 |
], |
| 1023 |
], |
| 1024 |
'contentWrapRadius' => [ |
| 1025 |
'type' => 'object', |
| 1026 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], |
| 1027 |
'style' => [ |
| 1028 |
(object)[ |
| 1029 |
'depends' => [ |
| 1030 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1031 |
], |
| 1032 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a { border-radius: {{contentWrapRadius}}; }' |
| 1033 |
], |
| 1034 |
], |
| 1035 |
], |
| 1036 |
'contentWrapHoverRadius' => [ |
| 1037 |
'type' => 'object', |
| 1038 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], |
| 1039 |
'style' => [ |
| 1040 |
(object)[ |
| 1041 |
'depends' => [ |
| 1042 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1043 |
], |
| 1044 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a:hover { border-radius: {{contentWrapHoverRadius}}; }' |
| 1045 |
], |
| 1046 |
], |
| 1047 |
], |
| 1048 |
'contentWrapShadow' => [ |
| 1049 |
'type' => 'object', |
| 1050 |
'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], |
| 1051 |
'style' => [ |
| 1052 |
(object)[ |
| 1053 |
'depends' => [ |
| 1054 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1055 |
], |
| 1056 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a' |
| 1057 |
], |
| 1058 |
], |
| 1059 |
], |
| 1060 |
'contentWrapHoverShadow' => [ |
| 1061 |
'type' => 'object', |
| 1062 |
'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], |
| 1063 |
'style' => [ |
| 1064 |
(object)[ |
| 1065 |
'depends' => [ |
| 1066 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1067 |
], |
| 1068 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a:hover' |
| 1069 |
], |
| 1070 |
], |
| 1071 |
], |
| 1072 |
'contentWrapPadding' => [ |
| 1073 |
'type' => 'object', |
| 1074 |
'default' => (object)['lg' =>(object)['unit' =>'px']], |
| 1075 |
'style' => [ |
| 1076 |
(object)[ |
| 1077 |
'depends' => [ |
| 1078 |
(object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']], |
| 1079 |
], |
| 1080 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-item a .ultp-taxonomy-lt5-content { padding: {{contentWrapPadding}}; }' |
| 1081 |
], |
| 1082 |
], |
| 1083 |
], |
| 1084 |
|
| 1085 |
//-------------------------- |
| 1086 |
// Image Setting/Style |
| 1087 |
//-------------------------- |
| 1088 |
'imgCrop' => [ |
| 1089 |
'type' => 'string', |
| 1090 |
'default' => (ultimate_post()->get_setting('disable_image_size') == 'yes' ? 'full' : 'ultp_layout_landscape'), |
| 1091 |
], |
| 1092 |
'imgWidth' => [ |
| 1093 |
'type' => 'object', |
| 1094 |
'default' => (object)['lg' =>'', 'ulg' =>'%'], |
| 1095 |
'style' => [ |
| 1096 |
(object)[ |
| 1097 |
'depends' => [ |
| 1098 |
(object)['key'=>'layout','condition'=>'==','value'=>['4','5']], |
| 1099 |
], |
| 1100 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-4 a img, {{ULTP}} .ultp-taxonomy-layout-5 a img { max-width: {{imgWidth}}; }' |
| 1101 |
], |
| 1102 |
], |
| 1103 |
], |
| 1104 |
'imgHeight' => [ |
| 1105 |
'type' => 'object', |
| 1106 |
'default' => (object)['lg' =>'', 'unit' =>'px'], |
| 1107 |
'style' => [ |
| 1108 |
(object)[ |
| 1109 |
'depends' => [ |
| 1110 |
(object)['key'=>'layout','condition'=>'==','value'=>['4','5']], |
| 1111 |
], |
| 1112 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-4 a img, {{ULTP}} .ultp-taxonomy-layout-5 a img {object-fit: cover; height: {{imgHeight}}; }' |
| 1113 |
], |
| 1114 |
], |
| 1115 |
], |
| 1116 |
'imgSpacing' => [ |
| 1117 |
'type' => 'object', |
| 1118 |
'default' => (object)['lg'=>''], |
| 1119 |
'style' => [ |
| 1120 |
(object)[ |
| 1121 |
'depends' => [ |
| 1122 |
(object)['key'=>'layout','condition'=>'==','value'=>['4','5']], |
| 1123 |
], |
| 1124 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-4 a img, {{ULTP}} .ultp-taxonomy-layout-5 a img { margin-bottom: {{imgSpacing}}px; }' |
| 1125 |
], |
| 1126 |
], |
| 1127 |
], |
| 1128 |
'contentAlign' => [ |
| 1129 |
'type' => 'string', |
| 1130 |
'default' => "center", |
| 1131 |
'style' => [ |
| 1132 |
(object)[ |
| 1133 |
'depends' => [ |
| 1134 |
(object)['key'=>'contentAlign','condition'=>'==','value'=>'left'], |
| 1135 |
], |
| 1136 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-5 li a, {{ULTP}} .ultp-taxonomy-layout-4 li a { text-align:{{contentAlign}}; } {{ULTP}} .ultp-taxonomy-layout-5 li a .ultp-taxonomy-lt5-content { justify-content: start; }' |
| 1137 |
], |
| 1138 |
(object)[ |
| 1139 |
'depends' => [ |
| 1140 |
(object)['key'=>'contentAlign','condition'=>'==','value'=>'center'], |
| 1141 |
], |
| 1142 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-5 li a, {{ULTP}} .ultp-taxonomy-layout-4 li a { text-align:{{contentAlign}}; } {{ULTP}} .ultp-taxonomy-layout-5 li a .ultp-taxonomy-lt5-content { justify-content: center; }' |
| 1143 |
], |
| 1144 |
(object)[ |
| 1145 |
'depends' => [ |
| 1146 |
(object)['key'=>'contentAlign','condition'=>'==','value'=>'right'], |
| 1147 |
], |
| 1148 |
'selector'=>'{{ULTP}} .ultp-taxonomy-layout-5 li a, {{ULTP}} .ultp-taxonomy-layout-4 li a { text-align:{{contentAlign}}; } {{ULTP}} .ultp-taxonomy-layout-5 li a .ultp-taxonomy-lt5-content { justify-content: end; }' |
| 1149 |
], |
| 1150 |
], |
| 1151 |
], |
| 1152 |
|
| 1153 |
//-------------------------- |
| 1154 |
// Separator |
| 1155 |
//-------------------------- |
| 1156 |
'separatorShow' => [ |
| 1157 |
'type' => 'boolean', |
| 1158 |
'default' => false, |
| 1159 |
'depends' => [ |
| 1160 |
(object)['key'=>'taxGridEn','condition'=>'!=','value'=>true], |
| 1161 |
], |
| 1162 |
], |
| 1163 |
'septColor' => [ |
| 1164 |
'type' => 'string', |
| 1165 |
'default' => '#e5e5e5', |
| 1166 |
'style' => [ |
| 1167 |
(object)[ |
| 1168 |
'depends' => [ |
| 1169 |
(object)['key'=>'separatorShow','condition'=>'==','value'=>true], |
| 1170 |
], |
| 1171 |
'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { border-bottom-color:{{septColor}}; }' |
| 1172 |
], |
| 1173 |
], |
| 1174 |
], |
| 1175 |
'septStyle' => [ |
| 1176 |
'type' => 'string', |
| 1177 |
'default' => 'solid', |
| 1178 |
'style' => [ |
| 1179 |
(object)[ |
| 1180 |
'depends' => [ |
| 1181 |
(object)['key'=>'separatorShow','condition'=>'==','value'=>true], |
| 1182 |
], |
| 1183 |
'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { border-bottom-style:{{septStyle}}; }' |
| 1184 |
], |
| 1185 |
], |
| 1186 |
], |
| 1187 |
'septSize' => [ |
| 1188 |
'type' => 'string', |
| 1189 |
'default' => (object)['lg'=>'1'], |
| 1190 |
'style' => [ |
| 1191 |
(object)[ |
| 1192 |
'depends' => [ |
| 1193 |
(object)['key'=>'separatorShow','condition'=>'==','value'=>true], |
| 1194 |
], |
| 1195 |
'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { border-bottom-width: {{septSize}}px; }' |
| 1196 |
], |
| 1197 |
], |
| 1198 |
], |
| 1199 |
'septSpace' => [ |
| 1200 |
'type' => 'object', |
| 1201 |
'default' => (object)['lg'=>'5'], |
| 1202 |
'style' => [ |
| 1203 |
(object)[ |
| 1204 |
'depends' => [ |
| 1205 |
(object)['key'=>'taxGridEn','condition'=>'!=','value'=>true], |
| 1206 |
], |
| 1207 |
'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { padding-bottom: {{septSpace}}px; } {{ULTP}} .ultp-block-item:not(:last-of-type) { margin-bottom: {{septSpace}}px; }' |
| 1208 |
], |
| 1209 |
], |
| 1210 |
], |
| 1211 |
|
| 1212 |
//-------------------------- |
| 1213 |
// Custom Wrapper Style |
| 1214 |
//-------------------------- |
| 1215 |
'customTaxColor' => [ |
| 1216 |
'type' => 'boolean', |
| 1217 |
'default' => false, |
| 1218 |
], |
| 1219 |
'seperatorTaxLink' => [ |
| 1220 |
'type' => 'string', |
| 1221 |
'default' => admin_url( 'edit-tags.php?taxonomy=category' ), |
| 1222 |
'style' => [ |
| 1223 |
(object)[ |
| 1224 |
'depends' => [ |
| 1225 |
(object)['key'=>'customTaxColor','condition'=>'==','value'=>true], |
| 1226 |
] |
| 1227 |
] |
| 1228 |
] |
| 1229 |
], |
| 1230 |
'TaxAnimation' => [ |
| 1231 |
'type' => 'string', |
| 1232 |
'default' => 'none' |
| 1233 |
], |
| 1234 |
|
| 1235 |
'TaxWrapBg' => [ |
| 1236 |
'type' => 'string', |
| 1237 |
'default' => '', |
| 1238 |
'style' => [ |
| 1239 |
(object)[ |
| 1240 |
'depends' => [ |
| 1241 |
// (object)['key'=>'layout','condition'=>'==','value'=>[2, 3, 6, 7, 8]], |
| 1242 |
(object)['key'=>'customTaxColor','condition'=>'!=','value'=>true], |
| 1243 |
], |
| 1244 |
'selector'=>'{{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt8-overlay { background:{{TaxWrapBg}}; }' |
| 1245 |
], |
| 1246 |
], |
| 1247 |
], |
| 1248 |
'TaxWrapHoverBg' => [ |
| 1249 |
'type' => 'string', |
| 1250 |
'style' => [ |
| 1251 |
(object)[ |
| 1252 |
'depends' => [ |
| 1253 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1254 |
(object)['key'=>'customTaxColor','condition'=>'!=','value'=>true], |
| 1255 |
], |
| 1256 |
'selector'=>'{{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt8-overlay { background:{{TaxWrapHoverBg}}; }' |
| 1257 |
], |
| 1258 |
], |
| 1259 |
], |
| 1260 |
'TaxWrapBorder' => [ |
| 1261 |
'type' => 'object', |
| 1262 |
'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], |
| 1263 |
'style' => [ |
| 1264 |
(object)[ |
| 1265 |
'depends' => [ |
| 1266 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1267 |
], |
| 1268 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a' |
| 1269 |
], |
| 1270 |
], |
| 1271 |
], |
| 1272 |
'TaxWrapHoverBorder' => [ |
| 1273 |
'type' => 'object', |
| 1274 |
'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], |
| 1275 |
'style' => [ |
| 1276 |
(object)[ |
| 1277 |
'depends' => [ |
| 1278 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1279 |
], |
| 1280 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a:hover' |
| 1281 |
], |
| 1282 |
], |
| 1283 |
], |
| 1284 |
'TaxWrapShadow' => [ |
| 1285 |
'type' => 'object', |
| 1286 |
'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], |
| 1287 |
'style' => [ |
| 1288 |
(object)[ |
| 1289 |
'depends' => [ |
| 1290 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1291 |
], |
| 1292 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a' |
| 1293 |
], |
| 1294 |
], |
| 1295 |
], |
| 1296 |
'TaxWrapHoverShadow' => [ |
| 1297 |
'type' => 'object', |
| 1298 |
'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], |
| 1299 |
'style' => [ |
| 1300 |
(object)[ |
| 1301 |
'depends' => [ |
| 1302 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1303 |
], |
| 1304 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a:hover' |
| 1305 |
], |
| 1306 |
], |
| 1307 |
], |
| 1308 |
'TaxWrapRadius' => [ |
| 1309 |
'type' => 'object', |
| 1310 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], |
| 1311 |
'style' => [ |
| 1312 |
(object)[ |
| 1313 |
'depends' => [ |
| 1314 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1315 |
], |
| 1316 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a { border-radius: {{TaxWrapRadius}}; }' |
| 1317 |
], |
| 1318 |
], |
| 1319 |
], |
| 1320 |
'TaxWrapHoverRadius' => [ |
| 1321 |
'type' => 'object', |
| 1322 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], |
| 1323 |
'style' => [ |
| 1324 |
(object)[ |
| 1325 |
'depends' => [ |
| 1326 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1327 |
], |
| 1328 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a:hover { border-radius: {{TaxWrapHoverRadius}}; }' |
| 1329 |
], |
| 1330 |
], |
| 1331 |
], |
| 1332 |
'customOpacityTax' => [ |
| 1333 |
'type' => 'string', |
| 1334 |
'default' => .6, |
| 1335 |
'style' => [ |
| 1336 |
(object)[ |
| 1337 |
'selector'=>'{{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt8-overlay { opacity: {{customOpacityTax}}; }' |
| 1338 |
], |
| 1339 |
], |
| 1340 |
], |
| 1341 |
'customTaxOpacityHover' => [ |
| 1342 |
'type' => 'string', |
| 1343 |
'default' => .9, |
| 1344 |
'style' => [ |
| 1345 |
(object)[ |
| 1346 |
'selector'=>'{{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt8-overlay { opacity: {{customTaxOpacityHover}}; }' |
| 1347 |
], |
| 1348 |
], |
| 1349 |
], |
| 1350 |
'TaxWrapPadding' => [ |
| 1351 |
'type' => 'object', |
| 1352 |
'default' => (object)['lg' =>(object)[ 'unit' =>'px']], |
| 1353 |
'style' => [ |
| 1354 |
(object)[ |
| 1355 |
'depends' => [ |
| 1356 |
(object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']], |
| 1357 |
], |
| 1358 |
'selector'=>'{{ULTP}} .ultp-taxonomy-item a { padding: {{TaxWrapPadding}}; }' |
| 1359 |
], |
| 1360 |
], |
| 1361 |
], |
| 1362 |
|
| 1363 |
|
| 1364 |
//-------------------------- |
| 1365 |
// Wrapper Style |
| 1366 |
//-------------------------- |
| 1367 |
'wrapBg' => [ |
| 1368 |
'type' => 'object', |
| 1369 |
'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#f5f5f5'], |
| 1370 |
'style' => [ |
| 1371 |
(object)[ |
| 1372 |
'selector'=>'{{ULTP}} .ultp-block-wrapper' |
| 1373 |
], |
| 1374 |
], |
| 1375 |
], |
| 1376 |
'wrapBorder' => [ |
| 1377 |
'type' => 'object', |
| 1378 |
'default' => (object)['openBorder'=>0, 'width' =>(object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], |
| 1379 |
'style' => [ |
| 1380 |
(object)[ |
| 1381 |
'selector'=>'{{ULTP}} .ultp-block-wrapper' |
| 1382 |
], |
| 1383 |
], |
| 1384 |
], |
| 1385 |
'wrapShadow' => [ |
| 1386 |
'type' => 'object', |
| 1387 |
'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], |
| 1388 |
'style' => [ |
| 1389 |
(object)[ |
| 1390 |
'selector'=>'{{ULTP}} .ultp-block-wrapper' |
| 1391 |
], |
| 1392 |
], |
| 1393 |
], |
| 1394 |
'wrapRadius' => [ |
| 1395 |
'type' => 'object', |
| 1396 |
'default' => (object)['lg' =>'', 'unit' =>'px'], |
| 1397 |
'style' => [ |
| 1398 |
(object)[ |
| 1399 |
'selector'=>'{{ULTP}} .ultp-block-wrapper { border-radius:{{wrapRadius}}; }' |
| 1400 |
], |
| 1401 |
], |
| 1402 |
], |
| 1403 |
'wrapHoverBackground' => [ |
| 1404 |
'type' => 'object', |
| 1405 |
'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#037fff'], |
| 1406 |
'style' => [ |
| 1407 |
(object)[ |
| 1408 |
'selector'=>'{{ULTP}} .ultp-block-wrapper:hover' |
| 1409 |
], |
| 1410 |
], |
| 1411 |
], |
| 1412 |
'wrapHoverBorder' => [ |
| 1413 |
'type' => 'object', |
| 1414 |
'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], |
| 1415 |
'style' => [ |
| 1416 |
(object)[ |
| 1417 |
'selector'=>'{{ULTP}} .ultp-block-wrapper:hover' |
| 1418 |
], |
| 1419 |
], |
| 1420 |
], |
| 1421 |
'wrapHoverRadius' => [ |
| 1422 |
'type' => 'object', |
| 1423 |
'default' => (object)['lg' =>'', 'unit' =>'px'], |
| 1424 |
'style' => [ |
| 1425 |
(object)[ |
| 1426 |
'selector'=>'{{ULTP}} .ultp-block-wrapper:hover { border-radius:{{wrapHoverRadius}}; }' |
| 1427 |
], |
| 1428 |
], |
| 1429 |
], |
| 1430 |
'wrapHoverShadow' => [ |
| 1431 |
'type' => 'object', |
| 1432 |
'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], |
| 1433 |
'style' => [ |
| 1434 |
(object)[ |
| 1435 |
'selector'=>'{{ULTP}} .ultp-block-wrapper:hover' |
| 1436 |
], |
| 1437 |
], |
| 1438 |
], |
| 1439 |
'wrapMargin' => [ |
| 1440 |
'type' => 'object', |
| 1441 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], |
| 1442 |
'style' => [ |
| 1443 |
(object)[ |
| 1444 |
'selector'=>'{{ULTP}} .ultp-block-wrapper { margin:{{wrapMargin}}; }' |
| 1445 |
], |
| 1446 |
], |
| 1447 |
], |
| 1448 |
'wrapOuterPadding' => [ |
| 1449 |
'type' => 'object', |
| 1450 |
'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']], |
| 1451 |
'style' => [ |
| 1452 |
(object)[ |
| 1453 |
'selector'=>'{{ULTP}} .ultp-block-wrapper { padding:{{wrapOuterPadding}}; }' |
| 1454 |
], |
| 1455 |
], |
| 1456 |
], |
| 1457 |
'advanceId' => [ |
| 1458 |
'type' => 'string', |
| 1459 |
'default' => '', |
| 1460 |
], |
| 1461 |
'advanceZindex' => [ |
| 1462 |
'type' => 'string', |
| 1463 |
'default' => '', |
| 1464 |
'style' => [ |
| 1465 |
(object)[ |
| 1466 |
'selector' => '{{ULTP}} .ultp-block-wrapper{z-index:{{advanceZindex}};}' |
| 1467 |
], |
| 1468 |
], |
| 1469 |
], |
| 1470 |
'hideExtraLarge' => [ |
| 1471 |
'type' => 'boolean', |
| 1472 |
'default' => false, |
| 1473 |
'style' => [ |
| 1474 |
(object)[ |
| 1475 |
'selector' => '{{ULTP}} {display:none;}' |
| 1476 |
], |
| 1477 |
], |
| 1478 |
], |
| 1479 |
'hideTablet' => [ |
| 1480 |
'type' => 'boolean', |
| 1481 |
'default' => false, |
| 1482 |
'style' => [ |
| 1483 |
(object)[ |
| 1484 |
'selector' => '{{ULTP}} {display:none;}' |
| 1485 |
], |
| 1486 |
], |
| 1487 |
], |
| 1488 |
'hideMobile' => [ |
| 1489 |
'type' => 'boolean', |
| 1490 |
'default' => false, |
| 1491 |
'style' => [ |
| 1492 |
(object)[ |
| 1493 |
'selector' => '{{ULTP}} {display:none;}' |
| 1494 |
], |
| 1495 |
], |
| 1496 |
], |
| 1497 |
'advanceCss' => [ |
| 1498 |
'type' => 'string', |
| 1499 |
'default' => '', |
| 1500 |
'style' => [(object)['selector' => '']], |
| 1501 |
] |
| 1502 |
); |
| 1503 |
|
| 1504 |
if ($default) { |
| 1505 |
$temp = array(); |
| 1506 |
foreach ($attributes as $key => $value) { |
| 1507 |
if (isset($value['default'])) { |
| 1508 |
$temp[$key] = $value['default']; |
| 1509 |
} |
| 1510 |
} |
| 1511 |
return $temp; |
| 1512 |
} else { |
| 1513 |
return $attributes; |
| 1514 |
} |
| 1515 |
} |
| 1516 |
|
| 1517 |
public function register() { |
| 1518 |
register_block_type( 'ultimate-post/ultp-taxonomy', |
| 1519 |
array( |
| 1520 |
'editor_script' => 'ultp-blocks-editor-script', |
| 1521 |
'editor_style' => 'ultp-blocks-editor-css', |
| 1522 |
'attributes' => $this->get_attributes(), |
| 1523 |
'render_callback' => array($this, 'content') |
| 1524 |
) |
| 1525 |
); |
| 1526 |
} |
| 1527 |
|
| 1528 |
public function content($attr, $noAjax) { |
| 1529 |
|
| 1530 |
if (!$noAjax) { |
| 1531 |
$paged = is_front_page() ? get_query_var('page') : get_query_var('paged'); |
| 1532 |
$attr['paged'] = $paged ? $paged : 1; |
| 1533 |
} |
| 1534 |
|
| 1535 |
$block_name = 'ultp-taxonomy'; |
| 1536 |
$wraper_before = $wraper_after = $post_loop = ''; |
| 1537 |
|
| 1538 |
$recent_posts = ultimate_post()->get_category_data( json_decode($attr['taxValue']), $attr['queryNumber'], $attr['taxType'], $attr['taxSlug'] ); |
| 1539 |
|
| 1540 |
if (!empty($recent_posts)) { |
| 1541 |
$wraper_before .= '<div '.($attr['advanceId']?'id="'.$attr['advanceId'].'" ':'').' class="wp-block-ultimate-post-'.$block_name.' ultp-block-'.$attr["blockId"].' '.(isset($attr["class"])?$attr["class"]:'').'">'; |
| 1542 |
$wraper_before .= '<div class="ultp-block-wrapper">'; |
| 1543 |
|
| 1544 |
// Loading |
| 1545 |
$wraper_before .= ultimate_post()->loading(); |
| 1546 |
|
| 1547 |
if ($attr['headingShow']) { |
| 1548 |
$wraper_before .= '<div class="ultp-heading-filter">'; |
| 1549 |
$wraper_before .= '<div class="ultp-heading-filter-in">'; |
| 1550 |
// Heading |
| 1551 |
include ULTP_PATH.'blocks/template/heading.php'; |
| 1552 |
$wraper_before .= '</div>'; |
| 1553 |
$wraper_before .= '</div>'; |
| 1554 |
} |
| 1555 |
$wraper_before .= '<div class="ultp-block-items-wrap">'; |
| 1556 |
$idx = $noAjax ? 1 : 0; |
| 1557 |
|
| 1558 |
$wraper_before .= '<ul class="ultp-taxonomy-items '.(isset($attr["TaxAnimation"])? ' ultp-taxonomy-animation-' .$attr["TaxAnimation"]:'').' ultp-taxonomy-column-'.json_decode(json_encode($attr['columns']), True)['lg'].' ultp-taxonomy-layout-'.$attr['layout'].'">'; |
| 1559 |
foreach ($recent_posts as $value) { |
| 1560 |
$_style = ( ($attr["customTaxColor"] && $value['color']) ? ' style="background-color:'.$value['color'].';"' : ''); |
| 1561 |
$_style_color = ((in_array($attr['layout'], [1,4,5]) && $value['color'] && $attr["customTaxTitleColor"] ) ? ' style="color:'.$value['color'].';"' : ''); |
| 1562 |
$_style_title_bg = ((in_array($attr['layout'], [7,8]) && $value['color'] && $attr["customTaxTitleColor"] ) ? ' style="background:'.$value['color'].';"' : ''); |
| 1563 |
|
| 1564 |
$post_loop .= '<li class="ultp-block-item ultp-taxonomy-item">'; |
| 1565 |
|
| 1566 |
$style = in_array($attr['layout'], [2,3,6,7,8]) ? 'style="'.($value['image'] ? 'background-image: url('.$value['image'][ $attr['imgCrop']].')' : 'background-color:'.$value['color']).'"' : ''; |
| 1567 |
$name = ($attr['titleShow'] && $value['name']) ? '<'.$attr['titleTag'].' class="ultp-taxonomy-name" '.$_style_color.'>'.$value['name'].'</'.$attr['titleTag'].'>' : ''; |
| 1568 |
$count = ($attr['countShow'] && $value['count']) ? '<span class="ultp-taxonomy-count" '.$_style_color.'>'.$value['count'].'</span>' : ''; |
| 1569 |
$excerpt = ($attr['excerptShow'] && $value['desc']) ? '<div class="ultp-taxonomy-desc">'.$value['desc'].'</div>' : ''; |
| 1570 |
|
| 1571 |
$post_loop .= '<a href="'.$value['url'].'" '.($attr['layout'] != 3 ? $style : '').'>'; |
| 1572 |
switch ($attr['layout']) { |
| 1573 |
case 1: |
| 1574 |
$post_loop .= $name.$count.$excerpt; |
| 1575 |
break; |
| 1576 |
case 2: |
| 1577 |
$post_loop .= '<div class="ultp-taxonomy-lt2-overlay"'.$_style.'></div><div class="ultp-taxonomy-lt2-content">'.$name.'<span class="ultp-taxonomy-bar"></span>'.$count.'</div>'.$excerpt; |
| 1578 |
break; |
| 1579 |
case 3: |
| 1580 |
$post_loop .= '<div class="ultp-taxonomy-lt3-img" '.$style.'></div><div class="ultp-taxonomy-lt3-overlay"'.$_style.'></div><div class="ultp-taxonomy-lt3-content">'.$name.'<span class="ultp-taxonomy-bar"></span>'.$count.'</div>'.$excerpt; |
| 1581 |
break; |
| 1582 |
case 4: |
| 1583 |
$img = $value['image'] ? '<img src="'.$value['image'][ $attr['imgCrop']].'" alt="'.$value['name'].'"/>' : ''; |
| 1584 |
$post_loop .= $img.'<div class="ultp-taxonomy-lt4-content">'.$name.$count.'</div>'.$excerpt; |
| 1585 |
break; |
| 1586 |
case 5: |
| 1587 |
$img = $value['image'] ? '<img src="'.$value['image'][ $attr['imgCrop']].'" alt="'.$value['name'].'"/>' : ''; |
| 1588 |
$post_loop .= $img.'<span class="ultp-taxonomy-lt5-content">'.$name.$count.$excerpt.'</span>'; |
| 1589 |
break; |
| 1590 |
case 6: |
| 1591 |
$post_loop .= '<div class="ultp-taxonomy-lt6-overlay"'.$_style.'></div>'.$name.$count.$excerpt; |
| 1592 |
break; |
| 1593 |
case 7: |
| 1594 |
$post_loop .= '<div class="ultp-taxonomy-lt7-overlay"'.$_style.'></div><'.$attr['titleTag'].' class="ultp-taxonomy-name" '.$_style_title_bg.'>'.$value['name'].$count.'</'.$attr['titleTag'].'>'.$excerpt; |
| 1595 |
break; |
| 1596 |
case 8: |
| 1597 |
$post_loop .= '<div class="ultp-taxonomy-lt8-overlay"'.$_style.'></div><'.$attr['titleTag'].' class="ultp-taxonomy-name" '.$_style_title_bg.'>'.$value['name'].$count.'</'.$attr['titleTag'].'>'.$excerpt; |
| 1598 |
break; |
| 1599 |
default: |
| 1600 |
# code... |
| 1601 |
break; |
| 1602 |
} |
| 1603 |
$post_loop .= '</a>'; |
| 1604 |
$post_loop .= '</li>'; |
| 1605 |
$idx ++; |
| 1606 |
} |
| 1607 |
$wraper_after .= '</ul>'; |
| 1608 |
$wraper_after .= '</div>';//ultp-block-items-wrap |
| 1609 |
$wraper_after .= '</div>'; |
| 1610 |
$wraper_after .= '</div>'; |
| 1611 |
wp_reset_query(); |
| 1612 |
}else { |
| 1613 |
$wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); |
| 1614 |
} |
| 1615 |
|
| 1616 |
return $noAjax ? $post_loop : $wraper_before.$post_loop.$wraper_after; |
| 1617 |
} |
| 1618 |
|
| 1619 |
} |