PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.0.36
Post Grid Gutenberg Blocks – PostX v5.0.36
5.0.39 5.0.38 5.0.37 5.0.36 5.0.35 5.0.34 5.0.33 5.0.32 5.0.31 5.0.30 5.0.29 5.0.28 5.0.27 5.0.26 5.0.25 5.0.23 5.0.24 5.0.22 5.0.21 5.0.20 5.0.19 5.0.18 5.0.17 2.1.1 2.1.2 All 237 releases
ultimate-post / blocks / template / loadmore.php

loadmore.php in Post Grid Gutenberg Blocks – PostX 5.0.36, at blocks/template/loadmore.php

19 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 // Adv Filter Integration
5 $adv_filter_dataset = ultimate_post()->get_adv_data_attrs( $attr );
6
7 $attr['blockId'] = sanitize_html_class( $attr['blockId'] );
8 $allowed_html_tags = ultimate_post()->ultp_allowed_html_tags();
9 $attr['loadMoreText'] = isset( $attr['loadMoreText'] ) ? wp_kses( $attr['loadMoreText'], $allowed_html_tags ) : 'Load More';
10
11 $page_post_id = ( isset( $attr['currentPostId'] ) && $attr['currentPostId'] ) ? sanitize_html_class( $attr['currentPostId'] ) : ultimate_post()->get_page_post_id( $attr['blockId'] );
12 $self_post_id = 'data-selfpostid="' . ( ( isset( $attr['currentPostId'] ) && $attr['currentPostId'] ) ? 'yes' : 'no' ) . '"';
13 $exclude_id = isset( $curr_post_id ) ? $curr_post_id : '';
14 $wraper_after .= '<div class="ultp-loadmore">';
15 if ( 1 != $pageNum ) {
16 $wraper_after .= '<span class="ultp-loadmore-action" tabindex="0" role="button" data-pages="' . $pageNum . '" data-pagenum="1" data-expost="' . $exclude_id . '" data-blockid="' . $attr['blockId'] . '" data-blockname="ultimate-post_' . $block_name . '" data-postid="' . $page_post_id . '" ' . ultimate_post()->get_builder_attr( $attr['queryType'] ) . $self_post_id . $adv_filter_dataset . '>' . $attr['loadMoreText'] . ' <span class="ultp-spin">' . ultimate_post()->get_svg_icon( 'refresh' ) . '</span></span>';
17 }
18 $wraper_after .= '</div>';
19