/**
  * Saves the job data in this object to the database (e.g. to a post)
  *
  * @param bool $complete whether or not to set the status
  *                       of the target element to complete
  */
 public function save_to_element($complete = false)
 {
     global $wpdb, $wpml_post_translations, $wpml_term_translations;
     $wpml_tm_records = new WPML_TM_Records($wpdb, $wpml_post_translations, $wpml_term_translations);
     $save_data_action = new WPML_Save_Translation_Data_Action(array('job_id' => $this->get_id(), 'complete' => $complete, 'fields' => array()), $wpml_tm_records);
     $save_data_action->save_translation();
 }
function wpml_tm_save_data($data)
{
    $save_data_action = new WPML_Save_Translation_Data_Action($data);
    $save_data_action->save_translation();
    $redirect_target = $save_data_action->get_redirect_target();
    if ((bool) $redirect_target === true) {
        wp_redirect($redirect_target);
    }
}
function wpml_tm_save_data($data)
{
    global $wpdb;
    $wpml_tm_records = new WPML_TM_Records($wpdb);
    $save_data_action = new WPML_Save_Translation_Data_Action($data, $wpml_tm_records);
    $save_data_action->save_translation();
    $redirect_target = $save_data_action->get_redirect_target();
    if ((bool) $redirect_target === true) {
        wp_redirect($redirect_target);
    }
}
 function save_to_element($complete = false)
 {
     $save_data_action = new WPML_Save_Translation_Data_Action(array('job_id' => $this->get_id(), 'complete' => $complete, 'fields' => array()));
     $save_data_action->save_translation();
 }