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