Пример #1
0
 /**
  * 해당 게시글을 삭제한다.
  */
 public function delete($board_id, $entry_id)
 {
     $status = parent::deleteEntry($board_id, $entry_id);
     if ($status == true) {
         $status = $this->removeChanger($board_id, $entry_id);
     }
     return $status;
 }
Пример #2
0
function remove_kingkong_board_each_entry()
{
    $result = array();
    $entry_id = sanitize_text_field($_POST['entry_id']);
    $board_id = sanitize_text_field($_POST['board_id']);
    $board = new kkbController($board_id);
    $status = $board->deleteEntry($board_id, $entry_id);
    if (is_wp_error($status)) {
        $result['status'] = 'cancel';
        $result['message'] = __('삭제도중 오류가 발생하였습니다.', 'kingkongboard');
    } else {
        $result['status'] = 'success';
        $result['message'] = __('정상적으로 삭제 되었습니다.', 'kingkongboard');
    }
    header("Content-Type: application/json");
    echo json_encode($result);
    exit;
}