Version Description
- Fixing Tweet time/date display problems.
=
Download this release
Release Info
Developer | mpntod |
Plugin | Rotating Tweets (Twitter widget and shortcode) |
Version | 1.7.9 |
Comparing to | |
See all releases |
Code changes from version 1.7.8 to 1.7.9
- readme.txt +10 -3
- rotatingtweets.php +11 -9
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
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -123,6 +123,7 @@ All the options are listed on the [Rotating Tweets installation page](http://wor
|
|
123 |
= How can I include Rotating Tweets in my template? =
|
124 |
Try something like:
|
125 |
`<?php echo do_shortcode( "[rotatingtweets screen_name='your_twitter']" ) ?>`
|
|
|
126 |
|
127 |
= How can I pull information from two accounts into one widget =
|
128 |
The easiest way is to list more than one account in the 'Twitter name' box in the widget or use something like `screen_name='account1 account2'` in the shortcode.
|
@@ -179,10 +180,16 @@ into your CSS - changing `123px;` to the width you're aiming at - either via put
|
|
179 |
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.
|
180 |
|
181 |
== Upgrade notice ==
|
182 |
-
= 1.7.
|
183 |
-
*
|
184 |
|
185 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
= 1.7.8 =
|
187 |
* Solves bug when Base64 tries to decode an array
|
188 |
|
4 |
Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual,responsive
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 1.7.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
123 |
= How can I include Rotating Tweets in my template? =
|
124 |
Try something like:
|
125 |
`<?php echo do_shortcode( "[rotatingtweets screen_name='your_twitter']" ) ?>`
|
126 |
+
A common mistake with `do_shortcode` shortcodes is to use single-quotes or double-quotes all the way through without 'escaping' them. This will normally break your site! It's best to use double-quotes to enclose the shortcode string and single-quotes inside the shortcode string (or vice-versa!).
|
127 |
|
128 |
= How can I pull information from two accounts into one widget =
|
129 |
The easiest way is to list more than one account in the 'Twitter name' box in the widget or use something like `screen_name='account1 account2'` in the shortcode.
|
180 |
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.
|
181 |
|
182 |
== Upgrade notice ==
|
183 |
+
= 1.7.9 =
|
184 |
+
* Fixing Tweet time/date display problems.
|
185 |
|
186 |
== Changelog ==
|
187 |
+
= 1.7.9 =
|
188 |
+
* Fixing Tweet timezone display problem
|
189 |
+
* Restoring Tweet time display by default for 'Official Twitter Guidelines (wide)'
|
190 |
+
* Extra CSS added to enable people to hide links (should they want to)
|
191 |
+
* Option to switch off JavaScript (for advanced users only)
|
192 |
+
|
193 |
= 1.7.8 =
|
194 |
* Solves bug when Base64 tries to decode an array
|
195 |
|
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
|
@@ -458,7 +458,7 @@ function rotatingtweets_timestamp_link($twitter_object,$timetype = 'default',$ta
|
|
458 |
$string .= rotatingtweets_contextualtime_short($tweettimestamp);
|
459 |
break;
|
460 |
case 'long':
|
461 |
-
$string .= date_i18n(get_option('time_format'),$tweettimestamp
|
462 |
break;
|
463 |
default:
|
464 |
$string .= ucfirst(rotatingtweets_contextualtime($tweettimestamp));
|
@@ -720,7 +720,8 @@ function rotatingtweets_option_show_cycle_version() {
|
|
720 |
$options = get_option('rotatingtweets-api-settings');
|
721 |
$choice = array(
|
722 |
1 => _x('Version 1 (default)','Version of JQuery Cycle','rotatingtweets'),
|
723 |
-
2 => _x('Version 2 (beta)','Version of JQuery Cycle','rotatingtweets')
|
|
|
724 |
);
|
725 |
echo "\n<select id='rotatingtweets_api_jquery_cycle_version_input' name='rotatingtweets-api-settings[jquery_cycle_version]'>";
|
726 |
if(!isset($options['jquery_cycle_version'])) $options['jquery_cycle_version'] = 1;
|
@@ -814,7 +815,7 @@ function rotatingtweets_api_validate($input) {
|
|
814 |
endif;
|
815 |
// Check 'jquery_cycle_version'
|
816 |
if(isset($input['jquery_cycle_version'])):
|
817 |
-
$options['jquery_cycle_version']=max(min(absint($input['jquery_cycle_version']),
|
818 |
else:
|
819 |
$options['jquery_cycle_version']=1;
|
820 |
endif;
|
@@ -1597,9 +1598,9 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
|
|
1597 |
$displayurl = substr($displayurl,0,$urllength)."…";
|
1598 |
endif;
|
1599 |
if(isset($args['show_tco_link']) && $args['show_tco_link']):
|
1600 |
-
$after[] = "<a href='".$url['url']."' title='".$url['expanded_url']."'".$targetvalue.">".esc_html($url['url'])."</a>";
|
1601 |
else:
|
1602 |
-
$after[] = "<a href='".$url['url']."' title='".$url['expanded_url']."'".$targetvalue.">".esc_html($displayurl)."</a>";
|
1603 |
endif;
|
1604 |
endforeach;
|
1605 |
endif;
|
@@ -1608,7 +1609,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
|
|
1608 |
$media_data = $media[0];
|
1609 |
if(isset($args['show_media']) && $args['show_media']):
|
1610 |
$alt = esc_html(trim(str_replace($media_data['url'],'',strip_tags($main_text))));
|
1611 |
-
$show_media = "<a href='{$media_data['url']}' title='{$alt}'><img src='{$media_data['media_url_https']}' alt='{$alt}' /></a>";
|
1612 |
endif;
|
1613 |
else:
|
1614 |
unset($media);
|
@@ -1622,7 +1623,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
|
|
1622 |
$displayurl = str_replace(json_decode('"\u2026"'),"",$displayurl);
|
1623 |
$displayurl = substr($displayurl,0,$urllength)."…";
|
1624 |
endif;
|
1625 |
-
$after[] = "<a href='".$medium['url']."' title='".$medium['expanded_url']."'".$targetvalue.">".esc_html($displayurl)."</a>";
|
1626 |
endforeach;
|
1627 |
endif;
|
1628 |
// $before[]="%#([0-9]*[\p{L}a-zA-Z_]+\w*)%";
|
@@ -1766,7 +1767,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
|
|
1766 |
$result .= "\n\t\t<div class='rtw_wide'>";
|
1767 |
$result .= "\n\t\t<div class='rtw_wide_icon'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'icon',$targetvalue)."</div>";
|
1768 |
$result .= "\n\t\t<div class='rtw_wide_block'><div class='rtw_info'>";
|
1769 |
-
if($args['show_meta_timestamp']
|
1770 |
$result .= "\n\t\t\t<div class='rtw_time_short'>".rotatingtweets_timestamp_link($twitter_object,'short',$targetvalue).'</div>';
|
1771 |
endif;
|
1772 |
$result .= "\n\t\t\t<div class='rtw_name'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'name',$targetvalue)."</div>";
|
@@ -2034,6 +2035,7 @@ function rotatingtweets_enqueue_scripts() {
|
|
2034 |
}
|
2035 |
# Check if we're using jQuery Cycle 1 or 2
|
2036 |
$api = get_option('rotatingtweets-api-settings');
|
|
|
2037 |
if(!isset($api['js_in_footer'])) $api['js_in_footer'] = FALSE;
|
2038 |
$style = trim(strtolower(get_stylesheet()));
|
2039 |
$rt_data = get_plugin_data( __FILE__ );
|
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.9
|
6 |
Text Domain: rotatingtweets
|
7 |
Author: Martin Tod
|
8 |
Author URI: http://www.martintod.org.uk
|
458 |
$string .= rotatingtweets_contextualtime_short($tweettimestamp);
|
459 |
break;
|
460 |
case 'long':
|
461 |
+
$string .= date_i18n(get_option('time_format'),$tweettimestamp )." · ".date_i18n(get_option('date_format') ,$tweettimestamp );
|
462 |
break;
|
463 |
default:
|
464 |
$string .= ucfirst(rotatingtweets_contextualtime($tweettimestamp));
|
720 |
$options = get_option('rotatingtweets-api-settings');
|
721 |
$choice = array(
|
722 |
1 => _x('Version 1 (default)','Version of JQuery Cycle','rotatingtweets'),
|
723 |
+
2 => _x('Version 2 (beta)','Version of JQuery Cycle','rotatingtweets'),
|
724 |
+
3 => _x('None (advanced users who wish to use their own JavaScript only)','Version of JQuery Cycle','rotatingtweets')
|
725 |
);
|
726 |
echo "\n<select id='rotatingtweets_api_jquery_cycle_version_input' name='rotatingtweets-api-settings[jquery_cycle_version]'>";
|
727 |
if(!isset($options['jquery_cycle_version'])) $options['jquery_cycle_version'] = 1;
|
815 |
endif;
|
816 |
// Check 'jquery_cycle_version'
|
817 |
if(isset($input['jquery_cycle_version'])):
|
818 |
+
$options['jquery_cycle_version']=max(min(absint($input['jquery_cycle_version']),3),1);
|
819 |
else:
|
820 |
$options['jquery_cycle_version']=1;
|
821 |
endif;
|
1598 |
$displayurl = substr($displayurl,0,$urllength)."…";
|
1599 |
endif;
|
1600 |
if(isset($args['show_tco_link']) && $args['show_tco_link']):
|
1601 |
+
$after[] = "<a href='".$url['url']."' title='".$url['expanded_url']."'".$targetvalue." class='rtw_url_link'>".esc_html($url['url'])."</a>";
|
1602 |
else:
|
1603 |
+
$after[] = "<a href='".$url['url']."' title='".$url['expanded_url']."'".$targetvalue." class='rtw_url_link'>".esc_html($displayurl)."</a>";
|
1604 |
endif;
|
1605 |
endforeach;
|
1606 |
endif;
|
1609 |
$media_data = $media[0];
|
1610 |
if(isset($args['show_media']) && $args['show_media']):
|
1611 |
$alt = esc_html(trim(str_replace($media_data['url'],'',strip_tags($main_text))));
|
1612 |
+
$show_media = "<a href='{$media_data['url']}' title='{$alt}'><img src='{$media_data['media_url_https']}' alt='{$alt}' class='rtw_media_image' /></a>";
|
1613 |
endif;
|
1614 |
else:
|
1615 |
unset($media);
|
1623 |
$displayurl = str_replace(json_decode('"\u2026"'),"",$displayurl);
|
1624 |
$displayurl = substr($displayurl,0,$urllength)."…";
|
1625 |
endif;
|
1626 |
+
$after[] = "<a href='".$medium['url']."' title='".$medium['expanded_url']."'".$targetvalue." class='rtw_media_link'>".esc_html($displayurl)."</a>";
|
1627 |
endforeach;
|
1628 |
endif;
|
1629 |
// $before[]="%#([0-9]*[\p{L}a-zA-Z_]+\w*)%";
|
1767 |
$result .= "\n\t\t<div class='rtw_wide'>";
|
1768 |
$result .= "\n\t\t<div class='rtw_wide_icon'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'icon',$targetvalue)."</div>";
|
1769 |
$result .= "\n\t\t<div class='rtw_wide_block'><div class='rtw_info'>";
|
1770 |
+
if($args['show_meta_timestamp'] || !isset($args['official_format_override']) || !$args['official_format_override'] ):
|
1771 |
$result .= "\n\t\t\t<div class='rtw_time_short'>".rotatingtweets_timestamp_link($twitter_object,'short',$targetvalue).'</div>';
|
1772 |
endif;
|
1773 |
$result .= "\n\t\t\t<div class='rtw_name'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'name',$targetvalue)."</div>";
|
2035 |
}
|
2036 |
# Check if we're using jQuery Cycle 1 or 2
|
2037 |
$api = get_option('rotatingtweets-api-settings');
|
2038 |
+
if(isset($api['jquery_cycle_version']) && $api['jquery_cycle_version']==3) return;
|
2039 |
if(!isset($api['js_in_footer'])) $api['js_in_footer'] = FALSE;
|
2040 |
$style = trim(strtolower(get_stylesheet()));
|
2041 |
$rt_data = get_plugin_data( __FILE__ );
|