Core Function
View Source on Trac ↗ get_comment()
get_comment( mixed $comment = null, mixed $output = OBJECT ) Retrieves comment data given a comment ID or comment object.
Parameters 2 required
| Name / Type | Description |
|---|---|
| (WP_Comment | | string | int) $comment Comment to retrieve. Required |
| string | $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a WP_Comment object, an associative array, or a numeric array, respectively. Default OBJECT. Required |
Return Value
((WP_Comment)
| array | null) Depends on $output value.
Function Information
Since Version
2.0.0
Source File
wp-includes/comment.php
Advertisement