| @@ -18,8 +18,9 @@ | ||
| 18 | 18 | 'advFilterEnable' => false, |
| 19 | 19 | 'advPaginationEnable' => false, |
| 20 | 20 | 'defQueryTax' => array(), |
| 21 | 21 | 'advRelation' => 'AND', |
| 22 | + 'infiniteScroll' => false, | |
| 22 | 23 | // -------------------------- |
| 23 | 24 | // Query Setting |
| 24 | 25 | // -------------------------- |
| 25 | 26 | 'queryQuick' => '', |
| @@ -250,15 +251,21 @@ | ||
| 250 | 251 | $attr['readMoreText'] = wp_kses( $attr['readMoreText'], ultimate_post()->ultp_allowed_html_tags() ); |
| 251 | 252 | $attr['titleAnimation'] = sanitize_html_class( $attr['titleAnimation'] ); |
| 252 | 253 | $attr['overlayContentPosition'] = sanitize_html_class( $attr['overlayContentPosition'] ); |
| 253 | 254 | |
| 255 | + $iscroll = ''; | |
| 256 | + $wrap_data = ''; | |
| 257 | + if ( $attr['infiniteScroll'] ) { | |
| 258 | + $iscroll = 'ultp-iscroll-active'; | |
| 259 | + include ULTP_PATH . 'blocks/template/infinite_scroll_data.php'; | |
| 260 | + } | |
| 261 | + | |
| 254 | 262 | if ( $recent_posts->have_posts() ) { |
| 255 | - | |
| 256 | 263 | // Pagination Block Html |
| 257 | 264 | include ULTP_PATH . 'blocks/template/pagination_block.php'; |
| 258 | 265 | |
| 259 | - $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'] : '' ) . '">'; | |
| 260 | - $wraper_before .= '<div class="ultp-block-wrapper">'; | |
| 266 | + $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 . '">'; | |
| 267 | + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>'; | |
| 261 | 268 | |
| 262 | 269 | // Loading |
| 263 | 270 | $wraper_before .= ultimate_post()->postx_loading(); |
| 264 | 271 | |