Allows developers to add their own filters to the active filters list
Fixes #36704
This commit is contained in:
parent
ab0378634a
commit
53f80a24f6
|
@ -55,6 +55,8 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
|
||||||
$this->widget_start( $args, $instance );
|
$this->widget_start( $args, $instance );
|
||||||
|
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
|
|
||||||
|
do_action( 'woocommerce_widget_layered_nav_filters_start' );
|
||||||
|
|
||||||
// Attributes.
|
// Attributes.
|
||||||
if ( ! empty( $_chosen_attributes ) ) {
|
if ( ! empty( $_chosen_attributes ) ) {
|
||||||
|
@ -104,6 +106,8 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
|
||||||
echo '<li class="chosen"><a rel="nofollow" aria-label="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), esc_html( $rating ) ) . '</a></li>';
|
echo '<li class="chosen"><a rel="nofollow" aria-label="' . esc_attr__( 'Remove filter', 'woocommerce' ) . '" href="' . esc_url( $link ) . '">' . sprintf( esc_html__( 'Rated %s out of 5', 'woocommerce' ), esc_html( $rating ) ) . '</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_action( 'woocommerce_widget_layered_nav_filters_end' );
|
||||||
|
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue