| @@ -15,8 +15,9 @@ | ||
| 15 | 15 | 'advFilterEnable' => false, |
| 16 | 16 | 'advPaginationEnable' => false, |
| 17 | 17 | 'defQueryTax' => array(), |
| 18 | 18 | 'advRelation' => 'AND', |
| 19 | + 'infiniteScroll' => false, | |
| 19 | 20 | /* |
| 20 | 21 | ============================ |
| 21 | 22 | Layout |
| 22 | 23 | ============================*/ |
| @@ -271,15 +272,20 @@ | ||
| 271 | 272 | $attr['imgOverlayType'] = sanitize_html_class( $attr['imgOverlayType'] ); |
| 272 | 273 | $attr['popupAutoPlay'] = $attr['popupAutoPlay'] == true; |
| 273 | 274 | $attr['readMoreText'] = wp_kses( $attr['readMoreText'], ultimate_post()->ultp_allowed_html_tags() ); |
| 274 | 275 | |
| 276 | + include ULTP_PATH . 'blocks/template/pagination_block.php'; | |
| 277 | + $iscroll = ''; | |
| 278 | + $wrap_data = ''; | |
| 279 | + if ( $attr['infiniteScroll'] ) { | |
| 280 | + $iscroll = 'ultp-iscroll-active'; | |
| 281 | + include ULTP_PATH . 'blocks/template/infinite_scroll_data.php'; | |
| 282 | + } | |
| 283 | + | |
| 275 | 284 | if ( $recent_posts->have_posts() ) { |
| 276 | - | |
| 277 | 285 | // Pagination Block Html |
| 278 | - include ULTP_PATH . 'blocks/template/pagination_block.php'; | |
| 279 | - | |
| 280 | - $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . $attr['advanceId'] . '" ' : '' ) . ' class="ultp-post-grid-block wp-block-ultimate-post-' . $block_name . ' ultp-block-' . $attr['blockId'] . '' . ( $attr['align'] ? ' align' . $attr['align'] : '' ) . '' . ( $attr['className'] ? ' ' . $attr['className'] : '' ) . '">'; | |
| 281 | - $wraper_before .= '<div class="ultp-block-wrapper">'; | |
| 286 | + $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . $attr['advanceId'] . '" ' : '' ) . ' class="ultp-post-grid-block wp-block-ultimate-post-' . $block_name . ' ultp-block-' . $attr['blockId'] . '' . ( $attr['align'] ? ' align' . $attr['align'] : '' ) . '' . ( $attr['className'] ? ' ' . $attr['className'] : '' ) . ' ' . $iscroll . ' ">'; | |
| 287 | + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>'; | |
| 282 | 288 | |
| 283 | 289 | // Loading |
| 284 | 290 | $wraper_before .= ultimate_post()->postx_loading(); |
| 285 | 291 | |