[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-includes/ -> meta.php (summary)

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

Defines 4 functions

  gp_sanitize_meta_key()
  gp_get_meta()
  gp_update_meta()
  gp_delete_meta()

Functions
Functions that are not part of a class:

gp_sanitize_meta_key( $key )   X-Ref
Sanitizes a key name to be used to store meta data in to the database.

return: string
param: string $key Metadata key.
since: 1.0.0

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.
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.
since: 1.0.0

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.
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.
since: 1.0.0

gp_delete_meta( $object_id = 0, $meta_key, $meta_value, $type, $global = false )   X-Ref
Deletes meta data from the database.

return: bool
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.
since: 1.0.0



Generated: Sun Dec 22 01:01:04 2024 Cross-referenced by PHPXref 0.7.1