PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.1.0
Post Grid Gutenberg Blocks – PostX v5.1.0
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_Grid_1.php +6 -6 5.0.29 → 5.1.0 View file →
@@ -228,9 +228,9 @@
228 228 }
229 229
230 230 public function content( $attr, $noAjax ) {
231 231 $attr = wp_parse_args( $attr, $this->get_attributes() );
232 - global $unique_ID;
232 + global $ultp_unique_ID;
233 233
234 234 if ( ! $noAjax ) {
235 235 $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
236 236 $attr['paged'] = $paged ? $paged : 1;
@@ -235,9 +235,9 @@
235 235 $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
236 236 $attr['paged'] = $paged ? $paged : 1;
237 237 }
238 238 if ( $attr['queryUnique'] && isset( $attr['savedQueryUnique'] ) ) {
239 - $unique_ID = $attr['savedQueryUnique'];
239 + $ultp_unique_ID = $attr['savedQueryUnique'];
240 240 }
241 241 $block_name = 'post-grid-1';
242 242 $wraper_before = $wraper_after = $post_loop = '';
243 243 $attr['queryNumber'] = ultimate_post()->get_post_number( 4, $attr['queryNumber'], $attr['queryNumPosts'] );
@@ -256,9 +256,9 @@
256 256 $dummy_url = ULTP_URL . 'assets/img/ultp-fallback-img.png';
257 257
258 258 // Loadmore and Unique content
259 259 if ( $attr['queryUnique'] && isset( $attr['loadMoreQueryUnique'] ) && $attr['paginationShow'] && ( $attr['paginationType'] == 'loadMore' ) ) {
260 - $unique_ID = $attr['loadMoreQueryUnique'];
260 + $ultp_unique_ID = $attr['loadMoreQueryUnique'];
261 261 $current_unique_posts = $attr['ultp_current_unique_posts'];
262 262 }
263 263
264 264 $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : '';
@@ -337,9 +337,9 @@
337 337
338 338 include ULTP_PATH . 'blocks/template/category.php';
339 339
340 340 if ( $attr['queryUnique'] ) {
341 - $unique_ID[ $attr['queryUnique'] ][] = $post_id;
341 + $ultp_unique_ID[ $attr['queryUnique'] ][] = $post_id;
342 342 $current_unique_posts[] = $post_id;
343 343 }
344 344 $divStyle = '';
345 345 if ( $post_thumb_id && $attr['showImage'] ) {
@@ -443,9 +443,9 @@
443 443 $post_loop .= '</' . $attr['contentTag'] . '>';
444 444 ++$idx;
445 445 endwhile;
446 446 if ( $attr['queryUnique'] ) {
447 - $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>';
447 + $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>';
448 448 }
449 449 // if ( ($attr['paginationShow'] || $attr['advPaginationEnable']) && ($attr['paginationType'] == 'loadMore')) {
450 450 // $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>';
451 451 // }
@@ -469,9 +469,9 @@
469 469 $wraper_after .= '</div>';
470 470 $wraper_after .= $pagi_block_html;
471 471 $wraper_after .= '</div>';
472 472
473 - wp_reset_query();
473 + wp_reset_postdata();
474 474
475 475 } else {
476 476 $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] );
477 477 }