Recent Tweets Widget - Version 1.6

Version Description

  • Fix bug on settings page
Download this release

Release Info

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

Code changes from version 1.5 to 1.6

Files changed (5) hide show
  1. assets/icon-128x128.png +0 -0
  2. readme.txt +10 -7
  3. recent-tweets.php +3 -3
  4. settings.php +11 -2
  5. widget.php +2 -2
assets/icon-128x128.png ADDED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://themeprince.com/
4
  Tags: recent tweets, twitter widget, twitter api v1.1, cache, twitter, tweets, social media
5
  Requires at least: 3.4.1
6
  Tested up to: 4.2.2
7
- Stable tag: 1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -17,12 +17,12 @@ Recent Tweets Widget plugin for Twitter API v1.1 with Cache. It uses the new Twi
17
 
18
  == Installation ==
19
 
20
- 1. Unzip the downloaded zip file
21
  2. Upload the `recent-tweets` folder and its contents into the `wp-content/plugins/` directory of your WordPress installation
22
- 3. Activate Recent Tweets Widget from Plugins page
23
- 4. Go to your Widgets menu, add `* Recent Tweets` widget to a widget area
24
- 5. Visit [this link](https://dev.twitter.com/apps/ "Twitter") in a new tab, sign in with your account, click on `Create a new application` and create your own keys in case you don't have already
25
- 6. Fill all your widget settings
26
  7. Enjoy your new Twitter feed! :)
27
 
28
 
@@ -30,7 +30,7 @@ Recent Tweets Widget plugin for Twitter API v1.1 with Cache. It uses the new Twi
30
 
31
  = How can I get Consumer Key, Consumer Secret, Access Token and Access Token Secret? =
32
 
33
- You will need to visit [this link](https://dev.twitter.com/apps/ "Twitter"), sign in with your account and create your own keys.
34
 
35
  == Screenshots ==
36
 
@@ -39,6 +39,9 @@ You will need to visit [this link](https://dev.twitter.com/apps/ "Twitter"), sig
39
 
40
  == Changelog ==
41
 
 
 
 
42
  = 1.5 =
43
  * Settings page and other updates
44
 
4
  Tags: recent tweets, twitter widget, twitter api v1.1, cache, twitter, tweets, social media
5
  Requires at least: 3.4.1
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
17
 
18
  == Installation ==
19
 
20
+ 1. Unzip the downloaded zip file.
21
  2. Upload the `recent-tweets` folder and its contents into the `wp-content/plugins/` directory of your WordPress installation
22
+ 3. Activate Recent Tweets Widget from Plugins page.
23
+ 4. Go to your Widgets menu, add `* Recent Tweets` widget to a widget area.
24
+ 5. Visit [https://apps.twitter.com/](https://apps.twitter.com/ "Twitter") in a new tab, sign in with your account, click on `Create a new application` and create your own keys if you haven't already.
25
+ 6. Fill all your widget settings.
26
  7. Enjoy your new Twitter feed! :)
27
 
28
 
30
 
31
  = How can I get Consumer Key, Consumer Secret, Access Token and Access Token Secret? =
32
 
33
+ You will need to visit [https://apps.twitter.com/](https://apps.twitter.com/ "Twitter"), sign in with your account and create your own keys.
34
 
35
  == Screenshots ==
36
 
39
 
40
  == Changelog ==
41
 
42
+ = 1.6 =
43
+ * Fix bug on settings page
44
+
45
  = 1.5 =
46
  * Settings page and other updates
47
 
recent-tweets.php CHANGED
@@ -4,13 +4,13 @@
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.5
8
  Author: Noah Kagan
9
  Author URI: http://sumome.com
10
  */
11
 
12
- //error_reporting(E_ALL);
13
- //ini_set('display_errors', '1');
14
 
15
  // make sure we don't expose any info if called directly
16
  if ( !function_exists( 'add_action' ) ) {
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
  Author: Noah Kagan
9
  Author URI: http://sumome.com
10
  */
11
 
12
+ error_reporting(E_ALL);
13
+ ini_set('display_errors', '1');
14
 
15
  // make sure we don't expose any info if called directly
16
  if ( !function_exists( 'add_action' ) ) {
settings.php CHANGED
@@ -11,12 +11,21 @@ $tp_twitter_plugin_options = get_option('tp_twitter_plugin_options');
11
  <th scope="row"><label for="support-us">Support Us!</label></th>
12
  <td>
13
  <select name="tp_twitter_plugin_options[support-us]" id="support-us">
14
- <option value="1" <?php echo $tp_twitter_plugin_options['support-us'] == '1' ? 'selected="selected"' : ''; ?>>Yes</option>
15
- <option value="0" <?php echo !array_key_exists('support-us', $tp_twitter_plugin_options) || $tp_twitter_plugin_options['support-us'] == '0' ? 'selected="selected"' : ''; ?>>No</option>
16
  </select>
 
17
  </td>
18
  </tr>
19
  </table>
20
  <?php submit_button(); ?>
21
  </form>
 
 
 
 
 
 
 
 
22
  </div>
11
  <th scope="row"><label for="support-us">Support Us!</label></th>
12
  <td>
13
  <select name="tp_twitter_plugin_options[support-us]" id="support-us">
14
+ <option value="1" <?php echo is_array($tp_twitter_plugin_options) && $tp_twitter_plugin_options['support-us'] == '1' ? 'selected="selected"' : ''; ?>>Yes</option>
15
+ <option value="0" <?php echo !is_array($tp_twitter_plugin_options) || $tp_twitter_plugin_options['support-us'] != '1' ? 'selected="selected"' : ''; ?>>No</option>
16
  </select>
17
+ <p>Show our link below the widget. Pretty please.</p>
18
  </td>
19
  </tr>
20
  </table>
21
  <?php submit_button(); ?>
22
  </form>
23
+ <h3>Adding the Widget</h3>
24
+ <ol>
25
+ <li><a href="<?php echo admin_url('widgets.php'); ?>">Go to your Widgets menu</a>, add the <code>Recent Tweets</code> widget to a widget area.</li>
26
+ <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>
27
+ <li>Fill all your widget settings.</li>
28
+ <li>Enjoy your new Twitter feed! :)</li>
29
+ </ol>
30
+ <p style="border:1px solid #CCCCCC;background:#FFFFFF;padding:8px;">Check out more sharing tools with our <a href="https://wordpress.org/plugins/sumome" target="_blank">SumoMe WordPress plugin</a></p>
31
  </div>
widget.php CHANGED
@@ -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://dev.twitter.com/apps" target="_blank">here</a>!','tp_tweets') . $after_widget;
56
  }else{
57
  echo '<strong>'.$tweets->errors[0]->message.'</strong>' . $after_widget;
58
  }
@@ -149,7 +149,7 @@
149
  $instance = wp_parse_args( (array) $instance, $defaults );
150
 
151
  echo '
152
- <p>Get your API keys &amp; tokens at:<br /><a href="https://dev.twitter.com/apps/" target="_blank">https://dev.twitter.com/apps/</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>
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
  }
149
  $instance = wp_parse_args( (array) $instance, $defaults );
150
 
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>