Prefilling_Aware
Adjusts the counting criteria of filters choices.
For "checkboxes" types of filters, the user is allowed to select one or more choices. When only one filter is used, results are merged instead of being restricted to the related selected choices.
Table of Contents
- get_choices_counts() : mixed
- include_variations() : mixed
- should_restrict() : bool
- Checks if results should be restricted or merged.
- taxonomy_filter_should_restrict() : bool
- Determine if filtering should be restricted to match all filters when one or more filter is enabled and is a checkbox.
Methods
get_choices_counts()
public
get_choices_counts(array<string|int, mixed> $post_ids[, mixed $filters = false ][, mixed $prefilling = false ]) : mixed
Parameters
- $post_ids : array<string|int, mixed>
- $filters : mixed = false
- $prefilling : mixed = false
Tags
Return values
mixed —include_variations()
public
include_variations() : mixed
Return values
mixed —should_restrict()
Checks if results should be restricted or merged.
private
should_restrict(bool $prefilling[, array<string|int, mixed> $other_filters = [] ]) : bool
Parameters
- $prefilling : bool
- $other_filters : array<string|int, mixed> = []
Return values
bool —taxonomy_filter_should_restrict()
Determine if filtering should be restricted to match all filters when one or more filter is enabled and is a checkbox.
private
taxonomy_filter_should_restrict(mixed $prefilling[, array<string|int, mixed> $other_filters = [] ]) : bool
Parameters
- $prefilling : mixed
- $other_filters : array<string|int, mixed> = []