Skip to content

Instantly share code, notes, and snippets.

@kachi
Created April 6, 2012 02:04
Show Gist options
  • Select an option

  • Save kachi/2316000 to your computer and use it in GitHub Desktop.

Select an option

Save kachi/2316000 to your computer and use it in GitHub Desktop.
<?php
$api_key = "APIキー";
wp_enqueue_script("twitter-anywhere",
"http://platform.twitter.com/anywhere.js?id={$api_key}&v=1");
add_action("wp_head", "twitter_anywhere");
function twitter_anywhere()
{
echo '<script type="text/javascript">';
echo 'twttr.anywhere(onAnywhereLoad);';
echo 'function onAnywhereLoad(twitter) { twitter.hovercards(); }';
echo '</script>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment