Version Description
- Fixed Exclude Replies variable notice and tweet calculation
Download this release
Release Info
Developer | Planet Interactive |
Plugin | Simple Twitter Tweets |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
- README.txt +6 -3
- simple-twitter-tweets.php +8 -7
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A94
|
|
4 |
Tags: Twitter, Stream, Tweets, Twitter OAuth, social
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5.2
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -115,6 +115,9 @@ As far as we know it just works! Phew, but if you have an issue or you want to p
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
118 |
= 1.3.1 =
|
119 |
* Added @ symbol for Twitter name links in Tweets
|
120 |
|
@@ -143,5 +146,5 @@ As far as we know it just works! Phew, but if you have an issue or you want to p
|
|
143 |
|
144 |
== Upgrade Notice ==
|
145 |
|
146 |
-
= 1.3.
|
147 |
-
Minor update.
|
4 |
Tags: Twitter, Stream, Tweets, Twitter OAuth, social
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5.2
|
7 |
+
Stable tag: 1.3.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 1.3.2 =
|
119 |
+
* Fixed Exclude Replies variable notice and tweet calculation
|
120 |
+
|
121 |
= 1.3.1 =
|
122 |
* Added @ symbol for Twitter name links in Tweets
|
123 |
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
+
= 1.3.2 =
|
150 |
+
Minor update. Exclude replies notice fixed, No. Tweets correct calculation.
|
simple-twitter-tweets.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Simple Twitter Tweets
|
|
4 |
Plugin URI: http://www.planet-interactive.co.uk/simple-twitter-tweets
|
5 |
Description: Display last x number tweets from Twitter API stream, store locally in dataabse to present past tweets when failure to access Twitters restrictive API occurs
|
6 |
Author: Ashley Sheinwald
|
7 |
-
Version: 1.3.
|
8 |
Author URI: http://www.planet-interactive.co.uk/
|
9 |
*/
|
10 |
|
@@ -105,7 +105,7 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
105 |
</p>
|
106 |
<p>
|
107 |
<input class="checkbox" type="checkbox" <?php checked( isset( $instance['exclude_replies']), true ); ?> id="<?php echo $this->get_field_id( 'exclude_replies' ); ?>" name="<?php echo $this->get_field_name( 'exclude_replies' ); ?>" />
|
108 |
-
<label for="<?php echo $this->get_field_id( 'exclude_replies' ); ?>"><?php _e('
|
109 |
</p>
|
110 |
|
111 |
<div class="twitterFollow" style="background:#d6eef9;">
|
@@ -195,7 +195,7 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
195 |
*/
|
196 |
|
197 |
// Configuration.
|
198 |
-
$numTweets = $PI_numTweets;
|
199 |
$name = $PI_name; // Twitter UserName
|
200 |
$cacheTime = $PI_cacheTime; // Time in minutes between updates.
|
201 |
|
@@ -206,8 +206,8 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
206 |
$accessToken = $PI_accessToken; // OAuth Access Token
|
207 |
$accessTokenSecret = $PI_accessTokenSecret;// OAuth Token Secret
|
208 |
|
209 |
-
$exclude_replies = $PI_exclude_replies;
|
210 |
-
$twitterFollow = $PI_twitterFollow;
|
211 |
|
212 |
$dataShowCount = ($PI_dataShowCount != "true") ? "false" : "true"; // Whether to show Twitter Follower Count
|
213 |
$dataShowScreenName = ($PI_dataShowScreenName != "true") ? "false" : "true"; // Whether to show Twitter Screen Name
|
@@ -232,14 +232,14 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
232 |
|
233 |
// If excluding replies, we need to fetch more than requested as the
|
234 |
// total is fetched first, and then replies removed.
|
235 |
-
$totalToFetch = ($
|
236 |
|
237 |
$fetchedTweets = $connection->get(
|
238 |
'statuses/user_timeline',
|
239 |
array(
|
240 |
'screen_name' => $name,
|
241 |
'count' => $totalToFetch,
|
242 |
-
'exclude_replies' => $
|
243 |
)
|
244 |
);
|
245 |
|
@@ -301,6 +301,7 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
301 |
<?php foreach($tweets as $t) : ?>
|
302 |
<li><?php echo $t['text']; ?>
|
303 |
<br/><em>
|
|
|
304 |
<a href="http://www.twitter.com/<?php echo $screen_name; ?>" target="_blank" title="Follow <?php echo $name; ?> on Twitter [Opens new window]"><?php echo human_time_diff($t['time'], current_time('timestamp')); ?> ago</a>
|
305 |
</em>
|
306 |
</li>
|
4 |
Plugin URI: http://www.planet-interactive.co.uk/simple-twitter-tweets
|
5 |
Description: Display last x number tweets from Twitter API stream, store locally in dataabse to present past tweets when failure to access Twitters restrictive API occurs
|
6 |
Author: Ashley Sheinwald
|
7 |
+
Version: 1.3.2
|
8 |
Author URI: http://www.planet-interactive.co.uk/
|
9 |
*/
|
10 |
|
105 |
</p>
|
106 |
<p>
|
107 |
<input class="checkbox" type="checkbox" <?php checked( isset( $instance['exclude_replies']), true ); ?> id="<?php echo $this->get_field_id( 'exclude_replies' ); ?>" name="<?php echo $this->get_field_name( 'exclude_replies' ); ?>" />
|
108 |
+
<label for="<?php echo $this->get_field_id( 'exclude_replies' ); ?>"><?php _e('Exclude_@replies', 'pi-tweet'); ?></label>
|
109 |
</p>
|
110 |
|
111 |
<div class="twitterFollow" style="background:#d6eef9;">
|
195 |
*/
|
196 |
|
197 |
// Configuration.
|
198 |
+
$numTweets = $PI_numTweets; // Num tweets to show
|
199 |
$name = $PI_name; // Twitter UserName
|
200 |
$cacheTime = $PI_cacheTime; // Time in minutes between updates.
|
201 |
|
206 |
$accessToken = $PI_accessToken; // OAuth Access Token
|
207 |
$accessTokenSecret = $PI_accessTokenSecret;// OAuth Token Secret
|
208 |
|
209 |
+
$exclude_replies = $PI_exclude_replies; // Leave out @replies?
|
210 |
+
$twitterFollow = $PI_twitterFollow; // Whether to show Twitter Follow button
|
211 |
|
212 |
$dataShowCount = ($PI_dataShowCount != "true") ? "false" : "true"; // Whether to show Twitter Follower Count
|
213 |
$dataShowScreenName = ($PI_dataShowScreenName != "true") ? "false" : "true"; // Whether to show Twitter Screen Name
|
232 |
|
233 |
// If excluding replies, we need to fetch more than requested as the
|
234 |
// total is fetched first, and then replies removed.
|
235 |
+
$totalToFetch = ($exclude_replies) ? max(50, $numTweets * 3) : $numTweets;
|
236 |
|
237 |
$fetchedTweets = $connection->get(
|
238 |
'statuses/user_timeline',
|
239 |
array(
|
240 |
'screen_name' => $name,
|
241 |
'count' => $totalToFetch,
|
242 |
+
'exclude_replies' => $exclude_replies
|
243 |
)
|
244 |
);
|
245 |
|
301 |
<?php foreach($tweets as $t) : ?>
|
302 |
<li><?php echo $t['text']; ?>
|
303 |
<br/><em>
|
304 |
+
<?php if(!isset($screen_name)){ $screen_name = $name; }?>
|
305 |
<a href="http://www.twitter.com/<?php echo $screen_name; ?>" target="_blank" title="Follow <?php echo $name; ?> on Twitter [Opens new window]"><?php echo human_time_diff($t['time'], current_time('timestamp')); ?> ago</a>
|
306 |
</em>
|
307 |
</li>
|