Exemplo n.º 1
0
 private function finalize($item_id, $mode, $value = 1)
 {
     if ($value) {
         wpl_property::finalize($item_id, $mode);
     } else {
         wpl_property::unfinalize($item_id);
     }
     $res = 1;
     $message = $res ? __('Saved.', WPL_TEXTDOMAIN) : __('Error Occured.', WPL_TEXTDOMAIN);
     $data = NULL;
     $response = array('success' => $res, 'message' => $message, 'data' => $data);
     echo json_encode($response);
     exit;
 }