WP_REST_Comments_Controller::get_comment

SummerySummery

Get the comment, if the ID is valid.

Syntax

WP_REST_Comments_Controller::get_comment( int $id )

ParametersParameters

$id

(int) (Required) Supplied ID.

ReturnReturn

(WP_Comment|WP_Error) Comment object if ID is valid, WP_Error otherwise.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.2 Introduced.
Scroll to Top