Changeset 355924
- Timestamp:
- 03/05/2011 09:05:22 PM (15 years ago)
- Location:
- wp-tweet-button/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-tweet-button.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-tweet-button/trunk/readme.txt
r355798 r355924 2 2 Contributors: 0xTC 3 3 Tags: twitter, tweet button, retweet, tweet, autotweet, WP Tweet Button, advanced, tweeting, social media, button, SEO, share, shortener, awe.sm, b2l.me, bit.ly, cli.gs, sl.ly, snipr, su.pr, tinyurl, analytics, google analytics, campaign, campaign tracking, auto tweeting, auto posts 4 Requires at least: 2. 7.24 Requires at least: 2.8 5 5 Tested up to: 3.1 6 6 Stable tag: trunk … … 125 125 == Changelog == 126 126 127 = 2.0.5 = 128 * Bugfix related to shortlinks and links on main page. 129 127 130 = 2.0.4.3 = 128 131 * Improved shortlink handling in Wordpress 3.1. Shortlink settings in this plugin can be set as universal by checking the "Add rel=shortlink to head" box. -
wp-tweet-button/trunk/wp-tweet-button.php
r355798 r355924 2 2 /* 3 3 Plugin Name: WP Tweet Button 4 Version: 2.0. 4.34 Version: 2.0.5 5 5 Plugin URI: http://0xtc.com/plugins/wp-tweet-button 6 6 Description: The WordPress implementation of the official Twitter Tweet Button. … … 488 488 */ 489 489 function tw_add_rel_shortlink(){ 490 echo '<link rel="shortlink" href="'.$this->tw_get_short_url().'" />'; 490 if (is_home()){ 491 $url = home_url(); 492 } else { 493 $url = $this->tw_get_short_url(); 494 } 495 echo '<link rel="shortlink" href="'.$url.'" />'; 491 496 } 492 497 … … 589 594 remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); 590 595 add_action( 'wp_head', array(&$this, 'tw_add_rel_shortlink')); 591 if ($this->tw_get_option('tw_url_shortener') != 'wordpress') add_filter('pre_get_shortlink', array(&$this, 'tw_get_short_url'),3); 596 if (($this->tw_get_option('tw_url_shortener') != 'wordpress')){ 597 598 add_filter('pre_get_shortlink', array(&$this, 'tw_get_short_url'),3); 599 600 } 592 601 } 593 602 } … … 870 879 function tw_get_long_url($addtrack=false, $addlang=true) { 871 880 global $my_transposh_plugin; 872 881 882 if (!in_the_loop() && is_home()){return esc_url(home_url());} 883 873 884 if(is_int($this->postid)) { 874 885 $post = get_post($this->postid); … … 878 889 $perms=null; 879 890 if (empty($post->post_title)) { 880 $perms= 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];891 $perms= esc_url('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); 881 892 } else { 882 893 $perms = trim(get_permalink($post->ID)); … … 925 936 global $post; 926 937 } 938 939 if (!in_the_loop() && is_home()){return esc_url(home_url());} 940 927 941 $perms = $this->tw_get_long_url(true); 928 942 if ($perms == false) return false; … … 1134 1148 function tweetbutton($post,$bwdata=false) { 1135 1149 global $post; 1136 $post = get_post($this->postid);1150 // $thepost = get_post($this->postid); 1137 1151 $this->postid = $post->ID; 1138 1152 if (isset($post->ID)){ … … 2041 2055 $wpTweetButton->tw_set_option('tw_count', $type); 2042 2056 } 2043 return $wpTweetButton->tweetbutton($ post,$bwdata);2057 return $wpTweetButton->tweetbutton($thepost,$bwdata); 2044 2058 } 2045 2059
Note: See TracChangeset
for help on using the changeset viewer.