lib/Comment.php
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);
	}
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);
	}
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 ) ; }
Enqueue the WP threaded comments javascript,
and fetch the reply link for various comments.
@api
@return string
Enqueue the WP threaded comments javascript and fetch the reply link for various comments .