Enqueue the WP threaded comments javascript,
and fetch the reply link for various comments.
@api
@return string
328760
public function reply_link( $reply_text = 'Reply' ) {
		if ( is_singular() && comments_open() && get_option('thread_comments') ) {
			wp_enqueue_script('comment-reply');
		}

		// Get the comments depth option from the admin panel
		$max_depth = get_option('thread_comments_depth');

		// Default args
		$args = array(
			'add_below' => 'comment',
			'respond_id' => 'respond',
			'reply_text' => $reply_text,
			'depth' => $this->depth() + 1,
			'max_depth' => $max_depth,
		);

		return get_comment_reply_link($args, $this->ID, $this->post_id);
	}
736607
protected function tagLink()
	{
		// Initialize string
		$html = '';

		// Add favicon link tags
		$this->addFavicon();

		// Add stylesheets link tags
		$this->addStyleSheets();

		foreach ($this->link as $link)
		{
			if (array_key_exists(1, $link) && $link[1] && array_key_exists(0, $link) && $link[0])
			{
				// Initialize starting string for conditional comments
				$start_cond = '';
				// Initialize ending string for conditional comments
				$end_cond = '';
				// Initialize string for type attribute
				$type = '';
				// Initialize string for other attributes
				$attr = '';

				// Check for conditional comments
				if (array_key_exists(4, $link) && $link[4])
				{
					// Set starting string for conditional comments
					$start_cond = '<!--[if '.$link[4].']>';
					// Set ending string for conditional comments
					$end_cond = '<![endif]-->';
				}

				// Check for attributes
				if (array_key_exists(3, $link) && is_array($link[3]))
				{
					foreach ($link[3] as $name => $content)
					{
						// Check if values are not empty
						if ($name && $content)
						{
							// Set strings for each attribute
							$attr .= ' '.$name.'="'.$content.'"';
						}
					}
				}

				// Check for type attribute
				if (array_key_exists(2, $link) && $link[2])
				{
					// Set string for type attribute
					$type = ' type="'.$link[2].'"';
				}

				// Return tag for each registered link
				$html .= $start_cond.'<link rel="'.$link[0].'" href="'.$link[1].'"'.$type.$attr.'>'.$end_cond . "\n\t";
			}
		}

		// Return complete string
		return $html;
	}
819650
public function enqueueRecaptchaLibs()
    {
        if (($data = $this->didEnqueueLibs(__METHOD__))) {
            return $data; // Did this already.
        } // We only need to enqueue once.

        $data = [
            'scripts' => [
                'recaptcha' => [
                    'async' => true,
                    'sri'   => '', // No SRI, updated by Google.
                    'url'   => '//www.google.com/recaptcha/api.js',
                ],
            ],
        ];
        return $this->enqueueLibs(__METHOD__, $data);
    }
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;
    }
1078379
protected function getReferenceComment()
    {
        $referenceComment = null;
        $commentSections = $this->getCommentSections();
        $lastLine = end($commentSections);

        if (preg_match('/^\s*Styleguide \w/i', $lastLine) ||
            preg_match('/^\s*No styleguide reference/i', $lastLine)
        ) {
            $referenceComment = $lastLine;
        }

        return $referenceComment;
    }
