PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.6.13
Shortcodes and extra features for Phlox theme v2.6.13
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-masonry.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 5 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-masonry.php
676 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-2020 averta
11 */
12
13 function auxin_get_recent_posts_masonry_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_masonry'] = array(
29 'name' => __('Masonry Recent Posts', 'auxin-elements' ),
30 'auxin_output_callback' => 'auxin_widget_recent_posts_masonry_callback',
31 'base' => 'aux_recent_posts_masonry',
32 'description' => __('It adds recent posts in masonry style.', 'auxin-elements' ),
33 'class' => 'aux-widget-recent-posts-masonry aux-column-post-entry',
34 'show_settings_on_create' => true,
35 'weight' => 1,
36 'is_widget' => false,
37 'is_shortcode' => true,
38 'is_so' => true,
39 'is_vc' => true,
40 'category' => THEME_NAME,
41 'group' => '',
42 'admin_enqueue_js' => '',
43 'admin_enqueue_css' => '',
44 'front_enqueue_js' => '',
45 'front_enqueue_css' => '',
46 'icon' => 'aux-element aux-pb-icons-masonry',
47 'custom_markup' => '',
48 'js_view' => '',
49 'html_template' => '',
50 'deprecated' => '',
51 'content_element' => '',
52 'as_parent' => '',
53 'as_child' => '',
54 'params' => array(
55 array(
56 'heading' => __('Title','auxin-elements' ),
57 'description' => __('Recent post title, leave it empty if you don`t need title.', 'auxin-elements'),
58 'param_name' => 'title',
59 'type' => 'textfield',
60 'std' => '',
61 'value' => '',
62 'holder' => 'textfield',
63 'class' => 'title',
64 'admin_label' => false,
65 'dependency' => '',
66 'weight' => '',
67 'group' => '',
68 'edit_field_class' => ''
69 ),
70 array(
71 'heading' => __('Categories', 'auxin-elements'),
72 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
73 'param_name' => 'cat',
74 'type' => 'aux_select2_multiple',
75 'def_value' => ' ',
76 'holder' => '',
77 'class' => 'cat',
78 'value' => $categories_list,
79 'admin_label' => false,
80 'dependency' => '',
81 'weight' => '',
82 'group' => __( 'Query', 'auxin-elements' ),
83 'edit_field_class' => ''
84 ),
85 array(
86 'heading' => __('Number of posts to show', 'auxin-elements'),
87 'description' => '',
88 'param_name' => 'num',
89 'type' => 'textfield',
90 'value' => '8',
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' => '0',
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' => '0',
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' => '0',
131 'class' => '',
132 'admin_label' => false,
133 'dependency' => array(
134 'element' => 'exclude_custom_post_formats',
135 'value' => array('0', 'false')
136 ),
137 'weight' => '',
138 'group' => '',
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' => __('Start offset','auxin-elements' ),
228 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
229 'param_name' => 'offset',
230 'type' => 'textfield',
231 'value' => '',
232 'holder' => '',
233 'class' => '',
234 'admin_label' => false,
235 'dependency' => '',
236 'weight' => '',
237 'group' => __( 'Query', 'auxin-elements' ),
238 'edit_field_class' => ''
239 ),
240 array(
241 'heading' => __('Display post media (image, video, etc)', 'auxin-elements' ),
242 'param_name' => 'show_media',
243 'type' => 'aux_switch',
244 'def_value' => '',
245 'value' => '1',
246 'holder' => '',
247 'class' => 'show_media',
248 'admin_label' => false,
249 'dependency' => '',
250 'weight' => '',
251 'group' => '',
252 'edit_field_class' => ''
253 ),
254 array(
255 'heading' => __('Display post title','auxin-elements' ),
256 'description' => '',
257 'param_name' => 'display_title',
258 'type' => 'aux_switch',
259 'value' => '1',
260 'class' => 'display_title',
261 'admin_label' => false,
262 'dependency' => '',
263 'weight' => '',
264 'group' => '',
265 'edit_field_class' => ''
266 ),
267 array(
268 'heading' => __('Display post meta','auxin-elements' ),
269 'description' => '',
270 'param_name' => 'show_info',
271 'type' => 'aux_switch',
272 'value' => '1',
273 'class' => '',
274 'admin_label' => false,
275 'weight' => '',
276 'group' => '',
277 'edit_field_class' => ''
278 ),
279 array(
280 'heading' => __('Display like button','auxin-elements' ),
281 '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>'),
282 'param_name' => 'display_like',
283 'type' => 'aux_switch',
284 'value' => '1',
285 'holder' => '',
286 'class' => 'display_like',
287 'admin_label' => false,
288 'dependency' => '',
289 'weight' => '',
290 'group' => '',
291 'edit_field_class' => ''
292 ),
293 array(
294 'heading' => __('Load More Type','auxin-elements' ),
295 'description' => '',
296 'param_name' => 'loadmore_type',
297 'type' => 'aux_visual_select',
298 'value' => 'scroll',
299 'class' => 'loadmore_type',
300 'admin_label' => false,
301 'dependency' => '',
302 'weight' => '',
303 'group' => '' ,
304 'edit_field_class' => '',
305 'choices' => array(
306 '' => array(
307 'label' => __('None', 'auxin-elements' ),
308 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
309 ),
310 'scroll' => array(
311 'label' => __('Infinite Scroll', 'auxin-elements' ),
312 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
313 ),
314 'next' => array(
315 'label' => __('Next Button', 'auxin-elements' ),
316 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
317 ),
318 'next-prev' => array(
319 'label' => __('Next Prev', 'auxin-elements' ),
320 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
321 )
322 )
323 ),
324 array(
325 'heading' => __('Excerpt length','auxin-elements' ),
326 'description' => __('Specify summary content in character.','auxin-elements' ),
327 'param_name' => 'excerpt_len',
328 'type' => 'textfield',
329 'value' => '160',
330 'holder' => '',
331 'class' => 'excerpt_len',
332 'admin_label' => false,
333 'dependency' => '',
334 'weight' => '',
335 'group' => '',
336 'edit_field_class' => ''
337 ),
338 array(
339 'heading' => __('Display author or read more', 'auxin-elements'),
340 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
341 'param_name' => 'author_or_readmore',
342 'type' => 'dropdown',
343 'def_value' => 'readmore',
344 'holder' => '',
345 'class' => 'author_or_readmore',
346 'value' => array (
347 'readmore' => __('Read More', 'auxin-elements'),
348 'author' => __('Author Name', 'auxin-elements'),
349 ),
350 'admin_label' => false,
351 'dependency' => '',
352 'weight' => '',
353 'group' => '',
354 'edit_field_class' => ''
355 ),
356 array(
357 'heading' => __('Number of columns', 'auxin-elements'),
358 'description' => '',
359 'param_name' => 'desktop_cnum',
360 'type' => 'dropdown',
361 'def_value' => '4',
362 'holder' => '',
363 'class' => 'desktop_cnum',
364 'value' => array(
365 '1' => '1', '2' => '2', '3' => '3',
366 '4' => '4', '5' => '5', '6' => '6'
367 ),
368 'admin_label' => false,
369 'dependency' => '',
370 'weight' => '',
371 'group' => __( 'Layout', 'auxin-elements' ),
372 'edit_field_class' => ''
373 ),
374 array(
375 'heading' => __('Number of columns in tablet size', 'auxin-elements'),
376 'description' => '',
377 'param_name' => 'tablet_cnum',
378 'type' => 'dropdown',
379 'value' => 'inherit',
380 'holder' => '',
381 'class' => 'tablet_cnum',
382 'value' => array(
383 'inherit' => 'Inherited from larger',
384 '1' => '1', '2' => '2', '3' => '3',
385 '4' => '4', '5' => '5', '6' => '6'
386 ),
387 'admin_label' => false,
388 'dependency' => '',
389 'weight' => '',
390 'group' => __( 'Layout', 'auxin-elements' ),
391 'edit_field_class' => ''
392 ),
393 array(
394 'heading' => __('Number of columns in phone size', 'auxin-elements'),
395 'description' => '',
396 'param_name' => 'phone_cnum',
397 'type' => 'dropdown',
398 'def_value' => '1',
399 'holder' => '',
400 'class' => 'phone_cnum',
401 'value' => array(
402 '1' => '1' , '2' => '2', '3' => '3'
403 ),
404 'admin_label' => false,
405 'dependency' => '',
406 'weight' => '',
407 'group' => __( 'Layout', 'auxin-elements' ),
408 'edit_field_class' => ''
409 ),
410 array(
411 'heading' => __('Extra class name','auxin-elements' ),
412 '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' ),
413 'param_name' => 'extra_classes',
414 'type' => 'textfield',
415 'value' => '',
416 'def_value' => '',
417 'holder' => '',
418 'class' => 'extra_classes',
419 'admin_label' => false,
420 'dependency' => '',
421 'weight' => '',
422 'group' => '',
423 'edit_field_class' => ''
424 )
425 )
426 );
427
428 return $master_array;
429 }
430
431 add_filter( 'auxin_master_array_shortcodes', 'auxin_get_recent_posts_masonry_master_array', 10, 1 );
432
433
434
435
436 /**
437 * Element without loop and column
438 * The front-end output of this element is returned by the following function
439 *
440 * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
441 * @param string $shortcode_content The shorcode content
442 * @return string The output of element markup
443 */
444 function auxin_widget_recent_posts_masonry_callback( $atts, $shortcode_content = null ){
445
446 // Defining default attributes
447 $default_atts = array(
448 'title' => '', // header title
449 'cat' => ' ',
450 'num' => '8', // max generated entry
451 'only_posts__in' => '', // display only these post IDs. array or string comma separated
452 'include' => '', // include these post IDs in result too. array or string comma separated
453 'exclude' => '', // exclude these post IDs from result. array or string comma separated
454 'offset' => '',
455 'paged' => '',
456 'order_by' => 'date',
457 'order' => 'DESC',
458 'exclude_without_media' => 0,
459 'exclude_custom_post_formats' => 0,
460 'exclude_quote_link' => 0,
461 'exclude_post_formats_in' => array(), // the list od post formats to exclude
462 'show_media' => true,
463 'display_like' => true,
464 'display_comments' => true,
465 'display_categories' => true,
466 'content_layout' => '', // entry-boxed
467 'post_info_position' => 'after-title', // entry-boxed
468 'excerpt_len' => '160',
469 'display_title' => true,
470 'show_excerpt' => true,
471 'show_content' => true,
472 'show_info' => true,
473 'show_date' => true,
474 'author_or_readmore' => 'readmore',
475 'display_author_header' => true,
476 'display_author_footer' => false,
477 // 'image_aspect_ratio' => 0.75,
478 'desktop_cnum' => 4,
479 'tablet_cnum' => 'inherit',
480 'phone_cnum' => '1',
481 'tag' => '',
482
483 'crop' => false,
484 'preloadable' => false,
485 'preload_preview' => true,
486 'preload_bgcolor' => '',
487
488 'extra_classes' => '',
489 'extra_column_classes' => '',
490 'custom_el_id' => '',
491 'taxonomy_name' => 'category',
492
493 'template_part_file' => 'theme-parts/entry/post-column',
494 'extra_template_path' => '',
495
496 'universal_id' => '',
497 'reset_query' => true,
498 'use_wp_query' => false, // true to use the global wp_query, false to use internal custom query
499 'wp_query_args' => array(), // additional wp_query args
500 'loadmore_type' => '', // 'next' (more button), 'scroll', 'next-prev'
501 'loadmore_per_page' => '',
502 'base' => 'aux_recent_posts_masonry',
503 'base_class' => 'aux-widget-recent-posts-masonry aux-column-post-entry'
504 );
505
506 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
507 extract( $result['parsed_atts'] );
508
509 $display_author_footer = auxin_is_true( $display_author_footer );
510 $display_author_header = auxin_is_true( $display_author_header );
511
512 // specify the post formats that should be excluded -------
513 $exclude_post_formats_in = (array) $exclude_post_formats_in;
514
515 if( $exclude_custom_post_formats ){
516 $exclude_post_formats_in = array_merge( $exclude_post_formats_in, array( 'aside', 'gallery', 'image', 'link', 'quote', 'video', 'audio' ) );
517 }
518 if( $exclude_quote_link ){
519 $exclude_post_formats_in[] = 'quote';
520 $exclude_post_formats_in[] = 'link';
521 }
522 $exclude_post_formats_in = array_unique( $exclude_post_formats_in );
523
524 // --------------
525
526 ob_start();
527
528 $tax_args = array();
529 if( ! empty( $cat ) && $cat != " " && ( ! is_array( $cat ) || ! in_array( " ", $cat ) ) ) {
530 $tax_args = array(
531 array(
532 'taxonomy' => $taxonomy_name,
533 'field' => 'term_id',
534 'terms' => ! is_array( $cat ) ? explode( ",", $cat ) : $cat
535 )
536 );
537 }
538
539 global $wp_query;
540
541 if( ! $use_wp_query ){
542
543 // create wp_query to get latest items -----------
544 $args = array(
545 'post_type' => 'post',
546 'orderby' => $order_by,
547 'order' => $order,
548 'offset' => $offset,
549 'paged' => $paged,
550 'tax_query' => $tax_args,
551 'post_status' => 'publish',
552 'posts_per_page' => $num,
553 'ignore_sticky_posts' => 1,
554
555 'include_posts__in' => $include, // include posts in this list
556 'posts__not_in' => $exclude, // exclude posts in this list
557 'posts__in' => $only_posts__in, // only posts in this list
558
559 'exclude_without_media' => $exclude_without_media,
560 'exclude_post_formats_in' => $exclude_post_formats_in
561 );
562
563 // ---------------------------------------------------------------------
564
565 // add the additional query args if available
566 if( $wp_query_args ){
567 $args = wp_parse_args( $args, $wp_query_args );
568 }
569
570 // pass the args through the auxin query parser
571 $wp_query = new WP_Query( auxin_parse_query_args( $args ) );
572 }
573
574 // widget header ------------------------------
575 echo $result['widget_header'];
576 echo $result['widget_title'];
577
578
579 $phone_break_point = 767;
580 $tablet_break_point = 1025;
581
582 $show_comments = true; // shows comments icon
583 $post_counter = 0;
584 $post_classes = '';
585 $column_class = '';
586 $item_class = 'aux-col aux-post-masonry';
587 $carousel_attrs = '';
588 $container_class = 'aux-masonry-layout ';
589
590 if( ! empty( $loadmore_type ) ) {
591 $item_class .= ' aux-ajax-item';
592 }
593
594 // generate columns class
595 $column_class = $container_class . ' aux-de-col' . $desktop_cnum;
596 $tablet_cnum = ('inherit' == $tablet_cnum ) ? $desktop_cnum : $tablet_cnum ;
597 $column_class .= ' aux-tb-col'.$tablet_cnum . ' aux-mb-col'.$phone_cnum;
598 $column_class .= 'entry-boxed' == $content_layout ? ' aux-entry-boxed' : '';
599
600 $column_class .= ' aux-ajax-view ' . $extra_column_classes;
601
602 $column_media_width = auxin_get_content_column_width( $desktop_cnum, 15, $content_width );
603
604 $have_posts = $wp_query->have_posts();
605
606 if( $have_posts ){
607
608 echo ! $skip_wrappers ? sprintf( '<div data-element-id="%s" class="%s">', esc_attr( $universal_id ), esc_attr( $column_class ) ) : '';
609
610 while ( $wp_query->have_posts() ) {
611
612 $wp_query->the_post();
613 $post = $wp_query->post;
614
615 $post_vars = auxin_get_post_format_media(
616 $post,
617 array(
618 'request_from' => 'archive',
619 'media_width' => $phone_break_point,
620 'media_size' => 'large',//array( 'width' => $column_media_width, 'height' => $column_media_width * $image_aspect_ratio ),
621 'upscale_image' => true,
622 'crop' => $crop,
623 'image_from_content' => ! $exclude_without_media, // whether to try to get image from content or not
624 'no_gallery' => false,
625 'add_image_hw' => false, // whether add width and height attr or not
626 'preloadable' => $preloadable,
627 'preload_preview' => $preload_preview,
628 'preload_bgcolor' => $preload_bgcolor,
629 'image_sizes' => 'auto',
630 'srcset_sizes' => 'auto'
631 )
632 );
633
634 extract( $post_vars );
635
636 $the_format = get_post_format( $post );
637
638 // add specific class to current classes for each column
639 $post_classes = $has_attach && $show_media ? 'post column-entry' : 'post column-entry no-media';
640
641 printf( '<div class="%s post-%s">', esc_attr( $item_class ), esc_attr( $post->ID ) );
642 include auxin_get_template_file( $template_part_file, '', $extra_template_path );
643 echo '</div>';
644 }
645
646 if( ! $skip_wrappers ) {
647 // End tag for aux-ajax-view wrapper
648 echo '</div>';
649 // Execute load more functionality
650 if( $wp_query->found_posts > $loadmore_per_page ) {
651 echo auxin_get_load_more_controller( $loadmore_type );
652 }
653
654 } else {
655 // Get post counter in the query
656 echo '<span class="aux-post-count hidden">'.$wp_query->post_count.'</span>';
657 }
658
659 }
660
661 if( $reset_query ){
662 wp_reset_query();
663 }
664
665 // return false if no result found
666 if( ! $have_posts ){
667 ob_get_clean();
668 return false;
669 }
670
671 // widget footer ------------------------------
672 echo $result['widget_footer'];
673
674 return ob_get_clean();
675 }
676