AnsPress_Comment_Hooks::comment_form()
Description #
Callback for loading comment form.
Source #
File: includes/comments.php
public static function comment_form() { $comment_id = ap_sanitize_unslash( 'comment', 'r' ); $_comment = get_comment( $comment_id ); if ( $_comment ) { $_post = ap_get_post( $_comment->comment_post_ID ); } else { $_post = ap_get_post( ap_sanitize_unslash( 'post_id', 'r' ) ); } ob_start(); ap_comment_form( $_post->ID, $_comment ); $html = ob_get_clean(); ap_ajax_json( array( 'success' => true, 'html' => $html, 'modal_title' => __( 'Add comment on post', 'anspress-question-answer' ), ) ); }
Expand full source code Collapse full source code View on GitHub: includes/comments.php:207
Add your comment