Recent Tweets Widget - Version 1.6.8

Version Description

Add translation support.

Download this release

Release Info

Developer grimmdude
Plugin Icon 128x128 Recent Tweets Widget
Version 1.6.8
Comparing to
See all releases

Code changes from version 1.6.7 to 1.6.8

languages/recent-tweets-widget-fr_FR.mo ADDED
Binary file
languages/recent-tweets-widget-fr_FR.po ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2017-10-09 21:28-0700\n"
5
+ "PO-Revision-Date: 2017-10-09 21:28-0700\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "Language: fr\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.0.4\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
+ "X-Poedit-KeywordsList: _e;__\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ #: recent-tweets.php:87 settings.php:16
19
+ msgid "Looking for more sharing tools?"
20
+ msgstr ""
21
+
22
+ #: settings.php:21
23
+ msgid "Adding the Widget"
24
+ msgstr ""
25
+
26
+ #: settings.php:25
27
+ msgid "Fill all your widget settings."
28
+ msgstr ""
29
+
30
+ #: settings.php:26
31
+ msgid "Enjoy your new Twitter feed! :)"
32
+ msgstr ""
33
+
34
+ #: settings.php:37
35
+ msgid "Show our link below the widget. Pretty please."
36
+ msgstr ""
37
+
38
+ #: settings.php:45
39
+ msgid "Signup for a free 30 day course to DOUBLE YOUR EMAIL LIST"
40
+ msgstr ""
41
+
42
+ #: settings.php:48
43
+ msgid "Type Your Email Address"
44
+ msgstr ""
45
+
46
+ #: settings.php:51
47
+ msgid "Let me in!"
48
+ msgstr ""
49
+
50
+ #: widget.php:10
51
+ msgid "Display recent tweets"
52
+ msgstr ""
53
+
54
+ #: widget.php:26
55
+ msgid "Please fill all widget settings!"
56
+ msgstr ""
57
+
58
+ #: widget.php:39
59
+ msgid "Couldn't find twitteroauth.php!"
60
+ msgstr ""
61
+
62
+ #: widget.php:55
63
+ msgid ""
64
+ "You'll need to regenerate it <a href=\"https://apps.twitter.com/\" target="
65
+ "\"_blank\">here</a>!"
66
+ msgstr ""
67
+
68
+ #: widget.php:115
69
+ msgid "<b>Error!</b> Couldn't retrieve tweets for some reason!"
70
+ msgstr ""
71
+
72
+ #: widget.php:154
73
+ msgid "Title:"
74
+ msgstr ""
75
+
76
+ #: widget.php:156
77
+ msgid "Consumer Key:"
78
+ msgstr ""
79
+
80
+ #: widget.php:158
81
+ msgid "Consumer Secret:"
82
+ msgstr ""
83
+
84
+ #: widget.php:160
85
+ msgid "Access Token:"
86
+ msgstr ""
87
+
88
+ #: widget.php:162
89
+ msgid "Access Token Secret:"
90
+ msgstr ""
91
+
92
+ #: widget.php:164
93
+ msgid "Cache Tweets in every:"
94
+ msgstr ""
95
+
96
+ #: widget.php:166
97
+ msgid "Twitter Username:"
98
+ msgstr ""
99
+
100
+ #: widget.php:168
101
+ msgid "Tweets to display:"
102
+ msgstr ""
103
+
104
+ #: widget.php:176
105
+ msgid "Exclude replies:"
106
+ msgstr ""
107
+
108
+ #: widget.php:228
109
+ msgid "right now"
110
+ msgstr ""
111
+
112
+ #: widget.php:230
113
+ msgid " seconds ago"
114
+ msgstr ""
115
+
116
+ #: widget.php:232
117
+ msgid "about 1 minute ago"
118
+ msgstr ""
119
+
120
+ #: widget.php:234
121
+ msgid " minutes ago"
122
+ msgstr ""
123
+
124
+ #: widget.php:236
125
+ msgid "about 1 hour ago"
126
+ msgstr ""
127
+
128
+ #: widget.php:238
129
+ msgid " hours ago"
130
+ msgstr ""
131
+
132
+ #: widget.php:240
133
+ msgid "yesterday"
134
+ msgstr ""
135
+
136
+ #: widget.php:242
137
+ msgid " days ago"
138
+ msgstr ""
139
+
140
+ #: widget.php:244
141
+ msgid "over a year ago"
142
+ msgstr ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: noahkagan
3
  Tags: recent tweets, twitter widget, twitter api v1.1, cache, twitter, tweets, social media
