ClarksonCore

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
throws
Exception

Error message.

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 the archive feed permalink.

public get_archive_feed_permalink([string $feed = '' ]) : string|null
Parameters
$feed : string = ''
Return values
string|null

Archive feed 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_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
$args : array<string|int, mixed>

Post query arguments.

Tags
example

Clarkson_Post_type->get_posts( array( 'posts_per_page' => 5 ) );

Return values
array<string|int, Clarkson_Object>

get_title()

Get the post type title.

public get_title() : string
Return values
string

        

Search results