| @@ -125,8 +125,14 @@ | ||
| 125 | 125 | if ( ! empty( $pagination_attributes ) ) { |
| 126 | 126 | $container_attributes['data-rtsb-ajax'] = $pagination_attributes; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | + // Opt-out of the scroll-to-top behaviour on Ajax filter/pagination when | |
| 130 | + // the "Enable Scroll To Top?" switch is turned off. | |
| 131 | + if ( isset( $settings['enable_ajax_scroll'] ) && empty( $settings['enable_ajax_scroll'] ) ) { | |
| 132 | + $container_attributes['data-rtsb-disable-scroll'] = '1'; | |
| 133 | + } | |
| 134 | + | |
| 129 | 135 | // Adding render attributes. |
| 130 | 136 | $this->add_attribute( 'rtsb_container_attr_' . $rand, $container_attributes ); |
| 131 | 137 | |
| 132 | 138 | // Start rendering. |
| @@ -507,9 +513,9 @@ | ||
| 507 | 513 | |
| 508 | 514 | $restore_query = true; |
| 509 | 515 | } |
| 510 | 516 | |
| 511 | - if ( Fns::product_has_applied_filters( 'shop' ) || Fns::product_has_applied_filters( 'archive' ) || 'rtsb_builder' === get_post_type( get_the_ID() ) ) { | |
| 517 | + if ( rtsb()->has_pro() && ( Fns::product_has_applied_filters( 'shop' ) || Fns::product_has_applied_filters( 'archive' ) || 'rtsb_builder' === get_post_type( get_the_ID() ) ) ) { | |
| 512 | 518 | $rtsb_active_filters_html = Fns::get_active_filters_html(); |
| 513 | 519 | $rtsb_wrapper_style = '' !== $rtsb_active_filters_html ? ' style="' . esc_attr( 'display:block;' ) . '"' : ''; |
| 514 | 520 | echo '<div class="rtsb-active-filters-wrapper"' . $rtsb_wrapper_style . '>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Style value is escaped above. |
| 515 | 521 | Fns::print_html( $rtsb_active_filters_html, true ); |