PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.9.22
Shortcodes and extra features for Phlox theme v2.9.22
2.17.22 2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elements / recent-posts-tiles-carousel.php
auxin-elements / includes / elements Last commit date
about-widget.php 4 years ago accordion-widget.php 4 years ago accordion.php 4 years ago attachment-url.php 4 years ago audio.php 4 years ago before-after.php 4 years ago button.php 4 years ago code.php 4 years ago contact-box.php 4 years ago contact-form.php 4 years ago custom-list.php 4 years ago divider.php 4 years ago dropcap.php 4 years ago facebook.php 4 years ago flickr.php 4 years ago gallery.php 4 years ago general-element-fields.php 4 years ago gmap.php 4 years ago highlight.php 4 years ago image.php 4 years ago instagram-feed.php 4 years ago latest-items.php 4 years ago latest-posts-slider.php 4 years ago popular-posts-widget.php 4 years ago products-grid.php 4 years ago quote.php 4 years ago recent-posts-grid-carousel.php 4 years ago recent-posts-land-style.php 4 years ago recent-posts-masonry.php 4 years ago recent-posts-tiles-carousel.php 4 years ago recent-posts-tiles.php 4 years ago recent-posts-timeline.php 4 years ago recent-posts-widget.php 4 years ago recent-products.php 4 years ago related-posts.php 8 years ago sample-element.php 4 years ago search.php 4 years ago socials-list.php 4 years ago staff.php 4 years ago tab-widget.php 4 years ago tabs.php 4 years ago testimonial.php 4 years ago text.php 4 years ago touch-slider.php 4 years ago video.php 4 years ago
recent-posts-tiles-carousel.php
781 lines
1 <?php
2 /**
3 * Recent Posts Tiles in Carousel Mode
4 *
5 *
6 * @package Auxin
7 * @license LICENSE.txt
8 * @author averta
9 * @link http://phlox.pro/
10 * @copyright (c) 2010-2022 averta
11 */
12
13 function auxin_get_recent_posts_tiles_carousel_master_array( $master_array ) {
14
15 $master_array['aux_recent_posts_tiles_carousel'] = array(
16 'name' => __('Recent Posts Tiles Carousel', 'auxin-elements' ),
17 'auxin_output_callback' => 'auxin_widget_recent_posts_tiles_carousel_callback',
18 'base' => 'aux_recent_posts_tiles_carousel',
19 'description' => __('It adds recent posts in tiles carousel mode.', 'auxin-elements' ),
20 'class' => 'aux-widget-recent-posts-tiles aux-carousel',
21 'show_settings_on_create' => true,
22 'weight' => 1,
23 'is_widget' => false,
24 'is_shortcode' => true,
25 'is_vc' => true,
26 'category' => THEME_NAME,
27 'group' => '',
28 'admin_enqueue_js' => '',
29 'admin_enqueue_css' => '',
30 'front_enqueue_js' => '',
31 'front_enqueue_css' => '',
32 'icon' => 'aux-element aux-pb-icons-tile',
33 'custom_markup' => '',
34 'js_view' => '',
35 'html_template' => '',
36 'deprecated' => '',
37 'content_element' => '',
38 'as_parent' => '',
39 'as_child' => '',
40 'params' => array(
41 array(
42 'heading' => __('Title','auxin-elements' ),
43 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
44 'param_name' => 'title',
45 'type' => 'textfield',
46 'value' => '',
47 'holder' => 'textfield',
48 'class' => 'title',
49 'admin_label' => false,
50 'dependency' => '',
51 'weight' => '',
52 'group' => '',
53 'edit_field_class' => ''
54 ),
55 array(
56 'heading' => __('Categories', 'auxin-elements'),
57 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
58 'param_name' => 'cat',
59 'type' => 'aux_taxonomy',
60 'taxonomy' => 'category',
61 'def_value' => ' ',
62 'holder' => '',
63 'class' => 'cat',
64 'admin_label' => false,
65 'dependency' => '',
66 'weight' => '',
67 'group' => __( 'Query', 'auxin-elements' ),
68 'edit_field_class' => ''
69 ),
70 array(
71 'heading' => __('Number of posts to show in per page', 'auxin-elements'),
72 'description' => '',
73 'param_name' => 'num',
74 'type' => 'textfield',
75 'value' => '5',
76 'holder' => '',
77 'class' => 'num',
78 'admin_label' => false,
79 'dependency' => '',
80 'weight' => '',
81 'group' => __( 'Query', 'auxin-elements' ),
82 'edit_field_class' => ''
83 ),
84 array(
85 'heading' => __('Number of Pages', 'auxin-elements'),
86 'description' => '',
87 'param_name' => 'page',
88 'type' => 'textfield',
89 'value' => '2',
90 'holder' => '',
91 'class' => 'num',
92 'admin_label' => false,
93 'dependency' => '',
94 'weight' => '',
95 'group' => __( 'Query', 'auxin-elements' ),
96 'edit_field_class' => ''
97 ),
98 array(
99 'heading' => __('Exclude posts without media','auxin-elements' ),
100 'description' => '',
101 'param_name' => 'exclude_without_media',
102 'type' => 'aux_switch',
103 'value' => '1',
104 'class' => '',
105 'admin_label' => false,
106 'dependency' => '',
107 'weight' => '',
108 'group' => __( 'Query', 'auxin-elements' ),
109 'edit_field_class' => ''
110 ),
111 array(
112 'heading' => __('Exclude custom post formats','auxin-elements' ),
113 'description' => '',
114 'param_name' => 'exclude_custom_post_formats',
115 'type' => 'aux_switch',
116 'value' => '1',
117 'class' => '',
118 'admin_label' => false,
119 'dependency' => '',
120 'weight' => '',
121 'group' => __( 'Query', 'auxin-elements' ),
122 'edit_field_class' => ''
123 ),
124 array(
125 'heading' => __('Exclude quote and link post formats','auxin-elements' ),
126 'description' => '',
127 'param_name' => 'exclude_quote_link',
128 'type' => 'aux_switch',
129 'value' => '1',
130 'class' => '',
131 'admin_label' => false,
132 'dependency' => array(
133 'element' => 'exclude_custom_post_formats',
134 'value' => '0'
135 ),
136 'weight' => '',
137 'group' => __( 'Query', 'auxin-elements' ),
138 'edit_field_class' => ''
139 ),
140 array(
141 'heading' => __('Order by', 'auxin-elements'),
142 'description' => '',
143 'param_name' => 'order_by',
144 'type' => 'dropdown',
145 'def_value' => 'date',
146 'holder' => '',
147 'class' => 'order_by',
148 'value' => array (
149 'date' => __('Date', 'auxin-elements'),
150 'menu_order date' => __('Menu Order', 'auxin-elements'),
151 'title' => __('Title', 'auxin-elements'),
152 'ID' => __('ID', 'auxin-elements'),
153 'rand' => __('Random', 'auxin-elements'),
154 'comment_count' => __('Comments', 'auxin-elements'),
155 'modified' => __('Date Modified', 'auxin-elements'),
156 'author' => __('Author', 'auxin-elements'),
157 'post__in' => __('Inserted Post IDs', 'auxin-elements')
158 ),
159 'admin_label' => false,
160 'dependency' => '',
161 'weight' => '',
162 'group' => __( 'Query', 'auxin-elements' ),
163 'edit_field_class' => ''
164 ),
165 array(
166 'heading' => __('Order', 'auxin-elements'),
167 'description' => '',
168 'param_name' => 'order',
169 'type' => 'dropdown',
170 'def_value' => 'DESC',
171 'holder' => '',
172 'class' => 'order',
173 'value' =>array (
174 'DESC' => __('Descending', 'auxin-elements'),
175 'ASC' => __('Ascending', 'auxin-elements'),
176 ),
177 'admin_label' => false,
178 'dependency' => '',
179 'weight' => '',
180 'group' => __( 'Query', 'auxin-elements' ),
181 'edit_field_class' => ''
182 ),
183 array(
184 'heading' => __('Only posts','auxin-elements' ),
185 'description' => __('If you intend to display ONLY specific posts, you should specify the posts here. You have to insert the post IDs that are separated by comma (eg. 53,34,87,25).', 'auxin-elements' ),
186 'param_name' => 'only_posts__in',
187 'type' => 'textfield',
188 'value' => '',
189 'holder' => '',
190 'class' => '',
191 'admin_label' => false,
192 'dependency' => '',
193 'weight' => '',
194 'group' => __( 'Query', 'auxin-elements' ),
195 'edit_field_class' => ''
196 ),
197 array(
198 'heading' => __('Include posts','auxin-elements' ),
199 'description' => __('If you intend to include additional posts, you should specify the posts here. You have to insert the Post IDs that are separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
200 'param_name' => 'include',
201 'type' => 'textfield',
202 'value' => '',
203 'holder' => '',
204 'class' => '',
205 'admin_label' => false,
206 'dependency' => '',
207 'weight' => '',
208 'group' => __( 'Query', 'auxin-elements' ),
209 'edit_field_class' => ''
210 ),
211 array(
212 'heading' => __('Exclude posts','auxin-elements' ),
213 'description' => __('If you intend to exclude specific posts from result, you should specify the posts here. You have to insert the Post IDs that are separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
214 'param_name' => 'exclude',
215 'type' => 'textfield',
216 'value' => '',
217 'holder' => '',
218 'class' => '',
219 'admin_label' => false,
220 'dependency' => '',
221 'weight' => '',
222 'group' => __( 'Query', 'auxin-elements' ),
223 'edit_field_class' => ''
224 ),
225 array(
226 'heading' => __('Order by', 'auxin-elements'),
227 'description' => '',
228 'param_name' => 'order_by',
229 'type' => 'dropdown',
230 'def_value' => 'date',
231 'holder' => '',
232 'class' => 'order_by',
233 'value' => array (
234 'date' => __('Date', 'auxin-elements'),
235 'menu_order date' => __('Menu Order', 'auxin-elements'),
236 'title' => __('Title', 'auxin-elements'),
237 'ID' => __('ID', 'auxin-elements'),
238 'rand' => __('Random', 'auxin-elements'),
239 'comment_count' => __('Comments', 'auxin-elements'),
240 'modified' => __('Date Modified', 'auxin-elements'),
241 'author' => __('Author', 'auxin-elements'),
242 'post__in' => __('Inserted Post IDs', 'auxin-elements')
243 ),
244 'admin_label' => false,
245 'dependency' => '',
246 'weight' => '',
247 'group' => __( 'Query', 'auxin-elements' ),
248 'edit_field_class' => ''
249 ),
250 array(
251 'heading' => __('Order', 'auxin-elements'),
252 'description' => '',
253 'param_name' => 'order',
254 'type' => 'dropdown',
255 'def_value' => 'DESC',
256 'holder' => '',
257 'class' => 'order',
258 'value' =>array (
259 'DESC' => __('Descending', 'auxin-elements'),
260 'ASC' => __('Ascending', 'auxin-elements'),
261 ),
262 'admin_label' => false,
263 'dependency' => '',
264 'weight' => '',
265 'group' => __( 'Query', 'auxin-elements' ),
266 'edit_field_class' => ''
267 ),
268 array(
269 'heading' => __('Start offset','auxin-elements' ),
270 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
271 'param_name' => 'offset',
272 'type' => 'textfield',
273 'value' => '',
274 'holder' => '',
275 'class' => '',
276 'admin_label' => false,
277 'dependency' => '',
278 'weight' => '',
279 'group' => __( 'Query', 'auxin-elements' ),
280 'edit_field_class' => ''
281 ),
282 array(
283 'heading' => __( 'Post Tile styles','auxin-elements' ),
284 'description' => '',
285 'param_name' => 'tile_style_pattern',
286 'type' => 'aux_visual_select',
287 'def_value' => 'default',
288 'holder' => '',
289 'class' => 'tile_style_pattern',
290 'admin_label' => false,
291 'dependency' => '',
292 'weight' => '',
293 'group' => __( 'Style', 'auxin-elements' ),
294 'edit_field_class' => '',
295 'choices' => array(
296 'default' => array(
297 'label' => __( 'Default', 'auxin-elements' ),
298 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-5.svg'
299 ),
300 'pattern-1' => array(
301 'label' => __( 'Pattern 1', 'auxin-elements' ),
302 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-3.svg'
303 ),
304 'pattern-2' => array(
305 'label' => __( 'Pattern 2', 'auxin-elements' ),
306 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-6.svg'
307 ),
308 'pattern-3' => array(
309 'label' => __( 'Pattern 3', 'auxin-elements' ),
310 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-7.svg'
311 ),
312 'pattern-4' => array(
313 'label' => __( 'Pattern 4', 'auxin-elements' ),
314 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-8.svg'
315 ),
316 'pattern-5' => array(
317 'label' => __( 'Pattern 5', 'auxin-elements' ),
318 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-4.svg'
319 ),
320 'pattern-6' => array(
321 'label' => __('Pattern 6', 'auxin-elements' ),
322 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-1.svg'
323 ),
324 'pattern-7' => array(
325 'label' => __('Pattern 7', 'auxin-elements' ),
326 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-2.svg'
327 ),
328 )
329 ),
330 array(
331 'heading' => __('Post tile style','auxin-elements' ),
332 'description' => '',
333 'param_name' => 'tile_style',
334 'type' => 'dropdown',
335 'def_value' => '',
336 'holder' => '',
337 'class' => 'tile_style',
338 'admin_label' => false,
339 'dependency' => '',
340 'weight' => '',
341 'group' => __( 'Style', 'auxin-elements' ),
342 'edit_field_class' => '',
343 'value' => array(
344 'dark' => __('Dark', 'auxin-elements'),
345 'light' => __('Light', 'auxin-elements'),
346 'light-overlay' => __('Light Overlay', 'auxin-elements'),
347 ),
348 ),
349 array(
350 'heading' => __('Button Navigation Style','auxin-elements' ),
351 'description' => '',
352 'param_name' => 'button_style',
353 'type' => 'aux_visual_select',
354 'def_value' => '',
355 'holder' => '',
356 'class' => 'button_style',
357 'admin_label' => false,
358 'dependency' => array(
359 'element' => 'carousel_navigation_control',
360 'value' => 'arrows'
361 ),
362 'weight' => '',
363 'group' => __( 'Style', 'auxin-elements' ),
364 'edit_field_class' => '',
365 'choices' => array(
366 'pattern-1' => array(
367 'label' => __('Pattern 1', 'auxin-elements' ),
368 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
369 ),
370 'pattern-2' => array(
371 'label' => __('Pattern 2', 'auxin-elements' ),
372 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
373 ),
374 ),
375 ),
376 array(
377 'heading' => __('Insert post title','auxin-elements' ),
378 'description' => '',
379 'param_name' => 'display_title',
380 'type' => 'aux_switch',
381 'value' => '1',
382 'class' => 'display_title',
383 'admin_label' => false,
384 'dependency' => '',
385 'weight' => '',
386 'group' => '' ,
387 'edit_field_class' => ''
388 ),
389 array(
390 'heading' => __('Insert post meta','auxin-elements' ),
391 'description' => '',
392 'param_name' => 'show_info',
393 'type' => 'aux_switch',
394 'value' => '1',
395 'class' => '',
396 'admin_label' => false,
397 'weight' => '',
398 'group' => '' ,
399 'edit_field_class' => ''
400 ),
401 array(
402 'heading' => __('Navigation type', 'auxin-elements'),
403 'description' => '',
404 'param_name' => 'carousel_navigation',
405 'type' => 'dropdown',
406 'def_value' => 'peritem',
407 'holder' => '',
408 'class' => 'num',
409 'value' => array(
410 'peritem' => __('Move per column', 'auxin-elements'),
411 'perpage' => __('Move per page', 'auxin-elements'),
412 'scroll' => __('Smooth scroll', 'auxin-elements'),
413 ),
414 'admin_label' => false,
415 'dependency' => array(
416 'element' => 'preview_mode',
417 'value' => 'carousel'
418 ),
419 'weight' => '',
420 'group' => __( 'Carousel', 'auxin-elements' ),
421 'edit_field_class' => ''
422 ),
423 array(
424 'heading' => __('Navigation control', 'auxin-elements'),
425 'description' => '',
426 'param_name' => 'carousel_navigation_control',
427 'type' => 'dropdown',
428 'def_value' => 'arrows',
429 'holder' => '',
430 'class' => 'num',
431 'value' => array(
432 'arrows' => __('Arrows', 'auxin-elements'),
433 'bullets' => __('Bullets', 'auxin-elements'),
434 '' => __('None', 'auxin-elements'),
435 ),
436 'dependency' => array(
437 'element' => 'preview_mode',
438 'value' => 'carousel'
439 ),
440 'weight' => '',
441 'admin_label' => false,
442 'group' => __( 'Carousel', 'auxin-elements' ),
443 'edit_field_class' => ''
444 ),
445 array(
446 'heading' => __('Loop navigation','auxin-elements' ),
447 'description' => '',
448 'param_name' => 'carousel_loop',
449 'type' => 'aux_switch',
450 'value' => '1',
451 'class' => '',
452 'dependency' => array(
453 'element' => 'preview_mode',
454 'value' => 'carousel'
455 ),
456 'weight' => '',
457 'group' => __( 'Carousel', 'auxin-elements' ),
458 'edit_field_class' => ''
459 ),
460 array(
461 'heading' => __('Autoplay carousel','auxin-elements' ),
462 'description' => '',
463 'param_name' => 'carousel_autoplay',
464 'type' => 'aux_switch',
465 'value' => '0',
466 'class' => '',
467 'admin_label' => false,
468 'dependency' => array(
469 'element' => 'preview_mode',
470 'value' => 'carousel'
471 ),
472 'weight' => '',
473 'group' => __( 'Carousel', 'auxin-elements' ),
474 'edit_field_class' => ''
475 ),
476 array(
477 'heading' => __('Autoplay delay','auxin-elements' ),
478 'description' => __('Specifies the delay between auto-forwarding in seconds.', 'auxin-elements' ),
479 'param_name' => 'carousel_autoplay_delay',
480 'type' => 'textfield',
481 'value' => '2',
482 'holder' => '',
483 'class' => 'excerpt_len',
484 'admin_label' => false,
485 'dependency' => array(
486 'element' => 'preview_mode',
487 'value' => 'carousel'
488 ),
489 'weight' => '',
490 'group' => __( 'Carousel', 'auxin-elements' ),
491 'edit_field_class' => ''
492 ),
493 array(
494 'heading' => __('Extra class name','auxin-elements' ),
495 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements' ),
496 'param_name' => 'extra_classes',
497 'type' => 'textfield',
498 'value' => '',
499 'holder' => '',
500 'class' => 'extra_classes',
501 'admin_label' => false,
502 'dependency' => '',
503 'weight' => '',
504 'group' => '',
505 'edit_field_class' => ''
506 )
507 )
508 );
509
510 return $master_array;
511 }
512
513 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_tiles_carousel_master_array', 10, 1 );
514
515
516
517
518 /**
519 * Element without loop and column
520 * The front-end output of this element is returned by the following function
521 *
522 * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
523 * @param string $shortcode_content The shorcode content
524 * @return string The output of element markup
525 */
526 function auxin_widget_recent_posts_tiles_carousel_callback( $atts, $shortcode_content = null ){
527
528 global $aux_content_width;
529
530 // Defining default attributes
531 $default_atts = array(
532 'title' => '', // header title
533 'cat' => ' ',
534 'num' => '5', // max generated entry
535 'only_posts__in' => '', // display only these post IDs. array or string comma separated
536 'include' => '', // include these post IDs in result too. array or string comma separated
537 'exclude' => '', // exclude these post IDs from result. array or string comma separated
538 'posts_per_page' => -1,
539 'offset' => '',
540 'paged' => '',
541 'order_by' => 'date',
542 'order' => 'DESC',
543 'excerpt_len' => '160',
544 'exclude_without_media' => true,
545 'exclude_custom_post_formats' => true,
546 'page' => '2',
547 'exclude_quote_link' => true,
548 'exclude_post_formats_in' => array(), // the list od post formats to exclude
549 'tile_style' => 'light',
550 'tile_style_pattern' => 'default',
551 'button_style' => 'pattern-1',
552 'display_title' => true,
553 'show_info' => true,
554 'show_date' => true,
555 'display_categories' => true,
556 // 'preloadable' => false,
557 // 'preload_preview' => true,
558 // 'preload_bgcolor' => '',
559 'extra_classes' => '',
560 'extra_column_classes' => '',
561 'custom_el_id' => '',
562 'taxonomy_name' => 'category',
563 'template_part_file' => 'theme-parts/entry/post-tile',
564 'extra_template_path' => '',
565 'universal_id' => '',
566 'reset_query' => true,
567 'carousel_autoplay' => false,
568 'carousel_navigation' => 'peritem',
569 'carousel_navigation_control' => 'arrows',
570 'carousel_autoplay_delay' => '2',
571 'carousel_loop' => 1,
572 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
573 'wp_query_args' => array(), // additional wp_query args
574 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
575 'loadmore_per_page' => '',
576 'base' => 'aux_recent_posts_tiles_carousel',
577 'base_class' => 'aux-widget-recent-posts-tiles aux-carousel'
578 );
579
580 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
581 extract( $result['parsed_atts'] );
582
583 // specify the post formats that should be excluded -------
584 $exclude_post_formats_in = (array) $exclude_post_formats_in;
585
586 if( $exclude_custom_post_formats ){
587 $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
588 }
589 if( $exclude_quote_link ){
590 $exclude_post_formats_in[] = 'quote';
591 $exclude_post_formats_in[] = 'link';
592 }
593 $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
594
595 // --------------
596
597 ob_start();
598
599 $tax_args = array();
600 if( ! empty( $cat ) && $cat != " " && ( ! is_array( $cat ) || ! in_array( " ", $cat ) ) ) {
601 $tax_args = array(
602 array(
603 'taxonomy' => $taxonomy_name,
604 'field' => 'term_id',
605 'terms' => ! is_array( $cat ) ? explode( ",", $cat ) : $cat
606 )
607 );
608 }
609
610 global $wp_query;
611
612 if( ! $use_wp_query ){
613
614 // create wp_query to get latest items -----------
615 $args = array(
616 'post_type' => 'post',
617 'orderby' => $order_by,
618 'order' => $order,
619 'offset' => $offset,
620 'tax_query' => $tax_args,
621 'post_status' => 'publish',
622 'posts_per_page' => $num * $page,
623 'ignore_sticky_posts' => 1,
624 'include_posts__in' => $include, // include posts in this liat
625 'posts__not_in' => $exclude, // exclude posts in this list
626 'posts__in' => $only_posts__in, // only posts in this list
627
628 'exclude_without_media' => $exclude_without_media,
629 'exclude_post_formats_in' => $exclude_post_formats_in
630 );
631
632 // ---------------------------------------------------------------------
633
634 // add the additional query args if available
635 if( $wp_query_args ){
636 $args = wp_parse_args( $args, $wp_query_args );
637 }
638
639 // pass the args through the auxin query parser
640 $wp_query = new WP_Query( auxin_parse_query_args( $args ) );
641 }
642
643 // widget header ------------------------------
644 echo wp_kses_post( $result['widget_header'] );
645 echo wp_kses_post( $result['widget_title'] );
646
647 $tile_style = 'aux-tile-' . esc_attr( $tile_style ) . ' ';
648 $phone_break_point = 767;
649 $tablet_break_point = 1025;
650
651 $show_comments = true; // shows comments icon
652 $post_counter = 0;
653 $item_class = 'aux-post-tile aux-image-box';
654
655 if( ! empty( $loadmore_type ) ) {
656 $item_class .= ' aux-ajax-item';
657 }
658
659 $container_class = 'master-carousel aux-no-js aux-mc-before-init ' . $tile_style;
660
661 $have_posts = $wp_query->have_posts();
662
663 if( $have_posts ){
664
665
666 echo ! $skip_wrappers ? sprintf( '<div data-lazyload="true" data-element-id="%s" class="%s" data-columns="1" data-autoplay="%s" data-navigation="%s" data-loop="%s" data-delay="%s" data-wrap-controls="true" data-bullets="%s" data-bullet-class="aux-bullets aux-small aux-mask" data-arrows="%s" data-same-height="false">',
667 esc_attr( $universal_id ),
668 esc_attr( $container_class ),
669 esc_attr( $carousel_autoplay ),
670 esc_attr( $carousel_navigation ),
671 esc_attr( $carousel_loop ),
672 esc_attr( $carousel_autoplay_delay ),
673 'bullets' == $carousel_navigation_control ? 'true' : 'false',
674 'arrows' == $carousel_navigation_control ? 'true' : 'false'
675 ) : '';
676
677 while ( $wp_query->have_posts() ) {
678 $item_pattern_info = auxin_get_tile_pattern( $tile_style_pattern , $post_counter, $aux_content_width );
679
680 $post_counter++;
681
682 if ( ( $post_counter % $num ) == 1 ){
683 echo '<div class="aux-mc-item aux-tiles-layout">';
684 }
685
686
687 $wp_query->the_post();
688 $post = $wp_query->post;
689
690
691 $post_vars = auxin_get_post_format_media(
692 $post,
693 array(
694 'request_from' => 'archive',
695 'media_width' => $phone_break_point,
696 'media_size' => $item_pattern_info['size'],
697 'upscale_image' => true,
698 'image_from_content' => ! $exclude_without_media,
699 'ignore_formats' => array( '*' ),
700 'preloadable' => false,
701 'image_sizes' => 'auto',
702 'srcset_sizes' => 'auto'
703 )
704 );
705
706 extract( $post_vars );
707
708 $post_classes = $item_class .' post '. $item_pattern_info['classname'];
709
710 $the_format = get_post_format( $post );
711
712 include auxin_get_template_file( $template_part_file, '', $extra_template_path );
713
714 if ( ( $post_counter % $num ) == 0 ){
715 $post_counter = 0;
716 echo '</div>';
717 }
718
719 }
720 if ( $page != 1 && 'bullets' != $carousel_navigation_control ) {
721 ?>
722 <div class="aux-carousel-controls">
723 <?php if ( $button_style === 'pattern-1' ) { ?>
724 <div class="aux-next-arrow aux-arrow-nav aux-outline aux-hover-fill">
725 <span class="aux-svg-arrow aux-small-right"></span>
726 <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-right"></span>
727 </div>
728 <div class="aux-prev-arrow aux-arrow-nav aux-outline aux-hover-fill">
729 <span class="aux-svg-arrow aux-small-left"></span>
730 <span class="aux-hover-arrow aux-white aux-svg-arrow aux-small-left"></span>
731 </div>
732 <?php } else { ?>
733 <div class="aux-next-arrow aux-arrow-nav aux-hover-slide aux-round aux-outline aux-medium">
734 <span class="aux-overlay"></span>
735 <span class="aux-svg-arrow aux-medium-right"></span>
736 <span class="aux-hover-arrow aux-svg-arrow aux-medium-right aux-white"></span>
737 </div>
738 <div class="aux-prev-arrow aux-arrow-nav aux-hover-slide aux-round aux-outline aux-medium">
739 <span class="aux-overlay"></span>
740 <span class="aux-svg-arrow aux-medium-left"></span>
741 <span class="aux-hover-arrow aux-svg-arrow aux-medium-left aux-white"></span>
742 </div>
743 <?php } ?>
744 </div>
745
746 <?php
747 }
748
749 if( ! $skip_wrappers ) {
750 // End tag for aux-ajax-view wrapper
751 echo '</div>';
752 // Execute load more functionality
753 if( $wp_query->found_posts > $loadmore_per_page ) {
754 echo auxin_get_load_more_controller( $loadmore_type );
755 }
756
757 } else {
758 // Get post counter in the query
759 echo '<span class="aux-post-count hidden">'. esc_html( $wp_query->post_count ) .'</span>';
760 echo '<span class="aux-all-posts-count hidden">'. esc_html( $wp_query->found_posts ) .'</span>';
761 }
762 }
763
764 if( $reset_query ){
765 wp_reset_query();
766 }
767
768 // return false if no result found
769 if( ! $have_posts ){
770 ob_get_clean();
771 return false;
772 }
773
774 // widget footer ------------------------------
775 echo wp_kses_post( $result['widget_footer'] );
776
777 return ob_get_clean();
778 }
779
780
781