Rotating Tweets (Twitter widget and shortcode) - Version 0.26

Version Description

If there's an error in the twitter feed, this upgrade makes sure the plug-in doesn't cache it and doesn't display it.

=

Download this release

Release Info

Developer mpntod
Plugin Icon wp plugin Rotating Tweets (Twitter widget and shortcode)
Version 0.26
Comparing to
See all releases

Code changes from version 0.25 to 0.26

Files changed (2) hide show
  1. readme.txt +11 -14
  2. rotatingtweets.php +2 -5
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: shortcode,widget,twitter,rotating,rotate
5
  Requires at least: 2.6
6
  Tested up to: 3.3.2
7
- Stable tag: 0.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -27,10 +27,10 @@ If you'd like to see what it looks like in action, you can [see the plug-in work
27
  Possible variables for the shortcode include:
28
 
29
  * `screen_name` = Twitter user name - required
30
- * `include_rts` = `'0'` or `'1'` - include retweets - optional - default is '0'
31
- * `exclude_replies` = `'0'` or `'1'` - exclude replies - optional - default is '0'
32
- * `tweet_count` = number of tweets to show - optional - default is 5
33
- * `show_follow` = `'0'` or `'1'` - show follow button - optional - default is '0'
34
 
35
  But you may just decide to use the 'Rotating Tweets' widget!
36
 
@@ -39,18 +39,15 @@ But you may just decide to use the 'Rotating Tweets' widget!
39
  Not yet. Why not ask one?
40
 
41
  == Upgrade notice ==
42
- = 0.25 =
43
- Doesn't display empty twitter feeds
44
-
45
- = 0.21 =
46
- Fixed a missing `</div>` in the follow-button code
47
-
48
- = 0.2 =
49
- Fixes a serious problem with cacheing of different feeds
50
 
51
  == Changelog ==
 
 
 
52
  = 0.25 =
53
- Doesn't display empty twitter feeds
54
 
55
  = 0.21 =
56
  Replaced a missing `</div>` in the follow-button code (with thanks to [jacobp](http://wordpress.org/support/profile/jacobp) for spotting it and suggesting a fix)
4
  Tags: shortcode,widget,twitter,rotating,rotate
5
  Requires at least: 2.6
6
  Tested up to: 3.3.2
7
+ Stable tag: 0.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
27
  Possible variables for the shortcode include:
28
 
29
  * `screen_name` = Twitter user name - required
30
+ * `include_rts` = `'0'` or `'1'` - include retweets - optional - default is `'0'`
31
+ * `exclude_replies` = `'0'` or `'1'` - exclude replies - optional - default is `'0'`
32
+ * `tweet_count` = number of tweets to show - optional - default is `5`
33
+ * `show_follow` = `'0'` or `'1'` - show follow button - optional - default is `'0'`
34
 
35
  But you may just decide to use the 'Rotating Tweets' widget!
36
 
39
  Not yet. Why not ask one?
40
 
41
  == Upgrade notice ==
42
+ = 0.26 =
43
+ If there's an error in the twitter feed, this upgrade makes sure the plug-in doesn't cache it and doesn't display it.
 
 
 
 
 
 
44
 
45
  == Changelog ==
46
+ = 0.26 =
47
+ Stops display and cacheing of non-existent twitter feeds
48
+
49
  = 0.25 =
50
+ Stops display and cacheing of faulty twitter feeds
51
 
52
  = 0.21 =
53
  Replaced a missing `</div>` in the follow-button code (with thanks to [jacobp](http://wordpress.org/support/profile/jacobp) for spotting it and suggesting a fix)
rotatingtweets.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Rotating Tweets widget & shortcode
4
  Description: Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or a widget, with a rotating tweets display
5
- Version: 0.25
6
  Author: Martin Tod
7
  Author URI: http://www.martintod.org.uk
8
  License: GPL2
@@ -193,13 +193,10 @@ function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_r
193
  # Displays the tweets
194
  function rotating_tweets_display($json,$tweet_count=5,$show_follow=FALSE,$print=TRUE) {
195
  unset($result);
196
- if(!empty($json->errors)) return;
197
  $tweet_count = max(1,intval($tweet_count));
198
  $result = "<div class='rotatingtweets' id='".uniqid('rotatingtweets_')."'>";
199
  $tweet_counter = 0;
200
- echo "<!--";
201
- print_r($json);
202
- echo "-->";
203
  foreach($json as $twitter_object):
204
  $twitter_vars = get_object_vars($twitter_object);
205
  $tweet_counter++;
2
  /*
3
  Plugin Name: Rotating Tweets widget & shortcode
4
  Description: Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or a widget, with a rotating tweets display
5
+ Version: 0.26
6
  Author: Martin Tod
7
  Author URI: http://www.martintod.org.uk
8
  License: GPL2
193
  # Displays the tweets
194
  function rotating_tweets_display($json,$tweet_count=5,$show_follow=FALSE,$print=TRUE) {
195
  unset($result);
196
+ if(!empty($json->errors) or empty($json)) return;
197
  $tweet_count = max(1,intval($tweet_count));
198
  $result = "<div class='rotatingtweets' id='".uniqid('rotatingtweets_')."'>";
199
  $tweet_counter = 0;
 
 
 
200
  foreach($json as $twitter_object):
201
  $twitter_vars = get_object_vars($twitter_object);
202
  $tweet_counter++;