Posted By

screamwork on 08/27/10


Tagged

wordpress


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

manavecplan


enable hovercards in functions.php


 / Published in: PHP
 

  1. $api_key = "your API-KEY here";
  2. wp_enqueue_script("twitter-anywhere",
  3. "http://platform.twitter.com/anywhere.js?id={$api_key}&v=1");
  4. add_action("wp_head", "twitter_anywhere");
  5.  
  6. function twitter_anywhere()
  7. {
  8. echo '<script type="text/javascript">';
  9. echo 'twttr.anywhere(onAnywhereLoad);';
  10. echo 'function onAnywhereLoad(twitter) { twitter.hovercards(); }';
  11. echo '</script>';
  12. }

Report this snippet  

You need to login to post a comment.