Recent Tweets Widget - Version 1.6.3

Version Description

Download this release

Release Info

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

Code changes from version 1.6.2 to 1.6.3

Files changed (3) hide show
  1. readme.txt +1 -1
  2. recent-tweets.php +31 -4
  3. settings.php +45 -19
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.2.2
6
- Stable tag: 1.6.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
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.2.2
6
+ Stable tag: 1.6.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
recent-tweets.php CHANGED
@@ -4,7 +4,7 @@
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.2
8
  Author: Noah Kagan
9
  Author URI: http://sumome.com
10
  */
@@ -53,18 +53,45 @@ function tp_twitter_plugin_settings_page() {
53
  include(plugin_dir_path( __FILE__ ).'/settings.php');
54
  }
55
 
 
 
 
 
56
  function register_tp_twitter_setting() {
57
  register_setting( 'tp_twitter_plugin_options', 'tp_twitter_plugin_options');
58
  }
59
  add_action( 'admin_init', 'register_tp_twitter_setting' );
 
 
60
 
61
  function tp_twitter_plugin_top_level_menu() {
62
  add_menu_page( 'Recent Tweets', 'Recent Tweets', 'manage_options', 'recent-tweets', 'tp_twitter_plugin_settings_page', 'dashicons-twitter');
63
  add_submenu_page( 'recent-tweets', 'Other Plugins', 'Other Plugins', 'manage_options', 'other-plugins', 'tp_twitter_other_plugins_page');
64
  }
65
 
66
- function tp_twitter_other_plugins_page() {
67
- include(plugin_dir_path( __FILE__ ).'/other_plugins.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
 
69
 
70
- add_action( 'admin_menu', 'tp_twitter_plugin_top_level_menu' );
 
 
 
 
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.3
8
  Author: Noah Kagan
9
  Author URI: http://sumome.com
10
  */
53
  include(plugin_dir_path( __FILE__ ).'/settings.php');
54
  }
55
 
56
+ function tp_twitter_other_plugins_page() {
57
+ include(plugin_dir_path( __FILE__ ).'/other_plugins.php');
58
+ }
59
+
60
  function register_tp_twitter_setting() {
61
  register_setting( 'tp_twitter_plugin_options', 'tp_twitter_plugin_options');
62
  }
63
  add_action( 'admin_init', 'register_tp_twitter_setting' );
64
+ //delete_option('tp_twitter_global_notification');
65
+ add_option('tp_twitter_global_notification', 1);
66
 
67
  function tp_twitter_plugin_top_level_menu() {
68
  add_menu_page( 'Recent Tweets', 'Recent Tweets', 'manage_options', 'recent-tweets', 'tp_twitter_plugin_settings_page', 'dashicons-twitter');
69
  add_submenu_page( 'recent-tweets', 'Other Plugins', 'Other Plugins', 'manage_options', 'other-plugins', 'tp_twitter_other_plugins_page');
70
  }
71
 
72
+ add_action( 'admin_menu', 'tp_twitter_plugin_top_level_menu' );
73
+
74
+
75
+ function tp_twitter_plugin_global_notice() {
76
+ if (in_array(substr(basename($_SERVER['REQUEST_URI']), 0, 11), array('plugins.php', 'index.php')) && get_option('tp_twitter_global_notification') == 1) {
77
+ ?>
78
+ <style type="text/css">
79
+ #tp_twitter_global_notification a.button:active {vertical-align:baseline;}
80
+ </style>
81
+ <div class="updated" id="tp_twitter_global_notification" style="border:3px solid #317A96;position:relative;background:##3c9cc2;background-color:#3c9cc2;color:#ffffff;height:70px;">
82
+ <a class="notice-dismiss" href="<?php echo admin_url('admin.php?page=recent-tweets&tp_twitter_global_notification=0'); ?>" style="right:165px;top:0;"></a>
83
+ <a href="<?php echo admin_url('admin.php?page=recent-tweets&tp_twitter_global_notification=0'); ?>" style="position:absolute;top:9px;right:15px;color:#ffffff;">Dismiss and go to settings</a>
84
+ <p style="font-size:16px;line-height:50px;">
85
+ <?php _e('Looking for more sharing tools?'); ?> &nbsp;<a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>
86
+ </p>
87
+ </div>
88
+ <?php
89
+ }
90
  }
91
+ add_action( 'admin_notices', 'tp_twitter_plugin_global_notice' );
92
 
93
+
94
+ function tp_twitter_plugin_deactivate() {
95
+ delete_option('tp_twitter_global_notification');
96
+ }
97
+ register_deactivation_hook( __FILE__, 'tp_twitter_plugin_deactivate' );
settings.php CHANGED
@@ -1,41 +1,67 @@
1
  <?php
2
  add_thickbox();
3
  $tp_twitter_plugin_options = get_option('tp_twitter_plugin_options');
 
 
 
 
4
  ?>
5
  <div class="wrap">
6
  <?php settings_errors(); ?>
7
- <?php /*
8
- <div class="updated" style="border-color:#6c65c2;">
9
- <p>
10
- Looking for more sharing tools? &nbsp;<a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>
 
 
11
  </p>
12
  </div>
13
- */ ?>
14
  <?php screen_icon(); ?>
15
  <h2>Recent Tweets</h2>
 
 
 
 
 
 
 
16
  <form method="post" action="options.php">
17
  <?php settings_fields( 'tp_twitter_plugin_options' ); ?>
18
  <table class="form-table">
19
  <tr valign="top">
20
- <th scope="row"><label for="support-us">Support Us!</label></th>
21
- <td>
22
- <select name="tp_twitter_plugin_options[support-us]" id="support-us">
23
- <option value="1" <?php echo is_array($tp_twitter_plugin_options) && $tp_twitter_plugin_options['support-us'] == '1' ? 'selected="selected"' : ''; ?>>Yes</option>
24
- <option value="0" <?php echo !is_array($tp_twitter_plugin_options) || $tp_twitter_plugin_options['support-us'] != '1' ? 'selected="selected"' : ''; ?>>No</option>
25
- </select>
26
  <p>Show our link below the widget. Pretty please.</p>
27
- </td>
 
28
  </tr>
29
  </table>
30
  <?php submit_button(); ?>
31
  </form>
32
- <h2>Adding the Widget</h2>
33
- <ol>
34
- <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>
35
- <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>
36
- <li>Fill all your widget settings.</li>
37
- <li>Enjoy your new Twitter feed! :)</li>
38
- </ol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  <!--<p style="border:1px solid #CCCCCC;background:#FFFFFF;padding:8px;">Check out more sharing tools with our <a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox">SumoMe WordPress plugin</a></p>-->
40
  <p><i>If you find this plugin useful please <a href="https://wordpress.org/support/view/plugin-reviews/recent-tweets-widget" target="_blank">leave us a review!</a></i></p>
