WP_CLI\Fetchers
Comment::get()
Get a comment object by ID
Method of the class: Comment{}
No Hooks.
Return
WP_Comment|Array|false
. The item if found; false otherwise.
Usage
$Comment = new Comment(); $Comment->get( $arg );
- $arg(string) (required)
- The raw CLI argument.
Comment::get() Comment::get code WP-CLI 2.8.0-alpha
public function get( $arg ) { $comment_id = (int) $arg; $comment = get_comment( $comment_id ); if ( null === $comment ) { return false; } return $comment; }