get_comment_meta() WP 1.0
Retrieve comment meta field for a comment.
Works based on:
get_metadata()
✈ 1 time = 0.000503s = slow | 50000 times = 0.12s = very fast | PHP 7.0.2, WP 4.4.2
No Hooks.
Return
Mixed. Will be an array if $single
is false. Will be value of meta data field if $single
is true.
Usage
get_comment_meta( $comment_id, $key, $single );
- $comment_id(int) (required)
- Comment ID.
- $key(string)
- The meta key to retrieve. By default, returns data for all keys.
Default:''
- $single(true/false)
- Whether to return a single value.
Default:false
Code of get comment meta:
wp-includes/comment.php
VER 5.0.3
Related Functions
From tag: Metadatas (any)
- add_comment_meta()
- add_metadata()
- add_post_meta()
- add_term_meta()
- add_user_meta()
- delete_comment_meta()
- delete_metadata()
- delete_post_meta()
- delete_term_meta()
- delete_user_meta()