Méthode | Description | |
---|---|---|
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. |
static public attach_taxonomy ( string $taxonomy ) | ||
$taxonomy | string |
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' } |
Résultat | WPLib_Post_List_Default[] |
static public instance_class ( ) : mixed | null | ||
Résultat | mixed | null |
static public is_singular ( ) : boolean | ||
Résultat | boolean |
static public register_post_type ( array $args = [] ) | ||
$args | array |
static public register_post_type_labels ( array $args = [] ) : array | ||
$args | array | |
Résultat | array |
static public remove_post_type_support ( string[] $to_remove ) | ||
$to_remove | string[] |