Retrieves the comments popup link

@return string
433299
public function commentsPopupLink()
    {
        $output = [];

        if (is_single() || post_password_required() || (!comments_open() || !get_comments_number())) {
            return '';
        }

        ob_start();
        comments_popup_link(
            __('Leave a comment', 'novusopress'),
            sprintf(__('%1$s1%2$s Comment', 'novusopress'), '<span class="badge">', '</span>'),
            sprintf(__('%1$s%%%2$s Comments', 'novusopress'), '<span class="badge">', '</span>'),
            'btn btn-default'
        );
        $link = ob_get_clean();

        $output[] = '<div class="comments-link-area pad-bottom">';
        $output[] = sprintf('<span class="comments-link">%s</span>', $link);
        $output[] = '</div>';

        return apply_filters('novusopress_view_comments_popup_link_output', implode('', $output));
    }
1112197
public function getComment()
    {
        if ($this->comment === null) {
            $match = [];
            preg_match(self::$REGEX_COMMENT, $this->output, $match);
            $this->comment = array_key_exists(2, $match) ? trim($match[2]) : '';
        }

        return $this->comment;
    }
777962
protected function getCommentSections()
    {
        if (empty($this->commentSections) && $this->rawComment) {
            $this->commentSections = explode("\n\n", $this->rawComment);
        }

        return $this->commentSections;
    }
1294815
public function getNumComments()
    {
        $count = (new CommentManager())
            ->filter("article = %i", array($this->getId()))
            ->filter("active = 1")
            ->filter("spam = 0 ");

        $count = $count->values();

        $num = 0;

        if ($count) {
            foreach ($count as $item) {
                if ($item->isAccessible()) {
                    $num++;
                }
            }
        }

        return $num;
    }
792653
protected function getShowURL()
    {
        /** @var Gallery $plugin */
        $plugin = $this->getTable()->getPlugin();
        if ('popup' == $plugin->settings['showItemMode'])
        {
            $url = $this->imageURL . '#gallery-popup';
        }
        else
        {
            $url = $plugin->clientListURL() . $this->id . '/';
        }

        return $url;
    }
1123887
public function getDocComment()
    {
        $docComment = false;
        $comments   = $this->namespaceNode->getAttribute('comments');

        if ($comments) {
            $docComment = (string)$comments[0];
        }

        return $docComment;
    }
505776
protected function getModifiersComment()
    {
        $modifiersComment = null;

        foreach ($this->getCommentSections() as $commentSection) {
            // Assume that the modifiers section starts with either a class or a
            // pseudo class
            if (preg_match('/^\s*(?:\.|:)/', $commentSection)) {
                $modifiersComment = $commentSection;
                break;
            }
        }

        return $modifiersComment;
    }
942164
protected function getDeprecatedComment()
    {
        $deprecatedComment = null;

        foreach ($this->getCommentSections() as $commentSection) {
            // Identify the deprecation notice by the Deprecated: marker
            if (preg_match('/^\s*Deprecated:/i', $commentSection)) {
                $deprecatedComment = $commentSection;
                break;
            }
        }

        return $deprecatedComment;
    }
660185
public function comments()
    {
        if (!class_exists(\Modules\Blog\Entities\Comment::class, false)) {
            throw new \Exception('in order to use User::comments() you have to install the \'vain-blog\' module');
        }

        return $this->hasMany(\Modules\Blog\Entities\Comment::class);
    }
748260
public function getFormComments()
    {
        ob_start();

        $placeTextarea = App::get('i18n')->transu('post.share_comment');

        $params = [
            'comment_notes_after' => '',
            'author' => '<p class="comment-form-author">' . '<label for="author">' . __('Your Name') . '</label>
					<input id="author" name="author" type="text"  value="Your First and Last Name" size="30" /></p>',
            'comment_field' => '
				<div class="form-group comment-form-comment">
		            <label for="comment">' . _x('Comment', 'noun') . '</label>
		            <textarea class="form-control" id="comment" name="comment" cols="45" rows="2"
							maxlength="1000" aria-required="true" placeholder="' . $placeTextarea . '"></textarea>
		        </div>',
        ];

        $placeAuthor = App::get('i18n')->transu('name');
        $placeEmail = App::get('i18n')->transu('email');
        $placeUrl = App::get('i18n')->transu('website');

        comment_form($params, $this->ID);
        $comment_form = ob_get_clean();
        $comment_form = str_replace('id="author"', 'class="author form-control" placeholder="' . $placeAuthor . '"',
            $comment_form);
        $comment_form = str_replace('id="email"', 'class="email form-control" placeholder="' . $placeEmail . '"',
            $comment_form);
        $comment_form = str_replace('id="url"', 'class="url form-control" placeholder="' . $placeUrl . '"',
            $comment_form);
        $comment_form = str_replace('id="submit"', 'class="btn btn-default"', $comment_form);
        return $comment_form;
    }
