Post
abstract class Post
A class to represent and help deal with common custom post type functionality.
Properties
| protected WP_Post | $Post | ||
| protected array | $Meta |
Methods
static
post_type()
Get the post type of the Post.
WP_Post
get_post()
Returns the parent WP_Post object.
int
get_ID()
Returns the ID of the parent WP_Post.
string
get_title()
Returns the title of the parent WP_Post.
__construct(int|WP_Post $id)
Construct the Post. Load Post and Post Meta data.
Details
at line 36
abstract static
post_type()
Get the post type of the Post.
at line 43
final WP_Post
get_post()
Returns the parent WP_Post object.
at line 50
final int
get_ID()
Returns the ID of the parent WP_Post.
at line 57
final string
get_title()
Returns the title of the parent WP_Post.
at line 66
final null|Post_Meta
get_meta(string $meta_key = '')
Returns the Post meta.
at line 87
__construct(int|WP_Post $id)
Construct the Post. Load Post and Post Meta data.
at line 125
final protected
add_meta(Post_Meta $Meta)
Add a Post Meta to this Post.