PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.1.1
Post Grid Gutenberg Blocks – PostX v5.1.1
5.1.1 5.1.0 5.0.41 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 All 240 releases
← All changes | blocks/Post_List_2.php +8 -8 5.0.33 → 5.1.1 View file →
@@ -240,9 +240,9 @@
240 240 }
241 241
242 242 public function content( $attr, $noAjax ) {
243 243 $attr = wp_parse_args( $attr, $this->get_attributes() );
244 - global $unique_ID;
244 + global $ultp_unique_ID;
245 245
246 246 if ( ! $noAjax ) {
247 247 $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
248 248 $attr['paged'] = $paged ? $paged : 1;
@@ -247,9 +247,9 @@
247 247 $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
248 248 $attr['paged'] = $paged ? $paged : 1;
249 249 }
250 250 if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) {
251 - $unique_ID = $attr['savedQueryUnique'];
251 + $ultp_unique_ID = $attr['savedQueryUnique'];
252 252 }
253 253
254 254 $block_name = 'post-list-2';
255 255 $vid_icon_redirect = true; // Its used for video icon do not remove it
@@ -261,9 +261,9 @@
261 261 $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png';
262 262
263 263 // Loadmore and Unique content
264 264 if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) {
265 - $unique_ID = $attr['loadMoreQueryUnique'];
265 + $ultp_unique_ID = $attr['loadMoreQueryUnique'];
266 266 $current_unique_posts = $attr['ultp_current_unique_posts'];
267 267 }
268 268
269 269 $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : '';
@@ -288,10 +288,10 @@
288 288
289 289 // Pagination Block Html
290 290 include ULTP_PATH . 'blocks/template/pagination_block.php';
291 291
292 - $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'] : '' ) . '">';
293 - $wraper_before .= '<div class="ultp-block-wrapper ' . $wrap_data . '">';
292 + $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 . '">';
293 + $wraper_before .= '<div class="ultp-block-wrapper" ' . $wrap_data . '>';
294 294
295 295 // Loading
296 296 $wraper_before .= ultimate_post()->postx_loading();
297 297
@@ -336,9 +336,9 @@
336 336
337 337 include ULTP_PATH . 'blocks/template/category.php';
338 338
339 339 if ( $attr['queryUnique'] ) {
340 - $unique_ID[ $attr['queryUnique'] ][] = $post_id;
340 + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id;
341 341 $current_unique_posts[] = $post_id;
342 342 }
343 343
344 344 $post_loop .= '<' . $attr['contentTag'] . ' class="ultp-block-item ultp-block-media post-id-' . $post_id . '">';
@@ -459,9 +459,9 @@
459 459 $post_loop .= '</' . $attr['contentTag'] . '>';
460 460 ++$idx;
461 461 endwhile;
462 462 if ( $attr['queryUnique'] ) {
463 - $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>';
463 + $post_loop .= "<span style='display: none;' class='ultp-current-unique-posts' data-ultp-unique-ids= " . wp_json_encode( $ultp_unique_ID ) . ' data-current-unique-posts= ' . wp_json_encode( $current_unique_posts ) . '> </span>';
464 464 }
465 465
466 466 // if ( ( $attr['paginationShow'] || $attr['advPaginationEnable'] ) && ($attr['paginationType'] == 'loadMore')) {
467 467 // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>';
@@ -487,9 +487,9 @@
487 487 $wraper_after .= '</div>';
488 488 $wraper_after .= $pagi_block_html;
489 489 $wraper_after .= '</div>';
490 490
491 - wp_reset_query();
491 + wp_reset_postdata();
492 492 } else {
493 493 $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] );
494 494 }
495 495