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,
)
);
}
Expand full source code Collapse full source code View on GitHub: ajax/comment-modal.php:79
Add your comment