ClarksonCore

Template_Context
in package

Table of Contents

add_author()  : array<string|int, mixed>
Adds an author object if the current request is an author archive.
add_post_type()  : array<string|int, mixed>
add_posts()  : array<string|int, mixed>
Adds posts to the current context.
add_posts_page()  : array<string|int, mixed>
Adds posts page overview as Clarkson Object if current page is home
add_search_count()  : array<string|int, mixed>
Adds the search result count if the current request is a search.
add_term()  : array<string|int, mixed>
Adds a term if the current request is a term archive.
register_hooks()  : void
Register all hooks to add context to the template call.

Methods

add_author()

Adds an author object if the current request is an author archive.

public add_author(array<string|int, mixed> $context, WP_Query $wp_query) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>
$wp_query : WP_Query
Return values
array<string|int, mixed>

add_post_type()

public add_post_type(array<string|int, mixed> $context, WP_Query $wp_query) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>
$wp_query : WP_Query
Return values
array<string|int, mixed>

add_posts()

Adds posts to the current context.

public add_posts(array<string|int, mixed> $context, WP_Query $wp_query) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>
$wp_query : WP_Query
Return values
array<string|int, mixed>

add_posts_page()

Adds posts page overview as Clarkson Object if current page is home

public add_posts_page(array<string|int, mixed> $context) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>
Return values
array<string|int, mixed>

add_search_count()

Adds the search result count if the current request is a search.

public add_search_count(array<string|int, mixed> $context, WP_Query $wp_query) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>
$wp_query : WP_Query
Return values
array<string|int, mixed>

add_term()

Adds a term if the current request is a term archive.

public add_term(array<string|int, mixed> $context, WP_Query $wp_query) : array<string|int, mixed>
Parameters
$context : array<string|int, mixed>
$wp_query : WP_Query
Return values
array<string|int, mixed>

register_hooks()

Register all hooks to add context to the template call.

public register_hooks() : void
Return values
void

        

Search results