41
  </div>
1
  <?php
2
  add_thickbox();
3
  $tp_twitter_plugin_options = get_option('tp_twitter_plugin_options');
4
+
5
+ if ($_GET['tp_twitter_global_notification'] == 0) {
6
+ update_option('tp_twitter_global_notification', 0);
7
+ }
8
  ?>
9
  <div class="wrap">
10
  <?php settings_errors(); ?>
11
+ <style type="text/css">
12
+ #tp_twitter_global_notification a.button:active {vertical-align:baseline;}
13
+ </style>
14
+ <div id="tp_twitter_global_notification" class="updated" style="border:3px solid #317A96;position:relative;background:##3c9cc2;background-color:#3c9cc2;color:#ffffff;height:70px;">
15
+ <p style="font-size:16px;line-height:50px;">
16
+ <?php _e('Looking for more sharing tools?'); ?> &nbsp;<a style="background-color: #6267BE;border-color: #3C3F76;" href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox button button-primary">Get SumoMe WordPress Plugin</a>
17
  </p>
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' ); ?>
30
  <table class="form-table">
31
  <tr valign="top">
32
+ <td scope="row" colspan="2">
33
+ <select name="tp_twitter_plugin_options[support-us]" id="support-us">
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>
41
  </table>
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" />
55
+ <input type="hidden" name="meta_split_id" value="" />
56
+ <input type="hidden" name="listname" value="awlist3626406" />
57
+ <input type="hidden" name="redirect" value="http://email1k.sumome.com/tweet.html" id="redirect_19605a373ab8e7f77fc954424326ab1c" />
58
+ <input type="hidden" name="meta_redirect_onlist" value="http://email1k.sumome.com/tweet.html" />
59
+ <input type="hidden" name="meta_adtracking" value="recent-tweets-widget" />
60
+ <input type="hidden" name="meta_message" value="1" />
61
+ <input type="hidden" name="meta_required" value="email" />
62
+ <input type="hidden" name="meta_tooltip" value="" />
63
+ </form>
64
+
65
  <!--<p style="border:1px solid #CCCCCC;background:#FFFFFF;padding:8px;">Check out more sharing tools with our <a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox">SumoMe WordPress plugin</a></p>-->
66
  <p><i>If you find this plugin useful please <a href="https://wordpress.org/support/view/plugin-reviews/recent-tweets-widget" target="_blank">leave us a review!</a></i></p>
67
  </div>