Skip to content

Instantly share code, notes, and snippets.

@ajgagnon
Created January 22, 2021 16:27
Show Gist options
  • Save ajgagnon/ef45cca6457e51dffb1d26316ae4a0dc to your computer and use it in GitHub Desktop.
Save ajgagnon/ef45cca6457e51dffb1d26316ae4a0dc to your computer and use it in GitHub Desktop.
Script output example
<script>
(function(d, t, g) {
var ph = d.createElement(t),
s = d.getElementsByTagName(t)[0];
ph.type = 'text/javascript';
ph.async = true;
ph.charset = 'UTF-8';
ph.src = g + '&v=' + (new Date()).getTime();
s.parentNode.insertBefore(ph, s);
})(document, 'script', '<?php ph_the_api_url($post_id); ?>');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment