Backend\Modules\Blog\Engine\Api::commentsDelete PHP Method

commentsDelete() public static method

Delete comment(s).
public static commentsDelete ( string $id )
$id string The id/ids of the comment(s) to update.
    public static function commentsDelete($id)
    {
        // authorize
        if (BaseAPI::isAuthorized() && BaseAPI::isValidRequestMethod('POST')) {
            // redefine
            if (!is_array($id)) {
                $id = (array) explode(',', $id);
            }
            // update statuses
            BackendBlogModel::deleteComments($id);
        }
    }