Retrieves a comment.
Parameters
$request
WP_REST_Requestrequired- Full details about the request.
Source
public function get_item( $request ) {
$comment = $this->get_comment( $request['id'] );
if ( is_wp_error( $comment ) ) {
return $comment;
}
$data = $this->prepare_item_for_response( $comment, $request );
$response = rest_ensure_response( $data );
return $response;
}
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.