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