public function source_status() { $client = new Lingotek_API(); if ($client->document_exists($this->document_id)) { unset($this->desc_array['lingotek']['api_errors']['source_status']); if ('importing' == $this->status) { $this->status = 'current'; } } else { $this->desc_array['lingotek']['api_errors']['source_status'] = __('Error updating translation status of post ', 'wp-lingotek') . $this->source; } $this->save(); }
public function source_status() { $client = new Lingotek_API(); if ('importing' == $this->status && $client->document_exists($this->document_id, $this->source)) { $this->status = 'current'; $this->save(); } }