4
  Requires at least: 3.4.1
5
- Tested up to: 4.7
6
- Stable tag: 1.6.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -37,6 +37,9 @@ You will need to visit [https://apps.twitter.com/](https://apps.twitter.com/ "Tw
37
  2. How it looks on frontend page
38
 
39
  == Changelog ==
 
 
 
40
  = 1.6.7 =
41
  Minor widget CSS change.
42
 
2
  Contributors: noahkagan
3
  Tags: recent tweets, twitter widget, twitter api v1.1, cache, twitter, tweets, social media
4
  Requires at least: 3.4.1
5
+ Tested up to: 4.8
6
+ Stable tag: 1.6.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
37
  2. How it looks on frontend page
38
 
39
  == Changelog ==
40
+ = 1.6.8 =
41
+ Add translation support.
42
+
43
  = 1.6.7 =
44
  Minor widget CSS change.
45
 
recent-tweets.php CHANGED
@@ -4,9 +4,10 @@
4
  Plugin Name: Recent Tweets Widget
5
  Plugin URI: http://wordpress.org/extend/plugins/recent-tweets-widget/
6
  Description: Recent Tweets Widget plugin for Twitter API v1.1 with Cache. It uses the new Twitter API v1.1 and stores tweets in the cache. It means that it will read status messages from your database and it doesn't query Twitter.com for every page load so you won't be rate limited. You can set how often you want to update the cache.
7
- Version: 1.6.7
8
  Author: Noah Kagan
9
  Author URI: http://sumome.com
 
10
  */
11
 
12
  //error_reporting(E_ALL);
@@ -19,6 +20,7 @@ if ( !function_exists( 'add_action' ) ) {
19
  }
20
 
21
  define('TP_RECENT_TWEETS_PATH', plugin_dir_url( __FILE__ ));
 
22
 
23
  //register stylesheet for widget
24
  function tp_twitter_plugin_styles() {
@@ -95,3 +97,9 @@ function tp_twitter_plugin_deactivate() {
95
  delete_option('tp_twitter_global_notification');
96
  }
97
  register_deactivation_hook( __FILE__, 'tp_twitter_plugin_deactivate' );
 
 
 
 
 
 
4
  Plugin Name: Recent Tweets Widget
5
  Plugin URI: http://wordpress.org/extend/plugins/recent-tweets-widget/
6
  Description: Recent Tweets Widget plugin for Twitter API v1.1 with Cache. It uses the new Twitter API v1.1 and stores tweets in the cache. It means that it will read status messages from your database and it doesn't query Twitter.com for every page load so you won't be rate limited. You can set how often you want to update the cache.
7
+ Version: 1.6.8
8
  Author: Noah Kagan
9
  Author URI: http://sumome.com
10
+ Text Domain: recent-tweets-widget
11
  */
12
 
13
  //error_reporting(E_ALL);
20
  }
21
 
22
  define('TP_RECENT_TWEETS_PATH', plugin_dir_url( __FILE__ ));
23
+ define('TP_RECENT_TEXT_DOMAIN', 'recent-tweets-widget');
24
 
25
  //register stylesheet for widget
26
  function tp_twitter_plugin_styles() {
97
  delete_option('tp_twitter_global_notification');
98
  }
99
  register_deactivation_hook( __FILE__, 'tp_twitter_plugin_deactivate' );
100
+
101
+
102
+ function tp_twitter_plugin_load_plugin_textdomain() {
103
+ load_plugin_textdomain( TP_RECENT_TEXT_DOMAIN, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
104
+ }
105
+ add_action( 'plugins_loaded', 'tp_twitter_plugin_load_plugin_textdomain' );
settings.php CHANGED
@@ -18,12 +18,12 @@ if (array_key_exists('tp_twitter_global_notification', $_GET) && $_GET['tp_twitt
18
  </div>
19
  <?php screen_icon(); ?>
20
  <h2>Recent Tweets</h2>
21
- <h3>Adding the Widget</h3>
22
  <ol>
23
  <li><a href="<?php echo admin_url('widgets.php'); ?>" target="_blank">Go to your Widgets menu</a>, add the <code>Recent Tweets</code> widget to a widget area.</li>
24
  <li>Visit <a href="https://apps.twitter.com/">https://apps.twitter.com/</a>, sign in with your account, click on <code>Create New App</code> and create your own keys if you haven't already.</li>
25
- <li>Fill all your widget settings.</li>
26
- <li>Enjoy your new Twitter feed! :)</li>
27
  </ol>
28
  <form method="post" action="options.php">
29
  <?php settings_fields( 'tp_twitter_plugin_options' ); ?>
@@ -34,7 +34,7 @@ if (array_key_exists('tp_twitter_global_notification', $_GET) && $_GET['tp_twitt
34
  <option value="1" <?php echo is_array($tp_twitter_plugin_options) && $tp_twitter_plugin_options['support-us'] == '1' ? 'selected="selected"' : ''; ?>>Yes</option>
35
  <option value="0" <?php echo !is_array($tp_twitter_plugin_options) || $tp_twitter_plugin_options['support-us'] != '1' ? 'selected="selected"' : ''; ?>>No</option>
36
  </select>
37
- <p>Show our link below the widget. Pretty please.</p>
38
  </td>
39
 
40
  </tr>
@@ -42,13 +42,13 @@ if (array_key_exists('tp_twitter_global_notification', $_GET) && $_GET['tp_twitt
42
  <?php submit_button(); ?>
43
  </form>
44
 
45
- <h3>Signup for a free 30 day course to DOUBLE YOUR EMAIL LIST</h3>
46
  <form method="post" class="af-form-wrapper" action="http://www.aweber.com/scripts/addlead.pl" target="_blank">
47
  <p>
48
- <input placeholder="Type Your Email Address" class="email" name="email" autofocus style="width:200px;" />
49
  </p>
50
  <p>
51
- <button class="button button-primary">Let me in!</button>
52
  </p>
53
 
54
  <input type="hidden" name="meta_web_form_id" value="1747290999" />
18
  </div>
19
  <?php screen_icon(); ?>
20
  <h2>Recent Tweets</h2>
21
+ <h3><?php _e('Adding the Widget', TP_RECENT_TEXT_DOMAIN); ?></h3>
22
  <ol>
23
  <li><a href="<?php echo admin_url('widgets.php'); ?>" target="_blank">Go to your Widgets menu</a>, add the <code>Recent Tweets</code> widget to a widget area.</li>
24
  <li>Visit <a href="https://apps.twitter.com/">https://apps.twitter.com/</a>, sign in with your account, click on <code>Create New App</code> and create your own keys if you haven't already.</li>
25
+ <li><?php _e('Fill all your widget settings.', TP_RECENT_TEXT_DOMAIN); ?></li>
26
+ <li><?php _e('Enjoy your new Twitter feed! :)', TP_RECENT_TEXT_DOMAIN); ?></li>
27
  </ol>
28
  <form method="post" action="options.php">
29
  <?php settings_fields( 'tp_twitter_plugin_options' ); ?>
34
  <option value="1" <?php echo is_array($tp_twitter_plugin_options) && $tp_twitter_plugin_options['support-us'] == '1' ? 'selected="selected"' : ''; ?>>Yes</option>
35
  <option value="0" <?php echo !is_array($tp_twitter_plugin_options) || $tp_twitter_plugin_options['support-us'] != '1' ? 'selected="selected"' : ''; ?>>No</option>
36
  </select>
37
+ <p><?php _e('Show our link below the widget. Pretty please.', TP_RECENT_TEXT_DOMAIN); ?></p>
38
  </td>
39
 
40
  </tr>
42
  <?php submit_button(); ?>
43
  </form>
44
 
45
+ <h3><?php _e('Signup for a free 30 day course to DOUBLE YOUR EMAIL LIST', TP_RECENT_TEXT_DOMAIN); ?></h3>
46
  <form method="post" class="af-form-wrapper" action="http://www.aweber.com/scripts/addlead.pl" target="_blank">
47
  <p>
48
+ <input placeholder="<?php _e('Type Your Email Address', TP_RECENT_TEXT_DOMAIN); ?>" class="email" name="email" autofocus style="width:200px;" />
49
  </p>
50
  <p>
51
+ <button class="button button-primary"><?php _e('Let me in!', TP_RECENT_TEXT_DOMAIN); ?></button>
52
  </p>
53
 
54
  <input type="hidden" name="meta_web_form_id" value="1747290999" />
widget.php CHANGED
@@ -7,7 +7,7 @@
7
  parent::__construct(
8
  'tp_widget_recent_tweets', // Base ID
9
  '* Recent Tweets', // Name
10
- array( 'description' => __( 'Display recent tweets', 'tp_tweets' ), ) // Args
11
  );
12
  }
13
 
@@ -23,7 +23,7 @@
23
 
24
  //check settings and die if not set
25
  if(empty($instance['consumerkey']) || empty($instance['consumersecret']) || empty($instance['accesstoken']) || empty($instance['accesstokensecret']) || empty($instance['cachetime']) || empty($instance['username'])){
26
- echo '<strong>'.__('Please fill all widget settings!','tp_tweets').'</strong>' . $after_widget;
27
  return;
28
  }
29
 
@@ -36,7 +36,7 @@
36
  if($diff >= $crt || empty($tp_twitter_plugin_last_cache_time)){
37
 
38
  if(!require_once('twitteroauth.php')){
39
- echo '<strong>'.__('Couldn\'t find twitteroauth.php!','tp_tweets').'</strong>' . $after_widget;
40
  return;
41
  }
42
 
@@ -52,7 +52,7 @@
52
 
53
  if(!empty($tweets->errors)){
54
  if($tweets->errors[0]->message == 'Invalid or expired token'){
55
- echo '<strong>'.$tweets->errors[0]->message.'!</strong><br />' . __('You\'ll need to regenerate it <a href="https://apps.twitter.com/" target="_blank">here</a>!','tp_tweets') . $after_widget;
56
  }else{
57
  echo '<strong>'.$tweets->errors[0]->message.'</strong>' . $after_widget;
58
  }
@@ -112,7 +112,7 @@
112
  }else{
113
  print '
114
  <div class="tp_recent_tweets">
115
- ' . __('<b>Error!</b> Couldn\'t retrieve tweets for some reason!','tp_tweets') . '
116
  </div>';
117
  }
118
 
@@ -151,21 +151,21 @@
151
  echo '
152
  <p>Get your API keys &amp; tokens at:<br /><a href="https://apps.twitter.com/" target="_blank">https://apps.twitter.com/</a></p>
153
  <p><i>Check out our <a href="https://wordpress.org/plugins/sumome/" target="_blank">SumoMe</a> plugin</i></p>
154
- <p><label>' . __('Title:','tp_tweets') . '</label>
155
  <input type="text" name="'.$this->get_field_name( 'title' ).'" id="'.$this->get_field_id( 'title' ).'" value="'.esc_attr($instance['title']).'" class="widefat" /></p>
156
- <p><label>' . __('Consumer Key:','tp_tweets') . '</label>
157
  <input type="text" name="'.$this->get_field_name( 'consumerkey' ).'" id="'.$this->get_field_id( 'consumerkey' ).'" value="'.esc_attr($instance['consumerkey']).'" class="widefat" /></p>
158
- <p><label>' . __('Consumer Secret:','tp_tweets') . '</label>
159
  <input type="text" name="'.$this->get_field_name( 'consumersecret' ).'" id="'.$this->get_field_id( 'consumersecret' ).'" value="'.esc_attr($instance['consumersecret']).'" class="widefat" /></p>
160
- <p><label>' . __('Access Token:','tp_tweets') . '</label>
161
  <input type="text" name="'.$this->get_field_name( 'accesstoken' ).'" id="'.$this->get_field_id( 'accesstoken' ).'" value="'.esc_attr($instance['accesstoken']).'" class="widefat" /></p>
162
- <p><label>' . __('Access Token Secret:','tp_tweets') . '</label>
163
  <input type="text" name="'.$this->get_field_name( 'accesstokensecret' ).'" id="'.$this->get_field_id( 'accesstokensecret' ).'" value="'.esc_attr($instance['accesstokensecret']).'" class="widefat" /></p>
164
- <p><label>' . __('Cache Tweets in every:','tp_tweets') . '</label>
165
  <input type="text" name="'.$this->get_field_name( 'cachetime' ).'" id="'.$this->get_field_id( 'cachetime' ).'" value="'.esc_attr($instance['cachetime']).'" class="small-text" /> hours</p>
166
- <p><label>' . __('Twitter Username:','tp_tweets') . '</label>
167
  <input type="text" name="'.$this->get_field_name( 'username' ).'" id="'.$this->get_field_id( 'username' ).'" value="'.esc_attr($instance['username']).'" class="widefat" /></p>
168
- <p><label>' . __('Tweets to display:','tp_tweets') . '</label>
169
  <select type="text" name="'.$this->get_field_name( 'tweetstoshow' ).'" id="'.$this->get_field_id( 'tweetstoshow' ).'">';
170
  $i = 1;
171
  for($i; $i <= 10; $i++){
@@ -173,7 +173,7 @@
173
  }
174
  echo '
175
  </select></p>
176
- <p><label>' . __('Exclude replies:','tp_tweets') . '</label>
177
  <input type="checkbox" name="'.$this->get_field_name( 'excludereplies' ).'" id="'.$this->get_field_id( 'excludereplies' ).'" value="true"';
178
  if(!empty($instance['excludereplies']) && esc_attr($instance['excludereplies']) == 'true'){
179
  print ' checked="checked"';
@@ -225,23 +225,23 @@
225
 
226
  if(is_numeric($d) && $d > 0) {
227
  //if less then 3 seconds
228
- if($d < 3) return __('right now','tp_tweets');
229
  //if less then minute
230
- if($d < $minute) return floor($d) . __(' seconds ago','tp_tweets');
231
  //if less then 2 minutes
232
- if($d < $minute * 2) return __('about 1 minute ago','tp_tweets');
233
  //if less then hour
234
- if($d < $hour) return floor($d / $minute) . __(' minutes ago','tp_tweets');
235
  //if less then 2 hours
236
- if($d < $hour * 2) return __('about 1 hour ago','tp_tweets');
237
  //if less then day
238
- if($d < $day) return floor($d / $hour) . __(' hours ago','tp_tweets');
239
  //if more then day, but less then 2 days
240
- if($d > $day && $d < $day * 2) return __('yesterday','tp_tweets');
241
  //if less then year
242
- if($d < $day * 365) return floor($d / $day) . __(' days ago','tp_tweets');
243
  //else return more than a year
244
- return __('over a year ago','tp_tweets');
245
  }
246
  }
247
  }
7
  parent::__construct(
8
  'tp_widget_recent_tweets', // Base ID
9
  '* Recent Tweets', // Name
10
+ array( 'description' => __( 'Display recent tweets', TP_RECENT_TEXT_DOMAIN ), ) // Args
11
  );
12
  }
13
 
23
 
24
  //check settings and die if not set
25
  if(empty($instance['consumerkey']) || empty($instance['consumersecret']) || empty($instance['accesstoken']) || empty($instance['accesstokensecret']) || empty($instance['cachetime']) || empty($instance['username'])){
26
+ echo '<strong>'.__('Please fill all widget settings!',TP_RECENT_TEXT_DOMAIN).'</strong>' . $after_widget;
27
  return;
28
  }
29
 
36
  if($diff >= $crt || empty($tp_twitter_plugin_last_cache_time)){
37
 
38
  if(!require_once('twitteroauth.php')){
39
+ echo '<strong>'.__('Couldn\'t find twitteroauth.php!',TP_RECENT_TEXT_DOMAIN).'</strong>' . $after_widget;
40
  return;
41
  }
42
 
52
 
53
  if(!empty($tweets->errors)){
54
  if($tweets->errors[0]->message == 'Invalid or expired token'){
55
+ echo '<strong>'.$tweets->errors[0]->message.'!</strong><br />' . __('You\'ll need to regenerate it <a href="https://apps.twitter.com/" target="_blank">here</a>!',TP_RECENT_TEXT_DOMAIN) . $after_widget;
56
  }else{
57
  echo '<strong>'.$tweets->errors[0]->message.'</strong>' . $after_widget;
58
  }
112
  }else{
113
  print '
114
  <div class="tp_recent_tweets">
115
+ ' . __('<b>Error!</b> Couldn\'t retrieve tweets for some reason!',TP_RECENT_TEXT_DOMAIN) . '
116
  </div>';
117
  }
118
 
151
  echo '
152
  <p>Get your API keys &amp; tokens at:<br /><a href="https://apps.twitter.com/" target="_blank">https://apps.twitter.com/</a></p>
153
  <p><i>Check out our <a href="https://wordpress.org/plugins/sumome/" target="_blank">SumoMe</a> plugin</i></p>
154
+ <p><label>' . __('Title:',TP_RECENT_TEXT_DOMAIN) . '</label>
155
  <input type="text" name="'.$this->get_field_name( 'title' ).'" id="'.$this->get_field_id( 'title' ).'" value="'.esc_attr($instance['title']).'" class="widefat" /></p>
156
+ <p><label>' . __('Consumer Key:',TP_RECENT_TEXT_DOMAIN) . '</label>
157
  <input type="text" name="'.$this->get_field_name( 'consumerkey' ).'" id="'.$this->get_field_id( 'consumerkey' ).'" value="'.esc_attr($instance['consumerkey']).'" class="widefat" /></p>
158
+ <p><label>' . __('Consumer Secret:',TP_RECENT_TEXT_DOMAIN) . '</label>
159
  <input type="text" name="'.$this->get_field_name( 'consumersecret' ).'" id="'.$this->get_field_id( 'consumersecret' ).'" value="'.esc_attr($instance['consumersecret']).'" class="widefat" /></p>
160
+ <p><label>' . __('Access Token:',TP_RECENT_TEXT_DOMAIN) . '</label>
161
  <input type="text" name="'.$this->get_field_name( 'accesstoken' ).'" id="'.$this->get_field_id( 'accesstoken' ).'" value="'.esc_attr($instance['accesstoken']).'" class="widefat" /></p>
162
+ <p><label>' . __('Access Token Secret:',TP_RECENT_TEXT_DOMAIN) . '</label>
163
  <input type="text" name="'.$this->get_field_name( 'accesstokensecret' ).'" id="'.$this->get_field_id( 'accesstokensecret' ).'" value="'.esc_attr($instance['accesstokensecret']).'" class="widefat" /></p>
164
+ <p><label>' . __('Cache Tweets in every:',TP_RECENT_TEXT_DOMAIN) . '</label>
165
  <input type="text" name="'.$this->get_field_name( 'cachetime' ).'" id="'.$this->get_field_id( 'cachetime' ).'" value="'.esc_attr($instance['cachetime']).'" class="small-text" /> hours</p>
166
+ <p><label>' . __('Twitter Username:',TP_RECENT_TEXT_DOMAIN) . '</label>
167
  <input type="text" name="'.$this->get_field_name( 'username' ).'" id="'.$this->get_field_id( 'username' ).'" value="'.esc_attr($instance['username']).'" class="widefat" /></p>
168
+ <p><label>' . __('Tweets to display:',TP_RECENT_TEXT_DOMAIN) . '</label>
169
  <select type="text" name="'.$this->get_field_name( 'tweetstoshow' ).'" id="'.$this->get_field_id( 'tweetstoshow' ).'">';
170
  $i = 1;
171
  for($i; $i <= 10; $i++){
173
  }
174
  echo '
175
  </select></p>
176
+ <p><label>' . __('Exclude replies:',TP_RECENT_TEXT_DOMAIN) . '</label>
177
  <input type="checkbox" name="'.$this->get_field_name( 'excludereplies' ).'" id="'.$this->get_field_id( 'excludereplies' ).'" value="true"';
178
  if(!empty($instance['excludereplies']) && esc_attr($instance['excludereplies']) == 'true'){
179
  print ' checked="checked"';
225
 
226
  if(is_numeric($d) && $d > 0) {
227
  //if less then 3 seconds
228
+ if($d < 3) return __('right now',TP_RECENT_TEXT_DOMAIN);
229
  //if less then minute
230
+ if($d < $minute) return floor($d) . __(' seconds ago',TP_RECENT_TEXT_DOMAIN);
231
  //if less then 2 minutes
232
+ if($d < $minute * 2) return __('about 1 minute ago',TP_RECENT_TEXT_DOMAIN);
233
  //if less then hour
234
+ if($d < $hour) return floor($d / $minute) . __(' minutes ago',TP_RECENT_TEXT_DOMAIN);
235
  //if less then 2 hours
236
+ if($d < $hour * 2) return __('about 1 hour ago',TP_RECENT_TEXT_DOMAIN);
237
  //if less then day
238
+ if($d < $day) return floor($d / $hour) . __(' hours ago',TP_RECENT_TEXT_DOMAIN);
239
  //if more then day, but less then 2 days
240
+ if($d > $day && $d < $day * 2) return __('yesterday',TP_RECENT_TEXT_DOMAIN);
241
  //if less then year
242
+ if($d < $day * 365) return floor($d / $day) . __(' days ago',TP_RECENT_TEXT_DOMAIN);
243
  //else return more than a year
244
+ return __('over a year ago',TP_RECENT_TEXT_DOMAIN);
245
  }
246
  }
247
  }