| @@ -661,13 +661,15 @@ | ||
| 661 | 661 | $filter_attributes['queryQuick'] = $adv_filter_data['adv_sort']; |
| 662 | 662 | $filter_attributes['queryOrderBy'] = |
| 663 | 663 | ! empty( $adv_filter_data['orderby'] ) ? $adv_filter_data['orderby'] : ( $value['attrs']['queryOrderBy'] ?? '' ); |
| 664 | 664 | } |
| 665 | - | |
| 665 | + $pagination = $this->pagination_for_filter( $attr, $postId, $blockRaw, $filter_attributes ); | |
| 666 | 666 | $toReturn = array( |
| 667 | 667 | 'blocks' => $objectBlock->content( $attr, true ), |
| 668 | 668 | 'notFound' => isset( $attr['notFoundMessage'] ) ? $attr['notFoundMessage'] : '', |
| 669 | - 'pagination' => $this->pagination_for_filter( $attr, $postId, $blockRaw, $filter_attributes ), | |
| 669 | + 'pagination' => $pagination['pagination_content'], | |
| 670 | + 'data_attrs' => $pagination['data_attrs'], | |
| 671 | + 'data_all_attrs' => $pagination['data_attrs'], | |
| 670 | 672 | 'paginationType' => $attr['paginationType'], |
| 671 | 673 | 'paginationShow' => $attr['paginationShow'], |
| 672 | 674 | ); |
| 673 | 675 | } |
| @@ -723,10 +725,28 @@ | ||
| 723 | 725 | |
| 724 | 726 | $wraper_after .= '</div>'; |
| 725 | 727 | } |
| 726 | 728 | wp_reset_query(); |
| 727 | - | |
| 728 | - return $wraper_after; | |
| 729 | + | |
| 730 | + // queryQuick | |
| 731 | + return array( | |
| 732 | + 'pagination_content' => $wraper_after, | |
| 733 | + 'data_attrs' => wp_json_encode( array( | |
| 734 | + 'paged' => 1, | |
| 735 | + 'blockid' => $attr['blockId'], | |
| 736 | + 'postid' => $postId, | |
| 737 | + 'pages' => $pageNum, | |
| 738 | + 'blockname' => $blockRaw, | |
| 739 | + 'filter_value' => isset( $filter_attributes['queryTaxValue'] ) ? $filter_attributes['queryTaxValue'] : '', | |
| 740 | + 'filter_type' => isset( $filter_attributes['queryTax'] ) ? $filter_attributes['queryTax'] : '', | |
| 741 | + 'filter_author' => isset( $filter_attributes['queryAuthor'] ) ? $filter_attributes['queryAuthor'] : '', | |
| 742 | + 'filter_order' => isset( $filter_attributes['queryOrder'] ) ? $filter_attributes['queryOrder'] : 'DESC', | |
| 743 | + 'filter_orderby' => isset( $filter_attributes['queryOrderBy'] ) ? $filter_attributes['queryOrderBy'] : '', | |
| 744 | + 'filter_search' => isset( $filter_attributes['querySearch'] ) ? $filter_attributes['querySearch'] : '', | |
| 745 | + 'filter_queryQuick' => isset( $filter_attributes['queryQuick'] ) ? $filter_attributes['queryQuick'] : '', | |
| 746 | + 'filter_for' => 'ultp-block-' . $attr['blockId'], | |
| 747 | + )), | |
| 748 | + ); | |
| 729 | 749 | } |
| 730 | 750 | |
| 731 | 751 | /** |
| 732 | 752 | * Nonce Generation Callback |