Recent Tweets Widget - Version 1.6.1

Version Description

Download this release

Release Info

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

Code changes from version 1.6 to 1.6.1

assets/banner.psd DELETED
Binary file
assets/icon-256x256.psd DELETED
Binary file
other_plugins.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php add_thickbox(); ?>
2
+ <div class="wrap">
3
+ <?php screen_icon(); ?>
4
+ <h2>Other Plugins</h2>
5
+
6
+ <p style="border:1px solid #CCCCCC;background:#FFFFFF;padding:8px;">
7
+ <a href="<?php echo admin_url( 'plugin-install.php?tab=plugin-information&plugin=sumome&TB_iframe=true&width=743&height=500'); ?>" class="thickbox">SumoMe</a> - Tools to grow your Email List, Social Sharing and Analytics
8
+ <br /><br />
9
+ <a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=google-analyticator&TB_iframe=true&width=743&height=500'); ?>" class="thickbox">Google Analyticator</a> - Easily view your Google Analytics and real-time statistics
10
+ <br /><br />
11
+ <a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=social-share-boost&TB_iframe=true&width=743&height=500'); ?>" class="thickbox">Social Share Boost</a> - Boost Your Social Sharing by automatically adding various social share tools above or below the posts, page and excerpts.
12
+ </p>
13
+ </div>
readme.txt CHANGED
@@ -1,10 +1,9 @@
1
  === Recent Tweets Widget ===
2
  Contributors: noahkagan
3
- 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.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
1
  === Recent Tweets Widget ===
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.2.2
6
+ Stable tag: 1.6.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
recent-tweets.php CHANGED
@@ -4,57 +4,62 @@
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' ) ) {
17
- echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
18
- exit;
19
- }
20
 
21
- define('TP_RECENT_TWEETS_PATH', plugin_dir_url( __FILE__ ));
22
 
23
- //register stylesheet for widget
24
- function tp_twitter_plugin_styles() {
25
- wp_enqueue_style( 'tp_twitter_plugin_css', TP_RECENT_TWEETS_PATH . 'tp_twitter_plugin.css', array(), '1.0', 'screen' );
26
- }
27
- add_action( 'wp_enqueue_scripts', 'tp_twitter_plugin_styles' );
28
 
29
- // include widget function
30
- require_once('widget.php');
31
 
32
- // Link to settings page from plugins screen
33
- add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'add_action_links' );
34
 
35
- function add_action_links ( $links ) {
36
- $mylinks = array(
37
- '<a href="' . admin_url( 'options-general.php?page=recent-tweets' ) . '">Settings</a>',
38
- );
39
 
40
- return array_merge( $links, $mylinks );
41
- }
42
 
43
- // Settings menu
44
- add_action('admin_menu', 'tp_twitter_plugin_menu_item');
45
-
46
- function tp_twitter_plugin_menu_item() {
47
- add_options_page( 'Recent Tweets', 'Recent Tweets', 'manage_options', 'recent-tweets', 'tp_twitter_plugin_settings_page');
48
- }
49
-
50
- function tp_twitter_plugin_settings_page() {
51
- include(plugin_dir_path( __FILE__ ).'/settings.php');
52
- }
53
 
54
- //add_option('recent-tweets-options', array('support-us' => 0));
 
 
 
55
 
 
 
 
56
 
57
- function register_tp_twitter_setting() {
58
- register_setting( 'tp_twitter_plugin_options', 'tp_twitter_plugin_options');
59
- }
60
  add_action( 'admin_init', 'register_tp_twitter_setting' );
 
 
 
 
 
 
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.1
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' ) ) {
17
+ echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
18
+ exit;
19
+ }
20
 
21
+ define('TP_RECENT_TWEETS_PATH', plugin_dir_url( __FILE__ ));
22
 
23
+ //register stylesheet for widget
24
+ function tp_twitter_plugin_styles() {
25
+ wp_enqueue_style( 'tp_twitter_plugin_css', TP_RECENT_TWEETS_PATH . 'tp_twitter_plugin.css', array(), '1.0', 'screen' );
26
+ }
27
+ add_action( 'wp_enqueue_scripts', 'tp_twitter_plugin_styles' );
28
 
29
+ // include widget function
30
+ require_once('widget.php');
31
 
32
+ // Link to settings page from plugins screen
33
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'add_action_links' );
34
 
35
+ function add_action_links ( $links ) {
36
+ $mylinks = array(
37
+ '<a href="' . admin_url( 'options-general.php?page=recent-tweets' ) . '">Settings</a>',
38
+ );
39
 
40
+ return array_merge( $links, $mylinks );
41
+ }
42
 
43
+ // Settings menu
44
+ /*
45
+ add_action('admin_menu', 'tp_twitter_plugin_menu_item');
 
 
 
 
 
 
 
46
 
47
+ function tp_twitter_plugin_menu_item() {
48
+ add_options_page( 'Recent Tweets', 'Recent Tweets', 'manage_options', 'recent-tweets', 'tp_twitter_plugin_settings_page');
49
+ }
50
+ */
51
 
52
+ 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', function() {include(plugin_dir_path( __FILE__ ).'/other_plugins.php');});
64
+ }
65
+ add_action( 'admin_menu', 'tp_twitter_plugin_top_level_menu' );
settings.php CHANGED
@@ -1,31 +1,33 @@
1
  <?php
 
2
  $tp_twitter_plugin_options = get_option('tp_twitter_plugin_options');
3
  ?>
4
  <div class="wrap">
5
  <?php screen_icon(); ?>
6
  <h2>Recent Tweets</h2>
 
7
  <form method="post" action="options.php">
8
  <?php settings_fields( 'tp_twitter_plugin_options' ); ?>
9
  <table class="form-table">
10
- <tr valign="top">
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>
1
  <?php
2
+ add_thickbox();
3
  $tp_twitter_plugin_options = get_option('tp_twitter_plugin_options');
4
  ?>
5
  <div class="wrap">
6
  <?php screen_icon(); ?>
7
  <h2>Recent Tweets</h2>
8
+ <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>
9
  <form method="post" action="options.php">
10
  <?php settings_fields( 'tp_twitter_plugin_options' ); ?>
11
  <table class="form-table">
12
+ <tr valign="top">
13
+ <th scope="row"><label for="support-us">Support Us!</label></th>
14
+ <td>
15
+ <select name="tp_twitter_plugin_options[support-us]" id="support-us">
16
+ <option value="1" <?php echo is_array($tp_twitter_plugin_options) && $tp_twitter_plugin_options['support-us'] == '1' ? 'selected="selected"' : ''; ?>>Yes</option>
17
+ <option value="0" <?php echo !is_array($tp_twitter_plugin_options) || $tp_twitter_plugin_options['support-us'] != '1' ? 'selected="selected"' : ''; ?>>No</option>
18
+ </select>
19
+ <p>Show our link below the widget. Pretty please.</p>
20
+ </td>
21
+ </tr>
22
  </table>
23
  <?php submit_button(); ?>
24
  </form>
25
+ <h2>Adding the Widget</h2>
26
  <ol>
27
+ <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>
28
  <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>
29
  <li>Fill all your widget settings.</li>
30
  <li>Enjoy your new Twitter feed! :)</li>
31
  </ol>
32
+ <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>
33
  </div>