Comment_Modal::__construct()
Description #
The class constructor.
Set requests and nonce key.
Source #
File: ajax/comment-modal.php
protected function __construct() { $comment_id = ap_sanitize_unslash( 'comment_id', 'r' ); if ( empty( $comment_id ) ) { $this->req( 'post_id', ap_sanitize_unslash( 'post_id', 'r' ) ); $this->nonce_key = 'new_comment_' . $this->req( 'post_id' ); } else { $this->req( 'comment_id', $comment_id ); $this->nonce_key = 'edit_comment_' . $comment_id; } // Call parent. parent::__construct(); }
Expand full source code Collapse full source code View on GitHub: ajax/comment-modal.php:39
Add your comment