Version Description
- Minor bug fixes - on caching and displaying error message in
WP_DEBUG
mode.
=
Download this release
Release Info
Developer | mpntod |
Plugin | Rotating Tweets (Twitter widget and shortcode) |
Version | 1.7.16 |
Comparing to | |
See all releases |
Code changes from version 1.7.15 to 1.7.16
- readme.txt +21 -3
- rotatingtweets.php +6 -4
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,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual,responsive,page builder
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -24,6 +24,20 @@ Twitter widget and shortcode to show your latest tweets one at a time an animate
|
|
24 |
* Compatible with [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/).
|
25 |
* **Multi-lingual** - now set up to be multi-lingual. The Twitter 'follow' button is automatically translated to match your site's language setting [if Twitter has made the appropriate language available](https://dev.twitter.com/docs/api/1.1/get/help/languages). Also uses [Wordpress's multi-lingual capability](http://codex.wordpress.org/I18n_for_WordPress_Developers) to enable translation of all the other text used by the plug-in via [language packs](https://translate.wordpress.org/projects/wp-plugins/rotatingtweets).
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
If you'd like to see what the plug-in looks like in action, you can [see the plug-in working here](http://www.martintod.org.uk/2012/05/29/new-twitter-plugin-to-show-tweets-in-rotation/).
|
28 |
|
29 |
== Installation ==
|
@@ -173,10 +187,14 @@ into your CSS - changing `123px;` to the width you're aiming at - either via put
|
|
173 |
You can do this by going to the `rotatingtweets/css` directory and renaming `rotatingtweets-sample.css` to `rotatingtweets.css` and putting it in the `wp-content/uploads/` directory. This displays a Twitter bird to the left of your tweets. Any CSS you put into `rotatingtweets.css` won't be overwritten when the plug-in is upgraded to the latest version.
|
174 |
|
175 |
== Upgrade notice ==
|
176 |
-
= 1.7.
|
177 |
-
*
|
178 |
|
179 |
== Changelog ==
|
|
|
|
|
|
|
|
|
180 |
= 1.7.15 =
|
181 |
* Fixing bug on displaying meta content
|
182 |
* Enabling sorting of display elements via `rtw_display_order` shortcode
|
4 |
Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual,responsive,page builder
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.7.16
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
24 |
* Compatible with [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/).
|
25 |
* **Multi-lingual** - now set up to be multi-lingual. The Twitter 'follow' button is automatically translated to match your site's language setting [if Twitter has made the appropriate language available](https://dev.twitter.com/docs/api/1.1/get/help/languages). Also uses [Wordpress's multi-lingual capability](http://codex.wordpress.org/I18n_for_WordPress_Developers) to enable translation of all the other text used by the plug-in via [language packs](https://translate.wordpress.org/projects/wp-plugins/rotatingtweets).
|
26 |
|
27 |
+
Currently the following languages are available:
|
28 |
+
|
29 |
+
* US English *(complete)*
|
30 |
+
* British English *(complete - mainly changing 'favorite' to 'favourite'!)*
|
31 |
+
* Brazilian Portuguese *(complete - many thanks to Wilmerson Felipe for his help on this)*
|
32 |
+
* German *(almost complete - many thanks to Nils Kroneberg for his help on this)*
|
33 |
+
* Spanish *(complete - many thanks to Alberto Lario for his help on this)*
|
34 |
+
* Italian *(complete - many thanks to [Mattia Migliorini](https://profiles.wordpress.org/deshack/) at [deshack](http://deshack.net/) for his help on this)*
|
35 |
+
* Dutch *(public facing translation complete - many thanks to Natasja Weijer for her help on this)*
|
36 |
+
* French *(almost complete - many thanks to [Alexandre Trudel](http://wordpress.org/support/profile/alexandretrudel) for his help on this)*
|
37 |
+
* Serbian *(complete - many thanks to Borisa Djuraskovic at [Web Hosting Hub](http://www.webhostinghub.com/) for his help on this)*
|
38 |
+
|
39 |
+
If you have made the plug-in work in your language, please send the translations you'd like to see or, even better, the relevant [gettext PO and MO files](http://codex.wordpress.org/I18n_for_WordPress_Developers) to [me](http://www.martintod.org.uk/contact-martin/) and I will then share them with everyone else. You can download [the latest POT file](http://plugins.svn.wordpress.org/rotatingtweets/trunk/languages/rotatingtweets.pot), and [PO files in each language](http://plugins.svn.wordpress.org/rotatingtweets/trunk/languages/) from this site. You may find [Poedit](http://www.poedit.net/) rather useful for translation and creation of PO and MO files - although the PO files themselves are quite simple text files and can be edited in Notepad or [Notepad++](http://notepad-plus-plus.org/).
|
40 |
+
|
41 |
If you'd like to see what the plug-in looks like in action, you can [see the plug-in working here](http://www.martintod.org.uk/2012/05/29/new-twitter-plugin-to-show-tweets-in-rotation/).
|
42 |
|
43 |
== Installation ==
|
187 |
You can do this by going to the `rotatingtweets/css` directory and renaming `rotatingtweets-sample.css` to `rotatingtweets.css` and putting it in the `wp-content/uploads/` directory. This displays a Twitter bird to the left of your tweets. Any CSS you put into `rotatingtweets.css` won't be overwritten when the plug-in is upgraded to the latest version.
|
188 |
|
189 |
== Upgrade notice ==
|
190 |
+
= 1.7.16 =
|
191 |
+
* Minor bug fixes - on caching and displaying error message in `WP_DEBUG` mode.
|
192 |
|
193 |
== Changelog ==
|
194 |
+
= 1.7.16 =
|
195 |
+
* Fixed undefined variable error for `show_media` in `WP_DEBUG` mode
|
196 |
+
* Fix for caching bug
|
197 |
+
|
198 |
= 1.7.15 =
|
199 |
* Fixing bug on displaying meta content
|
200 |
* Enabling sorting of display elements via `rtw_display_order` shortcode
|
rotatingtweets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Rotating Tweets (Twitter widget & shortcode)
|
4 |
Description: Replaces a shortcode such as [rotatingtweets screen_name='your_twitter_name'], or a widget, with a rotating tweets display
|
5 |
-
Version: 1.7.
|
6 |
Text Domain: rotatingtweets
|
7 |
Author: Martin Tod
|
8 |
Author URI: http://www.martintod.org.uk
|
@@ -475,6 +475,7 @@ function rotatingtweets_user_intent($person,$lang,$linkcontent,$targetvalue='',$
|
|
475 |
}
|
476 |
// Many thanks to Moondrop for highlighting the need to do this - https://wordpress.org/support/topic/no-tweets-available-mostly?replies=30
|
477 |
function rotatingtweets_set_transient($transient,$value,$expiration) {
|
|
|
478 |
$newvalue = base64_encode(serialize($value));
|
479 |
return set_transient($transient,$newvalue,$expiration);
|
480 |
}
|
@@ -591,7 +592,8 @@ function rotatingtweets_display_shortcode( $atts, $content=null, $code="", $prin
|
|
591 |
'profile_image_size'=>'normal',
|
592 |
'shuffle'=>0,
|
593 |
'merge_cache'=>TRUE,
|
594 |
-
'rtw_display_order'=>'info,main,media,meta'
|
|
|
595 |
), $atts, 'rotatingtweets' ) ;
|
596 |
extract($args);
|
597 |
if(empty($screen_name) && empty($search) && !empty($url)):
|
@@ -999,7 +1001,7 @@ function rotatingtweets_get_cache_delay() {
|
|
999 |
return($cache_delay);
|
1000 |
}
|
1001 |
# Get the latest data from Twitter (or from a cache if it's been less than 2 minutes since the last load)
|
1002 |
-
function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_replies,$tw_get_favorites = FALSE,$tw_search = FALSE,$tw_list = FALSE, $tw_merge = TRUE ) {
|
1003 |
# Set timer
|
1004 |
$rt_starttime = microtime(true);
|
1005 |
# Clear up variables
|
@@ -1659,6 +1661,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
|
|
1659 |
endif;
|
1660 |
endforeach;
|
1661 |
endif;
|
|
|
1662 |
if(isset($entities['media'])):
|
1663 |
$media = $entities['media'];
|
1664 |
$media_data = $media[0];
|
@@ -1670,7 +1673,6 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
|
|
1670 |
endif;
|
1671 |
else:
|
1672 |
unset($media);
|
1673 |
-
$show_media='';
|
1674 |
endif;
|
1675 |
if(!empty($media)):
|
1676 |
foreach($media as $medium):
|
2 |
/*
|
3 |
Plugin Name: Rotating Tweets (Twitter widget & shortcode)
|
4 |
Description: Replaces a shortcode such as [rotatingtweets screen_name='your_twitter_name'], or a widget, with a rotating tweets display
|
5 |
+
Version: 1.7.16
|
6 |
Text Domain: rotatingtweets
|
7 |
Author: Martin Tod
|
8 |
Author URI: http://www.martintod.org.uk
|
475 |
}
|
476 |
// Many thanks to Moondrop for highlighting the need to do this - https://wordpress.org/support/topic/no-tweets-available-mostly?replies=30
|
477 |
function rotatingtweets_set_transient($transient,$value,$expiration) {
|
478 |
+
$expiration = max(intval($expiration),10);
|
479 |
$newvalue = base64_encode(serialize($value));
|
480 |
return set_transient($transient,$newvalue,$expiration);
|
481 |
}
|
592 |
'profile_image_size'=>'normal',
|
593 |
'shuffle'=>0,
|
594 |
'merge_cache'=>TRUE,
|
595 |
+
'rtw_display_order'=>'info,main,media,meta',
|
596 |
+
'collection_id' => 0
|
597 |
), $atts, 'rotatingtweets' ) ;
|
598 |
extract($args);
|
599 |
if(empty($screen_name) && empty($search) && !empty($url)):
|
1001 |
return($cache_delay);
|
1002 |
}
|
1003 |
# Get the latest data from Twitter (or from a cache if it's been less than 2 minutes since the last load)
|
1004 |
+
function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_replies,$tw_get_favorites = FALSE,$tw_search = FALSE,$tw_list = FALSE, $tw_merge = TRUE, $tw_collection = FALSE ) {
|
1005 |
# Set timer
|
1006 |
$rt_starttime = microtime(true);
|
1007 |
# Clear up variables
|
1661 |
endif;
|
1662 |
endforeach;
|
1663 |
endif;
|
1664 |
+
$show_media = '';
|
1665 |
if(isset($entities['media'])):
|
1666 |
$media = $entities['media'];
|
1667 |
$media_data = $media[0];
|
1673 |
endif;
|
1674 |
else:
|
1675 |
unset($media);
|
|
|
1676 |
endif;
|
1677 |
if(!empty($media)):
|
1678 |
foreach($media as $medium):
|