| @@ -1,2335 +1,453 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace ULTP\blocks; |
| 3 | 4 | |
| 4 | -defined('ABSPATH') || exit; | |
| 5 | +defined( 'ABSPATH' ) || exit; | |
| 5 | 6 | |
| 6 | -class Post_Grid_3{ | |
| 7 | +class Post_Grid_3 { | |
| 7 | 8 | |
| 8 | - public function __construct() { | |
| 9 | - add_action('init', array($this, 'register')); | |
| 10 | - } | |
| 9 | + public function __construct() { | |
| 10 | + add_action( 'init', array( $this, 'register' ) ); | |
| 11 | + } | |
| 11 | 12 | |
| 12 | - public function get_attributes($default = false){ | |
| 13 | + public function get_attributes() { | |
| 13 | 14 | |
| 14 | - $attributes = array( | |
| 15 | - 'blockId' => [ | |
| 16 | - 'type' => 'string', | |
| 17 | - 'default' => '', | |
| 18 | - ], | |
| 15 | + return array( | |
| 16 | + 'blockId' => '', | |
| 17 | + 'previewImg' => '', | |
| 18 | + 'advFilterEnable' => false, | |
| 19 | + 'advPaginationEnable' => false, | |
| 20 | + 'defQueryTax' => array(), | |
| 21 | + 'advRelation' => 'AND', | |
| 22 | + 'infiniteScroll' => false, | |
| 19 | 23 | |
| 20 | - //-------------------------- | |
| 21 | - // Layout | |
| 22 | - //-------------------------- | |
| 23 | - 'layout' => [ | |
| 24 | - 'type' => 'string', | |
| 25 | - 'default' => 'layout1', | |
| 26 | - ], | |
| 24 | + // -------------------------- | |
| 25 | + // Layout | |
| 26 | + // -------------------------- | |
| 27 | + 'layout' => 'layout1', | |
| 27 | 28 | |
| 28 | - //-------------------------- | |
| 29 | - // Query Setting | |
| 30 | - //-------------------------- | |
| 31 | - 'queryQuick' => [ | |
| 32 | - 'type' => 'string', | |
| 33 | - 'default' =>'', | |
| 34 | - ], | |
| 35 | - 'queryNumber' => [ | |
| 36 | - 'type' => 'string', | |
| 37 | - 'default' => 5, | |
| 38 | - 'style' => [ | |
| 39 | - (object)[ | |
| 40 | - 'depends' => [ | |
| 41 | - (object)['key'=>'layout','condition'=>'==','value'=>['layout1', 'layout2']], | |
| 42 | - ], | |
| 43 | - ], | |
| 44 | - ], | |
| 45 | - ], | |
| 46 | - 'queryType' => [ | |
| 47 | - 'type' => 'string', | |
| 48 | - 'default' => 'post' | |
| 49 | - ], | |
| 50 | - 'queryTax' => [ | |
| 51 | - 'type' => 'string', | |
| 52 | - 'default' => 'category' | |
| 53 | - ], | |
| 54 | - 'queryCat' => [ | |
| 55 | - 'type' => 'string', | |
| 56 | - 'default' => '[]', | |
| 57 | - 'style' => [ | |
| 58 | - (object)[ | |
| 59 | - 'depends' => [(object)['key' => 'queryTax','condition' => '==','value' => 'category']] | |
| 60 | - ], | |
| 61 | - ], | |
| 62 | - ], | |
| 63 | - 'queryTag' => [ | |
| 64 | - 'type' => 'string', | |
| 65 | - 'default' => '[]', | |
| 66 | - 'style' => [ | |
| 67 | - (object)[ | |
| 68 | - 'depends' => [(object)['key' => 'queryTax','condition' => '==','value' => 'post_tag']] | |
| 69 | - ], | |
| 70 | - ], | |
| 71 | - ], | |
| 72 | - 'queryOrderBy' => [ | |
| 73 | - 'type' => 'string', | |
| 74 | - 'default' => 'date', | |
| 75 | - ], | |
| 76 | - 'metaKey' => [ | |
| 77 | - 'type' => 'string', | |
| 78 | - 'default' => 'custom_meta_key', | |
| 79 | - 'style' => [ | |
| 80 | - (object)[ | |
| 81 | - 'depends' => [(object)['key' => 'queryOrderBy','condition' => '==','value' => 'meta_value_num']] | |
| 82 | - ], | |
| 83 | - ], | |
| 84 | - ], | |
| 85 | - 'queryOrder' => [ | |
| 86 | - 'type' => 'string', | |
| 87 | - 'default' => 'desc', | |
| 88 | - ], | |
| 89 | - 'queryInclude' => [ | |
| 90 | - 'type' => 'string', | |
| 91 | - 'default' => '' | |
| 92 | - ], | |
| 93 | - 'queryExclude' => [ | |
| 94 | - 'type' => 'string', | |
| 95 | - 'default' => '' | |
| 96 | - ], | |
| 97 | - 'queryOffset' => [ | |
| 98 | - 'type' => 'string', | |
| 99 | - 'default' => '0', | |
| 100 | - ], | |
| 101 | - //-------------------------- | |
| 102 | - // General Setting | |
| 103 | - //-------------------------- | |
| 104 | - 'contentAlign' => [ | |
| 105 | - 'type' => 'string', | |
| 106 | - 'default' => "left", | |
| 107 | - 'style' => [ | |
| 108 | - (object)[ | |
| 109 | - 'depends' => [ | |
| 110 | - (object)['key'=>'contentAlign','condition'=>'==','value'=>'left'], | |
| 111 | - ], | |
| 112 | - 'selector'=>'{{ULTP}} .ultp-block-content { text-align:{{contentAlign}}; } {{ULTP}} .ultp-block-meta {justify-content: flex-start;}' | |
| 113 | - ], | |
| 114 | - (object)[ | |
| 115 | - 'depends' => [ | |
| 116 | - (object)['key'=>'contentAlign','condition'=>'==','value'=>'center'], | |
| 117 | - ], | |
| 118 | - 'selector'=>'{{ULTP}} .ultp-block-content { text-align:{{contentAlign}}; } {{ULTP}} .ultp-block-meta {justify-content: center;}' | |
| 119 | - ], | |
| 120 | - (object)[ | |
| 121 | - 'depends' => [ | |
| 122 | - (object)['key'=>'contentAlign','condition'=>'==','value'=>'right'], | |
| 123 | - ], | |
| 124 | - 'selector'=>'{{ULTP}} .ultp-block-content { text-align:{{contentAlign}}; } {{ULTP}} .ultp-block-meta {justify-content: flex-end;}' | |
| 125 | - ], | |
| 126 | - ], | |
| 127 | - ], | |
| 128 | - 'column' => [ | |
| 129 | - 'type' => 'string', | |
| 130 | - 'default' => '2', | |
| 131 | - 'style' => [ | |
| 132 | - (object)[ | |
| 133 | - 'depends' => [ | |
| 134 | - (object)['key'=>'layout','condition'=>'==','value'=>['layout1','layout2']], | |
| 135 | - ], | |
| 136 | - 'selector'=>'{{ULTP}} .ultp-block-row { grid-template-columns: repeat({{column}}, 1fr); }' | |
| 137 | - ], | |
| 138 | - (object)[ | |
| 139 | - 'selector'=>'{{ULTP}} .ultp-block-row { grid-template-columns: repeat({{column}}, 1fr); }' | |
| 140 | - ], | |
| 141 | - ], | |
| 142 | - ], | |
| 143 | - 'columnGridGap' => [ | |
| 144 | - 'type' => 'object', | |
| 145 | - 'default' => (object)['lg' =>'20', 'unit' =>'px'], | |
| 146 | - 'style' => [ | |
| 147 | - (object)[ | |
| 148 | - 'selector'=>'{{ULTP}} .ultp-block-row { grid-gap: {{columnGridGap}}; }' | |
| 149 | - ], | |
| 150 | - ], | |
| 151 | - ], | |
| 152 | - 'overlayHeight' => [ | |
| 153 | - 'type' => 'object', | |
| 154 | - 'default' => (object)['lg' =>'450', 'unit' =>'px'], | |
| 155 | - 'style' => [ | |
| 156 | - (object)[ | |
| 157 | - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-block-image img, {{ULTP}} .ultp-block-item .ultp-block-empty-image {width: 100%; object-fit: cover; height: 100%; } {{ULTP}} .ultp-block-row.ultp-layout5 .ultp-block-item .ultp-block-content-overlay, {{ULTP}} .ultp-block-row.ultp-layout3 .ultp-block-item .ultp-block-content-overlay, {{ULTP}} .ultp-block-row.ultp-layout4 .ultp-block-item .ultp-block-content-overlay {height: calc({{overlayHeight}}/2);} {{ULTP}} .ultp-block-row.ultp-layout1 .ultp-block-item .ultp-block-content-overlay, {{ULTP}} .ultp-block-row.ultp-layout2 .ultp-block-item .ultp-block-content-overlay {height: calc({{overlayHeight}}/2.5);} {{ULTP}} .ultp-block-row.ultp-layout1 .ultp-block-item:first-child .ultp-block-content-overlay, {{ULTP}} .ultp-block-row.ultp-layout2 .ultp-block-item:first-child .ultp-block-content-overlay {height: calc({{overlayHeight}}/1.5);} {{ULTP}} .ultp-block-row {min-height: {{overlayHeight}}; } {{ULTP}} .ultp-block-row .ultp-block-item:first-child .ultp-block-image img, {{ULTP}} .ultp-block-row .ultp-block-item:first-child .ultp-block-empty-image {width: 100%; object-fit: cover; height: 100%; }' | |
| 158 | - ], | |
| 159 | - ], | |
| 160 | - ], | |
| 161 | - 'titleShow' => [ | |
| 162 | - 'type' => 'boolean', | |
| 163 | - 'default' => true, | |
| 164 | - ], | |
| 165 | - 'headingShow' => [ | |
| 166 | - 'type' => 'boolean', | |
| 167 | - 'default' => true, | |
| 168 | - ], | |
| 169 | - 'excerptShow' => [ | |
| 170 | - 'type' => 'boolean', | |
| 171 | - 'default' => false | |
| 172 | - ], | |
| 173 | - 'catShow' => [ | |
| 174 | - 'type' => 'boolean', | |
| 175 | - 'default' => true, | |
| 176 | - ], | |
| 177 | - 'metaShow' => [ | |
| 178 | - 'type' => 'boolean', | |
| 179 | - 'default' => true, | |
| 180 | - ], | |
| 181 | - 'showImage' => [ | |
| 182 | - 'type' => 'boolean', | |
| 183 | - 'default' => true, | |
| 184 | - ], | |
| 185 | - 'filterShow' => [ | |
| 186 | - 'type' => 'boolean', | |
| 187 | - 'default' => false, | |
| 188 | - ], | |
| 189 | - 'paginationShow' => [ | |
| 190 | - 'type' => 'boolean', | |
| 191 | - 'default' => false, | |
| 192 | - ], | |
| 193 | - | |
| 194 | - 'readMore' => [ | |
| 195 | - 'type' => 'boolean', | |
| 196 | - 'default' => false, | |
| 197 | - ], | |
| 198 | - 'openInTab' => [ | |
| 199 | - 'type' => 'boolean', | |
| 200 | - 'default' => false, | |
| 201 | - ], | |
| 29 | + // -------------------------- | |
| 30 | + // Query Setting | |
| 31 | + // -------------------------- | |
| 32 | + 'queryQuick' => '', | |
| 33 | + 'queryNumPosts' => (object) array( 'lg' => 5 ), | |
| 34 | + 'queryNumber' => 5, | |
| 35 | + 'queryType' => 'post', | |
| 36 | + 'queryTax' => 'category', | |
| 37 | + 'queryTaxValue' => '[]', | |
| 38 | + 'queryRelation' => 'OR', | |
| 39 | + 'queryOrderBy' => 'date', | |
| 40 | + 'metaKey' => 'custom_meta_key', | |
| 41 | + 'queryOrder' => 'desc', | |
| 42 | + // Include Remove from Version 2.5.4 | |
| 43 | + 'queryInclude' => '', | |
| 44 | + 'queryExclude' => '[]', | |
| 45 | + 'queryAuthor' => '[]', | |
| 46 | + 'queryOffset' => '0', | |
| 47 | + 'queryExcludeTerm' => '[]', | |
| 48 | + 'queryExcludeAuthor' => '[]', | |
| 49 | + 'querySticky' => true, | |
| 50 | + 'queryUnique' => '', | |
| 51 | + 'queryPosts' => '[]', | |
| 52 | + 'queryCustomPosts' => '[]', | |
| 202 | 53 | |
| 54 | + // -------------------------- | |
| 55 | + // General Setting | |
| 56 | + // -------------------------- | |
| 57 | + 'column' => '2', | |
| 58 | + 'titleShow' => true, | |
| 59 | + 'titleStyle' => 'none', | |
| 60 | + 'headingShow' => true, | |
| 61 | + 'excerptShow' => false, | |
| 62 | + 'catShow' => true, | |
| 63 | + 'metaShow' => true, | |
| 64 | + 'showImage' => true, | |
| 65 | + 'filterShow' => false, | |
| 66 | + 'paginationShow' => false, | |
| 67 | + 'readMore' => false, | |
| 68 | + 'contentTag' => 'div', | |
| 69 | + 'openInTab' => false, | |
| 70 | + 'notFoundMessage' => 'No Post Found', | |
| 203 | 71 | |
| 204 | - //-------------------------- | |
| 205 | - // Heading Setting/Style | |
| 206 | - //-------------------------- | |
| 207 | - 'headingText' => [ | |
| 208 | - 'type' => 'string', | |
| 209 | - 'default' => 'Post Grid #3', | |
| 210 | - ], | |
| 211 | - 'headingURL' => [ | |
| 212 | - 'type' => 'string', | |
| 213 | - 'default' => '', | |
| 214 | - ], | |
| 215 | - 'headingBtnText' => [ | |
| 216 | - 'type' => 'string', | |
| 217 | - 'default' => 'View More', | |
| 218 | - 'style' => [ | |
| 219 | - (object)[ | |
| 220 | - 'depends' => [ | |
| 221 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], | |
| 222 | - ], | |
| 223 | - ], | |
| 224 | - ], | |
| 225 | - ], | |
| 226 | - 'headingStyle' => [ | |
| 227 | - 'type' => 'string', | |
| 228 | - 'default' => 'style9', | |
| 229 | - ], | |
| 230 | - 'headingTag' => [ | |
| 231 | - 'type' => 'string', | |
| 232 | - 'default' => 'h2', | |
| 233 | - ], | |
| 234 | - 'headingAlign' => [ | |
| 235 | - 'type' => 'string', | |
| 236 | - 'default' => 'left', | |
| 237 | - 'style' => [(object)['selector' => '{{ULTP}} .ultp-heading-inner, {{ULTP}} .ultp-sub-heading-inner { text-align:{{headingAlign}}; }']] | |
| 238 | - ], | |
| 239 | - 'headingTypo' => [ | |
| 240 | - 'type' => 'object', | |
| 241 | - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '20', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none', 'transform' => 'uppercase', 'family'=>'','weight'=>'700'], | |
| 242 | - 'style' => [(object)['selector' => '{{ULTP}} .ultp-heading-wrap .ultp-heading-inner']] | |
| 243 | - ], | |
| 244 | - 'headingColor' => [ | |
| 245 | - 'type' => 'string', | |
| 246 | - 'default' => '#0e1523', | |
| 247 | - 'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { color:{{headingColor}}; }']], | |
| 248 | - ], | |
| 249 | - 'headingBorderBottomColor' => [ | |
| 250 | - 'type' => 'string', | |
| 251 | - 'default' => '#0e1523', | |
| 252 | - 'style' => [ | |
| 253 | - (object)[ | |
| 254 | - 'depends' => [ | |
| 255 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], | |
| 256 | - ], | |
| 257 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-color:{{headingBorderBottomColor}}; }' | |
| 258 | - ], | |
| 259 | - (object)[ | |
| 260 | - 'depends' => [ | |
| 261 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], | |
| 262 | - ], | |
| 263 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }' | |
| 264 | - ], | |
| 265 | - (object)[ | |
| 266 | - 'depends' => [ | |
| 267 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'], | |
| 268 | - ], | |
| 269 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color: {{headingBorderBottomColor}}; }' | |
| 270 | - ], | |
| 271 | - (object)[ | |
| 272 | - 'depends' => [ | |
| 273 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'], | |
| 274 | - ], | |
| 275 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color: {{headingBorderBottomColor}}; }' | |
| 276 | - ], | |
| 277 | - (object)[ | |
| 278 | - 'depends' => [ | |
| 279 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'], | |
| 280 | - ], | |
| 281 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }' | |
| 282 | - ], | |
| 283 | - (object)[ | |
| 284 | - 'depends' => [ | |
| 285 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'], | |
| 286 | - ], | |
| 287 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' | |
| 288 | - ], | |
| 289 | - (object)[ | |
| 290 | - 'depends' => [ | |
| 291 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'], | |
| 292 | - ], | |
| 293 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' | |
| 294 | - ], | |
| 295 | - (object)[ | |
| 296 | - 'depends' => [ | |
| 297 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], | |
| 298 | - ], | |
| 299 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }' | |
| 300 | - ], | |
| 301 | - (object)[ | |
| 302 | - 'depends' => [ | |
| 303 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'], | |
| 304 | - ], | |
| 305 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' | |
| 306 | - ], | |
| 307 | - (object)[ | |
| 308 | - 'depends' => [ | |
| 309 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'], | |
| 310 | - ], | |
| 311 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }' | |
| 312 | - ], | |
| 313 | - (object)[ | |
| 314 | - 'depends' => [ | |
| 315 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'], | |
| 316 | - ], | |
| 317 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }' | |
| 318 | - ], | |
| 319 | - (object)[ | |
| 320 | - 'depends' => [ | |
| 321 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'], | |
| 322 | - ], | |
| 323 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }' | |
| 324 | - ], | |
| 325 | - (object)[ | |
| 326 | - 'depends' => [ | |
| 327 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], | |
| 328 | - ], | |
| 329 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }' | |
| 330 | - ], | |
| 331 | - (object)[ | |
| 332 | - 'depends' => [ | |
| 333 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], | |
| 334 | - ], | |
| 335 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { border-color:{{headingBorderBottomColor}}; }' | |
| 336 | - ], | |
| 337 | - ], | |
| 338 | - ], | |
| 339 | - 'headingBorderBottomColor2' => [ | |
| 340 | - 'type' => 'string', | |
| 341 | - 'default' => '#e5e5e5', | |
| 342 | - 'style' => [ | |
| 343 | - (object)[ | |
| 344 | - 'depends' => [ | |
| 345 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'], | |
| 346 | - ], | |
| 347 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor2}}; }' | |
| 348 | - ], | |
| 349 | - (object)[ | |
| 350 | - 'depends' => [ | |
| 351 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'], | |
| 352 | - ], | |
| 353 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }' | |
| 354 | - ], | |
| 355 | - (object)[ | |
| 356 | - 'depends' => [ | |
| 357 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'], | |
| 358 | - ], | |
| 359 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }' | |
| 360 | - ], | |
| 361 | - (object)[ | |
| 362 | - 'depends' => [ | |
| 363 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], | |
| 364 | - ], | |
| 365 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }' | |
| 366 | - ], | |
| 367 | - ], | |
| 368 | - ], | |
| 369 | - 'headingBg' => [ | |
| 370 | - 'type' => 'string', | |
| 371 | - 'default' => '#1740f5', | |
| 372 | - 'style' => [ | |
| 373 | - (object)[ | |
| 374 | - 'depends' => [ | |
| 375 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'], | |
| 376 | - ], | |
| 377 | - 'selector'=>'{{ULTP}} .ultp-heading-style5 .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' | |
| 378 | - ], | |
| 379 | - (object)[ | |
| 380 | - 'depends' => [ | |
| 381 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'], | |
| 382 | - ], | |
| 383 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' | |
| 384 | - ], | |
| 385 | - (object)[ | |
| 386 | - 'depends' => [ | |
| 387 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], | |
| 388 | - ], | |
| 389 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' | |
| 390 | - ], | |
| 391 | - (object)[ | |
| 392 | - 'depends' => [ | |
| 393 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], | |
| 394 | - ], | |
| 395 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' | |
| 396 | - ], | |
| 397 | - (object)[ | |
| 398 | - 'depends' => [ | |
| 399 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], | |
| 400 | - ], | |
| 401 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }' | |
| 402 | - ], | |
| 403 | - (object)[ | |
| 404 | - 'depends' => [ | |
| 405 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], | |
| 406 | - ], | |
| 407 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }' | |
| 408 | - ], | |
| 409 | - (object)[ | |
| 410 | - 'depends' => [ | |
| 411 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'], | |
| 412 | - ], | |
| 413 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }' | |
| 414 | - ], | |
| 415 | - ], | |
| 416 | - ], | |
| 417 | - 'headingBg2' => [ | |
| 418 | - 'type' => 'string', | |
| 419 | - 'default' => '#e5e5e5', | |
| 420 | - 'style' => [ | |
| 421 | - (object)[ | |
| 422 | - 'depends' => [ | |
| 423 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], | |
| 424 | - ], | |
| 425 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg2}}; }' | |
| 426 | - ], | |
| 427 | - ], | |
| 428 | - ], | |
| 429 | - 'headingBtnTypo' => [ | |
| 430 | - 'type' => 'object', | |
| 431 | - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '14', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none','family'=>''], | |
| 432 | - 'style' => [ | |
| 433 | - (object)[ | |
| 434 | - 'depends' => [ | |
| 435 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], | |
| 436 | - ], | |
| 437 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn' | |
| 438 | - ], | |
| 439 | - ], | |
| 440 | - ], | |
| 441 | - 'headingBtnColor' => [ | |
| 442 | - 'type' => 'string', | |
| 443 | - 'default' => '#1740f5', | |
| 444 | - 'style' => [ | |
| 445 | - (object)[ | |
| 446 | - 'depends' => [ | |
| 447 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], | |
| 448 | - ], | |
| 449 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn { color:{{headingBtnColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn svg { fill:{{headingBtnColor}}; }' | |
| 450 | - ], | |
| 451 | - ], | |
| 452 | - ], | |
| 453 | - 'headingBtnHoverColor' => [ | |
| 454 | - 'type' => 'string', | |
| 455 | - 'default' => '#0a31da', | |
| 456 | - 'style' => [ | |
| 457 | - (object)[ | |
| 458 | - 'depends' => [ | |
| 459 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'], | |
| 460 | - ], | |
| 461 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover { color:{{headingBtnHoverColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover svg { fill:{{headingBtnHoverColor}}; }' | |
| 462 | - ], | |
| 463 | - ], | |
| 464 | - ], | |
| 465 | - | |
| 466 | - 'headingBorder' => [ | |
| 467 | - 'type' => 'string', | |
| 468 | - 'default' => '3', | |
| 469 | - 'style' => [ | |
| 470 | - (object)[ | |
| 471 | - 'depends' => [ | |
| 472 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], | |
| 473 | - ], | |
| 474 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-width:{{headingBorder}}px; }' | |
| 475 | - ], | |
| 476 | - (object)[ | |
| 477 | - 'depends' => [ | |
| 478 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], | |
| 479 | - ], | |
| 480 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }' | |
| 481 | - ], | |
| 482 | - (object)[ | |
| 483 | - 'depends' => [ | |
| 484 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'], | |
| 485 | - ], | |
| 486 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { width:{{headingBorder}}px; }' | |
| 487 | - ], | |
| 488 | - (object)[ | |
| 489 | - 'depends' => [ | |
| 490 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'], | |
| 491 | - ], | |
| 492 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }' | |
| 493 | - ], | |
| 494 | - (object)[ | |
| 495 | - 'depends' => [ | |
| 496 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'], | |
| 497 | - ], | |
| 498 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }' | |
| 499 | - ], | |
| 500 | - (object)[ | |
| 501 | - 'depends' => [ | |
| 502 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'], | |
| 503 | - ], | |
| 504 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }' | |
| 505 | - ], | |
| 506 | - (object)[ | |
| 507 | - 'depends' => [ | |
| 508 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'], | |
| 509 | - ], | |
| 510 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }' | |
| 511 | - ], | |
| 512 | - (object)[ | |
| 513 | - 'depends' => [ | |
| 514 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], | |
| 515 | - ], | |
| 516 | - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }' | |
| 517 | - ], | |
| 518 | - (object)[ | |
| 519 | - 'depends' => [ | |
| 520 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'], | |
| 521 | - ], | |
| 522 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }' | |
| 523 | - ], | |
| 524 | - (object)[ | |
| 525 | - 'depends' => [ | |
| 526 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'], | |
| 527 | - ], | |
| 528 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }' | |
| 529 | - ], | |
| 530 | - (object)[ | |
| 531 | - 'depends' => [ | |
| 532 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'], | |
| 533 | - ], | |
| 534 | - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }' | |
| 535 | - ], | |
| 536 | - (object)[ | |
| 537 | - 'depends' => [ | |
| 538 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'], | |
| 539 | - ], | |
| 540 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }' | |
| 541 | - ], | |
| 542 | - (object)[ | |
| 543 | - 'depends' => [ | |
| 544 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], | |
| 545 | - ], | |
| 546 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }' | |
| 547 | - ], | |
| 548 | - (object)[ | |
| 549 | - 'depends' => [ | |
| 550 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], | |
| 551 | - ], | |
| 552 | - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }' | |
| 553 | - ], | |
| 554 | - ], | |
| 555 | - ], | |
| 556 | - 'headingSpacing' => [ | |
| 557 | - 'type' => 'object', | |
| 558 | - 'default' => (object)['lg'=>30, 'unit'=>'px'], | |
| 559 | - 'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap {margin-top:0; margin-bottom:{{headingSpacing}}; }']] | |
| 560 | - ], | |
| 72 | + // -------------------------- | |
| 73 | + // Heading Setting/Style | |
| 74 | + // -------------------------- | |
| 75 | + 'headingText' => 'Post Grid #3', | |
| 76 | + 'headingURL' => '', | |
| 77 | + 'headingBtnText' => 'View More', | |
| 78 | + 'headingStyle' => 'style1', | |
| 79 | + 'headingTag' => 'h2', | |
| 80 | + 'headingAlign' => 'left', | |
| 81 | + 'subHeadingShow' => false, | |
| 82 | + 'subHeadingText' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut sem augue. Sed at felis ut enim dignissim sodales.', | |
| 561 | 83 | |
| 562 | - 'headingRadius' => [ | |
| 563 | - 'type' => 'object', | |
| 564 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']], | |
| 565 | - 'style' => [ | |
| 566 | - (object)[ | |
| 567 | - 'depends' => [ | |
| 568 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'], | |
| 569 | - ], | |
| 570 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }' | |
| 571 | - ], | |
| 572 | - (object)[ | |
| 573 | - 'depends' => [ | |
| 574 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], | |
| 575 | - ], | |
| 576 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }' | |
| 577 | - ], | |
| 578 | - (object)[ | |
| 579 | - 'depends' => [ | |
| 580 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], | |
| 581 | - ], | |
| 582 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' | |
| 583 | - ], | |
| 584 | - (object)[ | |
| 585 | - 'depends' => [ | |
| 586 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'], | |
| 587 | - ], | |
| 588 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }' | |
| 589 | - ], | |
| 590 | - (object)[ | |
| 591 | - 'depends' => [ | |
| 592 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], | |
| 593 | - ], | |
| 594 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' | |
| 595 | - ], | |
| 596 | - (object)[ | |
| 597 | - 'depends' => [ | |
| 598 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], | |
| 599 | - ], | |
| 600 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' | |
| 601 | - ], | |
| 602 | - (object)[ | |
| 603 | - 'depends' => [ | |
| 604 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], | |
| 605 | - ], | |
| 606 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' | |
| 607 | - ], | |
| 608 | - (object)[ | |
| 609 | - 'depends' => [ | |
| 610 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'], | |
| 611 | - ], | |
| 612 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }' | |
| 613 | - ], | |
| 614 | - ] | |
| 615 | - ], | |
| 84 | + // -------------------------- | |
| 85 | + // Title Setting/Style | |
| 86 | + // -------------------------- | |
| 87 | + 'titleTag' => 'h3', | |
| 88 | + 'titleAnimation' => '', | |
| 89 | + 'titlePosition' => true, | |
| 90 | + 'titleLength' => 0, | |
| 616 | 91 | |
| 92 | + // -------------------------- | |
| 93 | + // Overlay Content Setting/Style | |
| 94 | + // -------------------------- | |
| 95 | + 'overlayContentPosition' => 'bottomPosition', | |
| 617 | 96 | |
| 618 | - 'headingPadding' => [ | |
| 619 | - 'type' => 'object', | |
| 620 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']], | |
| 621 | - 'style' => [ | |
| 622 | - (object)[ | |
| 623 | - 'depends' => [ | |
| 624 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'], | |
| 625 | - ], | |
| 626 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 627 | - ], | |
| 628 | - (object)[ | |
| 629 | - 'depends' => [ | |
| 630 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'], | |
| 631 | - ], | |
| 632 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 633 | - ], | |
| 634 | - (object)[ | |
| 635 | - 'depends' => [ | |
| 636 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'], | |
| 637 | - ], | |
| 638 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 639 | - ], | |
| 640 | - (object)[ | |
| 641 | - 'depends' => [ | |
| 642 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'], | |
| 643 | - ], | |
| 644 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 645 | - ], | |
| 646 | - (object)[ | |
| 647 | - 'depends' => [ | |
| 648 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'], | |
| 649 | - ], | |
| 650 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 651 | - ], | |
| 652 | - (object)[ | |
| 653 | - 'depends' => [ | |
| 654 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'], | |
| 655 | - ], | |
| 656 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 657 | - ], | |
| 658 | - (object)[ | |
| 659 | - 'depends' => [ | |
| 660 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'], | |
| 661 | - ], | |
| 662 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 663 | - ], | |
| 664 | - (object)[ | |
| 665 | - 'depends' => [ | |
| 666 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'], | |
| 667 | - ], | |
| 668 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 669 | - ], | |
| 670 | - (object)[ | |
| 671 | - 'depends' => [ | |
| 672 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'], | |
| 673 | - ], | |
| 674 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 675 | - ], | |
| 676 | - (object)[ | |
| 677 | - 'depends' => [ | |
| 678 | - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'], | |
| 679 | - ], | |
| 680 | - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }' | |
| 681 | - ], | |
| 682 | - ] | |
| 683 | - ], | |
| 684 | - 'subHeadingShow' => [ | |
| 685 | - 'type' => 'boolean', | |
| 686 | - 'default' => false, | |
| 687 | - ], | |
| 688 | - 'subHeadingText' => [ | |
| 689 | - 'type' => 'string', | |
| 690 | - 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut sem augue. Sed at felis ut enim dignissim sodales.', | |
| 691 | - 'style' => [ | |
| 692 | - (object)[ | |
| 693 | - 'depends' => [ | |
| 694 | - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], | |
| 695 | - ], | |
| 696 | - ], | |
| 697 | - ], | |
| 698 | - ], | |
| 699 | - 'subHeadingTypo' => [ | |
| 700 | - 'type' => 'object', | |
| 701 | - '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' => 'capitalize','family'=>'','weight'=>'500'], | |
| 702 | - 'style' => [ | |
| 703 | - (object)[ | |
| 704 | - 'depends' => [ | |
| 705 | - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], | |
| 706 | - ], | |
| 707 | - 'selector'=>'{{ULTP}} .ultp-sub-heading div' | |
| 708 | - ], | |
| 709 | - ], | |
| 710 | - ], | |
| 711 | - 'subHeadingColor' => [ | |
| 712 | - 'type' => 'string', | |
| 713 | - 'default' => '#989898', | |
| 714 | - 'style' => [ | |
| 715 | - (object)[ | |
| 716 | - 'depends' => [ | |
| 717 | - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], | |
| 718 | - ], | |
| 719 | - 'selector'=>'{{ULTP}} .ultp-sub-heading div{ color:{{subHeadingColor}}; }' | |
| 720 | - ], | |
| 721 | - ], | |
| 722 | - ], | |
| 723 | - 'subHeadingSpacing' => [ | |
| 724 | - 'type' => 'object', | |
| 725 | - 'default' => (object)['lg' =>(object)['unit' =>'px']], | |
| 726 | - 'style' => [ | |
| 727 | - (object)[ | |
| 728 | - 'depends' => [ | |
| 729 | - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true], | |
| 730 | - ], | |
| 731 | - 'selector'=>'{{ULTP}} div.ultp-sub-heading-inner{ margin:{{subHeadingSpacing}}; }' | |
| 732 | - ], | |
| 733 | - ], | |
| 734 | - ], | |
| 97 | + // -------------------------- | |
| 98 | + // Content Setting/Style | |
| 99 | + // -------------------------- | |
| 100 | + 'showSeoMeta' => false, | |
| 101 | + 'showSmallExcerpt' => false, | |
| 102 | + 'showFullExcerpt' => false, | |
| 103 | + 'excerptLimit' => 10, | |
| 735 | 104 | |
| 105 | + // -------------------------- | |
| 106 | + // Category Setting/Style | |
| 107 | + // -------------------------- | |
| 108 | + 'maxTaxonomy' => '30', | |
| 109 | + 'taxonomy' => 'category', | |
| 110 | + 'showSmallCat' => true, | |
| 111 | + 'catStyle' => 'classic', | |
| 112 | + 'catPosition' => 'aboveTitle', | |
| 113 | + 'customCatColor' => false, | |
| 114 | + 'seperatorLink' => admin_url( 'edit-tags.php?taxonomy=category' ), | |
| 115 | + 'onlyCatColor' => false, | |
| 736 | 116 | |
| 737 | - //-------------------------- | |
| 738 | - // Title Setting/Style | |
| 739 | - //-------------------------- | |
| 740 | - 'titleTag' => [ | |
| 741 | - 'type' => 'string', | |
| 742 | - 'default' => 'h3', | |
| 743 | - ], | |
| 744 | - 'titleAnimation' => [ | |
| 745 | - 'type' => 'string', | |
| 746 | - 'default' => '', | |
| 747 | - ], | |
| 748 | - 'titlePosition' => [ | |
| 749 | - 'type' => 'boolean', | |
| 750 | - 'default' => true, | |
| 751 | - ], | |
| 752 | - 'titleColor' => [ | |
| 753 | - 'type' => 'string', | |
| 754 | - 'default' => '#fff', | |
| 755 | - 'style' => [ | |
| 756 | - (object)[ | |
| 757 | - 'depends' => [ | |
| 758 | - (object)['key'=>'titleShow','condition'=>'==','value'=>true], | |
| 759 | - ], | |
| 760 | - 'selector'=>'{{ULTP}} .ultp-block-content .ultp-block-title a { color:{{titleColor}}; }' | |
| 761 | - ], | |
| 762 | - ], | |
| 763 | - ], | |
| 764 | - 'titleHoverColor' => [ | |
| 765 | - 'type' => 'string', | |
| 766 | - 'default' => 'rgba(255,255,255,0.70)', | |
| 767 | - 'style' => [ | |
| 768 | - (object)[ | |
| 769 | - 'depends' => [ | |
| 770 | - (object)['key'=>'titleShow','condition'=>'==','value'=>true], | |
| 771 | - ], | |
| 772 | - 'selector'=>'{{ULTP}} .ultp-block-content .ultp-block-title a:hover { color:{{titleHoverColor}}; }' | |
| 773 | - ], | |
| 774 | - ], | |
| 775 | - ], | |
| 776 | - 'titleLgTypo' => [ | |
| 777 | - 'type' => 'object', | |
| 778 | - 'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'30', 'unit'=>'px'], 'height'=>(object)[ 'lg'=>'36', 'unit'=>'px'],'decoration'=>'none','family'=>'','weight'=>'700'], | |
| 779 | - 'style' => [ | |
| 780 | - (object)[ | |
| 781 | - 'depends' => [ | |
| 782 | - (object)['key'=>'titleShow','condition'=>'==','value'=>true], | |
| 783 | - ], | |
| 784 | - 'selector'=>'{{ULTP}} .ultp-block-item:first-child .ultp-block-title, {{ULTP}} .ultp-block-item:first-child .ultp-block-title a' | |
| 785 | - ], | |
| 786 | - ], | |
| 787 | - ], | |
| 788 | - 'titleTypo' => [ | |
| 789 | - 'type' => 'object', | |
| 790 | - 'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'20', 'unit'=>'px'], 'height'=>(object)['lg'=>'26', 'unit'=>'px'], 'decoration'=>'none','family'=>'','weight'=>'600'], | |
| 791 | - 'style' => [ | |
| 792 | - (object)[ | |
| 793 | - 'depends' => [ | |
| 794 | - (object)['key'=>'titleShow','condition'=>'==','value'=>true], | |
| 795 | - ], | |
| 796 | - 'selector'=>'{{ULTP}} .ultp-block-item:not(:first-child) .ultp-block-title, {{ULTP}} .ultp-block-item:not(:first-child) .ultp-block-title a' | |
| 797 | - ], | |
| 798 | - ], | |
| 799 | - ], | |
| 800 | - 'titlePadding' => [ | |
| 801 | - 'type' => 'object', | |
| 802 | - 'default' => (object)['lg'=>(object)['top'=>10,'bottom'=>5, 'unit'=>'px']], | |
| 803 | - 'style' => [ | |
| 804 | - (object)[ | |
| 805 | - 'depends' => [ | |
| 806 | - (object)['key'=>'titleShow','condition'=>'==','value'=>true], | |
| 807 | - ], | |
| 808 | - 'selector'=>'{{ULTP}} .ultp-block-content .ultp-block-title { padding:{{titlePadding}}; }' | |
| 809 | - ], | |
| 810 | - ], | |
| 811 | - ], | |
| 117 | + // -------------------------- | |
| 118 | + // Meta Setting/Style | |
| 119 | + // -------------------------- | |
| 120 | + 'showSmallMeta' => true, | |
| 121 | + 'metaPosition' => 'top', | |
| 122 | + 'metaStyle' => 'icon', | |
| 123 | + 'authorLink' => true, | |
| 124 | + 'metaSeparator' => 'dot', | |
| 125 | + 'metaList' => '["metaAuthor","metaDate","metaRead"]', | |
| 126 | + 'metaMinText' => 'min read', | |
| 127 | + 'metaAuthorPrefix' => 'By', | |
| 128 | + 'metaDateFormat' => 'M j, Y', | |
| 129 | + 'metaListSmall' => '["metaAuthor","metaDate"]', | |
| 812 | 130 | |
| 813 | - //-------------------------- | |
| 814 | - // Overlay Content Setting/Style | |
| 815 | - //-------------------------- | |
| 816 | - 'overlayContentPosition' => [ | |
| 817 | - 'type' => 'string', | |
| 818 | - 'default' => 'bottomPosition', | |
| 819 | - 'style' => [ | |
| 820 | - (object)[ | |
| 821 | - 'depends' => [ | |
| 822 | - (object)['key'=>'overlayContentPosition','condition'=>'==','value'=>'topPosition'], | |
| 823 | - ], | |
| 824 | - 'selector'=>'{{ULTP}} .ultp-block-content-topPosition { align-items:flex-start; }' | |
| 825 | - ], | |
| 826 | - (object)[ | |
| 827 | - 'depends' => [ | |
| 828 | - (object)['key'=>'overlayContentPosition','condition'=>'==','value'=>'middlePosition'], | |
| 829 | - ], | |
| 830 | - 'selector'=>'{{ULTP}} .ultp-block-content-middlePosition { align-items:center; }' | |
| 831 | - ], | |
| 832 | - (object)[ | |
| 833 | - 'depends' => [ | |
| 834 | - (object)['key'=>'overlayContentPosition','condition'=>'==','value'=>'bottomPosition'], | |
| 835 | - ], | |
| 836 | - 'selector'=>'{{ULTP}} .ultp-block-content-bottomPosition { align-items:flex-end; }' | |
| 837 | - ], | |
| 838 | - ] | |
| 839 | - ], | |
| 840 | - 'overlayBgColor' => [ | |
| 841 | - 'type' => 'object', | |
| 842 | - 'default' => (object)['openColor' => 1,'type' => 'color', 'color' => ''], | |
| 843 | - 'style' => [ | |
| 844 | - (object)[ | |
| 845 | - 'selector'=>'{{ULTP}} .ultp-block-content-inner' | |
| 846 | - ], | |
| 847 | - ], | |
| 848 | - ], | |
| 849 | - 'overlayWrapPadding' => [ | |
| 850 | - 'type' => 'object', | |
| 851 | - 'default' => (object)['lg' =>(object)['top' => '20','bottom' => '20', 'left'=>'20','right'=>'20', 'unit' =>'px']], | |
| 852 | - 'style' => [ | |
| 853 | - (object)[ | |
| 854 | - 'selector'=>'{{ULTP}} .ultp-block-content-inner { padding: {{overlayWrapPadding}}; }' | |
| 855 | - ], | |
| 856 | - ], | |
| 857 | - ], | |
| 131 | + // -------------------------- | |
| 132 | + // Image Setting/Style | |
| 133 | + // -------------------------- | |
| 134 | + 'imgCrop' => ( ultimate_post()->get_setting( 'disable_image_size' ) == 'yes' ? 'full' : 'ultp_layout_landscape' ), | |
| 135 | + 'imgCropSmall' => ( ultimate_post()->get_setting( 'disable_image_size' ) == 'yes' ? 'full' : 'ultp_layout_square' ), | |
| 136 | + 'imgAnimation' => 'roateLeft', | |
| 137 | + 'imgOverlay' => true, | |
| 138 | + 'imgOverlayType' => 'flat', | |
| 139 | + 'fallbackEnable' => true, | |
| 140 | + 'fallbackImg' => '', | |
| 141 | + 'imgSrcset' => false, | |
| 142 | + 'imgLazy' => false, | |
| 858 | 143 | |
| 859 | - //-------------------------- | |
| 860 | - // Content Setting/Style | |
| 861 | - //-------------------------- | |
| 862 | - 'showSmallExcerpt' => [ | |
| 863 | - 'type' => 'boolean', | |
| 864 | - 'default' => false, | |
| 865 | - ], | |
| 866 | - 'showFullExcerpt' => [ | |
| 867 | - 'type' => 'boolean', | |
| 868 | - 'default' => false, | |
| 869 | - ], | |
| 870 | - 'excerptLimit' => [ | |
| 871 | - 'type' => 'string', | |
| 872 | - 'default' => 30, | |
| 873 | - 'style' => [ | |
| 874 | - (object)[ | |
| 875 | - 'depends' => [ | |
| 876 | - (object)['key'=>'showFullExcerpt','condition'=>'==','value'=>false], | |
| 877 | - ], | |
| 878 | - ], | |
| 879 | - ], | |
| 880 | - ], | |
| 881 | - 'excerptColor' => [ | |
| 882 | - 'type' => 'string', | |
| 883 | - 'default' => '#fff', | |
| 884 | - 'style' => [ | |
| 885 | - (object)[ | |
| 886 | - 'depends' => [ | |
| 887 | - (object)['key'=>'excerptShow','condition'=>'==','value'=>true], | |
| 888 | - ], | |
| 889 | - 'selector'=>'{{ULTP}} .ultp-block-excerpt { color:{{excerptColor}}; }' | |
| 890 | - ], | |
| 891 | - ], | |
| 892 | - ], | |
| 893 | - 'excerptTypo' => [ | |
| 894 | - 'type' => 'object', | |
| 895 | - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>20, 'unit' =>'px'], 'decoration' => 'none','family'=>''], | |
| 896 | - 'style' => [ | |
| 897 | - (object)[ | |
| 898 | - 'depends' => [ | |
| 899 | - (object)['key'=>'excerptShow','condition'=>'==','value'=>true], | |
| 900 | - ], | |
| 901 | - 'selector'=>'{{ULTP}} .ultp-block-excerpt' | |
| 902 | - ], | |
| 903 | - ], | |
| 904 | - ], | |
| 905 | - 'excerptPadding' => [ | |
| 906 | - 'type' => 'object', | |
| 907 | - 'default' => (object)['lg' =>(object)['top' => 15,'bottom' => '', 'unit' =>'px']], | |
| 908 | - 'style' => [ | |
| 909 | - (object)[ | |
| 910 | - 'depends' => [ | |
| 911 | - (object)['key'=>'excerptShow','condition'=>'==','value'=>true], | |
| 912 | - ], | |
| 913 | - 'selector'=>'{{ULTP}} .ultp-block-excerpt{ padding: {{excerptPadding}}; }' | |
| 914 | - ], | |
| 915 | - ], | |
| 916 | - ], | |
| 144 | + /* | |
| 145 | + ============================ | |
| 146 | + Video Style | |
| 147 | + ============================*/ | |
| 148 | + 'vidIconEnable' => true, | |
| 149 | + 'popupAutoPlay' => true, | |
| 150 | + 'iconSize' => (object) array( | |
| 151 | + 'lg' => '40', | |
| 152 | + 'sm' => '30', | |
| 153 | + 'xs' => '30', | |
| 154 | + 'unit' => 'px', | |
| 155 | + ), | |
| 156 | + // by default should be off | |
| 157 | + 'enablePopup' => false, | |
| 158 | + 'enablePopupTitle' => true, | |
| 917 | 159 | |
| 918 | - //-------------------------- | |
| 919 | - // Category Setting/Style | |
| 920 | - //-------------------------- | |
| 921 | - 'showSmallCat' => [ | |
| 922 | - 'type' => 'boolean', | |
| 923 | - 'default' => true, | |
| 924 | - ], | |
| 925 | - 'catStyle' => [ | |
| 926 | - 'type' => 'string', | |
| 927 | - 'default' => 'classic', | |
| 928 | - ], | |
| 929 | - 'catPosition' => [ | |
| 930 | - 'type' => 'string', | |
| 931 | - 'default' => 'aboveTitle', | |
| 932 | - ], | |
| 933 | - 'customCatColor' => [ | |
| 934 | - 'type' => 'boolean', | |
| 935 | - 'default' => false, | |
| 936 | - ], | |
| 937 | - 'seperatorLink' => [ | |
| 938 | - 'type' => 'string', | |
| 939 | - 'default' => admin_url( 'edit-tags.php?taxonomy=category' ), | |
| 940 | - 'style' => [ | |
| 941 | - (object)[ | |
| 942 | - 'depends' => [ | |
| 943 | - (object)['key'=>'customCatColor','condition'=>'==','value'=>true], | |
| 944 | - ] | |
| 945 | - ] | |
| 946 | - ] | |
| 947 | - ], | |
| 948 | - 'onlyCatColor' => [ | |
| 949 | - 'type' => 'boolean', | |
| 950 | - 'default' => false, | |
| 951 | - 'style' => [ | |
| 952 | - (object)[ | |
| 953 | - 'depends' => [ | |
| 954 | - (object)['key'=>'customCatColor','condition'=>'==','value'=>true], | |
| 955 | - ] | |
| 956 | - ] | |
| 957 | - ] | |
| 958 | - ], | |
| 959 | - 'catLineWidth' => [ | |
| 960 | - 'type' => 'object', | |
| 961 | - 'default' => (object)['lg'=>'20'], | |
| 962 | - 'style' => [ | |
| 963 | - (object)[ | |
| 964 | - 'depends' => [ | |
| 965 | - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'], | |
| 966 | - ], | |
| 967 | - 'selector' => '{{ULTP}} .ultp-category-borderRight .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:after, {{ULTP}} .ultp-category-borderLeft .ultp-category-in:before { width:{{catLineWidth}}px; }' | |
| 968 | - ], | |
| 969 | - ] | |
| 970 | - ], | |
| 971 | - 'catLineSpacing' => [ | |
| 972 | - 'type' => 'object', | |
| 973 | - 'default' => (object)['lg'=>'30'], | |
| 974 | - 'style' => [ | |
| 975 | - (object)[ | |
| 976 | - 'depends' => [ | |
| 977 | - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'], | |
| 978 | - ], | |
| 979 | - 'selector' => '{{ULTP}} .ultp-category-borderBoth .ultp-category-in { padding-left: {{catLineSpacing}}px; padding-right: {{catLineSpacing}}px; } | |
| 980 | - {{ULTP}} .ultp-category-borderLeft .ultp-category-in { padding-left: {{catLineSpacing}}px; } | |
| 981 | - {{ULTP}} .ultp-category-borderRight .ultp-category-in { padding-right:{{catLineSpacing}}px; }' | |
| 982 | - ], | |
| 983 | - ] | |
| 984 | - ], | |
| 985 | - 'catLineColor' => [ | |
| 986 | - 'type' => 'string', | |
| 987 | - 'default' => '#000', | |
| 988 | - 'style' => [ | |
| 989 | - (object)[ | |
| 990 | - 'depends' => [ | |
| 991 | - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'], | |
| 992 | - ], | |
| 993 | - 'selector' => '{{ULTP}} .ultp-category-borderRight .ultp-category-in:before, {{ULTP}} .ultp-category-borderLeft .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:after, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:before { background:{{catLineColor}}; }' | |
| 994 | - ], | |
| 995 | - ] | |
| 996 | - ], | |
| 997 | - 'catLineHoverColor' => [ | |
| 998 | - 'type' => 'string', | |
| 999 | - 'default' => '#1740f5', | |
| 1000 | - 'style' => [ | |
| 1001 | - (object)[ | |
| 1002 | - 'depends' => [ | |
| 1003 | - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'], | |
| 1004 | - ], | |
| 1005 | - 'selector' => '{{ULTP}} .ultp-category-borderBoth:hover .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth:hover .ultp-category-in:after, {{ULTP}} .ultp-category-borderLeft:hover .ultp-category-in:before, {{ULTP}} .ultp-category-borderRight:hover .ultp-category-in:before { background:{{catLineHoverColor}}; }' | |
| 1006 | - ], | |
| 1007 | - ] | |
| 1008 | - ], | |
| 1009 | - 'catTypo' => [ | |
| 1010 | - 'type' => 'object', | |
| 1011 | - 'default' => (object)['openTypography' => 1, 'size' => (object)['lg' =>11, 'unit' =>'px'], 'height' => (object)['lg' =>15, 'unit' =>'px'], 'spacing' => (object)['lg' =>1, 'unit' =>'px'], 'transform' => 'uppercase', 'weight' => '500', 'decoration' => 'none','family'=>'' ], | |
| 1012 | - 'style' => [ | |
| 1013 | - (object)[ | |
| 1014 | - 'depends' => [ | |
| 1015 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1016 | - ], | |
| 1017 | - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-category-grid a' | |
| 1018 | - ], | |
| 1019 | - ], | |
| 1020 | - ], | |
| 1021 | - 'catColor' => [ | |
| 1022 | - 'type' => 'string', | |
| 1023 | - 'default' => '#fff', | |
| 1024 | - 'style' => [ | |
| 1025 | - (object)[ | |
| 1026 | - 'depends' => [ | |
| 1027 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1028 | - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true], | |
| 1029 | - ], | |
| 1030 | - 'selector'=>'{{ULTP}} .ultp-category-grid a { color:{{catColor}}; }' | |
| 1031 | - ], | |
| 1032 | - ], | |
| 1033 | - ], | |
| 1034 | - 'catBgColor' => [ | |
| 1035 | - 'type' => 'object', | |
| 1036 | - 'default' => (object)['openColor' => 1,'type' => 'color', 'color' => '#000'], | |
| 1037 | - 'style' => [ | |
| 1038 | - (object)[ | |
| 1039 | - 'depends' => [ | |
| 1040 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1041 | - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true], | |
| 1042 | - ], | |
| 1043 | - 'selector'=>'{{ULTP}} .ultp-category-grid a' | |
| 1044 | - ], | |
| 1045 | - ], | |
| 1046 | - ], | |
| 1047 | - 'catBorder' => [ | |
| 1048 | - 'type' => 'object', | |
| 1049 | - 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], | |
| 1050 | - 'style' => [ | |
| 1051 | - (object)[ | |
| 1052 | - 'depends' => [ | |
| 1053 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1054 | - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true], | |
| 1055 | - ], | |
| 1056 | - 'selector'=>'{{ULTP}} .ultp-category-grid a' | |
| 1057 | - ], | |
| 1058 | - ], | |
| 1059 | - ], | |
| 1060 | - 'catRadius' => [ | |
| 1061 | - 'type' => 'object', | |
| 1062 | - 'default' => (object)['lg' =>'2', 'unit' =>'px'], | |
| 1063 | - 'style' => [ | |
| 1064 | - (object)[ | |
| 1065 | - 'depends' => [ | |
| 1066 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1067 | - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true], | |
| 1068 | - ], | |
| 1069 | - 'selector'=>'{{ULTP}} .ultp-category-grid a { border-radius:{{catRadius}}; }' | |
| 1070 | - ], | |
| 1071 | - ], | |
| 1072 | - ], | |
| 1073 | - 'catHoverColor' => [ | |
| 1074 | - 'type' => 'string', | |
| 1075 | - 'default' => '#fff', | |
| 1076 | - 'style' => [ | |
| 1077 | - (object)[ | |
| 1078 | - 'depends' => [ | |
| 1079 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1080 | - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true], | |
| 1081 | - ], | |
| 1082 | - 'selector'=>'{{ULTP}} .ultp-category-grid a:hover { color:{{catHoverColor}}; }' | |
| 1083 | - ], | |
| 1084 | - ], | |
| 1085 | - ], | |
| 1086 | - 'catBgHoverColor' => [ | |
| 1087 | - 'type' => 'object', | |
| 1088 | - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#1740f5'], | |
| 1089 | - 'style' => [ | |
| 1090 | - (object)[ | |
| 1091 | - 'depends' => [ | |
| 1092 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1093 | - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true], | |
| 1094 | - ], | |
| 1095 | - 'selector'=>'{{ULTP}} .ultp-category-grid a:hover' | |
| 1096 | - ], | |
| 1097 | - ], | |
| 1098 | - ], | |
| 1099 | - 'catHoverBorder' => [ | |
| 1100 | - 'type' => 'object', | |
| 1101 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 1102 | - 'style' => [ | |
| 1103 | - (object)[ | |
| 1104 | - 'depends' => [ | |
| 1105 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1106 | - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true], | |
| 1107 | - ], | |
| 1108 | - 'selector'=>'{{ULTP}} .ultp-category-grid a:hover' | |
| 1109 | - ], | |
| 1110 | - ], | |
| 1111 | - ], | |
| 1112 | - 'catSacing' => [ | |
| 1113 | - 'type' => 'object', | |
| 1114 | - 'default' => (object)['lg' =>(object)['top' => 5,'bottom' => 5,'left' => 0,'right' => 0, 'unit' =>'px']], | |
| 1115 | - 'style' => [ | |
| 1116 | - (object)[ | |
| 1117 | - 'depends' => [ | |
| 1118 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1119 | - ], | |
| 1120 | - 'selector'=>'{{ULTP}} .ultp-category-grid { margin:{{catSacing}}; }' | |
| 1121 | - ], | |
| 1122 | - ], | |
| 1123 | - ], | |
| 1124 | - 'catPadding' => [ | |
| 1125 | - 'type' => 'object', | |
| 1126 | - 'default' => (object)['lg' =>(object)['top' => 3,'bottom' => 3,'left' => 7,'right' => 7, 'unit' =>'px']], | |
| 1127 | - 'style' => [ | |
| 1128 | - (object)[ | |
| 1129 | - 'depends' => [ | |
| 1130 | - (object)['key'=>'catShow','condition'=>'==','value'=>true], | |
| 1131 | - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true], | |
| 1132 | - ], | |
| 1133 | - 'selector'=>'{{ULTP}} .ultp-category-grid a { padding:{{catPadding}}; }' | |
| 1134 | - ], | |
| 1135 | - ], | |
| 1136 | - ], | |
| 160 | + // -------------------------- | |
| 161 | + // Read more Setting/Style | |
| 162 | + // -------------------------- | |
| 163 | + 'showSmallBtn' => false, | |
| 164 | + 'readMoreText' => '', | |
| 165 | + 'readMoreIcon' => 'rightArrowLg', | |
| 1137 | 166 | |
| 167 | + // -------------------------- | |
| 168 | + // Filter Setting/Style | |
| 169 | + // -------------------------- | |
| 170 | + 'filterBelowTitle' => false, | |
| 171 | + 'filterType' => 'category', | |
| 172 | + 'filterText' => 'all', | |
| 173 | + 'filterValue' => '[]', | |
| 174 | + 'filterMobile' => true, | |
| 175 | + 'filterMobileText' => 'More', | |
| 1138 | 176 | |
| 1139 | - //-------------------------- | |
| 1140 | - // Meta Setting/Style | |
| 1141 | - //-------------------------- | |
| 1142 | - 'showSmallMeta' => [ | |
| 1143 | - 'type' => 'boolean', | |
| 1144 | - 'default' => true, | |
| 1145 | - ], | |
| 1146 | - 'metaPosition' => [ | |
| 1147 | - 'type' => 'string', | |
| 1148 | - 'default' => 'top', | |
| 1149 | - ], | |
| 1150 | - 'metaStyle' => [ | |
| 1151 | - 'type' => 'string', | |
| 1152 | - 'default' => 'icon', | |
| 1153 | - ], | |
| 1154 | - 'metaSeparator' => [ | |
| 1155 | - 'type' => 'string', | |
| 1156 | - 'default' => 'dot', | |
| 1157 | - ], | |
| 1158 | - 'metaList' => [ | |
| 1159 | - 'type' => 'string', | |
| 1160 | - 'default' => '["metaAuthor","metaDate","metaRead"]', | |
| 1161 | - ], | |
| 1162 | - 'metaListSmall' => [ | |
| 1163 | - 'type' => 'string', | |
| 1164 | - 'default' => '["metaAuthor","metaDate"]', | |
| 1165 | - ], | |
| 1166 | - 'metaTypo' => [ | |
| 1167 | - 'type' => 'object', | |
| 1168 | - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>13, 'unit' =>'px'],'height' => (object)['lg' =>20, 'unit' =>'px'], 'decoration' => 'none','family'=>''], | |
| 1169 | - 'style' => [ | |
| 1170 | - (object)[ | |
| 1171 | - 'depends' => [ | |
| 1172 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1173 | - ], | |
| 1174 | - 'selector'=>'{{ULTP}} .ultp-block-meta span, {{ULTP}} .ultp-block-item .ultp-block-meta span a' | |
| 1175 | - ], | |
| 1176 | - ], | |
| 1177 | - ], | |
| 1178 | - 'metaColor' => [ | |
| 1179 | - 'type' => 'string', | |
| 1180 | - 'default' => 'rgba(255,255,255,0.90)', | |
| 1181 | - 'style' => [ | |
| 1182 | - (object)[ | |
| 1183 | - 'depends' => [ | |
| 1184 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1185 | - ], | |
| 1186 | - 'selector'=>'{{ULTP}} .ultp-block-meta span { color: {{metaColor}}; } {{ULTP}} .ultp-block-meta span svg { fill: {{metaColor}}; } {{ULTP}} .ultp-block-meta span a { color: {{metaColor}}; }{{ULTP}} .ultp-block-meta-dot span:after { background:{{metaColor}}; } {{ULTP}} .ultp-block-meta span:after { color:{{metaColor}}; }' | |
| 1187 | - ], | |
| 1188 | - ], | |
| 1189 | - ], | |
| 1190 | - 'metaHoverColor' => [ | |
| 1191 | - 'type' => 'string', | |
| 1192 | - 'default' => '#1740f5', | |
| 1193 | - 'style' => [ | |
| 1194 | - (object)[ | |
| 1195 | - 'depends' => [ | |
| 1196 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1197 | - ], | |
| 1198 | - 'selector'=>'{{ULTP}} .ultp-block-meta span a:hover { color: {{metaHoverColor}}; }' | |
| 1199 | - ], | |
| 1200 | - ], | |
| 1201 | - ], | |
| 1202 | - 'metaSpacing' => [ | |
| 1203 | - 'type' => 'object', | |
| 1204 | - 'default' => (object)['lg' =>'15', 'unit' =>'px'], | |
| 1205 | - 'style' => [ | |
| 1206 | - (object)[ | |
| 1207 | - 'depends' => [ | |
| 1208 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1209 | - ], | |
| 1210 | - 'selector'=>'{{ULTP}} .ultp-block-meta span { margin-right:{{metaSpacing}}; } {{ULTP}} .ultp-block-meta span { padding-left: {{metaSpacing}}; } .rtl {{ULTP}} .ultp-block-meta span {margin-right:0; margin-left:{{metaSpacing}}; } .rtl {{ULTP}} .ultp-block-meta span { padding-left:0; padding-right: {{metaSpacing}}; }' | |
| 1211 | - ], | |
| 1212 | - ], | |
| 1213 | - ], | |
| 1214 | - 'metaMargin' => [ | |
| 1215 | - 'type' => 'object', | |
| 1216 | - 'default' => (object)['lg' =>(object)['top' => '5','bottom' => '', 'left'=>'','right'=>'', 'unit' =>'px']], | |
| 1217 | - 'style' => [ | |
| 1218 | - (object)[ | |
| 1219 | - 'depends' => [ | |
| 1220 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1221 | - ], | |
| 1222 | - 'selector'=>'{{ULTP}} .ultp-block-meta { margin:{{metaMargin}}; }' | |
| 1223 | - ], | |
| 1224 | - ], | |
| 1225 | - ], | |
| 1226 | - 'metaPadding' => [ | |
| 1227 | - 'type' => 'object', | |
| 1228 | - 'default' => (object)['lg' =>(object)['top' => '5','bottom' => '5', 'left'=>'','right'=>'', 'unit' =>'px']], | |
| 1229 | - 'style' => [ | |
| 1230 | - (object)[ | |
| 1231 | - 'depends' => [ | |
| 1232 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1233 | - ], | |
| 1234 | - 'selector'=>'{{ULTP}} .ultp-block-meta { padding:{{metaPadding}}; }' | |
| 1235 | - ], | |
| 1236 | - ], | |
| 1237 | - ], | |
| 1238 | - 'metaBorder' => [ | |
| 1239 | - 'type' => 'object', | |
| 1240 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => '0', 'bottom' => '0', 'left' => '0'],'color' => '#009fd4','type' => 'solid'], | |
| 1241 | - 'style' => [ | |
| 1242 | - (object)[ | |
| 1243 | - 'depends' => [ | |
| 1244 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1245 | - ], | |
| 1246 | - 'selector'=>'{{ULTP}} .ultp-block-meta' | |
| 1247 | - ], | |
| 1248 | - ], | |
| 1249 | - ], | |
| 1250 | - 'metaBg' => [ | |
| 1251 | - 'type' => 'string', | |
| 1252 | - 'default' => '', | |
| 1253 | - 'style' => [ | |
| 1254 | - (object)[ | |
| 1255 | - 'depends' => [ | |
| 1256 | - (object)['key'=>'metaShow','condition'=>'==','value'=>true], | |
| 1257 | - ], | |
| 1258 | - 'selector'=>'{{ULTP}} .ultp-block-meta { background:{{metaBg}}; }' | |
| 1259 | - ], | |
| 1260 | - ], | |
| 1261 | - ], | |
| 177 | + // -------------------------- | |
| 178 | + // Pagination Setting/Style | |
| 179 | + // -------------------------- | |
| 180 | + 'paginationType' => 'loadMore', | |
| 181 | + 'loadMoreText' => 'Load More', | |
| 182 | + 'paginationText' => 'Previous|Next', | |
| 183 | + 'paginationNav' => 'textArrow', | |
| 184 | + 'paginationAjax' => true, | |
| 185 | + 'navPosition' => 'topRight', | |
| 1262 | 186 | |
| 187 | + // -------------------------- | |
| 188 | + // Wrapper Style | |
| 189 | + // -------------------------- | |
| 190 | + 'advanceId' => '', | |
| 191 | + 'advanceZindex' => '', | |
| 192 | + 'hideExtraLarge' => false, | |
| 193 | + 'hideTablet' => false, | |
| 194 | + 'hideMobile' => false, | |
| 195 | + 'advanceCss' => '', | |
| 196 | + 'currentPostId' => '', | |
| 1263 | 197 | |
| 198 | + /* | |
| 199 | + ============================ | |
| 200 | + Dynamic Content | |
| 201 | + ============================*/ | |
| 202 | + 'dcEnabled' => false, | |
| 203 | + 'dcFields' => array(), | |
| 204 | + 'dcSize' => 8, | |
| 205 | + ); | |
| 206 | + } | |
| 1264 | 207 | |
| 1265 | - //-------------------------- | |
| 1266 | - // Image Setting/Style | |
| 1267 | - //-------------------------- | |
| 1268 | - 'imgAnimation' => [ | |
| 1269 | - 'type' => 'string', | |
| 1270 | - 'default' => 'roateLeft', | |
| 1271 | - ], | |
| 1272 | - 'imgGrayScale' => [ | |
| 1273 | - 'type' => 'object', | |
| 1274 | - 'default' => (object)['lg' =>'0', 'unit' =>'%'], | |
| 1275 | - 'style' => [ | |
| 1276 | - (object)[ | |
| 1277 | - 'depends' => [ | |
| 1278 | - (object)['key'=>'showImage','condition'=>'==','value'=>true], | |
| 1279 | - ], | |
| 1280 | - 'selector'=>'{{ULTP}} .ultp-block-image img { filter: grayscale({{imgGrayScale}}); }' | |
| 1281 | - ], | |
| 1282 | - ], | |
| 1283 | - ], | |
| 1284 | - 'imgHoverGrayScale' => [ | |
| 1285 | - 'type' => 'object', | |
| 1286 | - 'default' => (object)['lg' =>'0', 'unit' =>'%'], | |
| 1287 | - 'style' => [ | |
| 1288 | - (object)[ | |
| 1289 | - 'depends' => [ | |
| 1290 | - (object)['key'=>'showImage','condition'=>'==','value'=>true], | |
| 1291 | - ], | |
| 1292 | - 'selector'=>'{{ULTP}} .ultp-block-item:hover .ultp-block-image img { filter: grayscale({{imgHoverGrayScale}}); }' | |
| 1293 | - ], | |
| 1294 | - ], | |
| 1295 | - ], | |
| 1296 | - 'imgRadius' => [ | |
| 1297 | - 'type' => 'object', | |
| 1298 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 1299 | - 'style' => [ | |
| 1300 | - (object)[ | |
| 1301 | - 'depends' => [ | |
| 1302 | - (object)['key'=>'showImage','condition'=>'==','value'=>true], | |
| 1303 | - ], | |
| 1304 | - 'selector'=>'{{ULTP}} .ultp-block-content-wrap, {{ULTP}} .ultp-block-image { border-radius:{{imgRadius}}; }' | |
| 1305 | - ], | |
| 1306 | - ], | |
| 1307 | - ], | |
| 1308 | - 'imgHoverRadius' => [ | |
| 1309 | - 'type' => 'object', | |
| 1310 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 1311 | - 'style' => [ | |
| 1312 | - (object)[ | |
| 1313 | - 'depends' => [ | |
| 1314 | - (object)['key'=>'showImage','condition'=>'==','value'=>true], | |
| 1315 | - ], | |
| 1316 | - 'selector'=>'{{ULTP}} .ultp-block-content-wrap:hover, {{ULTP}} .ultp-block-content-wrap:hover .ultp-block-image { border-radius:{{imgHoverRadius}}; }' | |
| 1317 | - ], | |
| 1318 | - ], | |
| 1319 | - ], | |
| 1320 | - 'imgShadow' => [ | |
| 1321 | - 'type' => 'object', | |
| 1322 | - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], | |
| 1323 | - 'style' => [ | |
| 1324 | - (object)[ | |
| 1325 | - 'depends' => [ | |
| 1326 | - (object)['key'=>'showImage','condition'=>'==','value'=>true], | |
| 1327 | - ], | |
| 1328 | - 'selector'=>'{{ULTP}} .ultp-block-content-overlay' | |
| 1329 | - ], | |
| 1330 | - ], | |
| 1331 | - ], | |
| 1332 | - 'imgHoverShadow' => [ | |
| 1333 | - 'type' => 'object', | |
| 1334 | - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], | |
| 1335 | - 'style' => [ | |
| 1336 | - (object)[ | |
| 1337 | - 'depends' => [ | |
| 1338 | - (object)['key'=>'showImage','condition'=>'==','value'=>true], | |
| 1339 | - ], | |
| 1340 | - 'selector'=>'{{ULTP}} .ultp-block-item:hover .ultp-block-content-overlay' | |
| 1341 | - ], | |
| 1342 | - ], | |
| 1343 | - ], | |
| 1344 | - 'imgOverlay' => [ | |
| 1345 | - 'type' => 'boolean', | |
| 1346 | - 'default' => true, | |
| 1347 | - ], | |
| 1348 | - 'imgOverlayType' => [ | |
| 1349 | - 'type' => 'string', | |
| 1350 | - 'default' => 'flat', | |
| 1351 | - 'style' => [ | |
| 1352 | - (object)[ | |
| 1353 | - 'depends' => [ | |
| 1354 | - (object)['key'=>'imgOverlay','condition'=>'==','value'=>true], | |
| 1355 | - ] | |
| 1356 | - ], | |
| 1357 | - ] | |
| 1358 | - ], | |
| 1359 | - 'overlayColor' => [ | |
| 1360 | - 'type' => 'object', | |
| 1361 | - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#0e1523'], | |
| 1362 | - 'style' => [ | |
| 1363 | - (object)[ | |
| 1364 | - 'depends' => [ | |
| 1365 | - (object)['key'=>'imgOverlayType','condition'=>'==','value'=>'custom'], | |
| 1366 | - ], | |
| 1367 | - 'selector'=>'{{ULTP}} .ultp-block-image-custom > a::before' | |
| 1368 | - ], | |
| 1369 | - ], | |
| 208 | + public function register() { | |
| 209 | + register_block_type( | |
| 210 | + 'ultimate-post/post-grid-3', | |
| 211 | + array( | |
| 212 | + 'editor_script' => 'ultp-blocks-editor-script', | |
| 213 | + 'editor_style' => 'ultp-blocks-editor-css', | |
| 214 | + 'render_callback' => array( $this, 'content' ), | |
| 215 | + ) | |
| 216 | + ); | |
| 217 | + } | |
| 1370 | 218 | |
| 1371 | - ], | |
| 1372 | - 'imgOpacity' => [ | |
| 1373 | - 'type' => 'string', | |
| 1374 | - 'default' => .7, | |
| 1375 | - 'style' => [ | |
| 1376 | - (object)[ | |
| 1377 | - 'depends' => [ | |
| 1378 | - (object)['key'=>'imgOverlayType','condition'=>'==','value'=>'custom'], | |
| 1379 | - ], | |
| 1380 | - 'selector'=>'{{ULTP}} .ultp-block-image-custom > a::before { opacity: {{imgOpacity}}; }' | |
| 1381 | - ], | |
| 1382 | - ], | |
| 1383 | - ], | |
| 1384 | - //-------------------------- | |
| 1385 | - // Read more Setting/Style | |
| 1386 | - //-------------------------- | |
| 1387 | - 'showSmallBtn' => [ | |
| 1388 | - 'type' => 'boolean', | |
| 1389 | - 'default' => false, | |
| 1390 | - ], | |
| 1391 | - 'readMoreText' => [ | |
| 1392 | - 'type' => 'string', | |
| 1393 | - 'default' => '' | |
| 1394 | - ], | |
| 1395 | - 'readMoreIcon' => [ | |
| 1396 | - 'type' => 'string', | |
| 1397 | - 'default' => 'rightArrowLg', | |
| 1398 | - ], | |
| 1399 | - 'readMoreTypo' => [ | |
| 1400 | - 'type' => 'object', | |
| 1401 | - 'default' => (object)['openTypography' => 1, 'size' => (object)['lg' =>12, 'unit' =>'px'], 'height' => (object)['lg' =>'', 'unit' =>'px'], 'spacing' => (object)['lg' =>1, 'unit' =>'px'], 'transform' => 'uppercase', 'weight' => '400', 'decoration' => 'none','family'=>'' ], | |
| 1402 | - 'style' => [ | |
| 1403 | - (object)[ | |
| 1404 | - 'depends' => [ | |
| 1405 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1406 | - ], | |
| 1407 | - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-block-readmore a' | |
| 1408 | - ], | |
| 1409 | - ], | |
| 1410 | - ], | |
| 1411 | - 'readMoreIconSize' => [ | |
| 1412 | - 'type' => 'object', | |
| 1413 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 1414 | - 'style' => [ | |
| 1415 | - (object)[ | |
| 1416 | - 'depends' => [ | |
| 1417 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1418 | - ], | |
| 1419 | - 'selector' => '{{ULTP}} .ultp-block-readmore svg{ width:{{readMoreIconSize}}; }' | |
| 1420 | - ], | |
| 1421 | - ] | |
| 1422 | - ], | |
| 1423 | - 'readMoreColor' => [ | |
| 1424 | - 'type' => 'string', | |
| 1425 | - 'default' => '#fff', | |
| 1426 | - 'style' => [ | |
| 1427 | - (object)[ | |
| 1428 | - 'depends' => [ | |
| 1429 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1430 | - ], | |
| 1431 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a { color:{{readMoreColor}}; } {{ULTP}} .ultp-block-readmore a svg { fill:{{readMoreColor}}; }' | |
| 1432 | - ], | |
| 1433 | - ], | |
| 1434 | - ], | |
| 1435 | - 'readMoreBgColor' => [ | |
| 1436 | - 'type' => 'object', | |
| 1437 | - 'default' => (object)['openColor' => 0,'type' => 'color', 'color' => ''], | |
| 1438 | - 'style' => [ | |
| 1439 | - (object)[ | |
| 1440 | - 'depends' => [ | |
| 1441 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1442 | - ], | |
| 1443 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a' | |
| 1444 | - ], | |
| 1445 | - ], | |
| 1446 | - ], | |
| 1447 | - 'readMoreBorder' => [ | |
| 1448 | - 'type' => 'object', | |
| 1449 | - 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ], | |
| 1450 | - 'style' => [ | |
| 1451 | - (object)[ | |
| 1452 | - 'depends' => [ | |
| 1453 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1454 | - ], | |
| 1455 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a' | |
| 1456 | - ], | |
| 1457 | - ], | |
| 1458 | - ], | |
| 1459 | - 'readMoreRadius' => [ | |
| 1460 | - 'type' => 'object', | |
| 1461 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 1462 | - 'style' => [ | |
| 1463 | - (object)[ | |
| 1464 | - 'depends' => [ | |
| 1465 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1466 | - ], | |
| 1467 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a { border-radius:{{readMoreRadius}}; }' | |
| 1468 | - ], | |
| 1469 | - ], | |
| 1470 | - ], | |
| 1471 | - 'readMoreHoverColor' => [ | |
| 1472 | - 'type' => 'string', | |
| 1473 | - 'default' => 'rgba(255,255,255,0.80)', | |
| 1474 | - 'style' => [ | |
| 1475 | - (object)[ | |
| 1476 | - 'depends' => [ | |
| 1477 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1478 | - ], | |
| 1479 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover { color:{{readMoreHoverColor}}; } {{ULTP}} .ultp-block-readmore a:hover svg { fill:{{readMoreHoverColor}}; }' | |
| 1480 | - ], | |
| 1481 | - ], | |
| 1482 | - ], | |
| 1483 | - 'readMoreBgHoverColor' => [ | |
| 1484 | - 'type' => 'object', | |
| 1485 | - 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => ''], | |
| 1486 | - 'style' => [ | |
| 1487 | - (object)[ | |
| 1488 | - 'depends' => [ | |
| 1489 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1490 | - ], | |
| 1491 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover' | |
| 1492 | - ], | |
| 1493 | - ], | |
| 1494 | - ], | |
| 1495 | - 'readMoreHoverBorder' => [ | |
| 1496 | - 'type' => 'object', | |
| 1497 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 1498 | - 'style' => [ | |
| 1499 | - (object)[ | |
| 1500 | - 'depends' => [ | |
| 1501 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1502 | - ], | |
| 1503 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover' | |
| 1504 | - ], | |
| 1505 | - ], | |
| 1506 | - ], | |
| 1507 | - 'readMoreHoverRadius' => [ | |
| 1508 | - 'type' => 'object', | |
| 1509 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 1510 | - 'style' => [ | |
| 1511 | - (object)[ | |
| 1512 | - 'depends' => [ | |
| 1513 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1514 | - ], | |
| 1515 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover { border-radius:{{readMoreHoverRadius}}; }' | |
| 1516 | - ], | |
| 1517 | - ], | |
| 1518 | - ], | |
| 1519 | - 'readMoreSacing' => [ | |
| 1520 | - 'type' => 'object', | |
| 1521 | - 'default' => (object)['lg' =>(object)['top' => 15,'bottom' => '','left' => '','right' => '', 'unit' =>'px']], | |
| 1522 | - 'style' => [ | |
| 1523 | - (object)[ | |
| 1524 | - 'depends' => [ | |
| 1525 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1526 | - ], | |
| 1527 | - 'selector'=>'{{ULTP}} .ultp-block-readmore { margin:{{readMoreSacing}}; }' | |
| 1528 | - ], | |
| 1529 | - ], | |
| 1530 | - ], | |
| 1531 | - 'readMorePadding' => [ | |
| 1532 | - 'type' => 'object', | |
| 1533 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '','right' => '', 'unit' =>'px']], | |
| 1534 | - 'style' => [ | |
| 1535 | - (object)[ | |
| 1536 | - 'depends' => [ | |
| 1537 | - (object)['key'=>'readMore','condition'=>'==','value'=>true], | |
| 1538 | - ], | |
| 1539 | - 'selector'=>'{{ULTP}} .ultp-block-readmore a { padding:{{readMorePadding}}; }' | |
| 1540 | - ], | |
| 1541 | - ], | |
| 1542 | - ], | |
| 219 | + public function content( $attr, $noAjax ) { | |
| 220 | + $attr = wp_parse_args( $attr, $this->get_attributes() ); | |
| 221 | + global $unique_ID; | |
| 1543 | 222 | |
| 1544 | - //-------------------------- | |
| 1545 | - // Filter Setting/Style | |
| 1546 | - //-------------------------- | |
| 1547 | - 'filterType' => [ | |
| 1548 | - 'type' => 'string', | |
| 1549 | - 'default' => 'category' | |
| 1550 | - ], | |
| 1551 | - 'filterText' => [ | |
| 1552 | - 'type' => 'string', | |
| 1553 | - 'default' => 'all' | |
| 1554 | - ], | |
| 1555 | - 'filterCat' => [ | |
| 1556 | - 'type' => 'string', | |
| 1557 | - 'default' => '[]', | |
| 1558 | - 'style' => [ | |
| 1559 | - (object)[ | |
| 1560 | - 'depends' => [(object)['key' => 'filterType','condition' => '==','value' => 'category']] | |
| 1561 | - ], | |
| 1562 | - ], | |
| 1563 | - ], | |
| 1564 | - 'filterTag' => [ | |
| 1565 | - 'type' => 'string', | |
| 1566 | - 'default' => '[]', | |
| 1567 | - 'style' => [ | |
| 1568 | - (object)[ | |
| 1569 | - 'depends' => [(object)['key' => 'filterType','condition' => '==','value' => 'post_tag']] | |
| 1570 | - ], | |
| 1571 | - ], | |
| 1572 | - ], | |
| 1573 | - 'fliterTypo' => [ | |
| 1574 | - 'type' => 'object', | |
| 1575 | - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>18, 'unit' =>'px'], 'decoration' => 'none','family'=>'','weight'=>500], | |
| 1576 | - 'style' => [ | |
| 1577 | - (object)[ | |
| 1578 | - 'depends' => [ | |
| 1579 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1580 | - ], | |
| 1581 | - 'selector'=>'{{ULTP}} .ultp-filter-navigation .ultp-filter-wrap ul li a' | |
| 1582 | - ], | |
| 1583 | - ], | |
| 1584 | - ], | |
| 1585 | - 'filterColor' => [ | |
| 1586 | - 'type' => 'string', | |
| 1587 | - 'default' => '#0e1523', | |
| 1588 | - 'style' => [ | |
| 1589 | - (object)[ | |
| 1590 | - 'depends' => [ | |
| 1591 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1592 | - ], | |
| 1593 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li a { color:{{filterColor}}; }' | |
| 1594 | - ], | |
| 1595 | - ], | |
| 1596 | - ], | |
| 1597 | - 'filterHoverColor' => [ | |
| 1598 | - 'type' => 'string', | |
| 1599 | - 'default' => '#828282', | |
| 1600 | - 'style' => [ | |
| 1601 | - (object)[ | |
| 1602 | - 'depends' => [ | |
| 1603 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1604 | - ], | |
| 1605 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li a:hover, {{ULTP}} .ultp-filter-wrap ul li a.filter-active { color:{{filterHoverColor}}; }' | |
| 1606 | - ], | |
| 1607 | - ], | |
| 1608 | - ], | |
| 1609 | - 'filterBgColor' => [ | |
| 1610 | - 'type' => 'string', | |
| 1611 | - 'style' => [ | |
| 1612 | - (object)[ | |
| 1613 | - 'depends' => [ | |
| 1614 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1615 | - ], | |
| 1616 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a { background:{{filterBgColor}}; }' | |
| 1617 | - ], | |
| 1618 | - ], | |
| 1619 | - ], | |
| 1620 | - 'filterHoverBgColor' => [ | |
| 1621 | - 'type' => 'string', | |
| 1622 | - 'style' => [ | |
| 1623 | - (object)[ | |
| 1624 | - 'depends' => [ | |
| 1625 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1626 | - ], | |
| 1627 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a:hover, {{ULTP}} .ultp-filter-wrap ul li.filter-item > a.filter-active { background:{{filterHoverBgColor}}; }' | |
| 1628 | - ], | |
| 1629 | - ], | |
| 1630 | - ], | |
| 1631 | - 'filterBorder' => [ | |
| 1632 | - 'type' => 'object', | |
| 1633 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 1634 | - 'style' => [ | |
| 1635 | - (object)[ | |
| 1636 | - 'depends' => [ | |
| 1637 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1638 | - ], | |
| 1639 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a' | |
| 1640 | - ], | |
| 1641 | - ], | |
| 1642 | - ], | |
| 1643 | - 'filterHoverBorder' => [ | |
| 1644 | - 'type' => 'object', | |
| 1645 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 1646 | - 'style' => [ | |
| 1647 | - (object)[ | |
| 1648 | - 'depends' => [ | |
| 1649 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1650 | - ], | |
| 1651 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a:hover' | |
| 1652 | - ], | |
| 1653 | - ], | |
| 1654 | - ], | |
| 1655 | - 'filterRadius' => [ | |
| 1656 | - 'type' => 'object', | |
| 1657 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 1658 | - 'style' => [ | |
| 1659 | - (object)[ | |
| 1660 | - 'depends' => [ | |
| 1661 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1662 | - ], | |
| 1663 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a { border-radius:{{filterRadius}}; }' | |
| 1664 | - ], | |
| 1665 | - ], | |
| 1666 | - ], | |
| 1667 | - 'fliterSpacing' => [ | |
| 1668 | - 'type' => 'object', | |
| 1669 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'right' => '', 'left' => '20', 'unit' =>'px']], | |
| 1670 | - 'style' => [ | |
| 1671 | - (object)[ | |
| 1672 | - 'depends' => [ | |
| 1673 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1674 | - ], | |
| 1675 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li { margin:{{fliterSpacing}}; }' | |
| 1676 | - ], | |
| 1677 | - ], | |
| 1678 | - ], | |
| 1679 | - 'fliterPadding' => [ | |
| 1680 | - 'type' => 'object', | |
| 1681 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], | |
| 1682 | - 'style' => [ | |
| 1683 | - (object)[ | |
| 1684 | - 'depends' => [ | |
| 1685 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1686 | - ], | |
| 1687 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a { padding:{{fliterPadding}}; }' | |
| 1688 | - ], | |
| 1689 | - ], | |
| 1690 | - ], | |
| 1691 | - 'filterDropdownColor' => [ | |
| 1692 | - 'type' => 'string', | |
| 1693 | - 'default' => '#0e1523', | |
| 1694 | - 'style' => [ | |
| 1695 | - (object)[ | |
| 1696 | - 'depends' => [ | |
| 1697 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1698 | - ], | |
| 1699 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup li a { color:{{filterDropdownColor}}; }' | |
| 1700 | - ], | |
| 1701 | - ], | |
| 1702 | - ], | |
| 1703 | - 'filterDropdownHoverColor' => [ | |
| 1704 | - 'type' => 'string', | |
| 1705 | - 'default' => '#1740f5', | |
| 1706 | - 'style' => [ | |
| 1707 | - (object)[ | |
| 1708 | - 'depends' => [ | |
| 1709 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1710 | - ], | |
| 1711 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup li a:hover { color:{{filterDropdownHoverColor}}; }' | |
| 1712 | - ], | |
| 1713 | - ], | |
| 1714 | - ], | |
| 1715 | - 'filterDropdownBg' => [ | |
| 1716 | - 'type' => 'string', | |
| 1717 | - 'default' => '#fff', | |
| 1718 | - 'style' => [ | |
| 1719 | - (object)[ | |
| 1720 | - 'depends' => [ | |
| 1721 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1722 | - ], | |
| 1723 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup { background:{{filterDropdownBg}}; }' | |
| 1724 | - ], | |
| 1725 | - ], | |
| 1726 | - ], | |
| 1727 | - 'filterDropdownRadius' => [ | |
| 1728 | - 'type' => 'object', | |
| 1729 | - 'default' => (object)['lg'=>'0'], | |
| 1730 | - 'style' => [ | |
| 1731 | - (object)[ | |
| 1732 | - 'depends' => [ | |
| 1733 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1734 | - ], | |
| 1735 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup { border-radius:{{filterDropdownRadius}}; }' | |
| 1736 | - ], | |
| 1737 | - ], | |
| 1738 | - ], | |
| 1739 | - 'filterDropdownPadding' => [ | |
| 1740 | - 'type' => 'object', | |
| 1741 | - 'default' => (object)['lg' =>(object)['top' => '15','bottom' => '15','left' => '20','right' => '20', 'unit' =>'px']], | |
| 1742 | - 'style' => [ | |
| 1743 | - (object)[ | |
| 1744 | - 'depends' => [ | |
| 1745 | - (object)['key'=>'filterShow','condition'=>'==','value'=>true], | |
| 1746 | - ], | |
| 1747 | - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup { padding:{{filterDropdownPadding}}; }' | |
| 1748 | - ], | |
| 1749 | - ], | |
| 1750 | - ], | |
| 223 | + if ( ! $noAjax ) { | |
| 224 | + $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); | |
| 225 | + $attr['paged'] = $paged ? $paged : 1; | |
| 226 | + } | |
| 227 | + if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) { | |
| 228 | + $unique_ID = $attr['savedQueryUnique']; | |
| 229 | + } | |
| 1751 | 230 | |
| 1752 | - //-------------------------- | |
| 1753 | - // Pagination Setting/Style | |
| 1754 | - //-------------------------- | |
| 1755 | - 'paginationType' => [ | |
| 1756 | - 'type' => 'string', | |
| 1757 | - 'default' => 'loadMore', | |
| 1758 | - ], | |
| 1759 | - 'loadMoreText' => [ | |
| 1760 | - 'type' => 'string', | |
| 1761 | - 'default' => 'Load More', | |
| 1762 | - 'style' => [ | |
| 1763 | - (object)[ | |
| 1764 | - 'depends' => [ | |
| 1765 | - (object)['key'=>'paginationType','condition'=>'==','value'=>'loadMore'], | |
| 1766 | - ], | |
| 1767 | - ], | |
| 1768 | - ], | |
| 1769 | - ], | |
| 1770 | - 'paginationNav' => [ | |
| 1771 | - 'type' => 'string', | |
| 1772 | - 'default' => 'textArrow', | |
| 1773 | - 'style' => [ | |
| 1774 | - (object)[ | |
| 1775 | - 'depends' => [ | |
| 1776 | - (object)['key'=>'paginationType','condition'=>'==','value'=>'pagination'], | |
| 1777 | - ], | |
| 1778 | - ], | |
| 1779 | - ], | |
| 1780 | - ], | |
| 1781 | - 'paginationAjax' => [ | |
| 1782 | - 'type' => 'boolean', | |
| 1783 | - 'default' => true, | |
| 1784 | - 'style' => [ | |
| 1785 | - (object)[ | |
| 1786 | - 'depends' => [ | |
| 1787 | - (object)['key'=>'paginationType','condition'=>'==','value'=>'pagination'], | |
| 1788 | - ], | |
| 1789 | - ], | |
| 1790 | - ], | |
| 1791 | - ], | |
| 1792 | - 'navPosition' => [ | |
| 1793 | - 'type' => 'string', | |
| 1794 | - 'default' => 'topRight', | |
| 1795 | - 'style' => [ | |
| 1796 | - (object)[ | |
| 1797 | - 'depends' => [ | |
| 1798 | - (object)['key'=>'paginationType','condition'=>'==','value'=>'navigation'], | |
| 1799 | - ], | |
| 1800 | - ], | |
| 1801 | - ], | |
| 1802 | - ], | |
| 1803 | - 'pagiAlign' => [ | |
| 1804 | - 'type' => 'object', | |
| 1805 | - 'default' => (object)['lg' =>'left'], | |
| 1806 | - 'style' => [ | |
| 1807 | - (object)[ | |
| 1808 | - 'depends' => [ | |
| 1809 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1810 | - ], | |
| 1811 | - 'selector'=>'{{ULTP}} .ultp-loadmore, {{ULTP}} .ultp-next-prev-wrap ul, {{ULTP}} .ultp-pagination { text-align:{{pagiAlign}}; }' | |
| 1812 | - ], | |
| 1813 | - ], | |
| 1814 | - ], | |
| 1815 | - 'pagiTypo' => [ | |
| 1816 | - 'type' => 'object', | |
| 1817 | - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>20, 'unit' =>'px'], 'decoration' => 'none','family'=>''], | |
| 1818 | - 'style' => [ | |
| 1819 | - (object)[ | |
| 1820 | - 'depends' => [ | |
| 1821 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1822 | - ], | |
| 1823 | - 'selector'=>'{{ULTP}} .ultp-pagination-wrap .ultp-pagination li a, {{ULTP}} .ultp-loadmore .ultp-loadmore-action' | |
| 1824 | - ], | |
| 1825 | - ], | |
| 231 | + $block_name = 'post-grid-3'; | |
| 232 | + $vid_icon_redirect = true; // Its used for video icon do not remove it | |
| 233 | + $wraper_before = $wraper_after = $post_loop = ''; | |
| 234 | + $attr['queryNumber'] = ultimate_post()->get_post_number( 5, $attr['queryNumber'], $attr['queryNumPosts'] ); | |
| 235 | + $recent_posts = new \WP_Query( ultimate_post()->get_query( $attr ) ); | |
| 236 | + $pageNum = ultimate_post()->get_page_number( $attr, $recent_posts->found_posts ); | |
| 237 | + // Dummy Img Url | |
| 238 | + $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png'; | |
| 1826 | 239 | |
| 1827 | - ], | |
| 1828 | - 'pagiArrowSize' => [ | |
| 1829 | - 'type' => 'object', | |
| 1830 | - 'default' => (object)['lg'=>'14'], | |
| 1831 | - 'style' => [ | |
| 1832 | - (object)[ | |
| 1833 | - 'depends' => [ | |
| 1834 | - (object)['key'=>'paginationType','condition'=>'==','value'=>'navigation'], | |
| 1835 | - ], | |
| 1836 | - 'selector'=>'{{ULTP}} .ultp-next-prev-wrap ul li a svg { width:{{pagiArrowSize}}px; }' | |
| 1837 | - ], | |
| 1838 | - ], | |
| 240 | + // Loadmore and Unique content | |
| 241 | + if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { | |
| 242 | + $unique_ID = $attr['loadMoreQueryUnique']; | |
| 243 | + $current_unique_posts = $attr['ultp_current_unique_posts']; | |
| 244 | + } | |
| 1839 | 245 | |
| 1840 | - ], | |
| 1841 | - 'pagiColor' => [ | |
| 1842 | - 'type' => 'string', | |
| 1843 | - 'default' => '#fff', | |
| 1844 | - 'style' => [ | |
| 1845 | - (object)[ | |
| 1846 | - 'depends' => [ | |
| 1847 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1848 | - ], | |
| 1849 | - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore .ultp-loadmore-action { color:{{pagiColor}}; } {{ULTP}} .ultp-next-prev-wrap ul li a svg { fill:{{pagiColor}}; } {{ULTP}} .ultp-pagination li a svg, {{ULTP}} .ultp-loadmore .ultp-loadmore-action svg { fill:{{pagiColor}}; }' | |
| 1850 | - ], | |
| 1851 | - ], | |
| 1852 | - ], | |
| 1853 | - 'pagiBgColor' => [ | |
| 1854 | - 'type' => 'object', | |
| 1855 | - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#0e1523'], | |
| 1856 | - 'style' => [ | |
| 1857 | - (object)[ | |
| 1858 | - 'depends' => [ | |
| 1859 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1860 | - ], | |
| 1861 | - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore .ultp-loadmore-action' | |
| 1862 | - ], | |
| 1863 | - ], | |
| 1864 | - ], | |
| 1865 | - 'pagiBorder' => [ | |
| 1866 | - 'type' => 'object', | |
| 1867 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 1868 | - 'style' => [ | |
| 1869 | - (object)[ | |
| 1870 | - 'depends' => [ | |
| 1871 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1872 | - ], | |
| 1873 | - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action' | |
| 1874 | - ], | |
| 1875 | - ], | |
| 1876 | - ], | |
| 1877 | - 'pagiShadow' => [ | |
| 1878 | - 'type' => 'object', | |
| 1879 | - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], | |
| 1880 | - 'style' => [ | |
| 1881 | - (object)[ | |
| 1882 | - 'depends' => [ | |
| 1883 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1884 | - ], | |
| 1885 | - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action' | |
| 1886 | - ], | |
| 1887 | - ], | |
| 1888 | - ], | |
| 1889 | - 'pagiRadius' => [ | |
| 1890 | - 'type' => 'object', | |
| 1891 | - 'default' => (object)['lg' =>(object)['top' => '2','bottom' => '2','left' => '2','right' => '2', 'unit' =>'px']], | |
| 1892 | - 'style' => [ | |
| 1893 | - (object)[ | |
| 1894 | - 'depends' => [ | |
| 1895 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1896 | - ], | |
| 1897 | - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action { border-radius:{{pagiRadius}}; }' | |
| 1898 | - ], | |
| 1899 | - ], | |
| 1900 | - ], | |
| 1901 | - 'pagiHoverColor' => [ | |
| 1902 | - 'type' => 'string', | |
| 1903 | - 'default' => '#fff', | |
| 1904 | - 'style' => [ | |
| 1905 | - (object)[ | |
| 1906 | - 'depends' => [ | |
| 1907 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1908 | - ], | |
| 1909 | - 'selector'=>'{{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover { color:{{pagiHoverColor}}; } {{ULTP}} .ultp-pagination li a:hover svg { fill:{{pagiHoverColor}}; } {{ULTP}} .ultp-next-prev-wrap ul li a:hover svg, {{ULTP}} .ultp-loadmore .ultp-loadmore-action:hover svg { fill:{{pagiHoverColor}}; } @media (min-width: 768px) { {{ULTP}} .ultp-pagination li a:hover { color:{{pagiHoverColor}};}}' | |
| 1910 | - ], | |
| 1911 | - ], | |
| 1912 | - ], | |
| 1913 | - 'pagiHoverbg' => [ | |
| 1914 | - 'type' => 'object', | |
| 1915 | - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#1740f5', 'replace'=>1], | |
| 1916 | - 'style' => [ | |
| 1917 | - (object)[ | |
| 1918 | - 'depends' => [ | |
| 1919 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1920 | - ], | |
| 1921 | - 'selector'=>'{{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover { {{pagiHoverbg}} } @media (min-width: 768px) { {{ULTP}} .ultp-pagination li a:hover { {{pagiHoverbg}} }}' | |
| 1922 | - ], | |
| 1923 | - ], | |
| 1924 | - ], | |
| 1925 | - 'pagiHoverBorder' => [ | |
| 1926 | - 'type' => 'object', | |
| 1927 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 1928 | - 'style' => [ | |
| 1929 | - (object)[ | |
| 1930 | - 'depends' => [ | |
| 1931 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1932 | - ], | |
| 1933 | - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover' | |
| 1934 | - ], | |
| 1935 | - ], | |
| 1936 | - ], | |
| 1937 | - 'pagiHoverShadow' => [ | |
| 1938 | - 'type' => 'object', | |
| 1939 | - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], | |
| 1940 | - 'style' => [ | |
| 1941 | - (object)[ | |
| 1942 | - 'depends' => [ | |
| 1943 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1944 | - ], | |
| 1945 | - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover' | |
| 1946 | - ], | |
| 1947 | - ], | |
| 1948 | - ], | |
| 1949 | - 'pagiHoverRadius' => [ | |
| 1950 | - 'type' => 'object', | |
| 1951 | - 'default' => (object)['lg' =>(object)['top' => '2','bottom' => '2','left' => '2','right' => '2', 'unit' =>'px']], | |
| 1952 | - 'style' => [ | |
| 1953 | - (object)[ | |
| 1954 | - 'depends' => [ | |
| 1955 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1956 | - ], | |
| 1957 | - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover { border-radius:{{pagiHoverRadius}}; }' | |
| 1958 | - ], | |
| 1959 | - ], | |
| 1960 | - ], | |
| 1961 | - 'pagiPadding' => [ | |
| 1962 | - 'type' => 'object', | |
| 1963 | - 'default' => (object)['lg' =>(object)['top' => '8','bottom' => '8','left' => '14','right' => '14', 'unit' =>'px']], | |
| 1964 | - 'style' => [ | |
| 1965 | - (object)[ | |
| 1966 | - 'depends' => [ | |
| 1967 | - (object)['key'=>'paginationShow','condition'=>'==','value'=>true], | |
| 1968 | - ], | |
| 1969 | - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action { padding:{{pagiPadding}}; }' | |
| 1970 | - ], | |
| 1971 | - ], | |
| 1972 | - ], | |
| 1973 | - 'navMargin' => [ | |
| 1974 | - 'type' => 'object', | |
| 1975 | - 'default' => (object)['lg' =>(object)['top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'unit' =>'px']], | |
| 1976 | - 'style' => [ | |
| 1977 | - (object)[ | |
| 1978 | - 'depends' => [ | |
| 1979 | - (object)['key'=>'paginationType','condition'=>'==','value'=>'navigation'], | |
| 1980 | - ], | |
| 1981 | - 'selector'=>'{{ULTP}} .ultp-next-prev-wrap ul { margin:{{navMargin}}; }' | |
| 1982 | - ], | |
| 1983 | - ], | |
| 1984 | - ], | |
| 1985 | - 'pagiMargin' => [ | |
| 1986 | - 'type' => 'object', | |
| 1987 | - 'default' => (object)['lg' =>(object)['top' => '30', 'right' => '0', 'bottom' => '0', 'left' => '0', 'unit' =>'px']], | |
| 1988 | - 'style' => [ | |
| 1989 | - (object)[ | |
| 1990 | - 'depends' => [ | |
| 1991 | - (object)['key'=>'paginationType','condition'=>'!=','value'=>'navigation'], | |
| 1992 | - ], | |
| 1993 | - 'selector'=>'{{ULTP}} .ultp-pagination, {{ULTP}} .ultp-loadmore { margin:{{pagiMargin}}; }' | |
| 1994 | - ], | |
| 1995 | - ], | |
| 1996 | - ], | |
| 246 | + $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : ''; | |
| 247 | + $attr['align'] = isset( $attr['align'] ) && $attr['align'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['align'] ) : ''; | |
| 248 | + $attr['advanceId'] = isset( $attr['advanceId'] ) ? sanitize_html_class( $attr['advanceId'] ) : ''; | |
| 249 | + $attr['blockId'] = isset( $attr['blockId'] ) ? sanitize_html_class( $attr['blockId'] ) : ''; | |
| 250 | + $attr['contentTag'] = in_array( $attr['contentTag'], ultimate_post()->ultp_allowed_block_tags() ) ? $attr['contentTag'] : 'div'; | |
| 251 | + $attr['layout'] = sanitize_html_class( $attr['layout'] ); | |
| 252 | + $attr['column'] = sanitize_html_class( $attr['column'] ); | |
| 253 | + $attr['imgAnimation'] = sanitize_html_class( $attr['imgAnimation'] ); | |
| 254 | + $attr['imgOverlayType'] = sanitize_html_class( $attr['imgOverlayType'] ); | |
| 255 | + $attr['popupAutoPlay'] = $attr['popupAutoPlay'] == true; | |
| 256 | + $attr['readMoreText'] = wp_kses( $attr['readMoreText'], ultimate_post()->ultp_allowed_html_tags() ); | |
| 257 | + $attr['titleAnimation'] = sanitize_html_class( $attr['titleAnimation'] ); | |
| 258 | + $attr['overlayContentPosition'] = sanitize_html_class( $attr['overlayContentPosition'] ); | |
| 1997 | 259 | |
| 260 | + $iscroll = ''; | |
| 261 | + $wrap_data = ''; | |
| 262 | + if ( $attr['infiniteScroll'] ) { | |
| 263 | + $iscroll = 'ultp-iscroll-active'; | |
| 264 | + include ULTP_PATH . 'blocks/template/infinite_scroll_data.php'; | |
| 265 | + } | |
| 1998 | 266 | |
| 267 | + if ( $recent_posts->have_posts() ) { | |
| 1999 | 268 | |
| 2000 | - //-------------------------- | |
| 2001 | - // Wrapper Style | |
| 2002 | - //-------------------------- | |
| 2003 | - 'loadingColor' => [ | |
| 2004 | - 'type' => 'string', | |
| 2005 | - 'default' => '#000', | |
| 2006 | - 'style' => [ | |
| 2007 | - (object)[ | |
| 2008 | - 'selector'=>'{{ULTP}} .ultp-loading .ultp-loading-blocks div { --loading-block-color: {{loadingColor}}; }' | |
| 2009 | - ], | |
| 2010 | - ], | |
| 2011 | - ], | |
| 2012 | - 'wrapBg' => [ | |
| 2013 | - 'type' => 'object', | |
| 2014 | - 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#f5f5f5'], | |
| 2015 | - 'style' => [ | |
| 2016 | - (object)[ | |
| 2017 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper' | |
| 2018 | - ], | |
| 2019 | - ], | |
| 2020 | - ], | |
| 2021 | - 'wrapBorder' => [ | |
| 2022 | - 'type' => 'object', | |
| 2023 | - 'default' => (object)['openBorder'=>0, 'width' =>(object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 2024 | - 'style' => [ | |
| 2025 | - (object)[ | |
| 2026 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper' | |
| 2027 | - ], | |
| 2028 | - ], | |
| 2029 | - ], | |
| 2030 | - 'wrapShadow' => [ | |
| 2031 | - 'type' => 'object', | |
| 2032 | - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], | |
| 2033 | - 'style' => [ | |
| 2034 | - (object)[ | |
| 2035 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper' | |
| 2036 | - ], | |
| 2037 | - ], | |
| 2038 | - ], | |
| 2039 | - 'wrapRadius' => [ | |
| 2040 | - 'type' => 'object', | |
| 2041 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 2042 | - 'style' => [ | |
| 2043 | - (object)[ | |
| 2044 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper { border-radius:{{wrapRadius}}; }' | |
| 2045 | - ], | |
| 2046 | - ], | |
| 2047 | - ], | |
| 2048 | - 'wrapHoverBackground' => [ | |
| 2049 | - 'type' => 'object', | |
| 2050 | - 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#1740f5'], | |
| 2051 | - 'style' => [ | |
| 2052 | - (object)[ | |
| 2053 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover' | |
| 2054 | - ], | |
| 2055 | - ], | |
| 2056 | - ], | |
| 2057 | - 'wrapHoverBorder' => [ | |
| 2058 | - 'type' => 'object', | |
| 2059 | - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'], | |
| 2060 | - 'style' => [ | |
| 2061 | - (object)[ | |
| 2062 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover' | |
| 2063 | - ], | |
| 2064 | - ], | |
| 2065 | - ], | |
| 2066 | - 'wrapHoverRadius' => [ | |
| 2067 | - 'type' => 'object', | |
| 2068 | - 'default' => (object)['lg' =>'', 'unit' =>'px'], | |
| 2069 | - 'style' => [ | |
| 2070 | - (object)[ | |
| 2071 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover { border-radius:{{wrapHoverRadius}}; }' | |
| 2072 | - ], | |
| 2073 | - ], | |
| 2074 | - ], | |
| 2075 | - 'wrapHoverShadow' => [ | |
| 2076 | - 'type' => 'object', | |
| 2077 | - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'], | |
| 2078 | - 'style' => [ | |
| 2079 | - (object)[ | |
| 2080 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover' | |
| 2081 | - ], | |
| 2082 | - ], | |
| 2083 | - ], | |
| 2084 | - 'wrapMargin' => [ | |
| 2085 | - 'type' => 'object', | |
| 2086 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']], | |
| 2087 | - 'style' => [ | |
| 2088 | - (object)[ | |
| 2089 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper { margin:{{wrapMargin}}; }' | |
| 2090 | - ], | |
| 2091 | - ], | |
| 2092 | - ], | |
| 2093 | - 'wrapOuterPadding' => [ | |
| 2094 | - 'type' => 'object', | |
| 2095 | - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']], | |
| 2096 | - 'style' => [ | |
| 2097 | - (object)[ | |
| 2098 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper { padding:{{wrapOuterPadding}}; }' | |
| 2099 | - ], | |
| 2100 | - ], | |
| 2101 | - ], | |
| 2102 | - 'wrapInnerPadding' => [ | |
| 2103 | - 'type' => 'object', | |
| 2104 | - 'default' => (object)['lg' =>(object)['unit' =>'px']], | |
| 2105 | - 'style' => [ | |
| 2106 | - (object)[ | |
| 2107 | - 'selector'=>'{{ULTP}} .ultp-block-wrapper { padding:{{wrapInnerPadding}}; }' | |
| 2108 | - ], | |
| 2109 | - ], | |
| 2110 | - ], | |
| 2111 | - 'advanceId' => [ | |
| 2112 | - 'type' => 'string', | |
| 2113 | - 'default' => '', | |
| 2114 | - ], | |
| 2115 | - 'advanceZindex' => [ | |
| 2116 | - 'type' => 'number', | |
| 2117 | - 'default' => '', | |
| 2118 | - 'style' => [ | |
| 2119 | - (object)[ | |
| 2120 | - 'selector' => '{{ULTP}} {z-index:{{advanceZindex}};}' | |
| 2121 | - ], | |
| 2122 | - ], | |
| 2123 | - ], | |
| 2124 | - 'hideExtraLarge' => [ | |
| 2125 | - 'type' => 'boolean', | |
| 2126 | - 'default' => false, | |
| 2127 | - 'style' => [ | |
| 2128 | - (object)[ | |
| 2129 | - 'selector' => '{{ULTP}} {display:none;}' | |
| 2130 | - ], | |
| 2131 | - ], | |
| 2132 | - ], | |
| 2133 | - 'hideDesktop' => [ | |
| 2134 | - 'type' => 'boolean', | |
| 2135 | - 'default' => false, | |
| 2136 | - 'style' => [ | |
| 2137 | - (object)[ | |
| 2138 | - 'selector' => '{{ULTP}} {display:none;}' | |
| 2139 | - ], | |
| 2140 | - ], | |
| 2141 | - ], | |
| 2142 | - 'hideTablet' => [ | |
| 2143 | - 'type' => 'boolean', | |
| 2144 | - 'default' => false, | |
| 2145 | - 'style' => [ | |
| 2146 | - (object)[ | |
| 2147 | - 'selector' => '{{ULTP}} {display:none;}' | |
| 2148 | - ], | |
| 2149 | - ], | |
| 2150 | - ], | |
| 2151 | - 'hideMobile' => [ | |
| 2152 | - 'type' => 'boolean', | |
| 2153 | - 'default' => false, | |
| 2154 | - 'style' => [ | |
| 2155 | - (object)[ | |
| 2156 | - 'selector' => '{{ULTP}} {display:none;}' | |
| 2157 | - ], | |
| 2158 | - ], | |
| 2159 | - ], | |
| 2160 | - 'advanceCss' => [ | |
| 2161 | - 'type' => 'string', | |
| 2162 | - 'default' => '', | |
| 2163 | - 'style' => [(object)['selector' => '']], | |
| 2164 | - ] | |
| 2165 | - ); | |
| 2166 | - | |
| 2167 | - if( $default ){ | |
| 2168 | - $temp = array(); | |
| 2169 | - foreach ($attributes as $key => $value) { | |
| 2170 | - if( isset($value['default']) ){ | |
| 2171 | - $temp[$key] = $value['default']; | |
| 2172 | - } | |
| 2173 | - } | |
| 2174 | - return $temp; | |
| 2175 | - }else{ | |
| 2176 | - return $attributes; | |
| 2177 | - } | |
| 2178 | - } | |
| 269 | + // Pagination Block Html | |
| 270 | + include ULTP_PATH . 'blocks/template/pagination_block.php'; | |
| 2179 | 271 | |
| 2180 | - public function register() { | |
| 2181 | - register_block_type( 'ultimate-post/post-grid-3', | |
| 2182 | - array( | |
| 2183 | - 'attributes' => $this->get_attributes(), | |
| 2184 | - 'description' => __( 'Post grid with top big posts overlay style.' ), | |
| 2185 | - 'keywords' => [__( 'grid' ), __( 'post' ), __( 'article' ), __('listing')], | |
| 2186 | - 'render_callback' => array($this, 'content') | |
| 2187 | - ) | |
| 2188 | - ); | |
| 2189 | - } | |
| 272 | + $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . $attr['advanceId'] . '" ' : '' ) . ' class="ultp-post-grid-block wp-block-ultimate-post-' . $block_name . ' ultp-block-' . $attr['blockId'] . '' . ( $attr['align'] ? ' align' . $attr['align'] : '' ) . '' . ( $attr['className'] ? ' ' . $attr['className'] : '' ) . ' ' . $iscroll . '">'; | |
| 273 | + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>'; | |
| 2190 | 274 | |
| 2191 | - public function content($attr, $noAjax) { | |
| 275 | + // Loading | |
| 276 | + $wraper_before .= ultimate_post()->postx_loading(); | |
| 2192 | 277 | |
| 2193 | - if(!$noAjax){ | |
| 2194 | - $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
| 2195 | - $attr['paged'] = $paged; | |
| 2196 | - } | |
| 278 | + if ( $attr['headingShow'] || $attr['filterShow'] || $attr['paginationShow'] ) { | |
| 279 | + $wraper_before .= '<div class="ultp-heading-filter">'; | |
| 280 | + $wraper_before .= '<div class="ultp-heading-filter-in">'; | |
| 2197 | 281 | |
| 2198 | - $block_name = 'post-grid-3'; | |
| 2199 | - $page_post_id = get_the_ID(); | |
| 2200 | - $wraper_before = $wraper_after = $post_loop = ''; | |
| 2201 | - $recent_posts = new \WP_Query( ultimate_post()->get_query( $attr ) ); | |
| 2202 | - $pageNum = ultimate_post()->get_page_number($attr, $recent_posts->found_posts); | |
| 2203 | - | |
| 2204 | - if ($recent_posts->have_posts()) { | |
| 2205 | - $wraper_before .= '<div '.($attr['advanceId']?'id="'.$attr['advanceId'].'" ':'').' class="wp-block-ultimate-post-'.$block_name.' ultp-block-'.$attr["blockId"].''.(isset($attr["align"])? ' align' .$attr["align"]:'').''.(isset($attr["className"])?' '.$attr["className"]:'').'">'; | |
| 2206 | - $wraper_before .= '<div class="ultp-block-wrapper">'; | |
| 282 | + // Heading | |
| 283 | + include ULTP_PATH . 'blocks/template/heading.php'; | |
| 2207 | 284 | |
| 2208 | - // Loading | |
| 2209 | - $wraper_before .= ultimate_post()->loading(); | |
| 285 | + if ( $attr['filterShow'] || $attr['paginationShow'] ) { | |
| 286 | + $wraper_before .= '<div class="ultp-filter-navigation">'; | |
| 2210 | 287 | |
| 2211 | - if ($attr['headingShow'] || $attr['filterShow'] || $attr['paginationShow']) { | |
| 2212 | - $wraper_before .= '<div class="ultp-heading-filter">'; | |
| 2213 | - $wraper_before .= '<div class="ultp-heading-filter-in">'; | |
| 2214 | - | |
| 2215 | - // Heading | |
| 2216 | - include ULTP_PATH.'blocks/template/heading.php'; | |
| 2217 | - | |
| 2218 | - if ($attr['filterShow'] || $attr['paginationShow']) { | |
| 2219 | - $wraper_before .= '<div class="ultp-filter-navigation">'; | |
| 288 | + // Filter | |
| 289 | + if ( $attr['filterShow'] && $attr['queryType'] != 'posts' && $attr['queryType'] != 'customPosts' ) { | |
| 290 | + include ULTP_PATH . 'blocks/template/filter.php'; | |
| 291 | + } | |
| 2220 | 292 | |
| 2221 | - // Filter | |
| 2222 | - if($attr['filterShow']) { | |
| 2223 | - include ULTP_PATH.'blocks/template/filter.php'; | |
| 2224 | - } | |
| 293 | + // Navigation | |
| 294 | + if ( $attr['paginationShow'] && ( $attr['paginationType'] == 'navigation' ) && ( $attr['navPosition'] == 'topRight' ) ) { | |
| 295 | + include ULTP_PATH . 'blocks/template/navigation-before.php'; | |
| 296 | + } | |
| 297 | + $wraper_before .= '</div>'; | |
| 298 | + } | |
| 2225 | 299 | |
| 2226 | - // Navigation | |
| 2227 | - if($attr['paginationShow'] && ($attr['paginationType'] == 'navigation') && ($attr['navPosition'] == 'topRight')) { | |
| 2228 | - include ULTP_PATH.'blocks/template/navigation-before.php'; | |
| 2229 | - } | |
| 2230 | - $wraper_before .= '</div>'; | |
| 2231 | - } | |
| 300 | + $wraper_before .= '</div>'; | |
| 301 | + $wraper_before .= '</div>'; | |
| 302 | + } | |
| 2232 | 303 | |
| 2233 | - $wraper_before .= '</div>'; | |
| 2234 | - $wraper_before .= '</div>'; | |
| 2235 | - } | |
| 2236 | - | |
| 2237 | - $wraper_before .= '<div class="ultp-block-items-wrap ultp-block-row ultp-'.$attr['layout'].' ultp-block-column'.$attr["column"].'">'; | |
| 2238 | - $idx = $noAjax ? 1 : 0; | |
| 2239 | - while ( $recent_posts->have_posts() ): $recent_posts->the_post(); | |
| 2240 | - | |
| 2241 | - include ULTP_PATH.'blocks/template/data.php'; | |
| 304 | + $wraper_before .= '<div class="ultp-block-items-wrap ultp-block-row ultp-' . $attr['layout'] . ' ultp-block-column' . $attr['column'] . '">'; | |
| 305 | + $idx = ( $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) ? ( $noAjax ? 1 : 0 ) : 0; | |
| 306 | + while ( $recent_posts->have_posts() ) : | |
| 307 | + $recent_posts->the_post(); | |
| 2242 | 308 | |
| 2243 | - include ULTP_PATH.'blocks/template/category.php'; | |
| 2244 | - | |
| 2245 | - $post_loop .= '<div class="ultp-block-item post-id-'.$post_id.($attr['titleAnimation'] ? ' ultp-animation-'.$attr['titleAnimation'] : '').'">'; | |
| 2246 | - $post_loop .= '<div class="ultp-block-content-wrap ultp-block-content-overlay">'; | |
| 309 | + $dcContent = array_fill( 0, $attr['dcSize'], '' ); | |
| 2247 | 310 | |
| 2248 | - if( has_post_thumbnail() && $attr['showImage'] ){ | |
| 2249 | - $post_loop .= '<div class="ultp-block-image ultp-block-image-'.$attr['imgAnimation'].($attr["imgOverlay"] ? ' ultp-block-image-overlay ultp-block-image-'.$attr["imgOverlayType"].' ultp-block-image-'.$attr["imgOverlayType"].$idx : '' ).'">'; | |
| 2250 | - $post_loop .= '<a href="'.$titlelink.'" '.($attr['openInTab'] ? 'target="_blank"' : '').'>'.ultimate_post()->get_image($post_thumb_id, 'full', '', $title).'</a>'; | |
| 2251 | - if( ($attr['catPosition'] != 'aboveTitle') && ($idx == 0 || $attr['showSmallCat']) && $attr['catShow'] ) { | |
| 2252 | - $post_loop .= '<div class="ultp-category-img-grid">'.$category.'</div>'; | |
| 2253 | - } | |
| 2254 | - $post_loop .= '</div>'; | |
| 2255 | - } else { | |
| 2256 | - $post_loop .= '<div class="ultp-block-image ultp-block-empty-image"></div>'; | |
| 2257 | - } | |
| 2258 | - $post_loop .= '<div class="ultp-block-content ultp-block-content-'.$attr['overlayContentPosition'].'">'; | |
| 2259 | - $post_loop .= '<div class="ultp-block-content-inner">'; | |
| 2260 | - // Category | |
| 2261 | - if(($attr['catPosition'] == 'aboveTitle') && ($idx == 0 || $attr['showSmallCat'] ) && $attr['catShow']) { | |
| 2262 | - $post_loop .= $category; | |
| 2263 | - } | |
| 311 | + if ( ultimate_post()->is_dc_active( $attr ) ) { | |
| 312 | + $dcContent = \ULTP\DCService::get_dc_content_for_block( $attr, $dcContent ); | |
| 313 | + } | |
| 2264 | 314 | |
| 2265 | - // Title | |
| 2266 | - if ($title && $attr['titleShow'] && $attr['titlePosition'] == 1) { | |
| 2267 | - include ULTP_PATH.'blocks/template/title.php'; | |
| 2268 | - } | |
| 2269 | - | |
| 2270 | - // Meta | |
| 2271 | - if( $attr['metaShow'] && ($idx == 0 || $attr['showSmallMeta']) && $attr['metaPosition'] =='top' ) { | |
| 2272 | - include ULTP_PATH.'blocks/template/meta.php'; | |
| 2273 | - } | |
| 2274 | - | |
| 2275 | - // Title | |
| 2276 | - if ($title && $attr['titleShow'] && $attr['titlePosition'] == 0) { | |
| 2277 | - include ULTP_PATH.'blocks/template/title.php'; | |
| 2278 | - } | |
| 315 | + include ULTP_PATH . 'blocks/template/data.php'; | |
| 2279 | 316 | |
| 2280 | - // Excerpt | |
| 2281 | - if(($idx == 0 || $attr['showSmallExcerpt']) && $attr['excerptShow']) { | |
| 2282 | - if ( $attr['showFullExcerpt']== 0 ) { | |
| 2283 | - $post_loop .= '<div class="ultp-block-excerpt">'.ultimate_post()->excerpt($post_id, $attr['excerptLimit']).'</div>'; | |
| 2284 | - } else { | |
| 2285 | - $post_loop .= '<div class="ultp-block-excerpt">'.get_the_excerpt().'</div>'; | |
| 2286 | - } | |
| 2287 | - } | |
| 317 | + include ULTP_PATH . 'blocks/template/category.php'; | |
| 2288 | 318 | |
| 2289 | - // Read More | |
| 2290 | - if ($attr['readMore'] && ($idx == 0 || $attr['showSmallBtn'])) { | |
| 2291 | - $post_loop .= '<div class="ultp-block-readmore"><a href="'.$titlelink.'" '.($attr['openInTab'] ? 'target="_blank"' : '').'>'.($attr['readMoreText'] ? $attr['readMoreText'] : __( "Read More", "ultimate-post" )).ultimate_post()->svg_icon($attr['readMoreIcon']).'</a></div>'; | |
| 2292 | - } | |
| 319 | + if ( $attr['queryUnique'] ) { | |
| 320 | + $unique_ID[ $attr['queryUnique'] ][] = $post_id; | |
| 321 | + $current_unique_posts[] = $post_id; | |
| 322 | + } | |
| 2293 | 323 | |
| 2294 | - // Meta Bottom | |
| 2295 | - if( $attr['metaShow'] && ($idx == 0 || $attr['showSmallMeta']) && $attr['metaPosition'] =='bottom' ) { | |
| 2296 | - include ULTP_PATH.'blocks/template/meta.php'; | |
| 2297 | - } | |
| 2298 | - $post_loop .= '</div>'; | |
| 2299 | - $post_loop .= '</div>'; | |
| 2300 | - $post_loop .= '</div>'; | |
| 2301 | - $post_loop .= '</div>'; | |
| 2302 | - $idx ++; | |
| 2303 | - endwhile; | |
| 324 | + $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item post-id-' . $post_id . ( $attr['titleAnimation'] ? ' ultp-animation-' . $attr['titleAnimation'] : '' ) . '">'; | |
| 325 | + $post_loop .= '<div class="ultp-block-content-wrap ultp-block-content-overlay">'; | |
| 2304 | 326 | |
| 2305 | - if($attr['paginationShow'] && ($attr['paginationType'] == 'loadMore')) { | |
| 2306 | - $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; | |
| 2307 | - } | |
| 2308 | - | |
| 2309 | - $wraper_after .= '</div>';//ultp-block-items-wrap | |
| 2310 | - | |
| 2311 | - // Load More | |
| 2312 | - if ($attr['paginationShow'] && ($attr['paginationType'] == 'loadMore')) { | |
| 2313 | - include ULTP_PATH.'blocks/template/loadmore.php'; | |
| 2314 | - } | |
| 327 | + if ( ( $post_thumb_id || $attr['fallbackEnable'] ) && $attr['showImage'] ) { | |
| 328 | + $post_loop .= '<div class="ultp-block-image ultp-block-image-' . $attr['imgAnimation'] . ( $attr['imgOverlay'] ? ' ultp-block-image-overlay ultp-block-image-' . $attr['imgOverlayType'] : '' ) . '">'; | |
| 329 | + $post_loop .= '<a href="' . $titlelink . '" ' . ( $attr['openInTab'] ? 'target="_blank"' : '' ) . '>'; | |
| 330 | + // Image Size | |
| 331 | + $imgSize = $idx == 0 ? $attr['imgCrop'] : $attr['imgCropSmall']; | |
| 332 | + // Post Image Id | |
| 333 | + $block_img_id = $post_thumb_id ? $post_thumb_id : ( $attr['fallbackEnable'] && isset( $attr['fallbackImg']['id'] ) ? $attr['fallbackImg']['id'] : '' ); | |
| 334 | + // Post Image | |
| 335 | + if ( $post_thumb_id || ( $attr['fallbackEnable'] && $block_img_id ) ) { | |
| 336 | + $post_loop .= ultimate_post()->get_image( $block_img_id, $imgSize, '', $title, $attr['imgSrcset'], $attr['imgLazy'] ); | |
| 337 | + } else { | |
| 338 | + $video = ultimate_post()->get_youtube_id( $post_video ); | |
| 339 | + $post_loop .= '<img src="' . ( $video ? 'https://img.youtube.com/vi/' . $video . '/0.jpg' : $dummy_url ) . '" alt="dummy-img" />'; | |
| 340 | + } | |
| 341 | + $post_loop .= '</a>'; | |
| 342 | + if ( ( $attr['catPosition'] != 'aboveTitle' ) && ( $idx == 0 || $attr['showSmallCat'] ) && $attr['catShow'] ) { | |
| 343 | + $post_loop .= '<div class="ultp-category-img-grid">' . $category . '</div>'; | |
| 344 | + } | |
| 345 | + $post_loop .= '</div>'; | |
| 346 | + if ( $post_video ) { | |
| 347 | + include ULTP_PATH . 'blocks/template/video_icon.php'; | |
| 348 | + } | |
| 349 | + } else { | |
| 350 | + if ( $post_video ) { | |
| 351 | + include ULTP_PATH . 'blocks/template/video_icon.php'; | |
| 352 | + } | |
| 353 | + $post_loop .= '<div class="ultp-block-image ultp-block-empty-image"></div>'; | |
| 354 | + } | |
| 355 | + $post_loop .= '<div class="ultp-block-content ultp-block-content-' . $attr['overlayContentPosition'] . '">'; | |
| 356 | + $post_loop .= '<div class="ultp-block-content-inner">'; | |
| 2315 | 357 | |
| 2316 | - // Navigation | |
| 2317 | - if ($attr['paginationShow'] && ($attr['paginationType'] == 'navigation') && ($attr['navPosition'] != 'topRight')) { | |
| 2318 | - include ULTP_PATH.'blocks/template/navigation-after.php'; | |
| 2319 | - } | |
| 358 | + $post_loop .= $dcContent[7]; | |
| 2320 | 359 | |
| 2321 | - // Pagination | |
| 2322 | - if ($attr['paginationShow'] && ($attr['paginationType'] == 'pagination')) { | |
| 2323 | - include ULTP_PATH.'blocks/template/pagination.php'; | |
| 2324 | - } | |
| 360 | + // Category | |
| 361 | + if ( ( $attr['catPosition'] == 'aboveTitle' ) && ( $idx == 0 || $attr['showSmallCat'] ) && $attr['catShow'] ) { | |
| 362 | + $post_loop .= $category; | |
| 363 | + } | |
| 2325 | 364 | |
| 2326 | - $wraper_after .= '</div>'; | |
| 2327 | - $wraper_after .= '</div>'; | |
| 365 | + $post_loop .= $dcContent[6]; | |
| 2328 | 366 | |
| 2329 | - wp_reset_query(); | |
| 2330 | - } | |
| 367 | + // Title | |
| 368 | + if ( $title && $attr['titleShow'] && $attr['titlePosition'] == 1 ) { | |
| 369 | + include ULTP_PATH . 'blocks/template/title.php'; | |
| 370 | + } | |
| 2331 | 371 | |
| 2332 | - return $noAjax ? $post_loop : $wraper_before.$post_loop.$wraper_after; | |
| 2333 | - } | |
| 372 | + $post_loop .= $dcContent[5]; | |
| 2334 | 373 | |
| 2335 | -} | |
| 374 | + // Meta | |
| 375 | + if ( $attr['metaShow'] && ( $idx == 0 || $attr['showSmallMeta'] ) && $attr['metaPosition'] == 'top' ) { | |
| 376 | + include ULTP_PATH . 'blocks/template/meta.php'; | |
| 377 | + } | |
| 378 | + | |
| 379 | + $post_loop .= $dcContent[4]; | |
| 380 | + | |
| 381 | + // Title | |
| 382 | + if ( $title && $attr['titleShow'] && $attr['titlePosition'] == 0 ) { | |
| 383 | + include ULTP_PATH . 'blocks/template/title.php'; | |
| 384 | + } | |
| 385 | + | |
| 386 | + $post_loop .= $dcContent[3]; | |
| 387 | + | |
| 388 | + // Excerpt | |
| 389 | + if ( ( $idx == 0 || $attr['showSmallExcerpt'] ) && $attr['excerptShow'] ) { | |
| 390 | + $post_loop .= '<div class="ultp-block-excerpt">' . ultimate_post()->get_excerpt( $post_id, $attr['showSeoMeta'], $attr['showFullExcerpt'], $attr['excerptLimit'] ) . '</div>'; | |
| 391 | + } | |
| 392 | + | |
| 393 | + $post_loop .= $dcContent[2]; | |
| 394 | + | |
| 395 | + // Read More | |
| 396 | + if ( $attr['readMore'] && ( $idx == 0 || $attr['showSmallBtn'] ) ) { | |
| 397 | + $post_loop .= '<div class="ultp-block-readmore"><a aria-label="' . $title . '" href="' . $titlelink . '" ' . ( $attr['openInTab'] ? 'target="_blank"' : '' ) . '>' . ( $attr['readMoreText'] ? $attr['readMoreText'] : esc_html__( 'Read More', 'ultimate-post' ) ) . ultimate_post()->get_svg_icon( $attr['readMoreIcon'] ) . '</a></div>'; | |
| 398 | + } | |
| 399 | + | |
| 400 | + $post_loop .= $dcContent[1]; | |
| 401 | + | |
| 402 | + // Meta Bottom | |
| 403 | + if ( $attr['metaShow'] && ( $idx == 0 || $attr['showSmallMeta'] ) && $attr['metaPosition'] == 'bottom' ) { | |
| 404 | + include ULTP_PATH . 'blocks/template/meta.php'; | |
| 405 | + } | |
| 406 | + | |
| 407 | + $post_loop .= $dcContent[0]; | |
| 408 | + | |
| 409 | + $post_loop .= '</div>'; | |
| 410 | + $post_loop .= '</div>'; | |
| 411 | + $post_loop .= '</div>'; | |
| 412 | + if ( $post_video && $attr['enablePopup'] ) { | |
| 413 | + include ULTP_PATH . 'blocks/template/video_popup.php'; | |
| 414 | + } | |
| 415 | + $post_loop .= '</' . $attr['contentTag'] . '>'; | |
| 416 | + ++$idx; | |
| 417 | + endwhile; | |
| 418 | + if ( $attr['queryUnique'] ) { | |
| 419 | + $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>'; | |
| 420 | + } | |
| 421 | + // if ( ($attr['paginationShow'] || $attr['advPaginationEnable']) && ($attr['paginationType'] == 'loadMore')) { | |
| 422 | + // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>'; | |
| 423 | + // } | |
| 424 | + | |
| 425 | + $wraper_after .= '</div>'; // ultp-block-items-wrap | |
| 426 | + | |
| 427 | + // Load More | |
| 428 | + if ( $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) { | |
| 429 | + include ULTP_PATH . 'blocks/template/loadmore.php'; | |
| 430 | + } | |
| 431 | + | |
| 432 | + // Navigation | |
| 433 | + if ( $attr['paginationShow'] && ( $attr['paginationType'] == 'navigation' ) && ( $attr['navPosition'] != 'topRight' ) ) { | |
| 434 | + include ULTP_PATH . 'blocks/template/navigation-after.php'; | |
| 435 | + } | |
| 436 | + | |
| 437 | + // Pagination | |
| 438 | + if ( $attr['paginationShow'] && ( $attr['paginationType'] == 'pagination' ) ) { | |
| 439 | + include ULTP_PATH . 'blocks/template/pagination.php'; | |
| 440 | + } | |
| 441 | + | |
| 442 | + $wraper_after .= '</div>'; | |
| 443 | + $wraper_after .= $pagi_block_html; | |
| 444 | + $wraper_after .= '</div>'; | |
| 445 | + | |
| 446 | + wp_reset_query(); | |
| 447 | + } else { | |
| 448 | + $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] ); | |
| 449 | + } | |
| 450 | + | |
| 451 | + return $noAjax ? $post_loop : $wraper_before . $post_loop . $wraper_after; | |
| 452 | + } | |
| 453 | +} | |