PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.0.41
Post Grid Gutenberg Blocks – PostX v5.0.41
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 5.0.17 2.1.1 All 238 releases
← All changes | blocks/Advanced_Filter.php +5 -4 5.0.285.0.41 View file →
@@ -634,10 +634,11 @@
634 634 $post_types = json_decode( $post_types, true );
635 635 }
636 636 }
637 637
638 - $attr['blockId'] = ultimate_post()->sanitize_attr( $attr, 'blockId', 'sanitize_html_class', 'missing_block_id' );
639 - $attr['allText'] = ultimate_post()->sanitize_attr( $attr, 'allText', 'sanitize_text_field', 'missing_block_id' );
638 + $attr['blockId'] = ultimate_post()->sanitize_attr( $attr, 'blockId', 'sanitize_html_class', 'missing_block_id' );
639 + $attr['allText'] = ultimate_post()->sanitize_attr( $attr, 'allText', 'sanitize_text_field', 'missing_block_id' );
640 + $current_page_post_id = ( isset( $attr['currentPostId'] ) && $attr['currentPostId'] ) ? sanitize_html_class( $attr['currentPostId'] ) : ultimate_post()->get_page_post_id( $attr['blockId'] );
640 641
641 642 if ( 'inline' === $attr['filterStyle'] ) {
642 643 $inline_values = json_decode( $attr['filterValues'], true );
643 644
@@ -653,9 +654,9 @@
653 654 'role' => 'button',
654 655 'data-blockId' => $attr['blockId'],
655 656 'data-is-active' => 'false',
656 657 'data-builder' => ultimate_post()->get_builder_attr( 'archiveBuilderFilter' ),
657 - 'data-current-postid' => get_the_ID(),
658 + 'data-current-postid' => $current_page_post_id,
658 659 'data-filter-label' => isset( $attr['allText'] ) ? $attr['allText'] : 'All',
659 660 )
660 661 );
661 662
@@ -715,9 +716,9 @@
715 716 'data-blockId' => $attr['blockId'],
716 717 'aria-expanded' => 'false',
717 718 'aria-label' => 'Select Filter (' . $attr['type'] . ')',
718 719 'data-builder' => ultimate_post()->get_builder_attr( 'archiveBuilderFilter' ),
719 - 'data-current-postid' => get_the_ID(),
720 + 'data-current-postid' => $current_page_post_id,
720 721 'data-filter-label' => isset( $def_value['name'] ) ? $def_value['name'] : 'All',
721 722 )
722 723 );
723 724