Fallback_Aware
Common methods used when making use of the fallback mode.
Table of Contents
- apply_integration_flag() : array<string|int, mixed>
- Insert a special flag into the WP_Query args array used by the query that retrieves filtered post ids.
- enqueue_json() : void
- Load json values needed for the fallback js.
- filter_query() : void
- Insert the filtered results into the query.
- 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>
- Prepare fallback json array.
- load_fallback_hooks() : void
- Load hooks for the fallback mode.
Methods
apply_integration_flag()
Insert a special flag into the WP_Query args array used by the query that retrieves filtered post ids.
public
apply_integration_flag(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed>
Return values
array<string|int, mixed> —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_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()
Prepare fallback json array.
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —load_fallback_hooks()
Load hooks for the fallback mode.
public
load_fallback_hooks() : void