Skip to content

Instantly share code, notes, and snippets.

@enlacee
Created August 12, 2016 06:48
Show Gist options
  • Save enlacee/7868f078f5e3a634824597c979e5b1fb to your computer and use it in GitHub Desktop.
Save enlacee/7868f078f5e3a634824597c979e5b1fb to your computer and use it in GitHub Desktop.
app/wp-content/themes/lbel2/headerCountrySelect.php:7
echo getCurrentURL()
function getCurrentURL()
{
$currentURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
$currentURL .= $_SERVER["SERVER_NAME"];
if ($_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443") {
$currentURL .= ":".$_SERVER["SERVER_PORT"];
}
$currentURL .= $_SERVER["REQUEST_URI"];
return $currentURL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment