Meta
abstract class Meta
An abstract class for other abstract classes to inherit regarding saving meta values in standard form in the WordPress database.
User Meta and Post Meta abstract classes for example will inherently extend this class.
Properties
| protected Meta_Schema | $Schema | ||
| protected string | $single | ||
| protected mixed | $data |
Methods
The meta key used in the database.
The function used to load meta data from the database.
The function used to save meta data.
Create a data structure that should be saved in it's own format in the database.
Return the Meta schema.
Get the meta data of this instance.
Construct the Meta. Load the data from the database.
Set the meta data of this instance.
Set properties of the class based on an associative array.
Validate the Meta export values based on the current Schema.
Details
at line 42
abstract static string
key()
The meta key used in the database.
at line 49
abstract mixed
load()
The function used to load meta data from the database.
at line 56
abstract bool
save()
The function used to save meta data.
at line 63
abstract mixed
export()
Create a data structure that should be saved in it's own format in the database.
at line 70
final Meta_Schema
get_schema()
Return the Meta schema.
at line 77
final protected mixed
get_data()
Get the meta data of this instance.
at line 82
__construct()
Construct the Meta. Load the data from the database.
at line 95
final protected
set_data(mixed $data)
Set the meta data of this instance.
at line 110
final protected
set_schema(Meta_Schema $Schema)
Set the schema for the Meta data.
at line 119
final
import(array $data)
Set properties of the class based on an associative array.
at line 132
final WP_Error|bool
validate()
Validate the Meta export values based on the current Schema.