Attribute_Filter_Widget extends Product_Table_Widget

Product Table implementation of WooCommerce Layered Navigation Widget.

Based on version 2.6.0 of the WC_Widget_Layered_Nav class.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

__construct()  : mixed
Constructor.
body_class()  : mixed
form()  : mixed
Outputs the settings update form.
init_settings()  : mixed
Init settings after post types are registered.
update()  : array<string|int, mixed>
Updates a particular instance of a widget.
widget()  : mixed
Output widget.
get_current_taxonomy()  : string
Return the currently viewed taxonomy name.
get_current_term_id()  : int
Return the currently viewed term ID.
get_current_term_slug()  : int
Return the currently viewed term slug.
get_filtered_term_product_counts()  : array<string|int, mixed>
Count products within certain terms, taking the main WP query into consideration.
get_main_meta_query()  : mixed
get_main_tax_query()  : mixed
layered_nav_dropdown()  : bool
Show dropdown layered nav.
layered_nav_list()  : bool
Show list based layered nav.

Methods

body_class()

public static body_class(mixed $classes) : mixed
Parameters
$classes : mixed
Tags
Return values
mixed

form()

Outputs the settings update form.

public form(array<string|int, mixed> $instance) : mixed
Parameters
$instance : array<string|int, mixed>
Tags
see

WP_Widget->form

Return values
mixed

init_settings()

Init settings after post types are registered.

public init_settings() : mixed
Tags
Return values
mixed

update()

Updates a particular instance of a widget.

public update(array<string|int, mixed> $new_instance, array<string|int, mixed> $old_instance) : array<string|int, mixed>
Parameters
$new_instance : array<string|int, mixed>
$old_instance : array<string|int, mixed>
Tags
see

WP_Widget->update

Return values
array<string|int, mixed>

widget()

Output widget.

public widget(array<string|int, mixed> $args, array<string|int, mixed> $instance) : mixed
Parameters
$args : array<string|int, mixed>
$instance : array<string|int, mixed>
Tags
see
WP_Widget
Return values
mixed

get_current_taxonomy()

Return the currently viewed taxonomy name.

protected get_current_taxonomy() : string
Tags
Return values
string

get_current_term_id()

Return the currently viewed term ID.

protected get_current_term_id() : int
Tags
Return values
int

get_current_term_slug()

Return the currently viewed term slug.

protected get_current_term_slug() : int
Tags
Return values
int

get_filtered_term_product_counts()

Count products within certain terms, taking the main WP query into consideration.

protected get_filtered_term_product_counts(array<string|int, mixed> $term_ids, string $taxonomy, string $query_type) : array<string|int, mixed>
Parameters
$term_ids : array<string|int, mixed>
$taxonomy : string
$query_type : string
Tags
Return values
array<string|int, mixed>

get_main_meta_query()

protected static get_main_meta_query() : mixed
Tags
Return values
mixed

get_main_tax_query()

protected static get_main_tax_query() : mixed
Tags
Return values
mixed

layered_nav_dropdown()

Show dropdown layered nav.

protected layered_nav_dropdown(array<string|int, mixed> $terms, string $taxonomy, string $query_type) : bool
Parameters
$terms : array<string|int, mixed>
$taxonomy : string
$query_type : string
Tags
Return values
bool

Will nav display?

layered_nav_list()

Show list based layered nav.

protected layered_nav_list(array<string|int, mixed> $terms, string $taxonomy, string $query_type) : bool
Parameters
$terms : array<string|int, mixed>
$taxonomy : string
$query_type : string
Tags
Return values
bool

Will nav display?

Search results