예제 #1
0
 /**
  * Acquires comment ID row via AJAX.
  *
  * @since 141111 First documented version.
  *
  * @param mixed $request_args Input argument(s).
  *
  * @see   MenuPageSubFormBase::commentIdRowViaAjax()
  */
 protected function subFormCommentIdRowViaAjax($request_args)
 {
     $request_args = (array) $request_args;
     if (!isset($request_args['post_id'])) {
         exit;
         // Missing post ID.
     }
     if (($post_id = (int) $request_args['post_id']) < 0) {
         exit;
         // Invalid post ID.
     }
     if (!current_user_can($this->plugin->manage_cap)) {
         if (!current_user_can($this->plugin->cap)) {
             exit;
             // Unauthenticated; ignore.
         }
     }
     exit(MenuPageSubFormBase::commentIdRowViaAjax($post_id));
 }