Пример #1
0
 /**
  * Remove Holiday
  *
  * @since 0.1
  *
  * @return json
  */
 function dept_remove()
 {
     $this->verify_nonce('wp-erp-hr-nonce');
     $holiday = erp_hr_delete_holidays(array('id' => intval($_POST['id'])));
     $this->send_success();
 }
Пример #2
0
 /**
  * Handle hoiday remove functionality
  *
  * @since 0.1
  *
  * @param array $get
  *
  * @return boolean
  */
 public function remove_holiday($get)
 {
     if (isset($get['action']) && $get['action'] == 'trash') {
         if (isset($get['holiday_id'])) {
             erp_hr_delete_holidays($get['holiday_id']);
             return true;
         }
     }
     if (isset($get['action2']) && $get['action2'] == 'trash') {
         if (isset($get['holiday_id'])) {
             erp_hr_delete_holidays($get['holiday_id']);
             return true;
         }
     }
     return false;
 }