Clarkson_Template
in package
Table of Contents
- $type : string
- The string here is the template name used by `::get_many()`.
- __construct() : mixed
- get() : Clarkson_Template|null
- get_many() : array<string|int, Clarkson_Template>
- Get multiple templates, without pagination.
- get_object() : Clarkson_Object
- Get the Clarkson object for this template.
- get_one() : Clarkson_Template|null
- Gets the first result from a `::get_many()` query.
Properties
$type
The string here is the template name used by `::get_many()`.
public
static string
$type
= ''
Methods
__construct()
public
__construct(WP_Post $post) : mixed
Parameters
- $post : WP_Post
Return values
mixed —get()
public
static get(int $id) : Clarkson_Template|null
Parameters
- $id : int
Return values
Clarkson_Template|null —get_many()
Get multiple templates, without pagination.
public
static get_many(array<string|int, mixed> $args[, mixed &$post_query = null ]) : array<string|int, Clarkson_Template>
Parameters
- $args : array<string|int, mixed>
-
- $post_query : mixed = null
-
The $post_query is passed by reference and will be filled with the WP_Query that produced these results.
Tags
Return values
array<string|int, Clarkson_Template> —get_object()
Get the Clarkson object for this template.
public
get_object() : Clarkson_Object
Return values
Clarkson_Object —get_one()
Gets the first result from a `::get_many()` query.
public
static get_one([array<string|int, mixed> $args = array() ]) : Clarkson_Template|null