Easy Twitter Feed Widget Plugin - Version 0.2

Version Description

  • June 09, 2014 =

  • Bug Fix: Fixed Show Replies option.

Download this release

Release Info

Developer designorbital
Plugin Icon 128x128 Easy Twitter Feed Widget Plugin
Version 0.2
Comparing to
See all releases

Version 0.2

easy-twitter-feed-widget.css ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * ==========================================================================
3
+ * Easy Twitter Feed Widget
4
+ * ==========================================================================
5
+ */
6
+ .widget-easy-twitter-feed-widget-kamn .widget-easy-twitter-feed-widget-container:before,
7
+ .widget-easy-twitter-feed-widget-kamn .widget-easy-twitter-feed-widget-container:after {
8
+ content: " ";
9
+ display: table;
10
+ }
11
+ .widget-easy-twitter-feed-widget-kamn .widget-easy-twitter-feed-widget-container:after {
12
+ clear: both;
13
+ }
14
+ .widget-easy-twitter-feed-widget-kamn .widget-easy-twitter-feed-widget-row:before,
15
+ .widget-easy-twitter-feed-widget-kamn .widget-easy-twitter-feed-widget-row:after {
16
+ content: " ";
17
+ display: table;
18
+ }
19
+ .widget-easy-twitter-feed-widget-kamn .widget-easy-twitter-feed-widget-row:after {
20
+ clear: both;
21
+ }
easy-twitter-feed-widget.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Easy Twitter Feed Widget
4
+ Plugin URI: http://designorbital.com/easy-twitter-feed-widget/
5
+ Description: Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
6
+ Author: DesignOrbital.com
7
+ Author URI: http://designorbital.com
8
+ Text Domain: kamn-easy-twitter-feed-widget
9
+ Domain Path: /languages/
10
+ Version: 0.2
11
+ License: GPL v3
12
+
13
+ Easy Twitter Feed Widget Plugin
14
+ Copyright (C) 2013, DesignOrbital.com
15
+
16
+ This program is free software: you can redistribute it and/or modify
17
+ it under the terms of the GNU General Public License as published by
18
+ the Free Software Foundation, either version 3 of the License, or
19
+ (at your option) any later version.
20
+
21
+ This program is distributed in the hope that it will be useful,
22
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ GNU General Public License for more details.
25
+
26
+ You should have received a copy of the GNU General Public License
27
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
28
+ */
29
+
30
+ /** Plugin Constants */
31
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_VERSION' ) ) {
32
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_VERSION', '0.1' );
33
+ }
34
+
35
+ /** Directory Location Constants */
36
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_DIR' ) ) {
37
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
38
+ }
39
+
40
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_DIR_BASENAME' ) ) {
41
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_DIR_BASENAME', trailingslashit( dirname( plugin_basename( __FILE__ ) ) ) );
42
+ }
43
+
44
+ /** URI Location Constants */
45
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_URI' ) ) {
46
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
47
+ }
48
+
49
+ /** Plugin Init */
50
+ require_once( KAMN_EASY_TWITTER_FEED_WIDGET_DIR . 'lib/init.php' );
languages/kamn-easy-twitter-feed-widget.pot ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2011 WordPress Importer
2
+ # This file is distributed under the same license as the WordPress Importer package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Easy Twitter Feed Widget 0.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-importer\n"
7
+ "POT-Creation-Date: 2014-01-04 00:08+0500\n"
8
+ "PO-Revision-Date: 2014-01-04 00:09+0500\n"
9
+ "Last-Translator: Arafat Ashraf <life.object@gmail.com>\n"
10
+ "Language-Team: DesignOrbital <designorbital@live.com>\n"
11
+ "Language: en_US\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Generator: Poedit 1.6.3\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr\n"
18
+ "X-Poedit-Basepath: E:\\wamp\\www\\themes\\wp-content\\plugins\\easy-twitter-"
19
+ "feed-widget\\\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ #: lib/widget-twitter-feed-widget.php:26
23
+ msgid "Easy Twitter Feed Widget"
24
+ msgstr ""
25
+
26
+ #: lib/widget-twitter-feed-widget.php:159
27
+ msgid "Title:"
28
+ msgstr ""
29
+
30
+ #: lib/widget-twitter-feed-widget.php:163
31
+ msgid "Easy Twitter Feed Widget Settings"
32
+ msgstr ""
33
+
34
+ #: lib/widget-twitter-feed-widget.php:167
35
+ msgid "Twitter Widget ID:"
36
+ msgstr ""
37
+
38
+ #: lib/widget-twitter-feed-widget.php:172
39
+ msgid "Twitter Screen Name:"
40
+ msgstr ""
41
+
42
+ #: lib/widget-twitter-feed-widget.php:177
43
+ msgid "Tweet Limit:"
44
+ msgstr ""
45
+
46
+ #: lib/widget-twitter-feed-widget.php:186
47
+ msgid "Show Replies:"
48
+ msgstr ""
49
+
50
+ #: lib/widget-twitter-feed-widget.php:195
51
+ msgid "Twitter Widget Width:"
52
+ msgstr ""
53
+
54
+ #: lib/widget-twitter-feed-widget.php:204
55
+ msgid "Twitter Widget Height:"
56
+ msgstr ""
57
+
58
+ #: lib/widget-twitter-feed-widget.php:210
59
+ msgid "Height setting will work only @ Tweet Limit \"default\"."
60
+ msgstr ""
61
+
62
+ #: lib/widget-twitter-feed-widget.php:214
63
+ msgid "Twitter Widget Theme:"
64
+ msgstr ""
65
+
66
+ #: lib/widget-twitter-feed-widget.php:223
67
+ msgid "Twitter Widget Link Color:"
68
+ msgstr ""
69
+
70
+ #: lib/widget-twitter-feed-widget.php:223
71
+ #: lib/widget-twitter-feed-widget.php:255
72
+ msgid "e.g #333333"
73
+ msgstr ""
74
+
75
+ #: lib/widget-twitter-feed-widget.php:228
76
+ msgid "Show Twitter Widget Header:"
77
+ msgstr ""
78
+
79
+ #: lib/widget-twitter-feed-widget.php:237
80
+ msgid "Show Twitter Widget Footer:"
81
+ msgstr ""
82
+
83
+ #: lib/widget-twitter-feed-widget.php:246
84
+ msgid "Show Twitter Widget Border:"
85
+ msgstr ""
86
+
87
+ #: lib/widget-twitter-feed-widget.php:255
88
+ msgid "Twitter Widget Border Color:"
89
+ msgstr ""
90
+
91
+ #: lib/widget-twitter-feed-widget.php:260
92
+ msgid "Show Twitter Widget Scrollbar:"
93
+ msgstr ""
94
+
95
+ #: lib/widget-twitter-feed-widget.php:266
96
+ msgid "Scrollbar setting will work only @ Tweet Limit \"default\"."
97
+ msgstr ""
98
+
99
+ #: lib/widget-twitter-feed-widget.php:270
100
+ msgid "Use Twitter Widget Background Color:"
101
+ msgstr ""
102
+
103
+ #: lib/admin/admin.php:26
104
+ msgid "Easy Twitter Feed Widget Options"
105
+ msgstr ""
106
+
107
+ #: lib/admin/admin.php:42
108
+ msgid "Load Twitter Script"
109
+ msgstr ""
110
+
111
+ #: lib/admin/admin.php:46
112
+ msgid "Reset Easy Twitter Feed Widget Options"
113
+ msgstr ""
114
+
115
+ #: lib/admin/admin.php:65
116
+ msgid "Plugin Support"
117
+ msgstr ""
118
+
119
+ #: lib/admin/admin.php:75
120
+ msgid "License"
121
+ msgstr ""
122
+
123
+ #: lib/admin/admin.php:85
124
+ msgid "Changelog"
125
+ msgstr ""
126
+
127
+ #: lib/admin/admin.php:92
128
+ msgid "For more information:"
129
+ msgstr ""
130
+
131
+ #: lib/admin/admin.php:94
132
+ msgid "Easy Twitter Feed Widget Plugin"
133
+ msgstr ""
134
+
135
+ #: lib/admin/admin.php:97
136
+ msgid "Easy Twitter Feed Widget Official Page"
137
+ msgstr ""
138
+
139
+ #: lib/admin/admin.php:149
140
+ msgid "yes"
141
+ msgstr ""
142
+
143
+ #: lib/admin/admin.php:150
144
+ msgid "no"
145
+ msgstr ""
146
+
147
+ #: lib/admin/admin.php:180
148
+ msgid "Customize Twitter Embeddable Widget by using the following settings."
149
+ msgstr ""
150
+
151
+ #: lib/admin/admin.php:197
152
+ msgid "Select \"no\" if your theme supports Twitter Embeddable Widget."
153
+ msgstr ""
154
+
155
+ #: lib/admin/admin.php:204
156
+ msgid ""
157
+ "Here are the general settings to customize easy twitter feed widget plugin."
158
+ msgstr ""
159
+
160
+ #: lib/admin/admin.php:210
161
+ msgid "Reset EasyTwitterFeedWidget Options."
162
+ msgstr ""
163
+
164
+ #: lib/admin/page.php:9
165
+ #, php-format
166
+ msgid "%1$s Settings"
167
+ msgstr ""
168
+
169
+ #: lib/admin/page.php:14
170
+ msgid "Premium WordPress Themes"
171
+ msgstr ""
172
+
173
+ #: lib/admin/page.php:15
174
+ msgid "Free WordPress Themes"
175
+ msgstr ""
176
+
177
+ #: lib/admin/page.php:21 lib/admin/page.php:50
178
+ msgid "Save Changes"
179
+ msgstr ""
180
+
181
+ #: lib/admin/page.php:29
182
+ msgid "Twitter Script Settings"
183
+ msgstr ""
184
+
185
+ #: lib/admin/page.php:30
186
+ msgid "General Settings"
187
+ msgstr ""
lib/admin/admin.php ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Kamn_Easytwitterfeedwidget_Admin {
3
+
4
+ /** Properties */
5
+ private $kamn_easy_twitter_feed_widget_menu_slug;
6
+ private $kamn_easy_twitter_feed_widget_options_page_hook;
7
+
8
+ /** Constructor Method */
9
+ function __construct() {
10
+
11
+ /** Let Set Properties */
12
+ $this->kamn_easy_twitter_feed_widget_menu_slug = 'easy-twitter-feed-widget-options';
13
+ $this->kamn_easy_twitter_feed_widget_options_page_hook = 'settings_page_' . $this->kamn_easy_twitter_feed_widget_menu_slug;
14
+
15
+ /** Admin Hooks */
16
+ add_action( 'admin_menu', array( $this, 'kamn_easy_twitter_feed_widget_options_page' ) );
17
+ add_action( 'admin_init', array( $this, 'kamn_easy_twitter_feed_widget_options' ) );
18
+ add_action( 'admin_init', array( $this, 'kamn_easy_twitter_feed_widget_options_init' ), 12 );
19
+ add_action( 'load-'. $this->kamn_easy_twitter_feed_widget_options_page_hook, array( $this, 'kamn_easy_twitter_feed_widget_options_page_contextual_help' ) );
20
+ add_action( 'admin_enqueue_scripts', array( $this, 'kamn_easy_twitter_feed_widget_enqueue_scripts' ) );
21
+
22
+ }
23
+
24
+ /** Options Page Menu */
25
+ function kamn_easy_twitter_feed_widget_options_page() {
26
+ add_submenu_page( 'options-general.php', esc_html( __( 'Easy Twitter Feed Widget Options', 'kamn-easy-twitter-feed-widget' ) ), esc_html( __( 'Easy Twitter Feed Widget Options', 'kamn-easy-twitter-feed-widget' ) ), 'manage_options', $this->kamn_easy_twitter_feed_widget_menu_slug, array( $this, 'kamn_easy_twitter_feed_widget_options_do_page' ) );
27
+ }
28
+
29
+ /** Options Page */
30
+ function kamn_easy_twitter_feed_widget_options_do_page() {
31
+ require_once( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR . 'page.php' );
32
+ }
33
+
34
+ /** Options Registration */
35
+ function kamn_easy_twitter_feed_widget_options() {
36
+
37
+ /** Register theme settings. */
38
+ register_setting( 'kamn_easy_twitter_feed_widget_options_group', 'kamn_easy_twitter_feed_widget_options', array( $this, 'kamn_easy_twitter_feed_widget_options_validate' ) );
39
+
40
+ /** Fonts Section */
41
+ add_settings_section( 'kamn_easy_twitter_feed_widget_section_script', 'Twitter Script Options', array( $this, 'kamn_easy_twitter_feed_widget_section_script_cb' ), 'kamn_easy_twitter_feed_widget_section_script_page' );
42
+ add_settings_field( 'kamn_easy_twitter_feed_widget_field_script_control', __( 'Load Twitter Script', 'kamn-easy-twitter-feed-widget' ), array( $this, 'kamn_easy_twitter_feed_widget_field_script_control_cb' ), 'kamn_easy_twitter_feed_widget_section_script_page', 'kamn_easy_twitter_feed_widget_section_script' );
43
+
44
+ /** General Section */
45
+ add_settings_section( 'kamn_easy_twitter_feed_widget_section_general', 'General Options', array( $this, 'kamn_easy_twitter_feed_widget_section_general_cb' ), 'kamn_easy_twitter_feed_widget_section_general_page' );
46
+ add_settings_field( 'kamn_easy_twitter_feed_widget_field_reset_control', __( 'Reset Easy Twitter Feed Widget Options', 'kamn-easy-twitter-feed-widget' ), array( $this, 'kamn_easy_twitter_feed_widget_field_reset_control_cb' ), 'kamn_easy_twitter_feed_widget_section_general_page', 'kamn_easy_twitter_feed_widget_section_general' );
47
+
48
+ }
49
+
50
+ /** Kamn Contextual Help. */
51
+ function kamn_easy_twitter_feed_widget_options_page_contextual_help() {
52
+
53
+ /** Get the plugin data. */
54
+ $plugin = kamn_easy_twitter_feed_widget_plugin_data();
55
+ $AuthorURI = $plugin['AuthorURI'];
56
+ $PluginURI = $plugin['PluginURI'];
57
+
58
+ /** Get the current screen */
59
+ $screen = get_current_screen();
60
+
61
+ /** Add theme reference help screen tab. */
62
+ $screen->add_help_tab( array(
63
+
64
+ 'id' => 'kamn-easy-twitter-feed-widget-plugin',
65
+ 'title' => __( 'Plugin Support', 'kamn-easy-twitter-feed-widget' ),
66
+ 'content' => implode( '', file( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR . 'help/support.html' ) ),
67
+
68
+ )
69
+ );
70
+
71
+ /** Add license reference help screen tab. */
72
+ $screen->add_help_tab( array(
73
+
74
+ 'id' => 'kamn-easy-twitter-feed-widget-license',
75
+ 'title' => __( 'License', 'kamn-easy-twitter-feed-widget' ),
76
+ 'content' => implode( '', file( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR . 'help/license.html' ) ),
77
+
78
+ )
79
+ );
80
+
81
+ /** Add changelog reference help screen tab. */
82
+ $screen->add_help_tab( array(
83
+
84
+ 'id' => 'kamn-easy-twitter-feed-widget-changelog',
85
+ 'title' => __( 'Changelog', 'kamn-easy-twitter-feed-widget' ),
86
+ 'content' => implode( '', file( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR . 'help/changelog.html' ) ),
87
+
88
+ )
89
+ );
90
+
91
+ /** Help Sidebar */
92
+ $sidebar = '<p><strong>' . __( 'For more information:', 'kamn-easy-twitter-feed-widget' ) . '</strong></p>';
93
+ if ( !empty( $AuthorURI ) ) {
94
+ $sidebar .= '<p><a href="' . esc_url( $AuthorURI ) . '" target="_blank">' . __( 'Easy Twitter Feed Widget Plugin', 'kamn-easy-twitter-feed-widget' ) . '</a></p>';
95
+ }
96
+ if ( !empty( $PluginURI ) ) {
97
+ $sidebar .= '<p><a href="' . esc_url( $PluginURI ) . '" target="_blank">' . __( 'Easy Twitter Feed Widget Official Page', 'kamn-easy-twitter-feed-widget' ) . '</a></p>';
98
+ }
99
+ $screen->set_help_sidebar( $sidebar );
100
+
101
+ }
102
+
103
+ /** Kamn Enqueue Scripts */
104
+ function kamn_easy_twitter_feed_widget_enqueue_scripts( $hook ) {
105
+
106
+ /** Load Scripts For Kamn Options Page */
107
+ if( $hook === $this->kamn_easy_twitter_feed_widget_options_page_hook ) {
108
+
109
+ /** Load Admin Scripts */
110
+ wp_enqueue_script( 'kamn-easy-twitter-feed-widget-admin-js-theme-options', esc_url( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_URI . 'plugin-options.js' ), array( 'jquery' ) );
111
+
112
+ /** Load Admin Stylesheet */
113
+ wp_enqueue_style( 'kamn-easy-twitter-feed-widget-admin-css-theme-options', esc_url( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_URI . 'plugin-options.css' ) );
114
+
115
+ }
116
+
117
+ }
118
+
119
+ /** Loads the plugin setting. */
120
+ function kamn_easy_twitter_feed_widget_get_admin_settings() {
121
+
122
+ /** Global Data */
123
+ global $kamn_easy_twitter_feed_widget;
124
+
125
+ /* If the settings array hasn't been set, call get_option() to get an array of plugin settings. */
126
+ if ( !isset( $kamn_easy_twitter_feed_widget->settings_admin ) ) {
127
+ $kamn_easy_twitter_feed_widget->settings_admin = apply_filters( 'kamn_easy_twitter_feed_widget_options_admin_filter', wp_parse_args( get_option( 'kamn_easy_twitter_feed_widget_options', kamn_easy_twitter_feed_widget_options_default() ), kamn_easy_twitter_feed_widget_options_default() ) );
128
+ }
129
+
130
+ /** return settings. */
131
+ return $kamn_easy_twitter_feed_widget->settings_admin;
132
+ }
133
+
134
+ /** Kamn Options Init */
135
+ function kamn_easy_twitter_feed_widget_options_init() {
136
+
137
+ $kamn_easy_twitter_feed_widget_options = get_option( 'kamn_easy_twitter_feed_widget_options' );
138
+ if( !is_array( $kamn_easy_twitter_feed_widget_options ) ) {
139
+ update_option( 'kamn_easy_twitter_feed_widget_options', kamn_easy_twitter_feed_widget_options_default() );
140
+ }
141
+
142
+ }
143
+
144
+ /** Kamn Options Range */
145
+
146
+ /* Boolean Yes | No */
147
+ function kamn_easy_twitter_feed_widget_boolean_pd() {
148
+ return array (
149
+ 1 => __( 'yes', 'kamn-easy-twitter-feed-widget' ),
150
+ 0 => __( 'no', 'kamn-easy-twitter-feed-widget' )
151
+ );
152
+ }
153
+
154
+ /** Kamn Options Validation */
155
+ function kamn_easy_twitter_feed_widget_options_validate( $input ) {
156
+
157
+ /** Default */
158
+ $default = kamn_easy_twitter_feed_widget_options_default();
159
+
160
+ /** Kamn Predefined */
161
+ $kamn_easy_twitter_feed_widget_boolean_pd = $this->kamn_easy_twitter_feed_widget_boolean_pd();
162
+
163
+ /* Validation: kamn_easy_twitter_feed_widget_fontawesome_control */
164
+ if ( ! array_key_exists( $input['kamn_easy_twitter_feed_widget_script_control'], $kamn_easy_twitter_feed_widget_boolean_pd ) ) {
165
+ $input['kamn_easy_twitter_feed_widget_script_control'] = $default['kamn_easy_twitter_feed_widget_script_control'];
166
+ }
167
+
168
+ /** Reset Logic */
169
+ if( $input['kamn_easy_twitter_feed_widget_reset_control'] == 1 ) {
170
+ $input = $default;
171
+ }
172
+
173
+ return $input;
174
+
175
+ }
176
+
177
+ /** Fonts Section Callback */
178
+ function kamn_easy_twitter_feed_widget_section_script_cb() {
179
+ echo '<div class="kamn-easy-twitter-feed-widget-section-desc">
180
+ <p class="description">'. __( 'Customize Twitter Embeddable Widget by using the following settings.', 'kamn-easy-twitter-feed-widget' ) .'</p>
181
+ </div>';
182
+ }
183
+
184
+ /* Script Control Callback */
185
+ function kamn_easy_twitter_feed_widget_field_script_control_cb() {
186
+
187
+ $kamn_easy_twitter_feed_widget_options = $this->kamn_easy_twitter_feed_widget_get_admin_settings();
188
+ $items = $this->kamn_easy_twitter_feed_widget_boolean_pd();
189
+
190
+ echo '<select id="kamn_easy_twitter_feed_widget_script_control" name="kamn_easy_twitter_feed_widget_options[kamn_easy_twitter_feed_widget_script_control]">';
191
+ foreach( $items as $key => $val ) {
192
+ ?>
193
+ <option value="<?php echo $key; ?>" <?php selected( $key, $kamn_easy_twitter_feed_widget_options['kamn_easy_twitter_feed_widget_script_control'] ); ?>><?php echo $val; ?></option>
194
+ <?php
195
+ }
196
+ echo '</select>';
197
+ echo '<div><code>'. __( 'Select "no" if your theme supports Twitter Embeddable Widget.', 'kamn-easy-twitter-feed-widget' ) .'</code></div>';
198
+
199
+ }
200
+
201
+ /** General Section Callback */
202
+ function kamn_easy_twitter_feed_widget_section_general_cb() {
203
+ echo '<div class="kamn-easy-twitter-feed-widget-section-desc">
204
+ <p class="description">'. __( 'Here are the general settings to customize easy twitter feed widget plugin.', 'kamn-easy-twitter-feed-widget' ) .'</p>
205
+ </div>';
206
+ }
207
+
208
+ /* Reset Control Callback */
209
+ function kamn_easy_twitter_feed_widget_field_reset_control_cb() {
210
+ echo '<label><input type="checkbox" id="kamn_easy_twitter_feed_widget_reset_control" name="kamn_easy_twitter_feed_widget_options[kamn_easy_twitter_feed_widget_reset_control]" value="1" /> '. __( 'Reset EasyTwitterFeedWidget Options.', 'kamn-easy-twitter-feed-widget' ) .'</label>';
211
+ }
212
+ }
213
+
214
+ /** Initiate Admin */
215
+ new Kamn_Easytwitterfeedwidget_Admin();
lib/admin/help/changelog.html ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <h2>Easy Twitter Feed Widget WordPress Plugin Changelog Information</h2>
2
+
3
+ <h3>0.1 [2014.01.03]</h3>
4
+ <p>Initial Release.</p>
lib/admin/help/license.html ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h2>Easy Twitter Feed Widget WordPress Plugin License Information</h2>
2
+
3
+ <p>Easy Twitter Feed Widget WordPress Plugin, Copyright (C) 2013 DesignOrbital.com</p>
4
+ <ol>
5
+ <li>License: GNU General Public License, GPLv3</li>
6
+ <li>License URI: <a href="http://www.gnu.org/licenses/gpl-3.0.html">http://www.gnu.org/licenses/gpl-3.0.html</a></li>
7
+ <li>For more information on this, and how to apply and follow the GNU GPL, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a></li>
8
+ </ol>
9
+
10
+ <p>This program is free software; you can redistribute it and/or modify
11
+ it under the terms of the GNU General Public License as published by
12
+ the Free Software Foundation; either version 3 of the License, or
13
+ (at your option) any later version.</p>
14
+
15
+ <p>This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU General Public License for more details.</p>
lib/admin/help/support.html ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <h2>Plugin Support</h2>
2
+ <p>Easy Twitter Feed Widget is a project of <a href="http://designorbital.com/">DesignOrbital</a>. You can reach us via contact us page.</p>
lib/admin/page.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap kamn-easy-twitter-feed-widget-settings">
2
+
3
+ <?php
4
+ /** Get the plugin data. */
5
+ $kamn_easy_twitter_feed_widget_plugin_data = kamn_easy_twitter_feed_widget_plugin_data();
6
+ screen_icon();
7
+ ?>
8
+
9
+ <h2><?php echo sprintf( __( '%1$s Settings', 'kamn-easy-twitter-feed-widget' ), $kamn_easy_twitter_feed_widget_plugin_data['Name'] ); ?></h2>
10
+
11
+ <?php settings_errors(); ?>
12
+
13
+ <div class="kamn-easy-twitter-feed-widget-promo-wrapper">
14
+ <a href="http://designorbital.com/premium-wordpress-themes/?utm_source=wporg-etfw&utm_medium=button&utm_campaign=premium-wp-themes" class="button button-primary button-hero" target="_blank"><?php _e( 'Premium WordPress Themes', 'kamn-easy-twitter-feed-widget' ); ?></a>
15
+ <a href="http://designorbital.com/free-wordpress-themes/?utm_source=wporg-etfw&utm_medium=button&utm_campaign=free-wp-themes" class="button button-hero" target="_blank"><?php _e( 'Free WordPress Themes', 'kamn-easy-twitter-feed-widget' ); ?></a>
16
+ <a href="https://www.facebook.com/designorbital" class="button button-hero" target="_blank"><?php _e( 'Like Us On Facebook', 'kamn-easy-twitter-feed-widget' ); ?></a>
17
+ <a href="https://twitter.com/designorbital" class="button button-hero" target="_blank"><?php _e( 'Follow On Twitter', 'kamn-easy-twitter-feed-widget' ); ?></a>
18
+ </div>
19
+
20
+ <form action="options.php" method="post" id="kamn-easy-twitter-feed-widget-form-wrapper">
21
+
22
+ <div id="kamn-easy-twitter-feed-widget-form-header" class="kamn-easy-twitter-feed-widget-clearfix">
23
+ <input type="submit" class="button button-primary" value="<?php _e( 'Save Changes', 'kamn-easy-twitter-feed-widget' ); ?>">
24
+ </div>
25
+
26
+ <?php settings_fields( 'kamn_easy_twitter_feed_widget_options_group' ); ?>
27
+
28
+ <div id="kamn-easy-twitter-feed-widget-sidebar">
29
+
30
+ <ul id="kamn-easy-twitter-feed-widget-group-menu">
31
+ <li id="0_section_group_li" class="kamn-easy-twitter-feed-widget-group-tab-link-li active"><a href="javascript:void(0);" id="0_section_group_li_a" class="kamn-easy-twitter-feed-widget-group-tab-link-a" data-rel="0"><span><?php _e( 'Twitter Script Settings', 'kamn-easy-twitter-feed-widget' ); ?></span></a></li>
32
+ <li id="1_section_group_li" class="kamn-easy-twitter-feed-widget-group-tab-link-li"><a href="javascript:void(0);" id="1_section_group_li_a" class="kamn-easy-twitter-feed-widget-group-tab-link-a" data-rel="1"><span><?php _e( 'General Settings', 'kamn-easy-twitter-feed-widget' ); ?></span></a></li>
33
+ </ul>
34
+
35
+ </div>
36
+
37
+ <div id="kamn-easy-twitter-feed-widget-main">
38
+
39
+ <div id="0_section_group" class="kamn-easy-twitter-feed-widget-group-tab">
40
+ <?php do_settings_sections( 'kamn_easy_twitter_feed_widget_section_script_page' ); ?>
41
+ </div>
42
+
43
+ <div id="1_section_group" class="kamn-easy-twitter-feed-widget-group-tab">
44
+ <?php do_settings_sections( 'kamn_easy_twitter_feed_widget_section_general_page' ); ?>
45
+ </div>
46
+
47
+ </div>
48
+
49
+ <div class="kamn-easy-twitter-feed-widget-clear"></div>
50
+
51
+ <div id="kamn-easy-twitter-feed-widget-form-footer" class="kamn-easy-twitter-feed-widget-clearfix">
52
+ <input type="submit" class="button button-primary" value="<?php _e( 'Save Changes', 'kamn-easy-twitter-feed-widget' ); ?>">
53
+ </div>
54
+
55
+ </form>
56
+
57
+ </div>
lib/admin/plugin-options.css ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ |------------------------
3
+ | =Clear Floated Elements
4
+ |------------------------
5
+ */
6
+
7
+ .kamn-easy-twitter-feed-widget-clear {
8
+ clear: both;
9
+ display: block;
10
+ overflow: hidden;
11
+ visibility: hidden;
12
+ width: 0;
13
+ height: 0;
14
+ }
15
+
16
+ .kamn-easy-twitter-feed-widget-clearfix:before,
17
+ .kamn-easy-twitter-feed-widget-clearfix:after {
18
+ content: '.';
19
+ display: block;
20
+ overflow: hidden;
21
+ visibility: hidden;
22
+ font-size: 0;
23
+ line-height: 0;
24
+ width: 0;
25
+ height: 0;
26
+ }
27
+
28
+ .kamn-easy-twitter-feed-widget-clearfix:after {
29
+ clear: both;
30
+ }
31
+
32
+ .kamn-easy-twitter-feed-widget-clearfix {
33
+ zoom: 1;
34
+ }
35
+
36
+ /**
37
+ |------------------------
38
+ | =Promo Wrapper
39
+ |------------------------
40
+ */
41
+
42
+ .kamn-easy-twitter-feed-widget-promo-wrapper {
43
+ margin: 25px 0;
44
+ }
45
+
46
+ /**
47
+ |------------------------
48
+ | =Options Form
49
+ |------------------------
50
+ */
51
+
52
+ #kamn-easy-twitter-feed-widget-form-wrapper {
53
+ background-color: #eeeeee;
54
+ border: 1px solid #e5e5e5;
55
+ margin-top: 20px;
56
+ }
57
+
58
+ #kamn-easy-twitter-feed-widget-form-header,
59
+ #kamn-easy-twitter-feed-widget-form-footer {
60
+ text-align: right;
61
+ padding: 20px;
62
+ }
63
+
64
+ #kamn-easy-twitter-feed-widget-form-header {
65
+ border-bottom: 1px solid #DFDFDF;
66
+ }
67
+
68
+ #kamn-easy-twitter-feed-widget-form-footer {
69
+ border-top: 1px solid #DFDFDF;
70
+ }
71
+
72
+ /**
73
+ |------------------------
74
+ | =Options Sidebar
75
+ |------------------------
76
+ */
77
+
78
+ #kamn-easy-twitter-feed-widget-sidebar,
79
+ #kamn-easy-twitter-feed-widget-main {
80
+ min-height: 300px;
81
+ }
82
+
83
+ #kamn-easy-twitter-feed-widget-sidebar {
84
+ width: 200px;
85
+ float: left;
86
+ }
87
+
88
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu,
89
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li {
90
+ margin: 0;
91
+ }
92
+
93
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li.divide {
94
+ padding: 0px;
95
+ border-width: 1px 0px 1px 0px;
96
+ border-style: solid;
97
+ border-bottom-color: #DFDFDF;
98
+ border-top-color: #F9F9F9;
99
+ }
100
+
101
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li a {
102
+ display:block;
103
+ padding: 14px 14px;
104
+ background: #eeeeee;
105
+ border-top: solid 1px #F9F9F9;
106
+ border-right: solid 1px #DFDFDF;
107
+ border-bottom: solid 1px #DFDFDF;
108
+ border-left: none;
109
+ color: #333333;
110
+ font-weight:bold;
111
+ text-decoration:none;
112
+ }
113
+
114
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li a.custom-tab {
115
+ background: #f6f6f6;
116
+ }
117
+
118
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li a img {
119
+ width: 16px;
120
+ height: 16px;
121
+ margin-bottom:-3px;
122
+ }
123
+
124
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li a:hover {
125
+ background:#f9f9f9;
126
+ }
127
+
128
+ #kamn-easy-twitter-feed-widget-sidebar #kamn-easy-twitter-feed-widget-group-menu li.active a {
129
+ background:#ffffff;
130
+ border-right: none;
131
+ }
132
+
133
+ /**
134
+ |------------------------
135
+ | =Options Main
136
+ |------------------------
137
+ */
138
+
139
+ #kamn-easy-twitter-feed-widget-main {
140
+ background: #FFFFFF;
141
+ margin-left: 200px;
142
+ padding: 16px 20px 1px 20px;
143
+ }
144
+
145
+ .kamn-easy-twitter-feed-widget-group-tab {
146
+ display: none;
147
+ }
148
+
149
+ .kamn-easy-twitter-feed-widget-group-tab h3 {
150
+ margin: 0 0 18px 0;
151
+ padding: 0 0 18px 0;
152
+ border-bottom: 1px solid #DFDFDF;
153
+ font-size: 21px;
154
+ font-weight: normal;
155
+ line-height: 1.2;
156
+ }
157
+
158
+ .kamn-easy-twitter-feed-widget-group-tab .kamn-easy-twitter-feed-widget-section-desc {
159
+ font-style: italic;
160
+ border-bottom: 1px solid #DFDFDF;
161
+ padding: 0 0 18px 0;
162
+ margin: 0 0 30px 0;
163
+ }
164
+
165
+ .kamn-easy-twitter-feed-widget-group-tab .kamn-easy-twitter-feed-widget-section-desc p.description {
166
+ margin: 0;
167
+ padding: 0;
168
+ }
169
+
170
+ .kamn-easy-twitter-feed-widget-group-tab select {
171
+ width: 35%;
172
+ }
173
+
174
+ .kamn-easy-twitter-feed-widget-group-tab input[type="text"] {
175
+ width: 50%;
176
+ }
177
+
178
+ /**
179
+ |------------------------
180
+ | =Options Form Table
181
+ |------------------------
182
+ */
183
+
184
+ .kamn-easy-twitter-feed-widget-group-tab .form-table {
185
+ clear: none;
186
+ }
187
+
188
+ .kamn-easy-twitter-feed-widget-group-tab .form-table th {
189
+ font-weight: bold;
190
+ padding: 0 0 30px 0;
191
+ }
192
+
193
+ .kamn-easy-twitter-feed-widget-group-tab .form-table td {
194
+ padding: 0 0 30px 0;
195
+ }
lib/admin/plugin-options.js ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Plugins for Admin Options */
2
+ /*!
3
+ * jQuery Cookie Plugin v1.3.1
4
+ * https://github.com/carhartl/jquery-cookie
5
+ *
6
+ * Copyright 2013 Klaus Hartl
7
+ * Released under the MIT license
8
+ */
9
+
10
+ (function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){function n(e){return e}function r(e){return decodeURIComponent(e.replace(t," "))}function i(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{return s.json?JSON.parse(e):e}catch(t){}}var t=/\+/g;var s=e.cookie=function(t,o,u){if(o!==undefined){u=e.extend({},s.defaults,u);if(typeof u.expires==="number"){var a=u.expires,f=u.expires=new Date;f.setDate(f.getDate()+a)}o=s.json?JSON.stringify(o):String(o);return document.cookie=[encodeURIComponent(t),"=",s.raw?o:encodeURIComponent(o),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}var l=s.raw?n:r;var c=document.cookie.split("; ");var h=t?undefined:{};for(var p=0,d=c.length;p<d;p++){var v=c[p].split("=");var m=l(v.shift());var g=l(v.join("="));if(t&&t===m){h=i(g);break}if(!t){h[m]=i(g)}}return h};s.defaults={};e.removeCookie=function(t,n){if(e.cookie(t)!==undefined){e.cookie(t,"",e.extend(n,{expires:-1}));return true}return false}});
11
+
12
+ /** Custom Code */
13
+ (function($){
14
+
15
+ /** Options Tabs */
16
+ function kamnEasyTwitterFeedWidgetOptionsTabs() {
17
+
18
+ var relid = $.cookie( 'kamn_easy_twitter_feed_widget_tab_relid' );
19
+
20
+ if( relid >= 1 ) {
21
+ kamnEasyTwitterFeedWidgetOptionsTabControl( relid );
22
+ } else {
23
+ kamnEasyTwitterFeedWidgetOptionsTabControl( 0 );
24
+ }
25
+
26
+ $( '.kamn-easy-twitter-feed-widget-group-tab-link-a' ).click( function() {
27
+
28
+ relid = $(this).attr( 'data-rel' );
29
+ $.cookie( 'kamn_easy_twitter_feed_widget_tab_relid', relid );
30
+ kamnEasyTwitterFeedWidgetOptionsTabControl( relid );
31
+
32
+ });
33
+
34
+ }
35
+
36
+ function kamnEasyTwitterFeedWidgetOptionsTabControl( relid ) {
37
+
38
+ $( '.kamn-easy-twitter-feed-widget-group-tab' ).each( function() {
39
+
40
+ if( $(this).attr( 'id' ) == relid + '_section_group' ) {
41
+ $(this).delay( 400 ).fadeIn( 1200 );
42
+ } else{
43
+ $(this).fadeOut( 'fast' );
44
+ }
45
+
46
+ });
47
+
48
+ $( '.kamn-easy-twitter-feed-widget-group-tab-link-li' ).each( function() {
49
+
50
+ if( $(this).attr('id') != relid + '_section_group_li' && $(this).hasClass( 'active' ) ) {
51
+ $(this).removeClass( 'active' );
52
+ }
53
+
54
+ if( $(this).attr('id') == relid + '_section_group_li' ) {
55
+ $(this).addClass('active');
56
+ }
57
+
58
+ });
59
+
60
+ }
61
+
62
+ /** jQuery Document Ready */
63
+ $(document).ready(function(){
64
+ kamnEasyTwitterFeedWidgetOptionsTabs();
65
+ });
66
+
67
+ })(jQuery);
lib/core.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**********************************************
3
+ * Default Options
4
+ **********************************************/
5
+
6
+ function kamn_easy_twitter_feed_widget_options_default() {
7
+
8
+ $default = array(
9
+
10
+ 'kamn_easy_twitter_feed_widget_script_control' => 1,
11
+ 'kamn_easy_twitter_feed_widget_reset_control' => 0
12
+
13
+ );
14
+
15
+ return $default;
16
+
17
+ }
18
+
19
+ /**********************************************
20
+ * Plugin Settings
21
+ **********************************************/
22
+
23
+ /** Loads the plugin setting. */
24
+ function kamn_easy_twitter_feed_widget_get_settings() {
25
+
26
+ /** Global Data */
27
+ global $kamn_easy_twitter_feed_widget;
28
+
29
+ /* If the settings array hasn't been set, call get_option() to get an array of plugin settings. */
30
+ if ( !isset( $kamn_easy_twitter_feed_widget->settings ) ) {
31
+ $kamn_easy_twitter_feed_widget->settings = apply_filters( 'kamn_easy_twitter_feed_widget_options_filter', wp_parse_args( get_option( 'kamn_easy_twitter_feed_widget_options', kamn_easy_twitter_feed_widget_options_default() ), kamn_easy_twitter_feed_widget_options_default() ) );
32
+ }
33
+
34
+ /** return settings. */
35
+ return $kamn_easy_twitter_feed_widget->settings;
36
+ }
37
+
38
+ /**********************************************
39
+ * Plugin Data
40
+ **********************************************/
41
+
42
+ /** Function for getting the plugin data */
43
+ function kamn_easy_twitter_feed_widget_plugin_data() {
44
+
45
+ /** Global Data */
46
+ global $kamn_easy_twitter_feed_widget;
47
+
48
+ /** If the parent theme data isn't set, let grab it. */
49
+ if ( !isset( $kamn_easy_twitter_feed_widget->plugin_data ) ) {
50
+ $kamn_easy_twitter_feed_widget->plugin_data = get_plugin_data( KAMN_EASY_TWITTER_FEED_WIDGET_DIR . 'easy-twitter-feed-widget.php' );
51
+ }
52
+
53
+ /** Return the plugin data. */
54
+ return $kamn_easy_twitter_feed_widget->plugin_data;
55
+ }
56
+
57
+ /**********************************************
58
+ * External Link
59
+ **********************************************/
60
+
61
+ function kamn_easy_twitter_feed_widget_external_link( $key = '' ) {
62
+
63
+ $kamn_easy_twitter_feed_widget_external_link = array(
64
+ 'fa-icons' => 'http://fontawesome.io/icons/',
65
+ );
66
+
67
+ return $kamn_easy_twitter_feed_widget_external_link[$key];
68
+
69
+ }
lib/init.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Kamn_Easytwitterfeedwidget {
3
+
4
+ /** Constructor */
5
+ function __construct() {
6
+
7
+ /** Standard Class */
8
+ global $kamn_easy_twitter_feed_widget;
9
+ $kamn_easy_twitter_feed_widget = new stdClass;
10
+
11
+ /** Loader */
12
+ add_action( 'plugins_loaded', array( $this, 'kamn_easy_twitter_feed_widget_loader' ), 10 );
13
+
14
+ /** Setup */
15
+ add_action( 'plugins_loaded', array( $this, 'kamn_easy_twitter_feed_widget_setup' ), 12 );
16
+
17
+ }
18
+
19
+ /** Loader */
20
+ function kamn_easy_twitter_feed_widget_loader() {
21
+
22
+ /** Directory Location Constants */
23
+
24
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR' ) ) {
25
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_DIR . 'lib' ) );
26
+ }
27
+
28
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR' ) ) {
29
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'admin' ) );
30
+ }
31
+
32
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_JS_DIR' ) ) {
33
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_JS_DIR', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'js' ) );
34
+ }
35
+
36
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_CSS_DIR' ) ) {
37
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_CSS_DIR', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'css' ) );
38
+ }
39
+
40
+ /** URI Location Constants */
41
+
42
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_LIB_URI' ) ) {
43
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_LIB_URI', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_URI . 'lib' ) );
44
+ }
45
+
46
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_URI' ) ) {
47
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_URI', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_URI . 'admin' ) );
48
+ }
49
+
50
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_JS_URI' ) ) {
51
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_JS_URI', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_URI . 'js' ) );
52
+ }
53
+
54
+ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_CSS_URI' ) ) {
55
+ define( 'KAMN_EASY_TWITTER_FEED_WIDGET_CSS_URI', trailingslashit( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_URI . 'css' ) );
56
+ }
57
+
58
+ /** Core Classes / Functions */
59
+ require_once( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'core.php' );
60
+
61
+ /** Register Modules */
62
+ require_once( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'modules.php' );
63
+
64
+ /** Load Admin */
65
+ if ( is_admin() ) {
66
+
67
+ /** Admin Options */
68
+ require_once( KAMN_EASY_TWITTER_FEED_WIDGET_ADMIN_DIR . 'admin.php' );
69
+
70
+ }
71
+
72
+ }
73
+
74
+ /** Plugin Setup */
75
+ function kamn_easy_twitter_feed_widget_setup() {
76
+
77
+ /** Utility */
78
+ require_once( KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'utils.php' );
79
+
80
+ }
81
+
82
+ }
83
+
84
+ /** Initiate Class */
85
+ new Kamn_Easytwitterfeedwidget();
lib/js/widget-easy-twitter-feed-widget.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*!
2
+ * Twitter Embeddable Widget
3
+ */
4
+
5
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
lib/modules.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**********************************************
3
+ * Widgets
4
+ **********************************************/
5
+
6
+ /** Widgets Skeleton */
7
+ function kamn_easy_twitter_feed_widget_widgets_skeleton() {
8
+
9
+ /** Theme Settings */
10
+ $kamn_easy_twitter_feed_widget_options = kamn_easy_twitter_feed_widget_get_settings();
11
+
12
+ /** Skeleton */
13
+ $kamn_easy_twitter_feed_widget_widgets_skeleton = array(
14
+
15
+ 'Kamn_Widget_Easytwitterfeedwidget' => array(
16
+ 'enable' => 1,
17
+ 'class' => KAMN_EASY_TWITTER_FEED_WIDGET_LIB_DIR . 'widget-easy-twitter-feed-widget.php',
18
+ 'enqueue_script' => $kamn_easy_twitter_feed_widget_options['kamn_easy_twitter_feed_widget_script_control'],
19
+ 'enqueue_style' => 0,
20
+ 'scripts' => array(
21
+ 1 => array(
22
+ 'handle' => 'kamn-js-widget-easy-twitter-feed-widget',
23
+ 'src' => KAMN_EASY_TWITTER_FEED_WIDGET_JS_URI . 'widget-easy-twitter-feed-widget.js',
24
+ 'deps' => array( 'jquery' )
25
+ )
26
+ ),
27
+ 'styles' => array()
28
+ )
29
+
30
+ );
31
+
32
+ return $kamn_easy_twitter_feed_widget_widgets_skeleton;
33
+
34
+ }
35
+
36
+ /** Widgets */
37
+ add_action( 'widgets_init', 'kamn_easy_twitter_feed_widget_widgets' );
38
+
39
+ /** Register Widgets */
40
+ function kamn_easy_twitter_feed_widget_widgets() {
41
+
42
+ /** Avaiable Widgets */
43
+ $kamn_easy_twitter_feed_widget_widgets_skeleton = kamn_easy_twitter_feed_widget_widgets_skeleton();
44
+
45
+ /** Register Widgets */
46
+ foreach( $kamn_easy_twitter_feed_widget_widgets_skeleton as $key => $widget ) {
47
+ if( $widget['enable'] == 1 ) {
48
+ require_once( $widget['class'] );
49
+ register_widget( $key );
50
+ }
51
+ }
52
+
53
+ /** Enqueue Widget Scripts */
54
+ add_action( 'wp_enqueue_scripts', 'kamn_easy_twitter_feed_widget_media_widget', 20 );
55
+ function kamn_easy_twitter_feed_widget_media_widget() {
56
+
57
+ /** Avaiable Widgets */
58
+ $kamn_easy_twitter_feed_widget_widgets_skeleton = kamn_easy_twitter_feed_widget_widgets_skeleton();
59
+
60
+ /** Iterate */
61
+ foreach( $kamn_easy_twitter_feed_widget_widgets_skeleton as $key => $widget ) {
62
+
63
+ /** Enqueue Scripts */
64
+ if( $widget['enable'] == 1 && $widget['enqueue_script'] == 1 ) {
65
+ foreach( $widget['scripts'] as $script ) {
66
+ wp_enqueue_script( $script['handle'], $script['src'], $script['deps'], '1.0', true );
67
+ }
68
+ }
69
+
70
+ /** Enqueue Styles */
71
+ if( $widget['enable'] == 1 && $widget['enqueue_style'] == 1 ) {
72
+ foreach( $widget['styles'] as $style ) {
73
+ wp_enqueue_style( $style['handle'], $style['src'] );
74
+ }
75
+ }
76
+
77
+ }
78
+
79
+ }
80
+
81
+ }
lib/utils.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**********************************************
3
+ * Translation
4
+ **********************************************/
5
+
6
+ load_plugin_textdomain( 'kamn-easy-twitter-feed-widget', false, KAMN_EASY_TWITTER_FEED_WIDGET_DIR_BASENAME . 'languages/' );
7
+
8
+ /**********************************************
9
+ * Media
10
+ **********************************************/
11
+
12
+ /** Enqueue Scripts */
13
+ add_action( 'wp_enqueue_scripts', 'kamn_easy_twitter_feed_widget_media' );
14
+
15
+ /** Enqueue Scripts */
16
+ function kamn_easy_twitter_feed_widget_media() {
17
+
18
+ /** Enqueue CSS Files */
19
+
20
+ /** Plugin Stylesheet */
21
+ wp_enqueue_style( 'kamn-css-easy-twitter-feed-widget', esc_url( KAMN_EASY_TWITTER_FEED_WIDGET_URI . 'easy-twitter-feed-widget.css' ) );
22
+
23
+ }
lib/widget-easy-twitter-feed-widget.php ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**********************************************
3
+ * Twitterwidget Widget
4
+ **********************************************/
5
+
6
+ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
7
+
8
+ /**
9
+ * Set up the widget's unique name, ID, class, description, and other options.
10
+ */
11
+ function __construct() {
12
+
13
+ /* Set up the widget options. */
14
+ $widget_options = array(
15
+ 'classname' => 'widget-easy-twitter-feed-widget-kamn',
16
+ 'description' => esc_html__( 'A widget to display Twitter feed.', 'kamn-easy-twitter-feed-widget' )
17
+ );
18
+
19
+ /* Set up the widget control options. */
20
+ $control_options = array(
21
+ 'width' => 300,
22
+ 'height' => 250
23
+ );
24
+
25
+ /* Create the widget. */
26
+ $this->WP_Widget( 'widget-easy-twitter-feed-widget-kamn', __( 'Easy Twitter Feed Widget', 'kamn-easy-twitter-feed-widget'), $widget_options, $control_options );
27
+
28
+ }
29
+
30
+ /**
31
+ * Outputs the widget based on the arguments input through the widget controls.
32
+ *
33
+ * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
34
+ * @param array $instance The settings for the particular instance of the widget
35
+ */
36
+
37
+ function widget( $args, $instance ) {
38
+
39
+ /** Global Data */
40
+ global $post;
41
+
42
+ /** Extract Args */
43
+ extract( $args );
44
+
45
+ /** Set up the default form values. */
46
+ $defaults = $this->kamn_defaults();
47
+
48
+ /** Merge the user-selected arguments with the defaults. */
49
+ $instance = wp_parse_args( (array) $instance, $defaults );
50
+
51
+ /** Data Chrome */
52
+ $data_chrome = array();
53
+ $data_chrome[] = ( $instance['twitter_widget_chrome_header'] == 0 )? 'noheader': '';
54
+ $data_chrome[] = ( $instance['twitter_widget_chrome_footer'] == 0 )? 'nofooter': '';
55
+ $data_chrome[] = ( $instance['twitter_widget_chrome_border'] == 0 )? 'noborders': '';
56
+ $data_chrome[] = ( $instance['twitter_widget_chrome_scrollbar'] == 0 )? 'noscrollbar': '';
57
+ $data_chrome[] = ( $instance['twitter_widget_chrome_background'] == 0 )? 'transparent': '';
58
+
59
+ /** Data Attributes */
60
+ $data_twitter_widget = array(
61
+ 'data-widget-id' => $instance['twitter_widget_id'],
62
+ 'data-screen-name' => $instance['twitter_widget_screen_name'],
63
+ 'data-show-replies' => $instance['twitter_widget_show_replies'],
64
+ 'data-theme' => $instance['twitter_widget_theme'],
65
+ 'data-link-color' => $instance['twitter_widget_link_color'],
66
+ 'data-border-color' => $instance['twitter_widget_border_color'],
67
+ 'data-chrome' => trim( join( ' ', $data_chrome ) )
68
+ );
69
+
70
+ /** Twitter only manages scrollbar / height at default value. So this is for it :) */
71
+ if( $instance['twitter_widget_tweet_limit'] != 0 ) {
72
+ $data_twitter_widget['data-tweet-limit'] = $instance['twitter_widget_tweet_limit'];
73
+ }
74
+
75
+ /** Data Attributes as name=value */
76
+ $data_twitter_widget_nv = '';
77
+ foreach ( $data_twitter_widget as $key => $val ) {
78
+ $data_twitter_widget_nv .= $key . '=' . '"' . esc_attr( $val ) . '"' . ' ';
79
+ }
80
+
81
+ /** Open the output of the widget. */
82
+ echo $before_widget;
83
+
84
+ ?>
85
+ <div class="widget-easy-twitter-feed-widget-global-wrapper">
86
+ <div class="widget-easy-twitter-feed-widget-container">
87
+
88
+ <div class="row">
89
+ <div class="col-lg-12">
90
+ <?php echo $before_title . '<span>' . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . '</span>' . $after_title; ?>
91
+ </div>
92
+ </div>
93
+
94
+ <div class="widget-easy-twitter-feed-widget-row">
95
+ <div class="widget-easy-twitter-feed-widget-col">
96
+ <div class="twitterwidget <?php echo $widget_id; ?>">
97
+ <a class="twitter-timeline" width="<?php echo $instance['twitter_widget_width']; ?>" height="<?php echo $instance['twitter_widget_height']; ?>" href="https://twitter.com/twitterapi" <?php echo trim( $data_twitter_widget_nv ); ?>>Tweets by @<?php echo $instance['twitter_widget_screen_name']; ?></a>
98
+ </div>
99
+ </div>
100
+ </div>
101
+
102
+ </div> <!-- End .widget-global-wrapper -->
103
+ </div>
104
+
105
+ <?php
106
+
107
+ /** Close the output of the widget. */
108
+ echo $after_widget;
109
+
110
+ }
111
+
112
+ /** Updates the widget control options for the particular instance of the widget.
113
+ *
114
+ * This function should check that $new_instance is set correctly.
115
+ * The newly calculated value of $instance should be returned.
116
+ * If "false" is returned, the instance won't be saved/updated.
117
+ *
118
+ * @param array $new_instance New settings for this instance as input by the user via form()
119
+ * @param array $old_instance Old settings for this instance
120
+ * @return array Settings to save or bool false to cancel saving
121
+ */
122
+ function update( $new_instance, $old_instance ) {
123
+
124
+ /** Default Args */
125
+ $defaults = $this->kamn_defaults();
126
+
127
+ /** Update Logic */
128
+ $instance = $old_instance;
129
+ foreach( $defaults as $key => $val ) {
130
+ $instance[$key] = strip_tags( $new_instance[$key] );
131
+ }
132
+ return $instance;
133
+
134
+ }
135
+
136
+ /**
137
+ *
138
+ * Displays the widget control options in the Widgets admin screen.
139
+ *
140
+ * @param array $instance Current settings
141
+ */
142
+ function form( $instance ) {
143
+
144
+ /** Set up the default form values. */
145
+ $defaults = $this->kamn_defaults();
146
+
147
+ /** Merge the user-selected arguments with the defaults. */
148
+ $instance = wp_parse_args( (array) $instance, $defaults );
149
+
150
+ $title = strip_tags( $instance['title'] );
151
+ $twitter_widget_tweet_limit = array_merge( array( 0 => 'default' ), array_combine( range( 1, 20 ), range( 1, 20 ) ) );
152
+ $twitter_widget_show_replies = array( 'true' => 'Yes', 'false' => 'No' );
153
+ $twitter_widget_width = range( 180, 520, 20 );
154
+ $twitter_widget_height = range( 200, 600, 50 );
155
+ $twitter_widget_theme = array( 'light' => 'Light', 'dark' => 'Dark' );
156
+ $boolean = array( 1 => 'Yes', 0 => 'No' );
157
+ ?>
158
+
159
+ <p>
160
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'kamn-easy-twitter-feed-widget' ); ?></label>
161
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" />
162
+ </p>
163
+
164
+ <p><strong><?php _e( 'Easy Twitter Feed Widget Settings', 'kamn-easy-twitter-feed-widget' ); ?></strong></p>
165
+ <hr />
166
+
167
+ <p>
168
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_id' ); ?>"><?php _e( 'Twitter Widget ID:', 'kamn-easy-twitter-feed-widget' ); ?></label>
169
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_id' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_id' ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_id'] ); ?>" />
170
+ </p>
171
+
172
+ <p>
173
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_screen_name' ); ?>"><?php _e( 'Twitter Screen Name:', 'kamn-easy-twitter-feed-widget' ); ?></label>
174
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_screen_name' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_screen_name' ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_screen_name'] ); ?>" />
175
+ </p>
176
+
177
+ <p>
178
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_tweet_limit' ); ?>"><?php _e( 'Tweet Limit:', 'kamn-easy-twitter-feed-widget' ); ?></label>
179
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_tweet_limit' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_tweet_limit' ); ?>">
180
+ <?php foreach ( $twitter_widget_tweet_limit as $key => $val ): ?>
181
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_tweet_limit'], $key ); ?>><?php echo esc_html( $val ); ?></option>
182
+ <?php endforeach; ?>
183
+ </select>
184
+ </p>
185
+
186
+ <p>
187
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_show_replies' ); ?>"><?php _e( 'Show Replies:', 'kamn-easy-twitter-feed-widget' ); ?></label>
188
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_show_replies' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_show_replies' ); ?>">
189
+ <?php foreach ( $twitter_widget_show_replies as $key => $val ): ?>
190
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_show_replies'], $key ); ?>><?php echo esc_html( $val ); ?></option>
191
+ <?php endforeach; ?>
192
+ </select>
193
+ </p>
194
+
195
+ <p>
196
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_width' ); ?>"><?php _e( 'Twitter Widget Width:', 'kamn-easy-twitter-feed-widget' ); ?></label>
197
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_width' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_width' ); ?>">
198
+ <?php foreach ( $twitter_widget_width as $val ): ?>
199
+ <option value="<?php echo esc_attr( $val ); ?>" <?php selected( $instance['twitter_widget_width'], $val ); ?>><?php echo esc_html( $val ); ?></option>
200
+ <?php endforeach; ?>
201
+ </select>
202
+ </p>
203
+
204
+ <p>
205
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_height' ); ?>"><?php _e( 'Twitter Widget Height:', 'kamn-easy-twitter-feed-widget' ); ?></label>
206
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_height' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_height' ); ?>">
207
+ <?php foreach ( $twitter_widget_height as $val ): ?>
208
+ <option value="<?php echo esc_attr( $val ); ?>" <?php selected( $instance['twitter_widget_height'], $val ); ?>><?php echo esc_html( $val ); ?></option>
209
+ <?php endforeach; ?>
210
+ </select>
211
+ <small><?php _e( 'Height setting will work only @ Tweet Limit "default".', 'kamn-easy-twitter-feed-widget' ); ?></small>
212
+ </p>
213
+
214
+ <p>
215
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_theme' ); ?>"><?php _e( 'Twitter Widget Theme:', 'kamn-easy-twitter-feed-widget' ); ?></label>
216
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_theme' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_theme' ); ?>">
217
+ <?php foreach ( $twitter_widget_theme as $key => $val ): ?>
218
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_theme'], $key ); ?>><?php echo esc_html( $val ); ?></option>
219
+ <?php endforeach; ?>
220
+ </select>
221
+ </p>
222
+
223
+ <p>
224
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_link_color' ); ?>"><?php _e( 'Twitter Widget Link Color:', 'kamn-easy-twitter-feed-widget' ); ?> <small><?php _e( 'e.g #333333', 'kamn-easy-twitter-feed-widget' ); ?></small></label><br />
225
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_link_color' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_link_color' ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_link_color'] ); ?>" />
226
+ </p>
227
+
228
+ <p>
229
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_header' ); ?>"><?php _e( 'Show Twitter Widget Header:', 'kamn-easy-twitter-feed-widget' ); ?></label>
230
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_chrome_header' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome_header' ); ?>">
231
+ <?php foreach ( $boolean as $key => $val ): ?>
232
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_header'], $key ); ?>><?php echo esc_html( $val ); ?></option>
233
+ <?php endforeach; ?>
234
+ </select>
235
+ </p>
236
+
237
+ <p>
238
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_footer' ); ?>"><?php _e( 'Show Twitter Widget Footer:', 'kamn-easy-twitter-feed-widget' ); ?></label>
239
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_chrome_footer' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome_footer' ); ?>">
240
+ <?php foreach ( $boolean as $key => $val ): ?>
241
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_footer'], $key ); ?>><?php echo esc_html( $val ); ?></option>
242
+ <?php endforeach; ?>
243
+ </select>
244
+ </p>
245
+
246
+ <p>
247
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_border' ); ?>"><?php _e( 'Show Twitter Widget Border:', 'kamn-easy-twitter-feed-widget' ); ?></label>
248
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_chrome_border' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome_border' ); ?>">
249
+ <?php foreach ( $boolean as $key => $val ): ?>
250
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_border'], $key ); ?>><?php echo esc_html( $val ); ?></option>
251
+ <?php endforeach; ?>
252
+ </select>
253
+ </p>
254
+
255
+ <p>
256
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_border_color' ); ?>"><?php _e( 'Twitter Widget Border Color:', 'kamn-easy-twitter-feed-widget' ); ?> <small><?php _e( 'e.g #333333', 'kamn-easy-twitter-feed-widget' ); ?></small></label><br />
257
+ <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_border_color' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_border_color' ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_border_color'] ); ?>" />
258
+ </p>
259
+
260
+ <p>
261
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_scrollbar' ); ?>"><?php _e( 'Show Twitter Widget Scrollbar:', 'kamn-easy-twitter-feed-widget' ); ?></label>
262
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_chrome_scrollbar' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome_scrollbar' ); ?>">
263
+ <?php foreach ( $boolean as $key => $val ): ?>
264
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_scrollbar'], $key ); ?>><?php echo esc_html( $val ); ?></option>
265
+ <?php endforeach; ?>
266
+ </select>
267
+ <small><?php _e( 'Scrollbar setting will work only @ Tweet Limit "default".', 'kamn-easy-twitter-feed-widget' ); ?></small>
268
+ </p>
269
+
270
+ <p>
271
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_background' ); ?>"><?php _e( 'Use Twitter Widget Background Color:', 'kamn-easy-twitter-feed-widget' ); ?></label>
272
+ <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_chrome_background' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome_background' ); ?>">
273
+ <?php foreach ( $boolean as $key => $val ): ?>
274
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_background'], $key ); ?>><?php echo esc_html( $val ); ?></option>
275
+ <?php endforeach; ?>
276
+ </select>
277
+ </p>
278
+
279
+ <?php
280
+ }
281
+
282
+ /** Set up the default form values. */
283
+ function kamn_defaults() {
284
+
285
+ $defaults = array(
286
+ 'title' => esc_attr__( 'Twitter Widget', 'kamn-easy-twitter-feed-widget'),
287
+ 'twitter_widget_id' => '344713329262084096',
288
+ 'twitter_widget_screen_name' => 'designorbital',
289
+ 'twitter_widget_tweet_limit' => 0,
290
+ 'twitter_widget_show_replies' => 'false',
291
+ 'twitter_widget_width' => 300,
292
+ 'twitter_widget_height' => 250,
293
+ 'twitter_widget_theme' => 'light',
294
+ 'twitter_widget_link_color' => '',
295
+ 'twitter_widget_border_color' => '',
296
+ 'twitter_widget_chrome_header' => 1,
297
+ 'twitter_widget_chrome_footer' => 1,
298
+ 'twitter_widget_chrome_border' => 1,
299
+ 'twitter_widget_chrome_scrollbar' => 1,
300
+ 'twitter_widget_chrome_background' => 1
301
+ );
302
+
303
+ return $defaults;
304
+
305
+ }
306
+
307
+ }
license.txt ADDED
@@ -0,0 +1,621 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
readme.txt ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Easy Twitter Feed Widget Plugin ===
2
+ Contributors: designorbital
3
+ License: GPLv3
4
+ License URI: http://www.gnu.org/licenses/gpl.html
5
+ Tags: twitter, twitter feed, tweet, twitter widget, feed, widget, twitter sidebar, social, social media, sidebar, plugin
6
+ Requires at least: 3.7
7
+ Tested up to: 3.9.1
8
+ Stable tag: 0.2
9
+
10
+ Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
11
+
12
+ == Description ==
13
+
14
+ Easy Twitter Feed Widget plugin uses the `Twitter Widget` without creating an API to display tweets on your WordPress site. There is no need to create Twitter application. Easy Twitter Feed Widget Plugin provides a nice interface to implement your tweets in an easy way.
15
+
16
+ If you are planning to display tweets on your blog's sidebar without bells and whistles than our plugin can be your ideal choice.
17
+
18
+ = Features =
19
+ * Easy Twitter Feed Widget Plugin is very easy to setup and use.
20
+ * You can blend your tweets professionally with the layout of any WordPress theme.
21
+ * Make it your own by customizing the link color, border color, background choice and other useful options.
22
+
23
+ = Further Useful Stuff =
24
+ Easy Twitter Feed Widget plugin is developed by DesignOrbital. You may be interesed to use our [Premium WordPress Themes](http://designorbital.com/) or [Free WordPress Themes](http://designorbital.com/free-wordpress-themes/) to run your website under the clean and SEO optimized code.
25
+
26
+ == Installation ==
27
+
28
+ 1. Upload the `easy-twitter-feed-widget` folder to the `/wp-content/plugins/` directory
29
+ 1. Activate the Easy Twitter Feed Widget plugin through the 'Plugins' menu in WordPress
30
+ 1. Configure the plugin by going to the `Settings > Easy Twitter Feed Widget Options`
31
+ 1. Use the Easy Twitter Feed Widget by going to the `Appearance > Widgets`
32
+
33
+ = How to get Twitter Widget ID =
34
+
35
+ 1. Sign In to your `Twitter Account`
36
+ 1. Go to `Settings > Widgets > Create new`
37
+ 1. Click `Create Widget` button
38
+ 1. You can copy the Widget ID from `Browser Address Bar` e.g. `419173025219799552`
39
+ 1. OR You can copy the Widget ID from the given HTML under the Widget Preview i.e. `data-widget-id="419173025219799552"`
40
+
41
+ == Screenshots ==
42
+
43
+ 1. Easy Twitter Feed Widget Plugin Options: You can control the loading of Twitter script manually. You may disable it, if your WordPress theme supports twitter script already.
44
+ 2. Easy Twitter Feed Widget: You may place your twitter feed in the sidebar or any other widgetized area of your WordPress theme by placing Easy Twitter Feed Widget.
45
+ 3. Easy Twitter Feed Widget Backend Example: You can cusomize your twitter widget to blend with any WordPress theme by adjusting an easy to use available options like Twitter Tweet limit, border color, link color etc.
46
+ 4. Easy Twitter Feed Widget Frontend Example: You can use our twitter widget with any color scheme of your WordPress theme. This is an example of Light and Dark WordPress theme layout.
47
+
48
+ == Changelog ==
49
+
50
+ = 0.2 - June 09, 2014 =
51
+
52
+ * Bug Fix: Fixed `Show Replies` option.
53
+
54
+ = 0.1 =
55
+
56
+ * Initial release.