Version Description
- Fixing bug for PHP installations that don't support the 'u' modifier. Renaming v2 JavaScript to avoid clash with other plug-ins.
=
Download this release
Release Info
Developer | mpntod |
Plugin | Rotating Tweets (Twitter widget and shortcode) |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- readme.txt +8 -3
- rotatingtweets.php +47 -6
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: 3.6
|
7 |
-
Stable tag: 1.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -162,10 +162,15 @@ into your CSS - changing `123px;` to the width you're aiming at - either via put
|
|
162 |
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.
|
163 |
|
164 |
== Upgrade notice ==
|
165 |
-
= 1.6.
|
166 |
-
*
|
167 |
|
168 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
169 |
= 1.6.1 =
|
170 |
* Move to a more unique class name to avoid clashes with another template.
|
171 |
|
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: 3.6
|
7 |
+
Stable tag: 1.6.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
162 |
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.
|
163 |
|
164 |
== Upgrade notice ==
|
165 |
+
= 1.6.2 =
|
166 |
+
* Fixing bug for PHP installations that don't support the 'u' modifier. Renaming v2 JavaScript to avoid clash with other plug-ins.
|
167 |
|
168 |
== Changelog ==
|
169 |
+
= 1.6.2 =
|
170 |
+
* Fixing bug for PHP installations that don't support the 'u' modifier
|
171 |
+
* Renaming v2 JavaScript to avoid clash with other plug-ins.
|
172 |
+
* Extra diagnostics put in to solve regular expression problem
|
173 |
+
|
174 |
= 1.6.1 =
|
175 |
* Move to a more unique class name to avoid clashes with another template.
|
176 |
|
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.6.
|
6 |
Text Domain: rotatingtweets
|
7 |
Author: Martin Tod
|
8 |
Author URI: http://www.martintod.org.uk
|
@@ -1376,9 +1376,50 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
|
|
1376 |
# This is designed to find hashtags and turn them into links...
|
1377 |
$before[]="%#\b(\d*[^\d\s[:punct:]]+[^\s[:punct:]]*)%u";
|
1378 |
$after[]='<a href="http://twitter.com/search?q=%23$1&src=hash" title="#$1"'.$targetvalue.'>#$1</a>';
|
1379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1380 |
if(isset($args['link_all_text']) && $args['link_all_text']):
|
1381 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1382 |
endif;
|
1383 |
# Now for the meta text
|
1384 |
switch ($args['official_format']) {
|
@@ -1619,9 +1660,9 @@ function rotatingtweets_enqueue_scripts() {
|
|
1619 |
'jquery-easing' => 'http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js',
|
1620 |
*/
|
1621 |
$rt_enqueue_script_list = array(
|
1622 |
-
'jquery-cycle2' => plugins_url('js/jquery.cycle2.renamed.js', __FILE__),
|
1623 |
-
'jquery-cycle2-scrollvert' => plugins_url('js/jquery.cycle2.scrollVert.renamed.js', __FILE__),
|
1624 |
-
'jquery-cycle2-carousel' => plugins_url('js/jquery.cycle2.carousel.renamed.js', __FILE__),
|
1625 |
'rotating_tweet' => plugins_url('js/rotatingtweets_v2.js', __FILE__)
|
1626 |
);
|
1627 |
// $dependence[]='jquery-effects-core';
|
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.6.2
|
6 |
Text Domain: rotatingtweets
|
7 |
Author: Martin Tod
|
8 |
Author URI: http://www.martintod.org.uk
|
1376 |
# This is designed to find hashtags and turn them into links...
|
1377 |
$before[]="%#\b(\d*[^\d\s[:punct:]]+[^\s[:punct:]]*)%u";
|
1378 |
$after[]='<a href="http://twitter.com/search?q=%23$1&src=hash" title="#$1"'.$targetvalue.'>#$1</a>';
|
1379 |
+
if( defined('DB_CHARSET') && strtoupper(DB_CHARSET) !='UTF-8' && strtoupper(DB_CHARSET)!= 'UTF8'):
|
1380 |
+
$new_text = iconv("UTF-8",DB_CHARSET . '//TRANSLIT',$main_text);
|
1381 |
+
if(empty($main_text)):
|
1382 |
+
if(WP_DEBUG):
|
1383 |
+
echo "<!-- iconv to ".DB_CHARSET." failed -->";
|
1384 |
+
endif;
|
1385 |
+
else:
|
1386 |
+
$main_text = $new_text;
|
1387 |
+
endif;
|
1388 |
+
endif;
|
1389 |
+
$new_text = preg_replace($before,$after,$main_text);
|
1390 |
+
if(empty($new_text)):
|
1391 |
+
if(WP_DEBUG):
|
1392 |
+
echo "<!-- preg_replace failed -->";
|
1393 |
+
endif;
|
1394 |
+
array_pop($before);
|
1395 |
+
$before[]="%#\b(\d*[^\d\s[:punct:]]+[^\s[:punct:]]*)%";
|
1396 |
+
$new_text = preg_replace($before,$after,$main_text);
|
1397 |
+
if(empty($new_text)):
|
1398 |
+
if(WP_DEBUG):
|
1399 |
+
echo "<!-- simplified preg_replace failed -->";
|
1400 |
+
endif;
|
1401 |
+
else:
|
1402 |
+
$main_text = $new_text;
|
1403 |
+
endif;
|
1404 |
+
else:
|
1405 |
+
$main_text = $new_text;
|
1406 |
+
endif;
|
1407 |
if(isset($args['link_all_text']) && $args['link_all_text']):
|
1408 |
+
$new_text = rotatingtweets_user_intent($tweetuser,$twitterlocale,$main_text,$targetvalue);
|
1409 |
+
if(empty($new_text)):
|
1410 |
+
if(WP_DEBUG):
|
1411 |
+
echo "<!-- linking all text failed -->";
|
1412 |
+
endif;
|
1413 |
+
else:
|
1414 |
+
$main_text = $new_text;
|
1415 |
+
endif;
|
1416 |
+
endif;
|
1417 |
+
// Attempt to deal with a very odd situation where no text is appearing
|
1418 |
+
if(empty($main_text)):
|
1419 |
+
if(WP_DEBUG):
|
1420 |
+
echo "<!-- Main Text Empty - Debug Data: \n";print_r($before);print_r($after);print_r($args);echo "\n-->\n";
|
1421 |
+
endif;
|
1422 |
+
$main_text = $twitter_object['text'];
|
1423 |
endif;
|
1424 |
# Now for the meta text
|
1425 |
switch ($args['official_format']) {
|
1660 |
'jquery-easing' => 'http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js',
|
1661 |
*/
|
1662 |
$rt_enqueue_script_list = array(
|
1663 |
+
'jquery-cycle2-renamed' => plugins_url('js/jquery.cycle2.renamed.js', __FILE__),
|
1664 |
+
'jquery-cycle2-scrollvert-renamed' => plugins_url('js/jquery.cycle2.scrollVert.renamed.js', __FILE__),
|
1665 |
+
'jquery-cycle2-carousel-renamed' => plugins_url('js/jquery.cycle2.carousel.renamed.js', __FILE__),
|
1666 |
'rotating_tweet' => plugins_url('js/rotatingtweets_v2.js', __FILE__)
|
1667 |
);
|
1668 |
// $dependence[]='jquery-effects-core';
|