Theme_Uncode extends Theme_Integration implements JsonSerializable, Fallback_Aware_Interface Uses Fallback_Aware

Uncode theme integration.

Interfaces, Classes and Traits

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

Table of Contents

$template  : string
The name of the current template.
apply_fallback_mode()  : bool
Enable fallback mode for the theme.
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.
assets()  : void
Load the assets specific to this integration.
enqueue_dummy_handle()  : void
Enqueue dummt handle.
enqueue_fix()  : void
Theme-specific inline css styling.
enqueue_json()  : void
Load json values needed for the fallback js.
filter_query()  : void
Insert the filtered results into the query.
get_dummy_handle()  : string
Generate an handle name for the dummy stylesheet to which we'll attach the custom inline styling.
get_page_base_url()  : string
Get the base url for the fallback mode.
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>
Prepare fallback json array.
load_fallback_hooks()  : void
Load hooks for the fallback mode.
register()  : void
Register the service.
should_enqueue()  : bool
Determine if the inline styling should enqueue or not.
theme_inline_styling()  : void
Load the inline styling when needed.
is_main_query()  : bool
Determine if it's a query we should be filtering or not.

Properties

$template

The name of the current template.

public string $template = 'uncode'

Use wp_get_theme to get it.

Methods

apply_fallback_mode()

Enable fallback mode for the theme.

public apply_fallback_mode(bool $enabled) : bool
Parameters
$enabled : bool
Return values
bool

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>

assets()

Load the assets specific to this integration.

public assets() : void
Return values
void

enqueue_dummy_handle()

Enqueue dummt handle.

public enqueue_dummy_handle() : void
Return values
void

enqueue_fix()

Theme-specific inline css styling.

public enqueue_fix() : void
Tags
inheritdoc
Return values
void

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_dummy_handle()

Generate an handle name for the dummy stylesheet to which we'll attach the custom inline styling.

public get_dummy_handle() : string
Return values
string

get_page_base_url()

Get the base url for the fallback mode.

public get_page_base_url() : string
Return values
string

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()

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
Return values
void

register()

Register the service.

public register() : void
Return values
void

should_enqueue()

Determine if the inline styling should enqueue or not.

public should_enqueue() : bool

Usually you check that the specific theme is enabled here.

Return values
bool

theme_inline_styling()

Load the inline styling when needed.

public theme_inline_styling() : void
Return values
void

is_main_query()

Determine if it's a query we should be filtering or not.

private is_main_query(WP_Query $query) : bool
Parameters
$query : WP_Query
Return values
bool

Search results