Glossary Term
get_comment_meta()
get_comment_meta() — Retrieves comment meta field for a comment.
Inputs: $comment_id (int): Comment ID. $key (string): Optional. The meta key to retrieve. By default, returns data for all keys. Default empty string. $single (bool): Optional. Whether to return a single value. This parameter has no effect if $key is not specified. Default false.
Returns mixed: An array of values if $single is false. The value of meta data field if $single is true. False for an invalid $comment_id (non-numeric, zero, or negative value). An empty array if a valid but non-existing comment ID is passed and $single is false. An empty string if a valid but non-existing comment ID is passed and $single is true. Note: Non-serialized values are returned as strings: false values are returned as empty strings (”) true values are returned as ‘1’ numbers are returned as strings Arrays and objects retain their original type. These conversions apply to stored values. A default value registered with register_meta() is never stored, so it is returned with the type it was registered with, which may be an integer, float, or boolean.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
