Comment_Modal::logged_in()

Description #

Handle ajax for logged in users.

Source #

File: ajax/comment-modal.php

	public function logged_in() {
		ob_start();
		ap_comment_form( $this->req( 'post_id' ), $this->req( 'comment_id' ) );
		$html = ob_get_clean();

		$this->set_success();

		$title = $this->req( 'comment_id' ) ? __( 'Edit comment', 'anspress-question-answer' ) : __( 'Add a comment', 'anspress-question-answer' );

		$this->add_res(
			'modal',
			array(
				'name'    => 'comment',
				'title'   => $title,
				'content' => $html,
			)
		);
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment