PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.9.22
Shortcodes and extra features for Phlox theme v2.9.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.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 3 years ago recent-posts-land-style.php 4 years ago recent-posts-masonry.php 4 years ago recent-posts-tiles-carousel.php 3 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 3 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 3 years ago touch-slider.php 4 years ago video.php 4 years ago
recent-posts-tiles.php
635 lines
1 <?php
2 /**
3 * Code highlighter element
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_master_array( $master_array ) {
14
15 $categories = get_terms( 'category', 'orderby=count&hide_empty=0' );
16 $categories_list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
17 foreach ( $categories as $key => $value ) {
18 $categories_list[$value->term_id] = $value->name;
19 }
20
21 // $tags = get_terms( 'post_tag', 'orderby=count&hide_empty=0' );
22 // $tags_list;
23 // foreach ($tags as $key => $value) {
24 // $tags_list["$value->term_id"] = $value->name;
25 // }
26
27
28 $master_array['aux_recent_posts_tiles'] = array(
29 'name' => __('Tiles Recent Posts', 'auxin-elements' ),
30 'auxin_output_callback' => 'auxin_widget_recent_posts_tiles_callback',
31 'base' => 'aux_recent_posts_tiles',
32 'description' => __('It adds recent posts in tiles style.', 'auxin-elements' ),
33 'class' => 'aux-widget-recent-posts-tiles',
34 'show_settings_on_create' => true,
35 'weight' => 1,
36 'is_widget' => false,
37 'is_shortcode' => true,
38 'is_vc' => true,
39 'category' => THEME_NAME,
40 'group' => '',
41 'admin_enqueue_js' => '',
42 'admin_enqueue_css' => '',
43 'front_enqueue_js' => '',
44 'front_enqueue_css' => '',
45 'icon' => 'aux-element aux-pb-icons-tile',
46 'custom_markup' => '',
47 'js_view' => '',
48 'html_template' => '',
49 'deprecated' => '',
50 'content_element' => '',
51 'as_parent' => '',
52 'as_child' => '',
53 'params' => array(
54 array(
55 'heading' => __('Title','auxin-elements' ),
56 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
57 'param_name' => 'title',
58 'type' => 'textfield',
59 'value' => '',
60 'holder' => 'textfield',
61 'class' => 'title',
62 'admin_label' => false,
63 'dependency' => '',
64 'weight' => '',
65 'group' => '',
66 'edit_field_class' => ''
67 ),
68 array(
69 'heading' => __('Categories', 'auxin-elements'),
70 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
71 'param_name' => 'cat',
72 'type' => 'aux_select2_multiple',
73 'def_value' => ' ',
74 'holder' => '',
75 'class' => 'cat',
76 'value' => $categories_list,
77 'admin_label' => false,
78 'dependency' => '',
79 'weight' => '',
80 'group' => __( 'Query', 'auxin-elements' ),
81 'edit_field_class' => ''
82 ),
83 array(
84 'heading' => __('Number of posts to show', 'auxin-elements'),
85 'description' => '',
86 'param_name' => 'num',
87 'type' => 'textfield',
88 'value' => '8',
89 'holder' => '',
90 'class' => 'num',
91 'admin_label' => false,
92 'dependency' => '',
93 'weight' => '',
94 'group' => __( 'Query', 'auxin-elements' ),
95 'edit_field_class' => ''
96 ),
97 array(
98 'heading' => __('Exclude posts without media','auxin-elements' ),
99 'description' => '',
100 'param_name' => 'exclude_without_media',
101 'type' => 'aux_switch',
102 'value' => '1',
103 'class' => '',
104 'admin_label' => false,
105 'dependency' => '',
106 'weight' => '',
107 'group' => __( 'Query', 'auxin-elements' ),
108 'edit_field_class' => ''
109 ),
110 array(
111 'heading' => __('Exclude custom post formats','auxin-elements' ),
112 'description' => '',
113 'param_name' => 'exclude_custom_post_formats',
114 'type' => 'aux_switch',
115 'value' => '1',
116 'class' => '',
117 'admin_label' => false,
118 'dependency' => '',
119 'weight' => '',
120 'group' => __( 'Query', 'auxin-elements' ),
121 'edit_field_class' => ''
122 ),
123 array(
124 'heading' => __('Exclude quote and link post formats','auxin-elements' ),
125 'description' => '',
126 'param_name' => 'exclude_quote_link',
127 'type' => 'aux_switch',
128 'value' => '1',
129 'class' => '',
130 'admin_label' => false,
131 'dependency' => array(
132 'element' => 'exclude_custom_post_formats',
133 'value' => '0'
134 ),
135 'weight' => '',
136 'group' => __( 'Query', 'auxin-elements' ),
137 'edit_field_class' => ''
138 ),
139 array(
140 'heading' => __('Load More Type','auxin-elements' ),
141 'description' => '',
142 'param_name' => 'loadmore_type',
143 'type' => 'aux_visual_select',
144 'value' => 'scroll',
145 'class' => 'loadmore_type',
146 'admin_label' => false,
147 'dependency' => '',
148 'weight' => '',
149 'group' => '' ,
150 'edit_field_class' => '',
151 'choices' => array(
152 '' => array(
153 'label' => __('None', 'auxin-elements' ),
154 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
155 ),
156 'scroll' => array(
157 'label' => __('Infinite Scroll', 'auxin-elements' ),
158 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
159 ),
160 'next' => array(
161 'label' => __('Next Button', 'auxin-elements' ),
162 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
163 ),
164 'next-prev' => array(
165 'label' => __('Next Prev', 'auxin-elements' ),
166 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
167 )
168 )
169 ),
170 array(
171 'heading' => __('Order by', 'auxin-elements'),
172 'description' => '',
173 'param_name' => 'order_by',
174 'type' => 'dropdown',
175 'def_value' => 'date',
176 'holder' => '',
177 'class' => 'order_by',
178 'value' => array (
179 'date' => __('Date', 'auxin-elements'),
180 'menu_order date' => __('Menu Order', 'auxin-elements'),
181 'title' => __('Title', 'auxin-elements'),
182 'ID' => __('ID', 'auxin-elements'),
183 'rand' => __('Random', 'auxin-elements'),
184 'comment_count' => __('Comments', 'auxin-elements'),
185 'modified' => __('Date Modified', 'auxin-elements'),
186 'author' => __('Author', 'auxin-elements'),
187 'post__in' => __('Inserted Post IDs', 'auxin-elements')
188 ),
189 'admin_label' => false,
190 'dependency' => '',
191 'weight' => '',
192 'group' => __( 'Query', 'auxin-elements' ),
193 'edit_field_class' => ''
194 ),
195 array(
196 'heading' => __('Order', 'auxin-elements'),
197 'description' => '',
198 'param_name' => 'order',
199 'type' => 'dropdown',
200 'def_value' => 'DESC',
201 'holder' => '',
202 'class' => 'order',
203 'value' =>array (
204 'DESC' => __('Descending', 'auxin-elements'),
205 'ASC' => __('Ascending', 'auxin-elements'),
206 ),
207 'admin_label' => false,
208 'dependency' => '',
209 'weight' => '',
210 'group' => __( 'Query', 'auxin-elements' ),
211 'edit_field_class' => ''
212 ),
213 array(
214 'heading' => __('Only posts','auxin-elements' ),
215 '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' ),
216 'param_name' => 'only_posts__in',
217 'type' => 'textfield',
218 'value' => '',
219 'holder' => '',
220 'class' => '',
221 'admin_label' => false,
222 'dependency' => '',
223 'weight' => '',
224 'group' => __( 'Query', 'auxin-elements' ),
225 'edit_field_class' => ''
226 ),
227 array(
228 'heading' => __('Include posts','auxin-elements' ),
229 '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' ),
230 'param_name' => 'include',
231 'type' => 'textfield',
232 'value' => '',
233 'holder' => '',
234 'class' => '',
235 'admin_label' => false,
236 'dependency' => '',
237 'weight' => '',
238 'group' => __( 'Query', 'auxin-elements' ),
239 'edit_field_class' => ''
240 ),
241 array(
242 'heading' => __('Exclude posts','auxin-elements' ),
243 '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' ),
244 'param_name' => 'exclude',
245 'type' => 'textfield',
246 'value' => '',
247 'holder' => '',
248 'class' => '',
249 'admin_label' => false,
250 'dependency' => '',
251 'weight' => '',
252 'group' => __( 'Query', 'auxin-elements' ),
253 'edit_field_class' => ''
254 ),
255 array(
256 'heading' => __('Order by', 'auxin-elements'),
257 'description' => '',
258 'param_name' => 'order_by',
259 'type' => 'dropdown',
260 'def_value' => 'date',
261 'holder' => '',
262 'class' => 'order_by',
263 'value' => array (
264 'date' => __('Date', 'auxin-elements'),
265 'menu_order date' => __('Menu Order', 'auxin-elements'),
266 'title' => __('Title', 'auxin-elements'),
267 'ID' => __('ID', 'auxin-elements'),
268 'rand' => __('Random', 'auxin-elements'),
269 'comment_count' => __('Comments', 'auxin-elements'),
270 'modified' => __('Date Modified', 'auxin-elements'),
271 'author' => __('Author', 'auxin-elements'),
272 'post__in' => __('Inserted Post IDs', 'auxin-elements')
273 ),
274 'admin_label' => false,
275 'dependency' => '',
276 'weight' => '',
277 'group' => __( 'Query', 'auxin-elements' ),
278 'edit_field_class' => ''
279 ),
280 array(
281 'heading' => __('Order', 'auxin-elements'),
282 'description' => '',
283 'param_name' => 'order',
284 'type' => 'dropdown',
285 'def_value' => 'DESC',
286 'holder' => '',
287 'class' => 'order',
288 'value' =>array (
289 'DESC' => __('Descending', 'auxin-elements'),
290 'ASC' => __('Ascending', 'auxin-elements'),
291 ),
292 'admin_label' => false,
293 'dependency' => '',
294 'weight' => '',
295 'group' => __( 'Query', 'auxin-elements' ),
296 'edit_field_class' => ''
297 ),
298 array(
299 'heading' => __('Start offset','auxin-elements' ),
300 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
301 'param_name' => 'offset',
302 'type' => 'textfield',
303 'value' => '',
304 'holder' => '',
305 'class' => '',
306 'admin_label' => false,
307 'dependency' => '',
308 'weight' => '',
309 'group' => __( 'Query', 'auxin-elements' ),
310 'edit_field_class' => ''
311 ),
312 array(
313 'heading' => __( 'Post Tile styles','auxin-elements' ),
314 'description' => '',
315 'param_name' => 'tile_style_pattern',
316 'type' => 'aux_visual_select',
317 'def_value' => 'default',
318 'holder' => '',
319 'class' => 'tile_style_pattern',
320 'admin_label' => false,
321 'dependency' => '',
322 'weight' => '',
323 'group' => __( 'Style', 'auxin-elements' ),
324 'edit_field_class' => '',
325 'choices' => array(
326 'default' => array(
327 'label' => __( 'Default', 'auxin-elements' ),
328 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-5.svg'
329 ),
330 'pattern-1' => array(
331 'label' => __( 'Pattern 1', 'auxin-elements' ),
332 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-3.svg'
333 ),
334 'pattern-2' => array(
335 'label' => __( 'Pattern 2', 'auxin-elements' ),
336 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-6.svg'
337 ),
338 'pattern-3' => array(
339 'label' => __( 'Pattern 3', 'auxin-elements' ),
340 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-7.svg'
341 ),
342 'pattern-4' => array(
343 'label' => __( 'Pattern 4', 'auxin-elements' ),
344 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-8.svg'
345 ),
346 'pattern-5' => array(
347 'label' => __( 'Pattern 5', 'auxin-elements' ),
348 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-4.svg'
349 ),
350 'pattern-6' => array(
351 'label' => __('Pattern 6', 'auxin-elements' ),
352 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-1.svg'
353 ),
354 'pattern-7' => array(
355 'label' => __('Pattern 7', 'auxin-elements' ),
356 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/tile-2.svg'
357 ),
358 )
359 ),
360 array(
361 'heading' => __('Post tile style','auxin-elements' ),
362 'description' => '',
363 'param_name' => 'tile_style',
364 'type' => 'aux_visual_select',
365 'def_value' => '',
366 'holder' => '',
367 'class' => 'tile_style',
368 'admin_label' => false,
369 'dependency' => '',
370 'weight' => '',
371 'group' => __( 'Style', 'auxin-elements' ),
372 'edit_field_class' => '',
373 'choices' => array(
374 '' => array(
375 'label' => __('Standard', 'auxin-elements' ),
376 'image' => AUXIN_URL . 'images/visual-select/button-normal.svg'
377 ),
378 'aux-overlay' => array(
379 'label' => __('Dark', 'auxin-elements' ),
380 'image' => AUXIN_URL . 'images/visual-select/button-curved.svg'
381 )
382 )
383 ),
384 array(
385 'heading' => __('Insert post title','auxin-elements' ),
386 'description' => '',
387 'param_name' => 'display_title',
388 'type' => 'aux_switch',
389 'value' => '1',
390 'class' => 'display_title',
391 'admin_label' => false,
392 'dependency' => '',
393 'weight' => '',
394 'group' => '' ,
395 'edit_field_class' => ''
396 ),
397 array(
398 'heading' => __('Insert post meta','auxin-elements' ),
399 'description' => '',
400 'param_name' => 'show_info',
401 'type' => 'aux_switch',
402 'value' => '1',
403 'class' => '',
404 'admin_label' => false,
405 'weight' => '',
406 'group' => '' ,
407 'edit_field_class' => ''
408 ),
409 array(
410 'heading' => __('Extra class name','auxin-elements' ),
411 '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' ),
412 'param_name' => 'extra_classes',
413 'type' => 'textfield',
414 'value' => '',
415 'holder' => '',
416 'class' => 'extra_classes',
417 'admin_label' => false,
418 'dependency' => '',
419 'weight' => '',
420 'group' => '',
421 'edit_field_class' => ''
422 )
423 )
424 );
425
426 return $master_array;
427 }
428
429 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_tiles_master_array', 10, 1 );
430
431
432 /**
433 * Element without loop and column
434 * The front-end output of this element is returned by the following function
435 *
436 * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
437 * @param string $shortcode_content The shorcode content
438 * @return string The output of element markup
439 */
440 function auxin_widget_recent_posts_tiles_callback( $atts, $shortcode_content = null ){
441
442 global $aux_content_width;
443
444 // Defining default attributes
445 $default_atts = array(
446 'title' => '', // header title
447 'cat' => ' ',
448 'num' => '8', // max generated entry
449 'only_posts__in' => '', // display only these post IDs. array or string comma separated
450 'include' => '', // include these post IDs in result too. array or string comma separated
451 'exclude' => '', // exclude these post IDs from result. array or string comma separated
452 'posts_per_page' => -1,
453 'offset' => '',
454 'paged' => '',
455 'order_by' => 'date',
456 'order' => 'DESC',
457 'excerpt_len' => '160',
458 'exclude_without_media' => true,
459 'exclude_custom_post_formats' => true,
460 'exclude_quote_link' => true,
461 'exclude_post_formats_in' => array(), // the list od post formats to exclude
462 'tile_style' => '',
463 'display_title' => true,
464 'show_info' => true,
465 'show_date' => true,
466 'display_categories' => true,
467 'tile_style_pattern' => 'default',
468 'extra_classes' => '',
469 'extra_column_classes' => '',
470 'custom_el_id' => '',
471 'taxonomy_name' => 'category',
472
473 'template_part_file' => 'theme-parts/entry/post-tile',
474 'extra_template_path' => '',
475
476 'universal_id' => '',
477 'reset_query' => true,
478 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
479 'wp_query_args' => array(), // additional wp_query args
480 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
481 'loadmore_per_page' => '',
482 'base' => 'aux_recent_posts_tiles',
483 'base_class' => 'aux-widget-recent-posts-tiles'
484 );
485
486 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
487 extract( $result['parsed_atts'] );
488
489 // specify the post formats that should be excluded -------
490 $exclude_post_formats_in = (array) $exclude_post_formats_in;
491
492 if( $exclude_custom_post_formats ){
493 $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
494 }
495 if( $exclude_quote_link ){
496 $exclude_post_formats_in[] = 'quote';
497 $exclude_post_formats_in[] = 'link';
498 }
499 $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
500
501 // --------------
502
503 ob_start();
504
505 $tax_args = array();
506 if( ! empty( $cat ) && $cat != " " && ( ! is_array( $cat ) || ! in_array( " ", $cat ) ) ) {
507 $tax_args = array(
508 array(
509 'taxonomy' => $taxonomy_name,
510 'field' => 'term_id',
511 'terms' => ! is_array( $cat ) ? explode( ",", $cat ) : $cat
512 )
513 );
514 }
515
516 global $wp_query;
517
518 if( ! $use_wp_query ){
519
520 // create wp_query to get latest items -----------
521 $args = array(
522 'post_type' => 'post',
523 'orderby' => $order_by,
524 'order' => $order,
525 'offset' => $offset,
526 'paged' => $paged,
527 'tax_query' => $tax_args,
528 'post_status' => 'publish',
529 'posts_per_page' => $num,
530 'ignore_sticky_posts' => 1,
531 'include_posts__in' => $include, // include posts in this liat
532 'posts__not_in' => $exclude, // exclude posts in this list
533 'posts__in' => $only_posts__in, // only posts in this list
534
535 'exclude_without_media' => $exclude_without_media,
536 'exclude_post_formats_in' => $exclude_post_formats_in
537 );
538
539 // ---------------------------------------------------------------------
540
541 // add the additional query args if available
542 if( $wp_query_args ){
543 $args = wp_parse_args( $args, $wp_query_args );
544 }
545
546 // pass the args through the auxin query parser
547 $wp_query = new WP_Query( auxin_parse_query_args( $args ) );
548 }
549
550 // widget header ------------------------------
551 echo wp_kses_post( $result['widget_header'] );
552 echo wp_kses_post( $result['widget_title'] );
553
554 $phone_break_point = 767;
555 $tablet_break_point = 1025;
556
557 $show_comments = true; // shows comments icon
558 $post_counter = 0;
559 $item_class = 'aux-post-tile aux-image-box';
560
561 if( ! empty( $loadmore_type ) ) {
562 $item_class .= ' aux-ajax-item';
563 }
564
565 $container_class = 'aux-tiles-layout aux-ajax-view ' . $tile_style;
566
567 $have_posts = $wp_query->have_posts();
568
569 if( $have_posts ){
570
571 echo ! $skip_wrappers ? sprintf( '<div data-lazyload="true" data-element-id="%s" class="%s">', esc_attr( $universal_id ), esc_attr( $container_class ) ) : '';
572
573 while ( $wp_query->have_posts() ) {
574
575 $wp_query->the_post();
576 $post = $wp_query->post;
577
578 $item_pattern_info = auxin_get_tile_pattern( $tile_style_pattern , $post_counter, $aux_content_width );
579 $post_counter++;
580
581 $post_vars = auxin_get_post_format_media(
582 $post,
583 array(
584 'request_from' => 'archive',
585 'media_width' => $phone_break_point,
586 'media_size' => $item_pattern_info['size'],
587 'upscale_image' => true,
588 'image_from_content' => ! $exclude_without_media,
589 'ignore_formats' => array( '*' ),
590 'preloadable' => false,
591 'image_sizes' => 'auto',
592 'srcset_sizes' => 'auto'
593 )
594 );
595
596 extract( $post_vars );
597
598 $post_classes = $item_class .' post '. $item_pattern_info['classname'];
599
600 $the_format = get_post_format( $post );
601
602 include auxin_get_template_file( $template_part_file, '', $extra_template_path );
603 }
604
605 if( ! $skip_wrappers ) {
606 // End tag for aux-ajax-view wrapper
607 echo '</div>';
608 // Execute load more functionality
609 if( $wp_query->found_posts > $loadmore_per_page ) {
610 echo auxin_get_load_more_controller( $loadmore_type );
611 }
612
613 } else {
614 // Get post counter in the query
615 echo '<span class="aux-post-count hidden">'. esc_html( $wp_query->post_count ) .'</span>';
616 echo '<span class="aux-all-posts-count hidden">'. esc_html( $wp_query->found_posts ) .'</span>';
617 }
618 }
619
620 if( $reset_query ){
621 wp_reset_query();
622 }
623
624 // return false if no result found
625 if( ! $have_posts ){
626 ob_get_clean();
627 return false;
628 }
629
630 // widget footer ------------------------------
631 echo wp_kses_post( $result['widget_footer'] );
632
633 return ob_get_clean();
634 }
635