Post_Meta
abstract class Post_Meta extends Meta
An abstract for dealing with Post Meta.
Properties
| protected Meta_Schema | $Schema | from Meta | |
| protected string | $single | from Meta | |
| protected mixed | $data | from Meta | |
| protected WP_Post | $Post |
Methods
The required abstract loading function.
Save the instance data to the database.
Create a data structure that should be saved in it's own format in the database.
Construct construct the Post Meta, instantiate Post if necessary, call parent constructor.
Return the Post.
Details
in
Meta at line 42
abstract static string
key()
The meta key used in the database.
at line 75
final mixed
load()
The required abstract loading function.
at line 84
final bool
save()
Save the instance data to the database.
in
Meta at line 63
abstract mixed
export()
Create a data structure that should be saved in it's own format in the database.
in
Meta at line 70
final Meta_Schema
get_schema()
Return the Meta schema.
in
Meta at line 77
final protected mixed
get_data()
Get the meta data of this instance.
at line 42
__construct(WP_Post|int $post)
Construct construct the Post Meta, instantiate Post if necessary, call parent constructor.
in
Meta at line 95
final protected
set_data(mixed $data)
Set the meta data of this instance.
in
Meta at line 110
final protected
set_schema(Meta_Schema $Schema)
Set the schema for the Meta data.
in
Meta at line 119
final
import(array $data)
Set properties of the class based on an associative array.
in
Meta at line 132
final WP_Error|bool
validate()
Validate the Meta export values based on the current Schema.
at line 35
final WP_Post
get_post()
Return the Post.