PHP Класс WPLib_Post_Module_Base, wplib

Наследование: extends WPLib_Module_Base
Показать файл Открыть проект

Открытые методы

Метод Описание
attach_taxonomy ( string $taxonomy ) Allows a post type to attach a taxonomy that is registered by someone else's code.
get_list ( array | string | WPLib_Query $query = [], array $args = [] ) : WPLib_Post_List_Default[]
get_query ( array $args = [] ) : WPLib_Query Query the posts. Equivalent to creating a new WP_Query which both instantiates and queries the DB.
instance_class ( ) : mixed | null
is_singular ( ) : boolean Determines if the current query's object is a singular post URL of the calling classes' post type.
register_post_type ( array $args = [] ) Register the post type inside of an Item classes' on_load() method.
register_post_type_labels ( array $args = [] ) : array Register the labels used for this post_type.
remove_post_type_support ( string[] $to_remove ) List post type support values given a list of values to support.

Описание методов

attach_taxonomy() статический публичный Метод

Allows a post type to attach a taxonomy that is registered by someone else's code.
static public attach_taxonomy ( string $taxonomy )
$taxonomy string

get_list() статический публичный Метод

static public get_list ( array | string | WPLib_Query $query = [], array $args = [] ) : WPLib_Post_List_Default[]
$query array | string | WPLib_Query
$args array { @type string $list_class The specific class for the list, i.e. WPLib_Post_List @type string $default_list The default list if no $list_class, i.e. WPLib_Post_List_Default @type string $items The array of items, or a callable that will return a list of items. @type string $list_owner The class "owning" the list, typically "Owner" if Owner::get_list() @type string $instance_class The class for items in the list, i.e. WP_Post @type string $queried 'local' or 'queried' }
Результат WPLib_Post_List_Default[]

get_query() статический публичный Метод

Query the posts. Equivalent to creating a new WP_Query which both instantiates and queries the DB.
static public get_query ( array $args = [] ) : WPLib_Query
$args array
Результат WPLib_Query

instance_class() статический публичный Метод

static public instance_class ( ) : mixed | null
Результат mixed | null

is_singular() статический публичный Метод

Determines if the current query's object is a singular post URL of the calling classes' post type.
static public is_singular ( ) : boolean
Результат boolean

register_post_type() статический публичный Метод

Register the post type inside of an Item classes' on_load() method.
static public register_post_type ( array $args = [] )
$args array

register_post_type_labels() статический публичный Метод

Register the labels used for this post_type.
static public register_post_type_labels ( array $args = [] ) : array
$args array
Результат array

remove_post_type_support() статический публичный Метод

Typically needed for 'post' and 'page'.
static public remove_post_type_support ( string[] $to_remove )
$to_remove string[]