Guest
Public paste!

Untitled

By: a guest | Jan 29th, 2009 | Syntax: None | Size: 0.72 KB | Hits: 193 | Expires: Never
Copy text to clipboard
  1. function get_tweet_this_url() {
  2.         $url = 'http://twitter.com/home/?status=Reading:+' .
  3.         get_tweet_this_trim_title().'+-+'. get_tweet_this_short_url().'+by+@duoblogger+and+@hendricius';
  4.         if (!tt_is_preview()) {
  5.                 if (get_option('tt_limit_to_single') == "true") {
  6.                         if (is_single() || is_page()) return $url;
  7.                         }
  8.                 else return $url;
  9.         }
  10. }
  11.  
  12. function tweet_this_url() {
  13.         echo get_tweet_this_url();
  14. }
  15.  
  16.  
  17. function tweet_this_text_link() {
  18.         $link = '<a href="' . get_tweet_this_url() . '" title="Post to Twitter (' .
  19.         get_tweet_this_short_url() . ')">Tweet This</a>';
  20.         if (!tt_is_preview()) {
  21.                 if (get_option('tt_limit_to_single') == "true") {
  22.                         if (is_single() || is_page()) echo $link;
  23.                         }
  24.                 else echo $link;
  25.         }
  26. }