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