Clarkson_Post_Type
in package
Clarkson Post Type class.
Table of Contents
- __construct() : mixed
- __get() : mixed
- Proxy requested properties to WP Post Type if it doesn't exist in Clarkson Post Type
- __isset() : bool
- Exists check for __get function
- get() : Clarkson_Post_Type|null
- Get post type object by post type name
- get_archive_feed_permalink() : string|null
- Get the archive feed permalink.
- get_archive_permalink() : string|null
- Get the archive permalink.
- get_archive_title() : string
- Get the post type archive title.
- get_many() : array<string|int, Clarkson_Post_Type>
- Get all available Clarkson Post Type objects
- get_post_type() : WP_Post_Type
- Get the post type data.
- get_posts() : array<string|int, Clarkson_Object>
- Get multiple posts, without pagination.
- get_title() : string
- Get the post type title.
Methods
__construct()
public
__construct(WP_Post_Type $post_type) : mixed
Parameters
- $post_type : WP_Post_Type
Return values
mixed —__get()
Proxy requested properties to WP Post Type if it doesn't exist in Clarkson Post Type
public
__get(string $name) : mixed
Parameters
- $name : string
-
Field to search by.
Tags
Return values
mixed —__isset()
Exists check for __get function
public
__isset(string $name) : bool
Parameters
- $name : string
-
Field to search by.
Return values
bool —property exists
get()
Get post type object by post type name
public
static get(string $post_type) : Clarkson_Post_Type|null
Parameters
- $post_type : string
Return values
Clarkson_Post_Type|null —get_archive_feed_permalink()
Get the archive feed permalink.
public
get_archive_feed_permalink([string $feed = '' ]) : string|null
Parameters
- $feed : string = ''
Return values
string|null —Archive feed permalink.
get_archive_permalink()
Get the archive permalink.
public
get_archive_permalink() : string|null
Return values
string|null —Archive permalink.
get_archive_title()
Get the post type archive title.
public
get_archive_title() : string
Return values
string —get_many()
Get all available Clarkson Post Type objects
public
static get_many([array<string|int, mixed> $args = array() ][, string $operator = 'and' ]) : array<string|int, Clarkson_Post_Type>
Parameters
- $args : array<string|int, mixed> = array()
-
Post type arguments
- $operator : string = 'and'
-
One of 'and', 'or', or 'not'
Tags
Return values
array<string|int, Clarkson_Post_Type> —get_post_type()
Get the post type data.
public
get_post_type() : WP_Post_Type
Return values
WP_Post_Type —get_posts()
Get multiple posts, without pagination.
public
get_posts(array<string|int, mixed> $args) : array<string|int, Clarkson_Object>
Parameters
Tags
Return values
array<string|int, Clarkson_Object> —get_title()
Get the post type title.
public
get_title() : string