コード例 #1
0
 public function disassociate()
 {
     $client = new Lingotek_API();
     $prefs = Lingotek_Model::get_prefs();
     if ($prefs['delete_document_from_tms']) {
         $client->delete_document($this->document_id);
         wp_delete_term($this->term_id, 'post_translations');
     } else {
         wp_delete_term($this->term_id, 'post_translations');
     }
 }
コード例 #2
0
ファイル: group.php プロジェクト: ergov2015/rideflag.dev
 public function disassociate()
 {
     $client = new Lingotek_API();
     $prefs = Lingotek_Model::get_prefs();
     if ($prefs['delete_document_from_tms']) {
         $client->delete_document($this->document_id);
         unset($this->desc_array['lingotek']);
         $this->save();
     } else {
         unset($this->desc_array['lingotek']);
         $this->save();
     }
 }
コード例 #3
0
ファイル: model.php プロジェクト: Gordondalos/expert
 public function delete_term($object_id)
 {
     if ($document = $this->get_group('term', $object_id)) {
         $client = new Lingotek_API();
         if ($document->source == $object_id) {
             $client->delete_document($document->document_id, $object_id);
         } else {
             $lang = $this->pllm->get_term_language($object_id);
             $this->pllm->delete_term_language($object_id);
             $this->pllm->delete_translation('term', $object_id);
             $client->delete_translation($document->document_id, $lang->lingotek_locale, $object_id);
         }
     }
 }