| @@ -13,8 +13,9 @@ | ||
| 13 | 13 | |
| 14 | 14 | return array( |
| 15 | 15 | 'blockId' => '', |
| 16 | 16 | 'previewImg' => '', |
| 17 | + 'infiniteScroll' => false, | |
| 17 | 18 | |
| 18 | 19 | /* |
| 19 | 20 | ============================ |
| 20 | 21 | General Setting |
| @@ -275,15 +276,20 @@ | ||
| 275 | 276 | $attr['popupAutoPlay'] = $attr['popupAutoPlay'] == true; |
| 276 | 277 | $attr['readMoreText'] = wp_kses( $attr['readMoreText'], ultimate_post()->ultp_allowed_html_tags() ); |
| 277 | 278 | $attr['gridStyle'] = sanitize_html_class( $attr['gridStyle'] ); |
| 278 | 279 | |
| 280 | + $iscroll = ''; | |
| 281 | + $wrap_data = ''; | |
| 282 | + if ( $attr['infiniteScroll'] ) { | |
| 283 | + $iscroll = 'ultp-iscroll-active'; | |
| 284 | + include ULTP_PATH . 'blocks/template/infinite_scroll_data.php'; | |
| 285 | + } | |
| 286 | + | |
| 279 | 287 | if ( $recent_posts->have_posts() ) { |
| 280 | - | |
| 281 | 288 | // Pagination Block Html |
| 282 | 289 | include ULTP_PATH . 'blocks/template/pagination_block.php'; |
| 283 | - | |
| 284 | - $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'] : '' ) . '">'; | |
| 285 | - $wraper_before .= '<div class="ultp-block-wrapper">'; | |
| 290 | + $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 . ' ">'; | |
| 291 | + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>'; | |
| 286 | 292 | |
| 287 | 293 | // Loading |
| 288 | 294 | $wraper_before .= ultimate_post()->postx_loading(); |
| 289 | 295 | if ( $attr['headingShow'] || $attr['filterShow'] || $attr['paginationShow'] ) { |