PHP Class WC_Widget_Layered_Nav

Inheritance: extends WP_Widget
Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) Constructor.
form ( array $instance ) Outputs the settings update form.
init_settings ( ) Init settings after post types are registered.
update ( array $new_instance, array $old_instance ) : array Updates a particular instance of a widget.
widget ( array $args, array $instance ) Output widget.

Méthodes protégées

Méthode Description
get_current_taxonomy ( ) : string Return the currently viewed taxonomy name.
get_current_term_id ( ) : integer Return the currently viewed term ID.
get_current_term_slug ( ) : integer Return the currently viewed term slug.
get_filtered_term_product_counts ( array $term_ids, string $taxonomy, string $query_type ) : array Count products within certain terms, taking the main WP query into consideration.
get_page_base_url ( $taxonomy ) : string Get current page URL for layered nav items.
layered_nav_dropdown ( array $terms, string $taxonomy, string $query_type ) : boolean Show dropdown layered nav.
layered_nav_list ( array $terms, string $taxonomy, string $query_type ) : boolean Show list based layered nav.

Method Details

__construct() public méthode

Constructor.
public __construct ( )

form() public méthode

Outputs the settings update form.
public form ( array $instance )
$instance array

get_current_taxonomy() protected méthode

Return the currently viewed taxonomy name.
protected get_current_taxonomy ( ) : string
Résultat string

get_current_term_id() protected méthode

Return the currently viewed term ID.
protected get_current_term_id ( ) : integer
Résultat integer

get_current_term_slug() protected méthode

Return the currently viewed term slug.
protected get_current_term_slug ( ) : integer
Résultat integer

get_filtered_term_product_counts() protected méthode

Count products within certain terms, taking the main WP query into consideration.
protected get_filtered_term_product_counts ( array $term_ids, string $taxonomy, string $query_type ) : array
$term_ids array
$taxonomy string
$query_type string
Résultat array

get_page_base_url() protected méthode

Get current page URL for layered nav items.
protected get_page_base_url ( $taxonomy ) : string
Résultat string

init_settings() public méthode

Init settings after post types are registered.
public init_settings ( )

layered_nav_dropdown() protected méthode

Show dropdown layered nav.
protected layered_nav_dropdown ( array $terms, string $taxonomy, string $query_type ) : boolean
$terms array
$taxonomy string
$query_type string
Résultat boolean Will nav display?

layered_nav_list() protected méthode

Show list based layered nav.
protected layered_nav_list ( array $terms, string $taxonomy, string $query_type ) : boolean
$terms array
$taxonomy string
$query_type string
Résultat boolean Will nav display?

update() public méthode

Updates a particular instance of a widget.
public update ( array $new_instance, array $old_instance ) : array
$new_instance array
$old_instance array
Résultat array

widget() public méthode

Output widget.
See also: WP_Widget
public widget ( array $args, array $instance )
$args array
$instance array