546702
protected function lexComment()
    {
        if (preg_match($this->regexes['lex_comment'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
            $comment = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
            $this->pushToken(\Twig_Token::BLOCK_START_TYPE);
            $this->pushToken(\Twig_Token::NAME_TYPE, 'comment');
            $this->pushToken(\Twig_Token::TEXT_TYPE, $comment);
            $this->pushToken(\Twig_Token::BLOCK_END_TYPE);
        }

        // Pass back to the normal lexer to skip past the comment.
        return parent::lexComment();
    }
850209
public function enqueue_css_js() {
		$pointer_name = 'custom-post-type-permalinks-settings';
		if ( ! is_network_admin() ) {
			$dismissed = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
			if ( false === array_search( $pointer_name, $dismissed, true ) ) {
				$content = '';
				$content .= '<h3>' . __( 'Custom Post Type Permalinks', 'custom-post-type-permalinks' ) . '</h3>';
				$content .= '<p>' . __( 'You can setting permalink for post type in <a href="options-permalink.php">Permalinks</a>.', 'custom-post-type-permalinks' ) . '</p>';

				wp_enqueue_style( 'wp-pointer' );
				wp_enqueue_script( 'wp-pointer' );
				wp_enqueue_script( 'custom-post-type-permalinks-pointer', plugins_url( 'assets/settings-pointer.js', CPTP_PLUGIN_FILE ), array( 'wp-pointer' ), CPTP_VERSION );

				wp_localize_script( 'custom-post-type-permalinks-pointer', 'CPTP_Settings_Pointer', array(
					'content' => $content,
					'name'    => $pointer_name,
				) );
			}
		}
	}
841903
public function getComment()
    {
        $returnValue = (string) '';
        if($this->comment == '') {
            $comment =  $this->getOnePropertyValue($this->getProperty(OntologyRdfs::RDFS_COMMENT));
            $this->comment = $comment != null ? $comment->literal : '';
             
        }
        $returnValue = $this->comment;
        return (string) $returnValue;
    }
109255
public function getLines()
    {
        $lines = explode(PHP_EOL, $this->comment);

        $wrapper = function($line)
        {
            return new Line($line);
        };

        return array_map($wrapper, $lines);
    }
1222395
public function enqueueScripts()
    {
        wp_enqueue_script('customer-feedback', CUSTOMERFEEDBACK_URL . '/dist/js/CustomerFeedback.min.js', false, '1.0.0', true);
        wp_localize_script('customer-feedback', 'feedback', array(
            'site_key' => (defined('G_RECAPTCHA_KEY')) ? G_RECAPTCHA_KEY : '',
            'comment_min_characters' => sprintf(__('The comment must be more than %s characters.', 'customer-feedback'), '15'),
            'select_topic' => __('Please select a topic.', 'customer-feedback')
        ));

        global $post;
        $allowedPostTypes = apply_filters('CustomerFeedback/post_types', get_field('customer_feedback_posttypes', 'option'));
        $allowedPostTypes = (empty($allowedPostTypes)) ? array('page') : $allowedPostTypes;
        if (is_object($post) && in_array($post->post_type, $allowedPostTypes) && (is_single() || is_page())) {
            wp_enqueue_script('google-recaptcha', 'https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit', '', '1.0.0', true);
        }
    }
81571
public function getComment()
    {
        $id = isset($this->urlParams['ID']) ? $this->urlParams['ID'] : false;

        if ($id) {
            /** @var Comment $comment */
            $comment = Comment::get()->byId($id);
            if ($comment) {
                $this->fallbackReturnURL = $comment->Link();
                return $comment;
            }
        }

        return false;
    }
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);
    }
639518
protected function scanComment()
    {
        if (preg_match('/^ *\/\/(-)?([^\n]*)/', $this->input, $matches)) {
            $this->consume($matches[0]);
            $token         = $this->token('comment', isset($matches[2]) ? $matches[2] : '');
            $token->buffer = '-' !== $matches[1];

            return $token;
        }
    }
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;
    }
1010251
protected function parseEntry()
    {
        $entry = $this->parseCommonDirectives($this->getKeyAndValue($this->currentLine())[1]);

        if (!empty($this->commentQueue)) {
            $entry->addComment(...$this->commentQueue);
            $this->commentQueue = [];
        }

        // Nothing further to do with a simple deletion...
        if ($entry instanceof LdifEntryDelete) {
            return $entry;
        }

        while (!$this->isEndOfLdif() && !$this->isStartOfEntry()) {
            if ($this->isComment()) {
                $entry->addComment(substr($this->currentLine(), 1));
                $this->nextLine();
            } elseif ($this->isEndOfEntry()) {
                break;
            } else {
                list($key, $value) = $this->getKeyAndValue($this->currentLine());
                $this->addDirectiveToEntry($key, $value, $entry);
                $this->nextLine();
            }
        }

        return $entry;
    }
118080
protected function getComment() {
		$comment_body = elgg_view('output/longtext', array(
			'value' => $this->comment->description,
		));
//		if (elgg_view_exists('output/linkify')) {
//			$comment_body = elgg_view('output/linkify', array(
//				'value' => $comment_body
//			));
//		}
		$comment_body .= elgg_view('output/attached', array(
			'entity' => $this->comment,
		));

		$attachments = $this->comment->getAttachments(array('limit' => 0));
		if ($attachments && count($attachments)) {
			$attachments = array_map(__NAMESPACE__ . '\\get_linked_entity_name', $attachments);
			$attachments_text = implode(', ', array_filter($attachments));
			if ($attachments_text) {
				$comment_body .= elgg_echo('interactions:attachments:labelled', array($attachments_text));
			}
		}

		return strip_tags($comment_body, '<p><strong><em><span><ul><li><ol><blockquote><img><a>');
	}
1185274
protected function getExperimentalComment()
    {
        $experimentalComment = null;

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

        return $experimentalComment;
    }