[ Index ] |
PHP Cross Reference of GlotPress |
[Source view] [Print] [Project Stats]
Functions for retrieving and manipulating metadata of various GlotPress object types.
File Size: | 208 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
gp_sanitize_meta_key( $key ) X-Ref |
Sanitizes a key name to be used to store meta data in to the database. return: string since: 1.0.0 param: string $key Metadata key. |
gp_get_meta( $object_type, $object_id, $meta_key = null ) X-Ref |
Retrieves and returns a meta value from the database. return: mixed|false Metadata or false. since: 1.0.0 param: string $object_type The object type. param: int $object_id ID of the object metadata is for. param: string|null $meta_key Optional. Metadata key. Default null. |
gp_update_meta( $object_id = 0, $meta_key, $meta_value, $type, $global = false ) X-Ref |
Adds and updates meta data in the database return: bool|int True if meta updated, false if there is an error and the id of the inserted row otherwise. since: 1.0.0 param: int $object_id ID of the object metadata is for. param: string $meta_key Metadata key. param: mixed $meta_value The value to store. param: string $type The object type. param: bool $global Overrides the requirement of $object_id to be a number OR not empty. |
gp_delete_meta( $object_id = 0, $meta_key, $meta_value, $type, $global = false ) X-Ref |
Deletes meta data from the database. return: bool since: 1.0.0 param: int $object_id ID of the object metadata is for. param: string $meta_key Metadata key. param: mixed $meta_value The value to store. param: string $type The object type. param: bool $global Overrides the requirement of $object_id to be a number OR not empty. |
Generated: Thu Nov 21 01:01:07 2024 | Cross-referenced by PHPXref 0.7.1 |