Retrieves comment meta field for a comment.
$comment_idintrequired
$keystringoptional
Default:''
$singlebooloptional
$key is not specified.Default:false
$single is false.$single is true.$comment_id (non-numeric, zero, or negative value).$single is false.$single is true.function get_comment_meta( $comment_id, $key = '', $single = false ) {
return get_metadata( 'comment', $comment_id, $key, $single );
}
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_comment_meta