Fallback_Aware_Interface

Indicates that a class is making use of the fallback mode.

Table of Contents

apply_fallback_mode()  : bool
Determine where to apply fallback mode, when enabled.
enqueue_json()  : void
Load json values needed for the fallback js.
filter_query()  : void
Insert the filtered results into the query.
get_query_argument_id()  : string
Get the string that is then attached as an argument to the WP_Query $args array as a flag.
get_requested_filters()  : string
Get the value of the url query string that holds the filters selected via the form.
get_requested_orderby()  : string
Get the value of the url query string that holds the orderby parameter.
jsonSerialize()  : array<string|int, mixed>
Define the fallback json data.

Methods

apply_fallback_mode()

Determine where to apply fallback mode, when enabled.

public apply_fallback_mode(bool $enabled) : bool

This is used via the wcf_fallback_mode filter.

Parameters
$enabled : bool
Return values
bool

enqueue_json()

Load json values needed for the fallback js.

public enqueue_json() : void
Return values
void

filter_query()

Insert the filtered results into the query.

public filter_query(WP_Query $query) : void

This is used via pre_get_posts.

Parameters
$query : WP_Query
Return values
void

get_query_argument_id()

Get the string that is then attached as an argument to the WP_Query $args array as a flag.

public get_query_argument_id() : string

The flag is used to shortcircuit our filtered results injection.

Without the flag we'd end up causing an infinite loop.

Return values
string

get_requested_filters()

Get the value of the url query string that holds the filters selected via the form.

public get_requested_filters() : string
Return values
string

get_requested_orderby()

Get the value of the url query string that holds the orderby parameter.

public get_requested_orderby() : string
Return values
string

jsonSerialize()

Define the fallback json data.

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results