PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.15.2
Shortcodes and extra features for Phlox theme v2.15.2
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-land-style.php
auxin-elements / includes / elements Last commit date
about-widget.php 3 years ago accordion-widget.php 3 years ago accordion.php 3 years ago attachment-url.php 3 years ago audio.php 3 years ago before-after.php 3 years ago button.php 3 years ago code.php 3 years ago contact-box.php 3 years ago contact-form.php 3 years ago custom-list.php 3 years ago divider.php 3 years ago dropcap.php 3 years ago facebook.php 3 years ago flickr.php 3 years ago gallery.php 3 years ago gmap.php 3 years ago highlight.php 3 years ago image.php 3 years ago instagram-feed.php 3 years ago latest-posts-slider.php 3 years ago popular-posts-widget.php 3 years ago products-grid.php 2 years ago quote.php 3 years ago recent-posts-grid-carousel.php 2 years ago recent-posts-land-style.php 2 years ago recent-posts-masonry.php 2 years ago recent-posts-tiles-carousel.php 2 years ago recent-posts-tiles.php 2 years ago recent-posts-timeline.php 2 years ago recent-posts-widget.php 3 years ago recent-products.php 2 years ago related-posts.php 8 years ago sample-element.php 3 years ago search.php 3 years ago socials-list.php 3 years ago staff.php 3 years ago tab-widget.php 3 years ago tabs.php 3 years ago testimonial.php 3 years ago text.php 3 years ago touch-slider.php 3 years ago video.php 3 years ago
recent-posts-land-style.php
643 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-2023 averta
11 */
12
13 function auxin_get_recent_posts_land_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_land_style'] = array(
29 'name' => __('Land Style Recent Posts', 'auxin-elements' ),
30 'auxin_output_callback' => 'auxin_widget_recent_posts_land_style_callback',
31 'base' => 'aux_recent_posts_land_style',
32 'description' => __('It adds recent posts in land style.', 'auxin-elements' ),
33 'class' => 'aux-widget-recent-posts-land',
34 'show_settings_on_create' => true,
35 'weight' => 1,
36 'is_widget' => false,
37 'is_shortcode' => true,
38 'category' => THEME_NAME,
39 'group' => '',
40 'admin_enqueue_js' => '',
41 'admin_enqueue_css' => '',
42 'front_enqueue_js' => '',
43 'front_enqueue_css' => '',
44 'icon' => 'aux-element aux-pb-icons-land',
45 'custom_markup' => '',
46 'js_view' => '',
47 'html_template' => '',
48 'deprecated' => '',
49 'content_element' => '',
50 'as_parent' => '',
51 'as_child' => '',
52 'params' => array(
53 array(
54 'heading' => __('Title','auxin-elements' ),
55 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
56 'param_name' => 'title',
57 'type' => 'textfield',
58 'std' => '',
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' => __('Image aspect ratio', 'auxin-elements'),
99 'description' => '',
100 'param_name' => 'image_aspect_ratio',
101 'type' => 'dropdown',
102 'def_value' => '0.75',
103 'holder' => '',
104 'class' => 'order',
105 'value' =>array (
106 '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
107 '0.56' => __('Horizontal 16:9', 'auxin-elements'),
108 '1.00' => __('Square 1:1' , 'auxin-elements'),
109 '1.33' => __('Vertical 3:4' , 'auxin-elements')
110 ),
111 'admin_label' => false,
112 'dependency' => '',
113 'weight' => '',
114 'group' => '',
115 'edit_field_class' => ''
116 ),
117 array(
118 'heading' => __('Exclude posts without media','auxin-elements' ),
119 'description' => '',
120 'param_name' => 'exclude_without_media',
121 'type' => 'aux_switch',
122 'value' => '0',
123 'class' => '',
124 'admin_label' => false,
125 'dependency' => '',
126 'weight' => '',
127 'group' => __( 'Query', 'auxin-elements' ),
128 'edit_field_class' => ''
129 ),
130 array(
131 'heading' => __('Exclude custom post formats','auxin-elements' ),
132 'description' => '',
133 'param_name' => 'exclude_custom_post_formats',
134 'type' => 'aux_switch',
135 'value' => '0',
136 'class' => '',
137 'admin_label' => false,
138 'dependency' => '',
139 'weight' => '',
140 'group' => __( 'Query', 'auxin-elements' ),
141 'edit_field_class' => ''
142 ),
143 array(
144 'heading' => __('Exclude quote and link post formats','auxin-elements' ),
145 'description' => '',
146 'param_name' => 'exclude_quote_link',
147 'type' => 'aux_switch',
148 'value' => '0',
149 'class' => '',
150 'admin_label' => false,
151 'dependency' => array(
152 'element' => 'exclude_custom_post_formats',
153 'value' => array('0', 'false')
154 ),
155 'weight' => '',
156 'group' => __( 'Query', 'auxin-elements' ),
157 'edit_field_class' => ''
158 ),
159 array(
160 'heading' => __('Order by', 'auxin-elements'),
161 'description' => '',
162 'param_name' => 'order_by',
163 'type' => 'dropdown',
164 'def_value' => 'date',
165 'holder' => '',
166 'class' => 'order_by',
167 'value' => array (
168 'date' => __('Date', 'auxin-elements'),
169 'menu_order date' => __('Menu Order', 'auxin-elements'),
170 'title' => __('Title', 'auxin-elements'),
171 'ID' => __('ID', 'auxin-elements'),
172 'rand' => __('Random', 'auxin-elements'),
173 'comment_count' => __('Comments', 'auxin-elements'),
174 'modified' => __('Date Modified', 'auxin-elements'),
175 'author' => __('Author', 'auxin-elements'),
176 'post__in' => __('Inserted Post IDs', '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' => __('Order', 'auxin-elements'),
186 'description' => '',
187 'param_name' => 'order',
188 'type' => 'dropdown',
189 'def_value' => 'DESC',
190 'holder' => '',
191 'class' => 'order',
192 'value' =>array (
193 'DESC' => __('Descending', 'auxin-elements'),
194 'ASC' => __('Ascending', 'auxin-elements'),
195 ),
196 'admin_label' => false,
197 'dependency' => '',
198 'weight' => '',
199 'group' => __( 'Query', 'auxin-elements' ),
200 'edit_field_class' => ''
201 ),
202 array(
203 'heading' => __('Only posts','auxin-elements' ),
204 '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' ),
205 'param_name' => 'only_posts__in',
206 'type' => 'textfield',
207 'value' => '',
208 'holder' => '',
209 'class' => '',
210 'admin_label' => false,
211 'dependency' => '',
212 'weight' => '',
213 'group' => __( 'Query', 'auxin-elements' ),
214 'edit_field_class' => ''
215 ),
216 array(
217 'heading' => __('Include posts','auxin-elements' ),
218 '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' ),
219 'param_name' => 'include',
220 'type' => 'textfield',
221 'value' => '',
222 'holder' => '',
223 'class' => '',
224 'admin_label' => false,
225 'dependency' => '',
226 'weight' => '',
227 'group' => __( 'Query', 'auxin-elements' ),
228 'edit_field_class' => ''
229 ),
230 array(
231 'heading' => __('Exclude posts','auxin-elements' ),
232 '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' ),
233 'param_name' => 'exclude',
234 'type' => 'textfield',
235 'value' => '',
236 'holder' => '',
237 'class' => '',
238 'admin_label' => false,
239 'dependency' => '',
240 'weight' => '',
241 'group' => __( 'Query', 'auxin-elements' ),
242 'edit_field_class' => ''
243 ),
244 array(
245 'heading' => __('Start offset','auxin-elements' ),
246 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
247 'param_name' => 'offset',
248 'type' => 'textfield',
249 'value' => '',
250 'holder' => '',
251 'class' => '',
252 'admin_label' => false,
253 'dependency' => '',
254 'weight' => '',
255 'group' => __( 'Query', 'auxin-elements' ),
256 'edit_field_class' => ''
257 ),
258 array(
259 'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
260 'param_name' => 'show_media',
261 'type' => 'aux_switch',
262 'def_value' => '',
263 'value' => '1',
264 'holder' => '',
265 'class' => 'show_media',
266 'admin_label' => false,
267 'dependency' => '',
268 'weight' => '',
269 'group' => '',
270 'edit_field_class' => ''
271 ),
272 array(
273 'heading' => __('Display post title','auxin-elements' ),
274 'description' => '',
275 'param_name' => 'display_title',
276 'type' => 'aux_switch',
277 'value' => '1',
278 'class' => 'display_title',
279 'admin_label' => false,
280 'dependency' => '',
281 'weight' => '',
282 'group' => '',
283 'edit_field_class' => ''
284 ),
285 array(
286 'heading' => __('Display post meta','auxin-elements' ),
287 'description' => '',
288 'param_name' => 'show_info',
289 'type' => 'aux_switch',
290 'value' => '1',
291 'class' => '',
292 'admin_label' => false,
293 'weight' => '',
294 'group' => '',
295 'edit_field_class' => ''
296 ),
297 array(
298 'heading' => __('Display like button','auxin-elements' ),
299 'description' => sprintf(__('Enable it to display %s like button%s on gride template blog. Please note WP Ulike plugin needs to be activaited to use this option.', 'auxin-elements'), '<strong>', '</strong>'),
300 'param_name' => 'display_like',
301 'type' => 'aux_switch',
302 'value' => '1',
303 'holder' => '',
304 'class' => 'display_like',
305 'admin_label' => false,
306 'dependency' => '',
307 'weight' => '',
308 'group' => '',
309 'edit_field_class' => ''
310 ),
311 array(
312 'heading' => __('Load More Type','auxin-elements' ),
313 'description' => '',
314 'param_name' => 'loadmore_type',
315 'type' => 'aux_visual_select',
316 'value' => 'scroll',
317 'class' => 'loadmore_type',
318 'admin_label' => false,
319 'dependency' => '',
320 'weight' => '',
321 'group' => '' ,
322 'edit_field_class' => '',
323 'choices' => array(
324 '' => array(
325 'label' => __('None', 'auxin-elements' ),
326 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
327 ),
328 'scroll' => array(
329 'label' => __('Infinite Scroll', 'auxin-elements' ),
330 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
331 ),
332 'next' => array(
333 'label' => __('Next Button', 'auxin-elements' ),
334 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
335 ),
336 'next-prev' => array(
337 'label' => __('Next Prev', 'auxin-elements' ),
338 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
339 )
340 )
341 ),
342 array(
343 'heading' => __('Excerpt length','auxin-elements' ),
344 'description' => __('Specify summary content in character.','auxin-elements' ),
345 'param_name' => 'excerpt_len',
346 'type' => 'textfield',
347 'value' => '160',
348 'holder' => '',
349 'class' => 'excerpt_len',
350 'admin_label' => false,
351 // @TODO: bcz of this dependency its value does not save on VC
352 'dependency' => array(
353 'element' => 'show_excerpt',
354 'value' => '1'
355 ),
356 'weight' => '',
357 'group' => '',
358 'edit_field_class' => ''
359 ),
360 array(
361 'heading' => __('Display author or read more', 'auxin-elements'),
362 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
363 'param_name' => 'author_or_readmore',
364 'type' => 'dropdown',
365 'def_value' => 'readmore',
366 'holder' => '',
367 'class' => 'author_or_readmore',
368 'value' =>array (
369 'readmore' => __('Read More', 'auxin-elements'),
370 'author' => __('Author Name', 'auxin-elements'),
371 ),
372 'admin_label' => false,
373 'dependency' => '',
374 'weight' => '',
375 'group' => '',
376 'edit_field_class' => ''
377 ),
378 array(
379 'heading' => __('Extra class name','auxin-elements' ),
380 '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' ),
381 'param_name' => 'extra_classes',
382 'type' => 'textfield',
383 'value' => '',
384 'def_value' => '',
385 'holder' => '',
386 'class' => 'extra_classes',
387 'admin_label' => false,
388 'dependency' => '',
389 'weight' => '',
390 'group' => '',
391 'edit_field_class' => ''
392 )
393 )
394 );
395
396 return $master_array;
397 }
398
399 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_land_master_array', 10, 1 );
400
401
402
403
404 /**
405 * Element without loop and column
406 * The front-end output of this element is returned by the following function
407 *
408 * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
409 * @param string $shortcode_content The shorcode content
410 * @return string The output of element markup
411 */
412 function auxin_widget_recent_posts_land_style_callback( $atts, $shortcode_content = null ){
413
414 // Defining default attributes
415 $default_atts = array(
416 'title' => '', // header title
417 'cat' => ' ',
418 'num' => '8',
419 'only_posts__in' => '', // display only these post IDs. array or string comma separated
420 'include' => '', // include these post IDs in result too. array or string comma separated
421 'exclude' => '', // exclude these post IDs from result. array or string comma separated
422 'posts_per_page' => -1,
423 'paged' => '',
424 'offset' => '',
425 'order_by' => 'date',
426 'order' => 'DESC',
427 'size' => '',
428 'exclude_without_media' => 0,
429 'exclude_custom_post_formats' => 0,
430 'exclude_quote_link' => 0,
431 'exclude_post_formats_in' => array(), // the list od post formats to exclude
432 'show_media' => true,
433 'show_excerpt' => true,
434 'show_content' => true,
435 'excerpt_len' => '160',
436 'display_title' => true,
437 'display_like' => true,
438 'display_comments' => true,
439 'display_categories' => true,
440 'max_taxonomy_num' => '',
441 'show_info' => true,
442 'show_date' => true,
443 'author_or_readmore' => 'readmore',
444 'display_author_footer' => false,
445 'display_author_header' => true,
446 'image_aspect_ratio' => 0.75,
447 'tag' => '',
448 'taxonomy_name' => 'category',
449 'preloadable' => false,
450 'preload_preview' => true,
451 'preload_bgcolor' => '',
452
453 'extra_classes' => '',
454 'extra_column_classes' => '',
455 'custom_el_id' => '',
456
457 'template_part_file' => 'theme-parts/entry/post-column',
458 'extra_template_path' => '',
459
460 'universal_id' => '',
461 'reset_query' => true,
462 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
463 'wp_query_args' => array(), // additional wp_query args
464 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
465 'loadmore_per_page' => '',
466 'base' => 'aux_recent_posts_land_style',
467 'base_class' => 'aux-widget-recent-posts-land'
468 );
469
470
471 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
472 extract( $result['parsed_atts'] );
473
474 $acceptedTemplateFiles = apply_filters( 'auxin_recent_posts_land_style_accepted_template_files', [
475 'theme-parts/entry/post-column',
476 'theme-parts/entry/post-flip',
477 'theme-parts/entry/post-land',
478 'theme-parts/entry/post-tile',
479 'theme-parts/entry/post',
480 ]);
481
482 if ( ! in_array( $template_part_file, $acceptedTemplateFiles ) ) {
483 return;
484 }
485
486 $display_author_footer = auxin_is_true( $display_author_footer );
487 $display_author_header = auxin_is_true( $display_author_header );
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
504 ob_start();
505
506 $tax_args = array();
507 if( ! empty( $cat ) && $cat != " " && ( ! is_array( $cat ) || ! in_array( " ", $cat ) ) ) {
508 $tax_args = array(
509 array(
510 'taxonomy' => $taxonomy_name,
511 'field' => 'term_id',
512 'terms' => ! is_array( $cat ) ? explode( ",", $cat ) : $cat
513 )
514 );
515 }
516
517 global $wp_query;
518
519 if( ! $use_wp_query ){
520
521 // create wp_query to get latest items -----------
522 $args = array(
523 'post_type' => 'post',
524 'orderby' => $order_by,
525 'order' => $order,
526 'offset' => $offset,
527 'paged' => $paged,
528 'tax_query' => $tax_args,
529 'post_status' => 'publish',
530 'posts_per_page' => $num,
531 'ignore_sticky_posts' => 1,
532 'include_posts__in' => $include, // include posts in this liat
533 'posts__not_in' => $exclude, // exclude posts in this list
534 'posts__in' => $only_posts__in, // only posts in this list
535
536 'exclude_without_media' => $exclude_without_media,
537 'exclude_post_formats_in' => $exclude_post_formats_in
538 );
539
540 // ---------------------------------------------------------------------
541
542 // add the additional query args if available
543 if( $wp_query_args ){
544 $args = wp_parse_args( $args, $wp_query_args );
545 }
546
547 // pass the args through the auxin query parser
548 $wp_query = new WP_Query( auxin_parse_query_args( $args ) );
549 }
550
551 // widget header ------------------------------
552 echo wp_kses_post( $result['widget_header'] );
553 echo wp_kses_post( $result['widget_title'] );
554
555
556 $phone_break_point = 767;
557 $tablet_break_point = 1025;
558
559 $show_comments = true; // shows comments icon
560 $post_counter = 0;
561 $column_class = 'aux-blog-land-style aux-ajax-view ' . $extra_column_classes;
562 $item_class = 'aux-block';
563
564 if( ! empty( $loadmore_type ) ) {
565 $item_class .= ' aux-ajax-item';
566 }
567
568 // automatically calculate the media size if was empty
569 if( empty( $size ) ){
570 $column_media_width = auxin_get_content_column_width( 2, 15, $content_width );
571 $size = array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio );
572 }
573
574 // whether any result was found or not
575 $have_posts = $wp_query->have_posts();
576
577 if( $have_posts ){
578
579 echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s">', esc_attr( $universal_id ), esc_attr( $column_class ) ) : '';
580
581 while ( $wp_query->have_posts() ) {
582
583 $wp_query->the_post();
584 $post = $wp_query->post;
585 $post_vars = auxin_get_post_format_media(
586 $post,
587 array(
588 'request_from' => 'archive',
589 'media_width' => $phone_break_point,
590 'media_size' => $size,
591 'upscale_image' => true,
592 'preloadable' => $preloadable,
593 'preload_preview' => $preload_preview,
594 'preload_bgcolor' => $preload_bgcolor,
595 'image_sizes' => 'auto',
596 'srcset_sizes' => 'auto'
597 )
598 );
599
600 extract( $post_vars );
601
602 $the_format = get_post_format( $post );
603
604 $post_classes = 'aux-column-post-entry land-post-style';
605 $post_classes .= $has_attach ? '': ' aux-no-thumb';
606
607 printf( '<div class="%s post-%s">', esc_attr( $item_class ), esc_attr( $post->ID ) );
608 include auxin_get_template_file( $template_part_file, '', $extra_template_path );
609 echo '</div>';
610 }
611
612 if( ! $skip_wrappers ) {
613 // End tag for aux-ajax-view wrapper
614 echo '</div>';
615 // Execute load more functionality
616 if( $wp_query->found_posts > $loadmore_per_page ) {
617 echo auxin_get_load_more_controller( $loadmore_type );
618 }
619
620 } else {
621 // Get post counter in the query
622 echo '<span class="aux-post-count hidden">'. esc_html( $wp_query->post_count ) .'</span>';
623 echo '<span class="aux-all-posts-count hidden">'. esc_html( $wp_query->found_posts ) .'</span>';
624 }
625
626 }
627
628 if( $reset_query ){
629 wp_reset_query();
630 }
631
632 // return false if no result found
633 if( ! $have_posts ){
634 ob_get_clean();
635 return false;
636 }
637
638 // widget footer ------------------------------
639 echo wp_kses_post( $result['widget_footer'] );
640
641 return ob_get_clean();
642 }
643