WooCommerce Code Reference

WC_Widget_Layered_Nav_Filters extends WC_Widget
in package

Widget layered nav filters.

Table of Contents

$settings  : array
Settings.
$widget_cssclass  : string
CSS class.
$widget_description  : string
Widget description.
$widget_id  : string
Widget ID.
$widget_name  : string
Widget name.
__construct()  : mixed
Constructor.
cache_widget()  : string
Cache the widget.
flush_widget_cache()  : mixed
Flush the cache.
form()  : mixed
Outputs the settings update form.
get_cached_widget()  : bool
Get cached widget.
update()  : array
Updates a particular instance of a widget.
widget()  : mixed
Output widget.
widget_end()  : mixed
Output the html at the end of a widget.
widget_start()  : mixed
Output the html at the start of a widget.
get_current_page_url()  : string
Get current page URL with various filtering props supported by WC.
get_instance_title()  : string
Get this widgets title.
get_widget_id_for_cache()  : string
Get widget id plus scheme/protocol to prevent serving mixed content from (persistently) cached widgets.

Properties

Methods

cache_widget()

Cache the widget.

public cache_widget(array $args, string $content) : string
Parameters
$args : array

Arguments.

$content : string

Content.

Return values
stringthe content that was cached

form()

Outputs the settings update form.

public form(array $instance) : mixed
Parameters
$instance : array

Instance.

Tags
see

WP_Widget->form

Return values
mixed

get_cached_widget()

Get cached widget.

public get_cached_widget(array $args) : bool
Parameters
$args : array

Arguments.

Return values
booltrue if the widget is cached otherwise false

update()

Updates a particular instance of a widget.

public update(array $new_instance, array $old_instance) : array
Parameters
$new_instance : array

New instance.

$old_instance : array

Old instance.

Tags
see

WP_Widget->update

Return values
array

widget_start()

Output the html at the start of a widget.

public widget_start(array $args, array $instance) : mixed
Parameters
$args : array

Arguments.

$instance : array

Instance.

Return values
mixed

get_current_page_url()

Get current page URL with various filtering props supported by WC.

protected get_current_page_url() : string
Tags
since
3.3.0
Return values
string

get_instance_title()

Get this widgets title.

protected get_instance_title(array $instance) : string
Parameters
$instance : array

Array of instance options.

Return values
string

get_widget_id_for_cache()

Get widget id plus scheme/protocol to prevent serving mixed content from (persistently) cached widgets.

protected get_widget_id_for_cache(string $widget_id[, string $scheme = '' ]) : string
Parameters
$widget_id : string

Id of the cached widget.

$scheme : string = ''

Scheme for the widget id.

Tags
since
3.4.0
Return values
stringWidget id including scheme/protocol.