WP_REST_Comments_Controller::handle_status_param

SummerySummery

Sets the comment_status of a given comment object when creating or updating a comment.

Syntax

WP_REST_Comments_Controller::handle_status_param( string|int $new_status, int $comment_id )

ParametersParameters

$new_status

(string|int) (Required) New comment status.

$comment_id

(int) (Required) Comment ID.

ReturnReturn

(bool) Whether the status was changed.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top