A WordPress-centric search engine for devs and theme authors



get_comment_meta ›

Since2.9.0
Deprecatedn/a
get_comment_meta ( $comment_id, $key = '', $single = false )
Parameters: (3)
  • (int) $comment_id Comment ID.
    Required: Yes
  • (string) $key Optional. The meta key to retrieve. By default, returns data for all keys.
    Required: No
    Default: (empty)
  • (bool) $single Whether to return a single value.
    Required: No
    Default: false
Links:
Returns:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Defined at:
Codex:

Retrieve comment meta field for a comment.



Source

function get_comment_meta( $comment_id, $key = '', $single = false ) {
	return get_metadata( 'comment', $comment_id, $key, $single );
}