Skip to content

Instantly share code, notes, and snippets.

@tonyoconnell
Created March 12, 2012 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyoconnell/2022960 to your computer and use it in GitHub Desktop.
Save tonyoconnell/2022960 to your computer and use it in GitHub Desktop.
Add This Pinterest
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
<a class="addthis_button_pinterest" pi:pinit:url="<?php echo curPageURL();?> pi:pinit:media="http://one.ie/images/logo.png" pi:pinit:layout="horizontal"></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment