Version Description
- This is an attempt at catching an elusive error. If you're getting an error referencing line 332, please try this new version.
Download this release
Release Info
Developer | aaroncampbell |
Plugin | Twitter Widget Pro |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.9 to 1.5.0
- readme.txt +4 -1
- upgrade.html +1 -4
- wp-twitter-widget.php +17 -4
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.2
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links. Requires PHP5.
|
10 |
|
@@ -46,6 +46,9 @@ Aparently the database queries required to display the friends feed was causing
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
49 |
= 1.4.9 =
|
50 |
* Fixed an uncaught exception that could occur starting in 1.4.8
|
51 |
|
4 |
Tags: twitter, widget, feed
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 2.8.2
|
7 |
+
Stable tag: 1.5.0
|
8 |
|
9 |
A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links. Requires PHP5.
|
10 |
|
46 |
|
47 |
== Changelog ==
|
48 |
|
49 |
+
= 1.5.0 =
|
50 |
+
* This is an attempt at catching an elusive error. If you're getting an error referencing line 332, please try this new version.
|
51 |
+
|
52 |
= 1.4.9 =
|
53 |
* Fixed an uncaught exception that could occur starting in 1.4.8
|
54 |
|
upgrade.html
CHANGED
@@ -1,7 +1,4 @@
|
|
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>
|
4 |
-
<li style="color:red; font-weight:bold;">In 1.4.8 the HTML has been changed for displaying profile images. If you show profile images, you may need to update your CSS accordingly</li>
|
5 |
-
<li>Changed name of widget from "Twitter Feed" to "Twitter Widget Pro"</li>
|
6 |
-
<li>Fixed issue with calculation of "time since" for tweets that were months old</li>
|
7 |
</ul>
|
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>This is an attempt at catching an elusive error. If you're getting an error referencing line 332, please try this new version.</li>
|
|
|
|
|
|
|
4 |
</ul>
|
wp-twitter-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.
|
6 |
-
* Version: 1.
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://xavisys.com/
|
9 |
* Text Domain: twitter-widget-pro
|
@@ -136,10 +136,23 @@ class wpTwitterWidget
|
|
136 |
|
137 |
if ( !is_wp_error($resp) && $resp['response']['code'] >= 200 && $resp['response']['code'] < 300 ) {
|
138 |
if (function_exists('json_decode')) {
|
139 |
-
|
140 |
} else {
|
141 |
require_once('json_decode.php');
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
} else {
|
145 |
// Failed to fetch url;
|
@@ -246,7 +259,7 @@ class wpTwitterWidget
|
|
246 |
$tweets = get_option("wptw-{$feedHash}");
|
247 |
$cacheAge = get_option("wptw-{$feedHash}-time");
|
248 |
//If we don't have cache or it's more than 5 minutes old
|
249 |
-
if ( empty($tweets) || (time() - $cacheAge) > 300 ) {
|
250 |
try {
|
251 |
$tweets = $this->_parseFeed($widgetOptions);
|
252 |
update_option("wptw-{$feedHash}", $tweets);
|
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, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.
|
6 |
+
* Version: 1.5.0
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://xavisys.com/
|
9 |
* Text Domain: twitter-widget-pro
|
136 |
|
137 |
if ( !is_wp_error($resp) && $resp['response']['code'] >= 200 && $resp['response']['code'] < 300 ) {
|
138 |
if (function_exists('json_decode')) {
|
139 |
+
$decodedResponse = json_decode($resp['body']);
|
140 |
} else {
|
141 |
require_once('json_decode.php');
|
142 |
+
$decodedResponse = Zend_Json_Decoder::decode($resp['body']);
|
143 |
+
}
|
144 |
+
if ( empty($decodedResponse) ) {
|
145 |
+
if (empty($widgetOptions['errmsg'])) {
|
146 |
+
$widgetOptions['errmsg'] = __('Invalid Twitter Response.', 'twitter-widget-pro');
|
147 |
+
}
|
148 |
+
throw new wpTwitterWidgetException($widgetOptions['errmsg']);
|
149 |
+
} elseif( !empty($decodedResponse->error) ) {
|
150 |
+
if (empty($widgetOptions['errmsg'])) {
|
151 |
+
$widgetOptions['errmsg'] = $decodedResponse->error;
|
152 |
+
}
|
153 |
+
throw new wpTwitterWidgetException($widgetOptions['errmsg']);
|
154 |
+
} else {
|
155 |
+
return $decodedResponse;
|
156 |
}
|
157 |
} else {
|
158 |
// Failed to fetch url;
|
259 |
$tweets = get_option("wptw-{$feedHash}");
|
260 |
$cacheAge = get_option("wptw-{$feedHash}-time");
|
261 |
//If we don't have cache or it's more than 5 minutes old
|
262 |
+
if ( true || empty($tweets) || (time() - $cacheAge) > 300 ) {
|
263 |
try {
|
264 |
$tweets = $this->_parseFeed($widgetOptions);
|
265 |
update_option("wptw-{$feedHash}", $tweets);
|