POSTMETA
Postmeta
What is Metadata?
Metadata can be described as data about data. Postmeta is the way to store post-related metadata that has an impact on a post. All the data is stored in the postmeta table and mapped with the post_id.
What is stored in the metadata tables? For example:
For posts, post_type is an example of metadata, but it's stored in the posts table
Taxonomy terms, categories, and tags can also be loosely defined as metadata, but these are stored entirely separately, in their own database tables.
Post metadata such as custom fields and additional metadata added via extension is stored in the postmeta table, as you would expect.
So it's easier to think of metadata in miniCal not according to the strict definition of the term, but as the data stored in the three metadata tables.
But let's have a look at some of the more common types of metadata:
Metadata about the extension.
Custom Fields.
User Metadata.
Structure of the miniCal post-meta Table
post_id
=> //post idpost_key
=> // keypost_value
=> // value
Add postmeta data with post data
You can add postmeta data with post data, Just add an array with key name meta. Here is an example is given.
Method | Description | Parameters Description | Return value |
---|---|---|---|
| Adds a new postmeta value. |
| null |
| Get postmeta value. |
| mixed Either array or null, if postmeta data is available or no error occurs, then array else null. |
| Update postmeta value. |
| mixed Either true or null, if postmeta data is updated then true else null. |
| Detele postmeta value. |
| mixed Either true or null, if postmeta data is deleted then true else null. |
Last updated