Twitter Widget Pro - Version 1.3.4

Version Description

Download this release

Release Info

Developer aaroncampbell
Plugin Icon wp plugin Twitter Widget Pro
Version 1.3.4
Comparing to
See all releases

Code changes from version 1.3.3 to 1.3.4

Files changed (2) hide show
  1. readme.txt +1 -1
  2. wp-twitter-widget.php +13 -18
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%4
4
  Tags: twitter, widget, feed
5
  Requires at least: 2.7
6
  Tested up to: 2.8
7
- Stable tag: 1.3.3
8
 
9
  A widget that properly handles twitter feeds, including parsing @username and URLs into links. Requires PHP5.
10
 
4
  Tags: twitter, widget, feed
5
  Requires at least: 2.7
6
  Tested up to: 2.8
7
+ Stable tag: 1.3.4
8
 
9
  A widget that properly handles twitter feeds, including parsing @username and URLs into links. Requires PHP5.
10
 
wp-twitter-widget.php CHANGED
@@ -3,15 +3,19 @@
3
  * Plugin Name: Twitter Widget Pro
4
  * Plugin URI: http://xavisys.com/wordpress-twitter-widget/
5
  * Description: A widget that properly handles twitter feeds, including @username and link parsing, and can even display profile images for the users. Requires PHP5.
6
- * Version: 1.3.3
7
  * Author: Aaron D. Campbell
8
  * Author URI: http://xavisys.com/
9
  */
10
 
11
- define('TWP_VERSION', '1.3.3');
12
 
13
  /**
14
  * Changelog:
 
 
 
 
15
  * 04/28/2009: 1.3.3
16
  * - Some configs still couldn't turn off the link to Twitter Widget Pro page
17
  *
@@ -339,8 +343,12 @@ class wpTwitterWidget
339
  <?php echo $tweet->ago; ?>
340
  </a> from <?php
341
  echo str_replace('&', '&amp;', $tweet->source);
342
- if (isset($tweet->in_reply_to)) {
343
- echo $this->_getReplyTo($tweet->in_reply_to);
 
 
 
 
344
  } ?>
345
  </span>
346
  </li>
@@ -363,20 +371,6 @@ class wpTwitterWidget
363
  echo '</ul></div>' . $after_widget;
364
  }
365
 
366
- /**
367
- * Returns a "in reply to" link to the user passed
368
- *
369
- * @param object $replyTo - Tweet
370
- * @return string - Link to Twitter user (XHTML)
371
- */
372
- private function _getReplyTo($replyTo) {
373
- return <<<replyTo
374
- <a href="http://twitter.com/{$replyTo->user->screen_name}/statuses/{$replyTo->id}">
375
- in reply to {$replyTo->user->screen_name}
376
- </a>
377
- replyTo;
378
- }
379
-
380
  /**
381
  * Returns the Twitter user's profile image, linked to that user's profile
382
  *
@@ -715,6 +709,7 @@ add_action( 'admin_menu', array($wpTwitterWidget,'admin_menu') );
715
  add_action( 'widgets_init', array($wpTwitterWidget, 'register') );
716
  add_filter( 'widget_twitter_content', array($wpTwitterWidget, 'linkTwitterUsers') );
717
  add_filter( 'widget_twitter_content', array($wpTwitterWidget, 'linkUrls') );
 
718
  add_action( 'activate_twitter-widget-pro/wp-twitter-widget.php', array($wpTwitterWidget, 'activatePlugin') );
719
  add_action( 'admin_footer', array($wpTwitterWidget, 'outputSendInfoForm') );
720
  add_filter( 'plugin_action_links', array($wpTwitterWidget, 'addSettingLink'), 10, 2 );
3
  * Plugin Name: Twitter Widget Pro
4
  * Plugin URI: http://xavisys.com/wordpress-twitter-widget/
5
  * Description: A widget that properly handles twitter feeds, including @username and link parsing, and can even display profile images for the users. Requires PHP5.
6
+ * Version: 1.3.4
7
  * Author: Aaron D. Campbell
8
  * Author URI: http://xavisys.com/
9
  */
10
 
11
+ define('TWP_VERSION', '1.3.4');
12
 
13
  /**
14
  * Changelog:
15
+ * 05/02/2009: 1.3.4
16
+ * - Added convert_chars filter to the tweet text to properly handle special characters
17
+ * - Fixed "in reply to" text which stopped working when Twitter changed their API
18
+ *
19
  * 04/28/2009: 1.3.3
20
  * - Some configs still couldn't turn off the link to Twitter Widget Pro page
21
  *
343
  <?php echo $tweet->ago; ?>
344
  </a> from <?php
345
  echo str_replace('&', '&amp;', $tweet->source);
346
+ if (!empty($tweet->in_reply_to_screen_name)) {
347
+ echo <<<replyTo
348
+ <a href="http://twitter.com/{$tweet->in_reply_to_screen_name}/statuses/{$tweet->in_reply_to_status_id}" class="reply-to">
349
+ in reply to {$tweet->in_reply_to_screen_name}
350
+ </a>
351
+ replyTo;
352
  } ?>
353
  </span>
354
  </li>
371
  echo '</ul></div>' . $after_widget;
372
  }
373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  /**
375
  * Returns the Twitter user's profile image, linked to that user's profile
376
  *
709
  add_action( 'widgets_init', array($wpTwitterWidget, 'register') );
710
  add_filter( 'widget_twitter_content', array($wpTwitterWidget, 'linkTwitterUsers') );
711
  add_filter( 'widget_twitter_content', array($wpTwitterWidget, 'linkUrls') );
712
+ add_filter( 'widget_twitter_content', 'convert_chars' );
713
  add_action( 'activate_twitter-widget-pro/wp-twitter-widget.php', array($wpTwitterWidget, 'activatePlugin') );
714
  add_action( 'admin_footer', array($wpTwitterWidget, 'outputSendInfoForm') );
715
  add_filter( 'plugin_action_links', array($wpTwitterWidget, 'addSettingLink'), 10, 2 );