Counters_Aware

Common methods used by various classes to handle the counters for filters.

Table of Contents

generate_result_count()  : string
Use the WC template to generate the results counter.
get_counts()  : array<string|int, mixed>
Loop through the available filters and print a list of counters for each available choice indexed by the filter.

Methods

generate_result_count()

Use the WC template to generate the results counter.

public generate_result_count([mixed $query = false ][, mixed $post_ids = [] ][, mixed $filters = null ]) : string
Parameters
$query : mixed = false
$post_ids : mixed = []
$filters : mixed = null
Return values
string

get_counts()

Loop through the available filters and print a list of counters for each available choice indexed by the filter.

public get_counts([mixed $filters = false ][, mixed $values = [] ]) : array<string|int, mixed>
Parameters
$filters : mixed = false
$values : mixed = []
Return values
array<string|int, mixed>

Search results