Rotating Tweets (Twitter widget and shortcode) - Version 1.9.1

Version Description

Download this release

Release Info

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

Code changes from version 1.9 to 1.9.1

Files changed (2) hide show
  1. readme.txt +2 -2
  2. rotatingtweets.php +7 -7
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.7
7
- Stable tag: 1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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
 
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
6
  Text Domain: rotatingtweets
7
  Domain Path: /languages
8
  Author: Martin Tod
@@ -431,11 +431,11 @@ function rotatingtweets_intents($twitter_object,$lang, $icons = 1,$targetvalue='
431
  $string = "\n\t\t\t<a href='".$type['link'].$twitter_object['id_str']."' title='".esc_attr($type['text'])."' lang='{$lang}'{$targetvalue}>";
432
  switch($icons) {
433
  case 2:
434
- $addstring[] = $string."<img src='".plugins_url($type['icon'],__FILE__)."' width='16' height='16' alt='".esc_attr($type['text'])."' /> {$type['text']}</a>";
435
  $glue = ' ';
436
  break;
437
  case 1:
438
- $addstring[] = $string."<img src='".plugins_url($type['icon'],__FILE__)."' width='16' height='16' alt='".esc_attr($type['text'])."' /></a>";
439
  $glue = '';
440
  break;
441
  case 0:
@@ -482,7 +482,7 @@ function rotatingtweets_user_intent($person,$lang,$linkcontent,$targetvalue='',$
482
  break;
483
  case 'blue_bird':
484
  $return = "<a href='https://twitter.com/intent/user?user_id={$person['id']}' title='".esc_attr(sprintf(__('Follow @%s','rotatingtweets'),$person['name']))."' lang='{$lang}'{$targetvalue}>";
485
- $return .= '<img src="'.plugins_url('images/bird_blue_32.png', __FILE__).'" class="twitter_icon" alt="'.__('Twitter','rotatingtweets').'" /></a>';
486
  break;
487
  default:
488
  $return .= strip_tags($linkcontent,'<img>')."</a>";
@@ -2027,7 +2027,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
2027
  switch( strtolower(trim($rt_display_element))):
2028
  case 'info':
2029
  $result .= "\n\t<div class='rtw_info'>";
2030
- $result .= "\n\t\t<div class='rtw_twitter_icon'><img src='".plugins_url('images/twitter-bird-16x16.png', __FILE__)."' width='16' height='16' alt='".__('Twitter','rotatingtweets')."' /></div>";
2031
  $result .= "\n\t\t<div class='rtw_icon'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'icon',$targetvalue,$iconsize)."</div>";
2032
  $result .= "\n\t\t<div class='rtw_name'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'name',$targetvalue)."</div>";
2033
  $result .= "\n\t\t<div class='rtw_id'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'screen_name',$targetvalue)."</div>";
@@ -2089,7 +2089,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
2089
  // $result .= "\n\t\t<div class='rtw_meta'><div class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 1).'</div>';
2090
  case 'meta':
2091
  if(isset($retweeter)) {
2092
- $result .= "\n\t\t<div class='rtw_rt_meta'>".rotatingtweets_user_intent($retweeter,$twitterlocale,"<img src='".plugins_url('images/retweet_on.png',__FILE__)."' width='16' height='16' alt='".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter['name'])."' />".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter['name']),$targetvalue)."</div>";
2093
  }
2094
  if($args['show_meta_reply_retweet_favorite'] || !isset($args['official_format_override']) || !$args['official_format_override'] || $args['displaytype']=='widget' || (isset($args['show_meta_prev_next']) && $args['show_meta_prev_next'] && $args['np_pos']=='tweets') ):
2095
  $result .= "\n\t\t<div class='rtw_meta'><span class='rtw_expand' style='display:none;'>".__('Expand','rotatingtweets')."</span><span class='rtw_intents'>";
@@ -2136,7 +2136,7 @@ function rotating_tweets_display($json,$args,$print=FALSE) {
2136
  break;
2137
  case 5:
2138
  # This is an adjusted Rotating Tweets display routine
2139
- $result .= "\n\t\t<p class='rtw_main'><img src='".plugins_url('images/bird_16_black.png', __FILE__)."' alt='Twitter' />&nbsp;&nbsp; $main_text ";
2140
  $meta = '';
2141
  if($args['show_meta_timestamp']):
2142
  $meta .= rotatingtweets_timestamp_link($twitter_object,'default',$targetvalue);
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
431
  $string = "\n\t\t\t<a href='".$type['link'].$twitter_object['id_str']."' title='".esc_attr($type['text'])."' lang='{$lang}'{$targetvalue}>";
432
  switch($icons) {
433
  case 2:
434
+ $addstring[] = $string."<img src='".plugin_dir_url( __FILE__ ).$type['icon']."' width='16' height='16' alt='".esc_attr($type['text'])."' /> {$type['text']}</a>";
435
  $glue = ' ';
436
  break;
437
  case 1:
438
+ $addstring[] = $string."<img src='".plugin_dir_url( __FILE__ ).$type['icon']."' width='16' height='16' alt='".esc_attr($type['text'])."' /></a>";
439
  $glue = '';
440
  break;
441
  case 0:
482
  break;
483
  case 'blue_bird':
484
  $return = "<a href='https://twitter.com/intent/user?user_id={$person['id']}' title='".esc_attr(sprintf(__('Follow @%s','rotatingtweets'),$person['name']))."' lang='{$lang}'{$targetvalue}>";
485
+ $return .= '<img src="'.plugin_dir_url( __FILE__ ).'images/bird_blue_32.png" class="twitter_icon" alt="'.__('Twitter','rotatingtweets').'" /></a>';
486
  break;
487
  default:
488
  $return .= strip_tags($linkcontent,'<img>')."</a>";
2027
  switch( strtolower(trim($rt_display_element))):
2028
  case 'info':
2029
  $result .= "\n\t<div class='rtw_info'>";
2030
+ $result .= "\n\t\t<div class='rtw_twitter_icon'><img src='".plugin_dir_url( __FILE__ )."images/twitter-bird-16x16.png' width='16' height='16' alt='".__('Twitter','rotatingtweets')."' /></div>";
2031
  $result .= "\n\t\t<div class='rtw_icon'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'icon',$targetvalue,$iconsize)."</div>";
2032
  $result .= "\n\t\t<div class='rtw_name'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'name',$targetvalue)."</div>";
2033
  $result .= "\n\t\t<div class='rtw_id'>".rotatingtweets_user_intent($tweetuser,$twitterlocale,'screen_name',$targetvalue)."</div>";
2089
  // $result .= "\n\t\t<div class='rtw_meta'><div class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 1).'</div>';
2090
  case 'meta':
2091
  if(isset($retweeter)) {
2092
+ $result .= "\n\t\t<div class='rtw_rt_meta'>".rotatingtweets_user_intent($retweeter,$twitterlocale,"<img src='".plugin_dir_url( __FILE__ )."images/retweet_on.png' width='16' height='16' alt='".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter['name'])."' />".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter['name']),$targetvalue)."</div>";
2093
  }
2094
  if($args['show_meta_reply_retweet_favorite'] || !isset($args['official_format_override']) || !$args['official_format_override'] || $args['displaytype']=='widget' || (isset($args['show_meta_prev_next']) && $args['show_meta_prev_next'] && $args['np_pos']=='tweets') ):
2095
  $result .= "\n\t\t<div class='rtw_meta'><span class='rtw_expand' style='display:none;'>".__('Expand','rotatingtweets')."</span><span class='rtw_intents'>";
2136
  break;
2137
  case 5:
2138
  # This is an adjusted Rotating Tweets display routine
2139
+ $result .= "\n\t\t<p class='rtw_main'><img src='".plugin_dir_url( __FILE__ )."images/bird_16_black.png' alt='Twitter' />&nbsp;&nbsp; $main_text ";
2140
  $meta = '';
2141
  if($args['show_meta_timestamp']):
2142
  $meta .= rotatingtweets_timestamp_link($twitter_object,'default',$targetvalue);