Untrashes a comment.

## OPTIONS

<id>...
: The IDs of the comments to untrash.

## EXAMPLES

# Untrash comment.
$ wp comment untrash 1337
Success: Untrashed comment 1337.
979251
public function untrash( $args, $assoc_args ) {
		$this->check_server_name();
		foreach ( $args as $id ) {
			$this->call( $id, __FUNCTION__, 'Untrashed', 'Failed untrashing' );
		}
	}
41947
function remove_comments(){
      if (options.clean_comments) {
        html = html.replace(/<!--[\s\S]*?-->/g, function(str){
          if (str.match(/<!--\[if /)) { return str; }
          if (str.match(/\n/)) { return str; }
          else { return ""; }
        });
      }
    }
761941
def _strip_comments(line):
        
        if line == '':
            return line
        r = re.search('(?P<line>[^#]*)(#(?P<comment>.*))?', line)
        if r:
            line = r.group('line')
            if not line.endswith('\n'):
                line += '\n'
            return line
        return '\n'
923316
def status_unreblog(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}/unreblog'.format(str(id))
        return self.__api_request('POST', url)
546392
def removeComments(element):
    
    global _num_bytes_saved_in_comments
    num = 0

    if isinstance(element, xml.dom.minidom.Comment):
        _num_bytes_saved_in_comments += len(element.data)
        element.parentNode.removeChild(element)
        num += 1
    else:
        for subelement in element.childNodes[:]:
            num += removeComments(subelement)

    return num
122612
public function deleteComment()
    {
        $userIsAllowed = $this
            ->userCredentialsProvider
            ->isAllowed();
        if (!$userIsAllowed) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'The user is not allowed to delete a comment',
            ], 401);
        }

        $sourceUUID = $this->getSourceUUID();
        if (empty($sourceUUID)) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Source UUID header must be defined',
            ], 400);
        }
        
        $authorUUID = $this
            ->userCredentialsProvider
            ->getUUID();
        if (empty($authorUUID)) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Author UUID must be defined',
            ], 400);
        }

        $postParameterBag = $this
            ->request
            ->request;
        $commentId = $postParameterBag->get('comment_id');

        if (empty($commentId)) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Some query parameters are missing',
            ], 400);
        }

        $commentReference = new CommentUUID($commentId);
        $comment = $this
            ->commentRepository
            ->findComment($commentReference)
            ->getFirstComment();

        if (!$comment instanceof Comment) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Comment not found',
            ], 404);
        }

        if (!$this->userCredentialsProvider->isModerator()) {
            if ($comment->getAuthorUUID() !== $authorUUID) {
                return new JsonResponse([
                    'status' => 'Error',
                    'message' => 'You are not authorized to delete this comment',
                ], 401);
            }
        }

        $this
            ->commentRepository
            ->deleteComment($comment);
        $this->flushRepository();

        return new JsonResponse([
            'status' => 'OK',
            'comment' => 'Comment deleted',
        ], 200);
    }
387620
function removeExportAnnotationsFromComment(comment) {
  // Remove @export annotations.
  comment = comment.replace(EXPORT_REGEX, '')

  // Split into lines, remove empty comment lines, then recombine.
  comment = comment.split('\n')
      .filter(function(line) { return !/^ *\*? *$/.test(line); })
      .join('\n');

  return comment;
}
729609
async def abort(self, *, comment: str = None):
        
        params = {
            "system_id": self.system_id
        }
        if comment:
            params["comment"] = comment
        self._data = await self._handler.abort(**params)
        return self
133231
public function removeComment($id, $commentId)
    {
        return $this->delete($this->getPath($id).'/comments/'.rawurlencode($commentId));
    }
