Comment_Modal::verify_permission()
Description #
Verify user permission.
Source #
File: ajax/comment-modal.php
protected function verify_permission() { $comment_id = $this->req( 'comment_id' ); $post_id = $this->req( 'post_id' ); if ( ( ! empty( $comment_id ) && ! ap_user_can_edit_comment( $comment_id ) ) || ( ! empty( $post_id ) && ! ap_user_can_comment( $post_id ) ) ) { parent::verify_permission(); } // Get comment object. if ( ! empty( $comment_id ) ) { $_comment = get_comment( $comment_id ); $this->req( 'post_id', $_comment->comment_post_ID ); } }
Expand full source code Collapse full source code View on GitHub: ajax/comment-modal.php:59
Add your comment