Twitter Widget Pro - Version 2.1.4

Version Description

  • Mixed-case attributes now work properly in the shortcode
  • Fixed issue with matching only @ as a username
Download this release

Release Info

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

Code changes from version 2.1.3 to 2.1.4

Files changed (3) hide show
  1. readme.txt +6 -2
  2. upgrade.html +0 -8
  3. wp-twitter-widget.php +24 -2
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.8
6
  Tested up to: 2.9
7
- Stable tag: 2.1.3
8
 
9
  A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links. Requires PHP5.
10
 
@@ -79,7 +79,11 @@ Aparently the database queries required to display the friends feed was causing
79
 
80
  == Changelog ==
81
 
82
- = 2.1.2 =
 
 
 
 
83
  * Fixed extraneous closing tag that caused invalid HTML
84
  * You can now specify your own date format as a per-widget option
85
 
4
  Tags: twitter, widget, feed
5
  Requires at least: 2.8
6
  Tested up to: 2.9
7
+ Stable tag: 2.1.4
8
 
9
  A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links. Requires PHP5.
10
 
79
 
80
  == Changelog ==
81
 
82
+ = 2.1.4 =
83
+ * Mixed-case attributes now work properly in the shortcode
84
+ * Fixed issue with matching only @ as a username
85
+
86
+ = 2.1.3 =
87
  * Fixed extraneous closing tag that caused invalid HTML
88
  * You can now specify your own date format as a per-widget option
89
 
upgrade.html DELETED
@@ -1,8 +0,0 @@
1
- <p><a href="http://wordpress.org/extend/plugins/twitter-widget-pro/changelog/">Change Log</a></p>
2
- <ul style="list-style: disc inside; padding: 5px 0 0 15px; font-weight: normal;">
3
- <li>2.1.2: Added links to the <a href="http://xavisys.com/support/forum/twitter-widget-pro/">Support Forum</a></li>
4
- <li>2.1.2: Fixed spacing issue that was introduced in 2.1.1</li>
5
- <li>2.1.1: Added an option to have all links open in new Windows</li>
6
- <li>2.1.0: Added a shortcode to allow you to embed a widget in any post or page</li>
7
- <li style="color:red; font-weight:bold;">2.0+: Now requires WordPress 2.8 and still requires PHP 5+</li>
8
- </ul>
 
 
 
 
 
 
 
 
wp-twitter-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Twitter Widget Pro
4
  * Plugin URI: http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/
5
  * Description: A widget that properly handles twitter feeds, including @username, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.
6
- * Version: 2.1.3
7
  * Author: Aaron D. Campbell
8
  * Author URI: http://xavisys.com/
9
  * Text Domain: twitter-widget-pro
@@ -274,7 +274,7 @@ class wpTwitterWidget
274
  * @return string - Tweet text with @replies linked
275
  */
276
  public function linkTwitterUsers($text) {
277
- $text = preg_replace_callback('/(^|\s)@(\w*)/i', array($this, '_linkTwitterUsersCallback'), $text);
278
  return $text;
279
  }
280
 
@@ -670,6 +670,28 @@ class wpTwitterWidget
670
  'showts' => 60 * 60 * 24,
671
  'dateFormat' => __('h:i:s A F d, Y', 'twitter-widget-pro'),
672
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
673
  if ( !empty($content) && empty($attr['title']) ) {
674
  $attr['title'] = $content;
675
  }
3
  * Plugin Name: Twitter Widget Pro
4
  * Plugin URI: http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/
5
  * Description: A widget that properly handles twitter feeds, including @username, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.
6
+ * Version: 2.1.4
7
  * Author: Aaron D. Campbell
8
  * Author URI: http://xavisys.com/
9
  * Text Domain: twitter-widget-pro
274
  * @return string - Tweet text with @replies linked
275
  */
276
  public function linkTwitterUsers($text) {
277
+ $text = preg_replace_callback('/(^|\s)@(\w+)/i', array($this, '_linkTwitterUsersCallback'), $text);
278
  return $text;
279
  }
280
 
670
  'showts' => 60 * 60 * 24,
671
  'dateFormat' => __('h:i:s A F d, Y', 'twitter-widget-pro'),
672
  );
673
+
674
+ /**
675
+ * Attribute names are strtolower'd, so we need to fix them to match
676
+ * the names used through the rest of the plugin
677
+ */
678
+ if ( array_key_exists( 'fetchtimeout', $attr ) ) {
679
+ $attr['fetchTimeOut'] = $attr['fetchtimeout'];
680
+ unset($attr['fetchtimeout']);
681
+ }
682
+ if ( array_key_exists( 'showxavisyslink', $attr ) ) {
683
+ $attr['showXavisysLink'] = $attr['showxavisyslink'];
684
+ unset($attr['showxavisyslink']);
685
+ }
686
+ if ( array_key_exists( 'targetblank', $attr ) ) {
687
+ $attr['targetBlank'] = $attr['targetblank'];
688
+ unset($attr['targetblank']);
689
+ }
690
+ if ( array_key_exists( 'dateformat', $attr ) ) {
691
+ $attr['dateFormat'] = $attr['dateformat'];
692
+ unset($attr['dateformat']);
693
+ }
694
+
695
  if ( !empty($content) && empty($attr['title']) ) {
696
  $attr['title'] = $content;
697
  }