return $result; } } } } /** ==================================================================================================================================================== * To add an external link in the * * @return the short_url */ function get_home_url() { // on identifie la racine des short links $home_url = home_url(); if ($this->get_param('removewww')) { $home_url = str_replace("://www.", "://", home_url()); } if ($this->get_param('changeroot')) { $home_url = $this->get_param('changeroot_url'); if (strpos($home_url, "http") !== 0) { $home_url = "http://" . $home_url; } if (substr($home_url, -1) == "/") { $home_url = substr($home_url, 0, -1); } } return $home_url; } } $shorturl = shorturl::getInstance();