function woo_uri_filter($url)
 {
     $lang = transposh_utils::get_language_from_url($_SERVER['HTTP_REFERER'], $this->transposh->home_url);
     tp_logger('altering woo url to:' . transposh_utils::rewrite_url_lang_param($url, $this->transposh->home_url, $this->transposh->options->enable_permalinks, $lang, $this->transposh->edit_mode));
     return transposh_utils::rewrite_url_lang_param($url, $this->transposh->home_url, $this->transposh->options->enable_permalinks, $lang, $this->transposh->edit_mode);
 }
Beispiel #2
0
 function on_ajax_nopriv_tp_cookie_bck()
 {
     setcookie('TR_LNG', transposh_utils::get_language_from_url($_SERVER['HTTP_REFERER'], $this->home_url), time() + 90 * 24 * 60 * 60, COOKIEPATH, COOKIE_DOMAIN);
     if ($_SERVER['HTTP_REFERER']) {
         $this->tp_redirect($_SERVER['HTTP_REFERER']);
     } else {
         $this->tp_redirect($my_transposh_plugin->home_url);
     }
     die;
 }