Allows developers to add their own filters to the active filters list (#36705)
This commit is contained in:
commit
7d62529dd4
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Added `woocommerce_widget_layered_nav_filters_start/end` hooks around layered nav filters widget
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Added `woocommerce_widget_layered_nav_filters_start/end` hooks around layered nav filters widget
|
|
@ -56,6 +56,16 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
|
|||
|
||||
echo '<ul>';
|
||||
|
||||
/**
|
||||
* Allow 3rd party developers to add their own filters to start the Layered Navigation Filters Widget.
|
||||
*
|
||||
* @since 7.6.0
|
||||
*
|
||||
* @param array $args Arguments.
|
||||
* @param array $instance Widget instance.
|
||||
*/
|
||||
do_action( 'woocommerce_widget_layered_nav_filters_start', $args, $instance );
|
||||
|
||||
// Attributes.
|
||||
if ( ! empty( $_chosen_attributes ) ) {
|
||||
foreach ( $_chosen_attributes as $taxonomy => $data ) {
|
||||
|
@ -105,6 +115,16 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow 3rd party developers to add their own filters to end the Layered Navigation Filters Widget.
|
||||
*
|
||||
* @since 7.6.0
|
||||
*
|
||||
* @param array $args Arguments.
|
||||
* @param array $instance Widget instance.
|
||||
*/
|
||||
do_action( 'woocommerce_widget_layered_nav_filters_end', $args, $instance );
|
||||
|
||||
echo '</ul>';
|
||||
|
||||
$this->widget_end( $args );
|
||||
|
|
Loading…
Reference in New Issue