get_metadata


get_metadata ( $meta_type, $object_id, $meta_key = '', $single = false )

Parameters:
  • (string) $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
  • (int) $object_id ID of the object metadata is for
  • (string) $meta_key Optional. Metadata key. If not specified, retrieve all metadata for the specified object.
  • (bool) $single Optional, default is false. If true, return only the first value of the specified meta_key. This parameter has no effect if meta_key is not specified.
Returns:
  • (mixed) Single metadata value, or array of values
Defined at:

Description

Retrieve metadata for the specified object.

Related Functions

delete_metadata, get_commentdata, get_theme_data, get_metadata_by_mid, get_userdata

Top Google Results

User discussions

wpseek mobile