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'); } }
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(); } }
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); } } }