1369818
public function getElement()
    {
        $this->startCommentBlock();
        foreach ($this->description as $line) {
            $this->addLine($line);
        }
        $this->addBlankLine();

        if (count($this->var_types) > 0) {
            $type_ltgh = max(array_map('mb_strlen', $this->var_types));
            $var_ltgh = max(array_map('mb_strlen', array_keys($this->var_types)));
            foreach ($this->var_types as $name => $type) {
                $type = str_pad($type, $type_ltgh);
                $param = str_pad($name, $var_ltgh);
                $this->addLine('@param '.$type.'$'.$param.' '.$this->var_descriptions[$name]);
            }
            $this->addBlankLine();
        }

        if (count($this->params) > 0) {
            $params_ltgh = array_map('strlen', array_keys($this->params));
            foreach ($this->params as $param => $value) {
                $this->addLine('@'.str_pad($param, max($params_ltgh)).' '.$value);
            }
        }

        $this->endCommentBlock();
        return $this->lines;
    }
453881
protected function getLink()
    {
        if ($this->link_value === null) {
            $link = $this->link;
        } elseif (is_array($this->link_value)) {
            $link_values = array();

            foreach ($this->link_value as $value) {
                $link_values[] = urlencode($value);
            }

            $link = vsprintf($this->link, $link_values);
        } else {
            $link_value = urlencode($this->link_value);
            $link = sprintf($this->link, $link_value);
        }

        return $link;
    }
521870
public function ham()
    {
        $comment = $this->getComment();
        if (!$comment) {
            return $this->httpError(404);
        }
        if (!$comment->canEdit()) {
            return Security::permissionFailure($this, 'You do not have permission to edit this comment');
        }
        if (!$comment->getSecurityToken()->checkRequest($this->request)) {
            return $this->httpError(400);
        }

        $comment->markApproved();
        return $this->renderChangedCommentState($comment);
    }
378709
private function get_parent_link_html()
    {
        global $post;

        if (! empty($post) && $this->parent_page_id == $post->ID) {
            $li_class = $this->args['li_active_class'] . ' ' . $this->args['li_class'];
            $link_class = $this->args['link_active_class'] . ' ' . $this->args['link_class'];
        } else {
            $li_class = $this->args['li_class'];
            $link_class = $this->args['link_class'];
        }

        return \sprintf(
            '<li class="%s">%s<a class="%s" href="%s">%s%s%s</a>%s</li>',
            $li_class,
            $this->args['before_link'],
            $link_class,
            get_the_permalink($this->parent_page_id),
            $this->args['before_text'],
            get_the_title($this->parent_page_id),
            $this->args['after_text'],
            $this->args['after_link']
        );
    }
213329
public function getComments()
    {
        //setup the comments
        $comment_ids = $this->getIds('comment');

        $comments = array();

        //only shows comments if there are comment_ids in the story
        //body or if the story has directly been commented on
        if (!empty($comment_ids)) {
            sort($comment_ids);
            $size = 0;
            foreach ($comment_ids as $id) {
                if (isset($this->_loaded_nodes[$id])) {
                    $comment = $this->_loaded_nodes[$id];
                    if ($comment instanceof ComBaseDomainEntityComment) {
                        $comments[$id] = $comment;
                        ++$size;
                    }
                }
                if ($size == 10) {
                    break;
                }
            }
        }

        return $comments;
    }
1142494
public function getUrl()
	{
		$commentable = $this->commentable;

		$url = false;
		if (method_exists($commentable, 'getUrl'))
		{
			$url = $commentable->getUrl();
		}

		return \URL::to($url.'#C'.$this->id);
	}
770073
public function getComment()
    {
        $postParameterBag = $this
            ->request
            ->query;
        $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);
        }
        
    
        return new JsonResponse([
            'comment' => $comment->toArray(),
            'user' => $this->userCredentialsProvider->toArray(),
        ], 200);
    }