215151
def strip_praw_comment(cls, comment):
        

        data = {}
        data['object'] = comment

        if isinstance(comment, praw.objects.MoreComments):
            data['type'] = 'MoreComments'
            data['level'] = comment.nested_level
            data['count'] = comment.count
            data['body'] = 'More comments'
            data['hidden'] = True

        elif hasattr(comment, 'nested_level'):
            author = getattr(comment, 'author', '[deleted]')
            name = getattr(author, 'name', '[deleted]')
            sub = getattr(comment, 'submission', '[deleted]')
            sub_author = getattr(sub, 'author', '[deleted]')
            sub_name = getattr(sub_author, 'name', '[deleted]')
            flair = getattr(comment, 'author_flair_text', '')
            permalink = getattr(comment, 'permalink', None)
            stickied = getattr(comment, 'stickied', False)

            data['type'] = 'Comment'
            data['level'] = comment.nested_level
            data['body'] = comment.body
            data['html'] = comment.body_html
            data['created'] = cls.humanize_timestamp(comment.created_utc)
            data['score'] = '{0} pts'.format(
                '-' if comment.score_hidden else comment.score)
            data['author'] = name
            data['is_author'] = (name == sub_name)
            data['flair'] = flair
            data['likes'] = comment.likes
            data['gold'] = comment.gilded
            data['permalink'] = permalink
            data['stickied'] = stickied
            data['hidden'] = False
            data['saved'] = comment.saved
            if comment.edited:
                data['edited'] = '(edit {})'.format(
                    cls.humanize_timestamp(comment.edited))
            else:
                data['edited'] = ''
        else:
            # Saved comments don't have a nested level and are missing a couple
            # of fields like ``submission``. As a result, we can only load a
            # subset of fields to avoid triggering a separate api call to load
            # the full comment.
            author = getattr(comment, 'author', '[deleted]')
            stickied = getattr(comment, 'stickied', False)
            flair = getattr(comment, 'author_flair_text', '')

            data['type'] = 'SavedComment'
            data['level'] = None
            data['title'] = '[Comment] {0}'.format(comment.body)
            data['comments'] = None
            data['url_full'] = comment._fast_permalink
            data['url'] = comment._fast_permalink
            data['permalink'] = comment._fast_permalink
            data['nsfw'] = comment.over_18
            data['subreddit'] = six.text_type(comment.subreddit)
            data['url_type'] = 'selfpost'
            data['score'] = '{0} pts'.format(
                '-' if comment.score_hidden else comment.score)
            data['likes'] = comment.likes
            data['created'] = cls.humanize_timestamp(comment.created_utc)
            data['saved'] = comment.saved
            data['stickied'] = stickied
            data['gold'] = comment.gilded
            data['author'] = author
            data['flair'] = flair
            data['hidden'] = False
            if comment.edited:
                data['edited'] = '(edit {})'.format(
                    cls.humanize_timestamp(comment.edited))
            else:
                data['edited'] = ''

        return data
748428
async def mark_broken(self, *, comment: str = None):
        
        params = {
            "system_id": self.system_id
        }
        if comment:
            params["comment"] = comment
        self._data = await self._handler.mark_broken(**params)
        return self
812555
public function closingComment()
    {
        if (!empty($this->attributes['id'])) {
            $hint = '#'.$this->attributes['id'];
        } elseif (!empty($this->classes)) {
            $hint = '.'.$this->classes[0];
        } else {
            return false;
        }
        Generator::call('il_comment', array($hint));
    }
743264
def deleteComment(self, commentId):
        
        url = "%s/comments/%s/delete" % (self.root, commentId)
        params = {
            "f": "json",
        }
        return self._post(url,
                             params,
                             securityHandler=self._securityHandler,
                             proxy_port=self._proxy_port,
                             proxy_url=self._proxy_url)
723454
public function actionDelete($id)
    {
        $commentModel = $this->findModel($id);
        $commentModel->setScenario(CommentModel::SCENARIO_MODERATION);
        $event = Yii::createObject(['class' => CommentEvent::class, 'commentModel' => $commentModel]);
        $this->trigger(self::EVENT_BEFORE_DELETE, $event);

        if ($commentModel->markRejected()) {
            $this->trigger(self::EVENT_AFTER_DELETE, $event);

            return Yii::t('yii2mod.comments', 'Comment has been deleted.');
        } else {
            Yii::$app->response->setStatusCode(500);

            return Yii::t('yii2mod.comments', 'Comment has not been deleted. Please try again!');
        }
    }
988181
public void deleteComment(String commentId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_DELETE_COMMENT);

        parameters.put("comment_id", commentId);

        // Note: This method requires an HTTP POST request.
        Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        // This method has no specific response - It returns an empty
        // sucess response if it completes without error.
    }
37224
def comment_delete(self, comment_id):
        
        return self._get('comments/{0}.json'.format(comment_id),
                         method='DELETE', auth=True)
643072
protected function _deleteObject( $comment_id ) {
		$comment = get_comment( $comment_id );
		if ( ! $comment || is_wp_error( $comment ) ) {
			return false;
		}

		$deleted = wp_delete_comment( $comment_id, true );
		if ( $deleted ) {
			$this->_debug( 'Deleted comment with ID: ' . $comment_id );
			return true;
		}

		$this->_debug( 'Comment removal failed for ID: ' . $comment_id );
		return false;
	}