Esempio n. 1
0
 function delete_comment()
 {
     if (!$this->can_do_comment_stuff()) {
         die;
     }
     $comment_id = intval($_REQUEST['comment_id']);
     spec_comment_delete_comment($comment_id);
     echo 'done';
     die;
 }
Esempio n. 2
0
 function comment_moderation_calls()
 {
     if (current_user_can('moderate_comments')) {
         if (isset($_GET['p']) && (isset($_GET['approvecomment']) || isset($_GET['spamcomment']) || isset($_GET['deletecomment']))) {
             $post_id = $_GET['p'];
             if (isset($_GET['approvecomment'])) {
                 $comment_id = $_GET['approvecomment'];
                 spec_comment_approve_comment($comment_id);
             } else {
                 if (isset($_GET['spamcomment'])) {
                     $comment_id = $_GET['spamcomment'];
                     spec_comment_spam_comment($comment_id);
                 } else {
                     if (isset($_GET['deletecomment'])) {
                         $comment_id = $_GET['deletecomment'];
                         spec_comment_delete_comment($comment_id);
                     }
                 }
             }
         }
     }
 }