Rotating Tweets (Twitter widget and shortcode) - Version 1.9.2

Version Description

  • New shortcode option: auto_height=0

=

Download this release

Release Info

Developer mpntod
Plugin Icon wp plugin Rotating Tweets (Twitter widget and shortcode)
Version 1.9.2
Comparing to
See all releases

Code changes from version 1.9.1 to 1.9.2

Files changed (2) hide show
  1. readme.txt +11 -4
  2. rotatingtweets.php +9 -3
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mpntod
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9XCNM4QSVHYT8
4
  Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual,responsive,page builder,do not track,dnt
5
  Requires at least: 3.2
6
- Tested up to: 4.8.1
7
- Stable tag: 1.9.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -92,6 +92,7 @@ Possible variables for the shortcode include:
92
  * `profile_image_size` = `'normal'`, `'bigger'`, `'mini'` or `'original'` - lets you change the size of profile images - default is `'normal'`
93
  * `shuffle` = `'0'` or `'1'` - shuffle the order that Tweets display - default is `'0'`
94
  * `merge_cache` = `'0'` or `'1'` - switches caching of searches on or off - default is `'1'` (i.e. on)
 
95
 
96
  * **Caching**
97
  * `w3tc_render_to` = 'your_choice_of_random_string' - used to support 'fragment caching' by [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/). For this to work, you also need to ensure that `W3TC_DYNAMIC_SECURITY` is defined in your `wp-config.php` file and that you are not using 'HTTP Compression' on the W3 Total Cache 'Browser Cache' settings page or 'Enhanced Disk caching' on the W3 Total Cache 'Page Cache' settings page.
@@ -186,10 +187,16 @@ into your CSS - changing `123px;` to the width you're aiming at - either via put
186
  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.
187
 
188
  == Upgrade notice ==
189
- = 1.9 =
190
- * Supports the [new longer Tweet format](https://dev.twitter.com/overview/api/upcoming-changes-to-tweets)
191
 
192
  == Changelog ==
 
 
 
 
 
 
193
  = 1.9 =
194
  * Supports the [new longer Tweet format](https://dev.twitter.com/overview/api/upcoming-changes-to-tweets)
195
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9XCNM4QSVHYT8
4
  Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual,responsive,page builder,do not track,dnt
5
  Requires at least: 3.2
6
+ Tested up to: 4.8.2
7
+ Stable tag: 1.9.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
92
  * `profile_image_size` = `'normal'`, `'bigger'`, `'mini'` or `'original'` - lets you change the size of profile images - default is `'normal'`
93
  * `shuffle` = `'0'` or `'1'` - shuffle the order that Tweets display - default is `'0'`
94
  * `merge_cache` = `'0'` or `'1'` - switches caching of searches on or off - default is `'1'` (i.e. on)
95
+ * `auto_height` = `'0'` or `'1'` - switches auto-height calculation of the Rotating Tweets container on or off - default is `'1'` (i.e. on)
96
 
97
  * **Caching**
98
  * `w3tc_render_to` = 'your_choice_of_random_string' - used to support 'fragment caching' by [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/). For this to work, you also need to ensure that `W3TC_DYNAMIC_SECURITY` is defined in your `wp-config.php` file and that you are not using 'HTTP Compression' on the W3 Total Cache 'Browser Cache' settings page or 'Enhanced Disk caching' on the W3 Total Cache 'Page Cache' settings page.
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.9.2 =
191
+ * New shortcode option: `auto_height=0`
192
 
193
  == Changelog ==
194
+ = 1.9.2 =
195
+ * New shortcode option: `auto_height=0` - to switch off height calculation
196
+
197
+ = 1.9.1 =
198
+ * Improved support for SSL
199
+
200
  = 1.9 =
201
  * Supports the [new longer Tweet format](https://dev.twitter.com/overview/api/upcoming-changes-to-tweets)
202
 
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.9.1
6
  Text Domain: rotatingtweets
7
  Domain Path: /languages
8
  Author: Martin Tod
@@ -627,7 +627,8 @@ function rotatingtweets_display_shortcode( $atts, $content=null, $code="", $prin
627
  'shuffle'=>0,
628
  'merge_cache'=>TRUE,
629
  'rtw_display_order'=>'info,main,media,meta',
630
- 'collection' => FALSE
 
631
  ), $atts, 'rotatingtweets' ) ;
632
  extract($args);
633
  if(empty($screen_name) && empty($search) && !empty($url) && empty($collection)):
@@ -1542,6 +1543,11 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
1542
  $rt_cache_delay = rotatingtweets_get_cache_delay();
1543
  $tweet_count = max(1,intval($args['tweet_count']));
1544
  $timeout = max(intval($args['timeout']),0);
 
 
 
 
 
1545
  $defaulturllength = 29;
1546
  if(isset($args['url_length'])):
1547
  $urllength = intval($args['url_length']);
@@ -1602,7 +1608,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
1602
  # Now set all the version 2 options
1603
  $v2string = '';
1604
  $v2options = array(
1605
- 'auto-height' => 'calc',
1606
  'fx' => $rotation_type,
1607
  'pause-on-hover' => 'true',
1608
  'timeout' => $timeout,
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.9.2
6
  Text Domain: rotatingtweets
7
  Domain Path: /languages
8
  Author: Martin Tod
627
  'shuffle'=>0,
628
  'merge_cache'=>TRUE,
629
  'rtw_display_order'=>'info,main,media,meta',
630
+ 'collection' => FALSE,
631
+ 'auto_height' => 'calc'
632
  ), $atts, 'rotatingtweets' ) ;
633
  extract($args);
634
  if(empty($screen_name) && empty($search) && !empty($url) && empty($collection)):
1543
  $rt_cache_delay = rotatingtweets_get_cache_delay();
1544
  $tweet_count = max(1,intval($args['tweet_count']));
1545
  $timeout = max(intval($args['timeout']),0);
1546
+ if( isset($args['auto_height']) && strtolower($args['auto_height']) != "calc" && $args['auto_height'] != 1 ):
1547
+ $auto_height = -1;
1548
+ else:
1549
+ $auto_height = "calc";
1550
+ endif;
1551
  $defaulturllength = 29;
1552
  if(isset($args['url_length'])):
1553
  $urllength = intval($args['url_length']);
1608
  # Now set all the version 2 options
1609
  $v2string = '';
1610
  $v2options = array(
1611
+ 'auto-height' => $auto_height,
1612
  'fx' => $rotation_type,
1613
  'pause-on-hover' => 'true',
1614
  'timeout' => $timeout,