Easy Twitter Feed Widget Plugin - Version 0.6

Version Description

  • December 18, 2016 =

  • New: Twitter embedded timeline can be displayed by using Twitter username.

  • New: Widget Id is optional now.

  • Enhancement: Plugin is re-written to provide an easy interface and secured code.

  • Hardening: Code hardening.

Download this release

Release Info

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

Code changes from version 0.5 to 0.6

css/admin.css ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*--------------------------------------------------------------
2
+ >>> TABLE OF CONTENTS:
3
+ ----------------------------------------------------------------
4
+ 1.0 - Clearings
5
+ 2.0 - Admin Wrapper
6
+ 3.0 - Forms
7
+ 4.0 - Easytabs
8
+ --------------------------------------------------------------*/
9
+
10
+ /*--------------------------------------------------------------
11
+ 1.0 - Clearings
12
+ --------------------------------------------------------------*/
13
+ .do-etfw-admin-wrapper:before,
14
+ .do-etfw-admin-wrapper:after,
15
+ .do-etfw-info:before,
16
+ .do-etfw-info:after,
17
+ .do-etfw-info-inside:before,
18
+ .do-etfw-info-inside:after {
19
+ content: '';
20
+ display: table;
21
+ }
22
+ .do-etfw-admin-wrapper:after,
23
+ .do-etfw-info:after,
24
+ .do-etfw-info-inside:after {
25
+ clear: both;
26
+ }
27
+
28
+ /*--------------------------------------------------------------
29
+ 2.0 - Admin Wrapper
30
+ --------------------------------------------------------------*/
31
+ .do-etfw-admin-wrapper {
32
+ margin: 10px 0;
33
+ width: 98%;
34
+ }
35
+
36
+ .do-etfw-header {
37
+ background: #fff;
38
+ border: 1px solid #e1e1e1;
39
+ border-bottom: none;
40
+ margin: 25px 0 0;
41
+ }
42
+ .do-etfw-header-inside {
43
+ padding: 25px;
44
+ }
45
+ .do-etfw-header h2 {
46
+ margin: 0;
47
+ padding: 0;
48
+ }
49
+
50
+ .do-etfw-info {
51
+ background: #f9f9f9;
52
+ border: 1px solid #e1e1e1;
53
+ margin: 0 0 25px;
54
+ }
55
+ .do-etfw-info-inside {
56
+ padding: 25px;
57
+ }
58
+ .do-etfw-info ul {
59
+ list-style: none;
60
+ margin: 0;
61
+ padding: 00;
62
+ }
63
+ .do-etfw-info ul li {
64
+ float: left;
65
+ margin: 0 10px 0 0;
66
+ }
67
+
68
+ div.updated {
69
+ margin: 25px 0 0 0;
70
+ }
71
+
72
+ /*--------------------------------------------------------------
73
+ 3.0 - Forms
74
+ --------------------------------------------------------------*/
75
+ .do-etfw-form-wrapper {
76
+ margin: 0;
77
+ padding: 0;
78
+ }
79
+ .do-etfw-form-wrapper input[type="text"] {
80
+ width: 80%;
81
+ }
82
+ .do-etfw-form-wrapper select {
83
+ width: 25%;
84
+ }
85
+ .do-etfw-form-header {
86
+ background: #f9f9f9;
87
+ border: 1px solid #e1e1e1;
88
+ border-bottom: none;
89
+ margin: 0;
90
+ text-align: right;
91
+ }
92
+ .do-etfw-form-header-inside {
93
+ padding: 25px;
94
+ }
95
+ .do-etfw-form-footer {
96
+ background: #f9f9f9;
97
+ border: 1px solid #e1e1e1;
98
+ border-top: none;
99
+ margin: 0 0 25px;
100
+ text-align: right;
101
+ }
102
+ .do-etfw-form-footer-inside {
103
+ padding: 25px;
104
+ }
105
+
106
+ /*--------------------------------------------------------------
107
+ 4.0 - Easytabs
108
+ --------------------------------------------------------------*/
109
+ .do-etfw-tabs-container:before,
110
+ .do-etfw-tabs-container:after {
111
+ content: '';
112
+ display: table;
113
+ }
114
+ .do-etfw-tabs-container:after,
115
+ .panel-container:after {
116
+ clear: both;
117
+ }
118
+ .do-etfw-tabs-container {
119
+ background: #fff;
120
+ border: 1px solid #e1e1e1;
121
+ min-height: 450px;
122
+ }
123
+
124
+ .do-etfw-tabs-container .panel-container {
125
+ background: #fff;
126
+ float: left;
127
+ width: 82%;
128
+ }
129
+
130
+ .do-etfw-tabs-container ul {
131
+ background: #f9f9f9;
132
+ border-right: 1px solid #e1e1e1;
133
+ display: block;
134
+ float: left;
135
+ min-height: 450px;
136
+ width: 15%;
137
+ list-style: none;
138
+ margin: 0 25px 0 0;
139
+ padding: 0;
140
+ }
141
+ .do-etfw-tabs-container ul li {
142
+ border-bottom: 1px solid #e1e1e1;
143
+ margin: 0;
144
+ padding: 0;
145
+ text-align: center;
146
+ }
147
+ .do-etfw-tabs-container ul li.active {
148
+ background: #fff;
149
+ left: 1px;
150
+ position: relative;
151
+ }
152
+ .do-etfw-tabs-container ul li a,
153
+ .do-etfw-tabs-container ul li a:visited {
154
+ color: #222;
155
+ display: block;
156
+ padding: 15px 0;
157
+ text-decoration: none;
158
+ outline: none;
159
+ }
easy-twitter-feed-widget.css DELETED
@@ -1,21 +0,0 @@
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 CHANGED
@@ -1,50 +1,72 @@
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.5
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' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Easy Twitter Feed Widget
4
+ Plugin URI: https://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: https://designorbital.com
8
+ Text Domain: do-etfw
9
+ Domain Path: /languages/
10
+ Version: 0.6
11
+ License: GPL v3
12
+
13
+ Easy Twitter Feed Widget Plugin
14
+ Copyright (C) 2012-2016, 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
+ /**
31
+ * Constants
32
+ */
33
+ if ( ! defined( 'DO_ETFW_VERSION' ) ) {
34
+ define( 'DO_ETFW_VERSION', '0.6' );
35
+ }
36
+
37
+ if ( ! defined( 'DO_ETFW_DIR' ) ) {
38
+ define( 'DO_ETFW_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
39
+ }
40
+
41
+ if ( ! defined( 'DO_ETFW_DIR_BASENAME' ) ) {
42
+ define( 'DO_ETFW_DIR_BASENAME', trailingslashit( dirname( plugin_basename( __FILE__ ) ) ) );
43
+ }
44
+
45
+ if ( ! defined( 'DO_ETFW_URI' ) ) {
46
+ define( 'DO_ETFW_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
47
+ }
48
+
49
+ /**
50
+ * Load plugin textdomain.
51
+ */
52
+ function do_etfw_load_textdomain() {
53
+ load_plugin_textdomain( 'do-etfw', false, DO_ETFW_DIR_BASENAME. 'languages/' );
54
+ }
55
+ add_action( 'plugins_loaded', 'do_etfw_load_textdomain' );
56
+
57
+ /**
58
+ * Custom functions.
59
+ */
60
+ require DO_ETFW_DIR . 'inc/extras.php';
61
+
62
+ /**
63
+ * Implement the Custom widgets.
64
+ */
65
+ require DO_ETFW_DIR . '/inc/widgets.php';
66
+
67
+ /**
68
+ * Admin Page
69
+ */
70
+ if ( is_admin() ) {
71
+ require DO_ETFW_DIR . 'inc/admin.php';
72
+ }
inc/admin.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin page for the plugin
4
+ */
5
+
6
+ /**
7
+ * Settings Page
8
+ */
9
+ function do_etfw_settings_page() {
10
+ add_submenu_page( 'options-general.php', esc_html__( 'Easy Twitter Feed Widget', 'do-etfw' ), esc_html__( 'Easy Twitter Feed Widget', 'do-etfw' ), 'manage_options', 'do-etfw-options', 'do_etfw_settings_page_content' );
11
+ }
12
+ add_action( 'admin_menu', 'do_etfw_settings_page' );
13
+
14
+ /**
15
+ * Settings Page Content
16
+ */
17
+ function do_etfw_settings_page_content() {
18
+ require DO_ETFW_DIR . 'inc/settings-page.php';
19
+ }
20
+
21
+ /**
22
+ * Enqueue scripts and styles.
23
+ */
24
+ function do_etfw_admin_scripts( $hook ) {
25
+
26
+ if( 'settings_page_do-etfw-options' === $hook ) {
27
+
28
+ /**
29
+ * Enqueue JS files
30
+ */
31
+
32
+ // Cookie
33
+ wp_enqueue_script( 'do-etfw-cookie', DO_ETFW_URI . 'js/cookie.js', array( 'jquery' ) );
34
+
35
+ // Easytabs
36
+ wp_enqueue_script( 'do-etfw-hashchange', DO_ETFW_URI . 'js/hashchange.js', array( 'jquery' ) );
37
+ wp_enqueue_script( 'do-etfw-easytabs', DO_ETFW_URI . 'js/easytabs.js', array( 'jquery', 'do-etfw-hashchange' ) );
38
+
39
+ // Admin JS
40
+ wp_enqueue_script( 'do-etfw-admin', DO_ETFW_URI . 'js/admin.js', array( 'jquery' ) );
41
+
42
+ /**
43
+ * Enqueue CSS files
44
+ */
45
+
46
+ // Admin Style
47
+ wp_enqueue_style( 'do-etfw-admin-style', DO_ETFW_URI . 'css/admin.css' );
48
+
49
+ }
50
+
51
+ }
52
+ add_action( 'admin_enqueue_scripts', 'do_etfw_admin_scripts' );
53
+
54
+ /**
55
+ * Contextual Help
56
+ */
57
+ function do_etfw_contextual_help() {
58
+
59
+ // Plugin Data
60
+ $plugin = do_etfw_plugin_data();
61
+ $AuthorURI = $plugin['AuthorURI'];
62
+ $PluginURI = $plugin['PluginURI'];
63
+ $Name = $plugin['Name'];
64
+
65
+ // Current Screen
66
+ $screen = get_current_screen();
67
+
68
+ // Help Strings
69
+ $content_support = '<p>';
70
+ $content_support .= sprintf( esc_html__( '%1$s is a project of %2$s. You can reach us via contact page.', 'do-etfw' ), $Name, '<a href="https://designorbital.com/">DesignOrbital</a>' );
71
+ $content_support .= '<p>';
72
+
73
+ // Plugin reference help screen tab.
74
+ $screen->add_help_tab( array (
75
+ 'id' => 'do-etfw-support',
76
+ 'title' => esc_html__( 'Plugin Support', 'do-etfw' ),
77
+ 'content' => $content_support,
78
+ )
79
+ );
80
+
81
+ // Help Sidebar
82
+ $sidebar = '<p><strong>' . esc_html__( 'For more information:', 'do-etfw' ) . '</strong></p>';
83
+ if ( ! empty( $AuthorURI ) ) {
84
+ $sidebar .= '<p><a href="' . esc_url( $AuthorURI ) . '" target="_blank">' . esc_html__( 'Plugin Author', 'do-etfw' ) . '</a></p>';
85
+ }
86
+ if ( ! empty( $PluginURI ) ) {
87
+ $sidebar .= '<p><a href="' . esc_url( $PluginURI ) . '" target="_blank">' . esc_html__( 'Plugin Official Page', 'do-etfw' ) . '</a></p>';
88
+ }
89
+ $screen->set_help_sidebar( $sidebar );
90
+
91
+ }
92
+ add_action( 'load-settings_page_do-etfw-options', 'do_etfw_contextual_help' );
93
+
94
+ /**
95
+ * Plugin Settings
96
+ */
97
+ function do_etfw_settings() {
98
+
99
+ // Register plugin settings
100
+ register_setting( 'do_etfw_options_group', 'do_etfw_options', 'do_etfw_options_validate' );
101
+
102
+ /** Config Section */
103
+ add_settings_section( 'do_etfw_section_config', esc_html__( 'Configuration', 'do-etfw' ), 'do_etfw_section_config_cb', 'do_etfw_section_config_page' );
104
+ add_settings_field( 'do_etfw_field_twitter_script', esc_html__( 'Load Twitter Script', 'do-etfw' ), 'do_etfw_field_twitter_script_cb', 'do_etfw_section_config_page', 'do_etfw_section_config' );
105
+
106
+ }
107
+ add_action( 'admin_init', 'do_etfw_settings' );
108
+
109
+ /**
110
+ * Twitter Script Options
111
+ */
112
+ function do_etfw_twitter_script_options() {
113
+ return array (
114
+ true => esc_html__( 'yes', 'do-etfw' ),
115
+ false => esc_html__( 'no', 'do-etfw' )
116
+ );
117
+ }
118
+
119
+ /**
120
+ * Plugin Settings Validation
121
+ */
122
+ function do_etfw_options_validate( $input ) {
123
+
124
+ // Enable
125
+ if ( ! array_key_exists( $input['twitter_script'], do_etfw_twitter_script_options() ) ) {
126
+ $input['twitter_script'] = do_etfw_option_default( 'twitter_script' );
127
+ }
128
+
129
+ // return validated array
130
+ return $input;
131
+
132
+ }
133
+
134
+ /**
135
+ * Config Section Callback
136
+ */
137
+ function do_etfw_section_config_cb() {
138
+ echo '<div class="do-section-desc">
139
+ <p class="description">'. esc_html__( 'Configure twitter feed widget by using the following settings.', 'do-etfw' ) .'</p>
140
+ </div>';
141
+ }
142
+
143
+ /* Twitter Script Callback */
144
+ function do_etfw_field_twitter_script_cb() {
145
+
146
+ $items = do_etfw_twitter_script_options();
147
+
148
+ echo '<select id="twitter_script" name="do_etfw_options[twitter_script]">';
149
+ foreach( $items as $key => $val ) {
150
+ ?>
151
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, do_etfw_option( 'twitter_script' ) ); ?>><?php echo esc_html( $val ); ?></option>
152
+ <?php
153
+ }
154
+ echo '</select>';
155
+ echo '<div><code>'. esc_html__( 'Select "no" if your theme loads Twitter script.', 'do-etfw' ) .'</code></div>';
156
+
157
+ }
inc/extras.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom functions for the plugin
4
+ */
5
+
6
+ /**
7
+ * Plugin Data
8
+ */
9
+ function do_etfw_plugin_data() {
10
+ return get_plugin_data( DO_ETFW_DIR . 'easy-twitter-feed-widget.php' );
11
+ }
12
+
13
+ /**
14
+ * Plugin Options Defaults
15
+ *
16
+ * Sane Defaults Logic
17
+ * Plugin will not save default settings to the database without explicit user action
18
+ * and Plugin will function properly out-of-the-box without user configuration.
19
+ *
20
+ * @param string $option - Name of the option to retrieve.
21
+ * @return mixed
22
+ */
23
+ function do_etfw_option_default( $option = 'enable' ) {
24
+
25
+ $do_etfw_options_default = array (
26
+ 'twitter_script' => true,
27
+ );
28
+
29
+ if( isset( $do_etfw_options_default[$option] ) ) {
30
+ return $do_etfw_options_default[$option];
31
+ }
32
+
33
+ return '';
34
+
35
+ }
36
+
37
+ /**
38
+ * Retrieve the plugin option.
39
+ *
40
+ * @param string $option - Name of the option to retrieve.
41
+ * @return mixed
42
+ */
43
+ function do_etfw_option( $option = 'twitter_script' ) {
44
+
45
+ $do_etfw_options = apply_filters( 'do_etfw_options', get_option( 'do_etfw_options' ) );
46
+
47
+ if ( isset( $do_etfw_options[$option] ) ) {
48
+ return $do_etfw_options[$option];
49
+ } else {
50
+ return do_etfw_option_default( $option );
51
+ }
52
+
53
+ }
54
+
55
+ /**
56
+ * Adds custom classes to the array of body classes.
57
+ *
58
+ * @param array $classes Classes for the body element.
59
+ * @return array
60
+ */
61
+ function do_etfw_body_classes( $classes ) {
62
+
63
+ // WSNB Class
64
+ if ( do_etfw_option( 'twitter_script' ) ) {
65
+ $classes[] = 'do-etfw';
66
+ }
67
+
68
+ return $classes;
69
+ }
70
+ add_filter( 'body_class', 'do_etfw_body_classes' );
inc/settings-page.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="do-etfw-admin-wrapper">
2
+
3
+ <div class="do-etfw-header">
4
+ <div class="do-etfw-header-inside">
5
+ <?php $plugin = do_etfw_plugin_data(); ?>
6
+ <h2><?php printf( '%1$s %2$s', $plugin['Name'], esc_html__( 'Settings', 'do-etfw' ) ); ?></h2>
7
+ </div>
8
+ </div><!-- .do-etfw-header -->
9
+
10
+ <div class="do-etfw-info">
11
+ <div class="do-etfw-info-inside">
12
+ <ul>
13
+ <li>
14
+ <a href="https://designorbital.com/premium-wordpress-themes/?utm_source=wporg-etfw&utm_medium=button&utm_campaign=premium-wp-themes" class="button button-primary" target="_blank"><?php echo esc_html__( 'Premium WordPress Themes', 'do-etfw' ); ?></a>
15
+ </li>
16
+ <li>
17
+ <a href="https://designorbital.com/free-wordpress-themes/?utm_source=wporg-etfw&utm_medium=button&utm_campaign=free-wp-themes" class="button" target="_blank"><?php echo esc_html__( 'Free WordPress Themes', 'do-etfw' ); ?></a>
18
+ </li>
19
+ <li>
20
+ <a href="https://www.facebook.com/designorbital" class="button" target="_blank"><?php echo esc_html__( 'Like Us On Facebook', 'do-etfw' ); ?></a>
21
+ </li>
22
+ <li>
23
+ <a href="https://twitter.com/designorbital" class="button" target="_blank"><?php echo esc_html__( 'Follow On Twitter', 'do-etfw' ); ?></a>
24
+ </li>
25
+ </ul>
26
+ </div>
27
+ </div><!-- .do-etfw-info -->
28
+
29
+ <div class="do-etfw-header">
30
+ <div class="do-etfw-header-inside">
31
+ <?php $plugin = do_etfw_plugin_data(); ?>
32
+ <h2><?php echo esc_html__( 'Support Us for the Development and Maintenance of Plugin', 'etfw' ); ?></h2>
33
+ </div>
34
+ </div><!-- .do-etfw-header -->
35
+
36
+ <div class="do-etfw-info">
37
+ <div class="do-etfw-info-inside">
38
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
39
+ <input type="hidden" name="cmd" value="_s-xclick">
40
+ <input type="hidden" name="hosted_button_id" value="Z3LBGSQDYRCWA">
41
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
42
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
43
+ </form>
44
+ </div>
45
+ </div><!-- .do-etfw-info -->
46
+
47
+ <form action="options.php" method="post" class="do-etfw-form-wrapper">
48
+
49
+ <?php settings_fields( 'do_etfw_options_group' ); ?>
50
+
51
+ <div class="do-etfw-form-header">
52
+ <div class="do-etfw-form-header-inside">
53
+ <input type="submit" class="button button-primary" value="<?php echo esc_html__( 'Save Changes', 'do-etfw' ); ?>">
54
+ </div>
55
+ </div><!-- .do-etfw-form-header -->
56
+
57
+ <div id="do-etfw-tabs" class="do-etfw-tabs-container">
58
+ <ul class="tabs">
59
+ <li class="tab" id="tab-1"><a href="#section-config"><?php echo esc_html__( 'Configuration', 'do-etfw' ); ?></a></li>
60
+ </ul>
61
+ <div class="panel-container">
62
+ <div id="section-config" class="panel">
63
+ <?php do_settings_sections( 'do_etfw_section_config_page' ); ?>
64
+ </div>
65
+ </div>
66
+ </div><!-- .do-etfw-tabs-container -->
67
+
68
+ <div class="do-etfw-form-footer">
69
+ <div class="do-etfw-form-footer-inside">
70
+ <input type="submit" class="button button-primary" value="<?php echo esc_html__( 'Save Changes', 'do-etfw' ); ?>">
71
+ </div>
72
+ </div><!-- .do-etfw-form-footer -->
73
+
74
+ </form><!-- .do-etfw-form-wrapper -->
75
+
76
+ </div><!-- .do-etfw-admin-wrapper -->
inc/widget-twitter.php ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Name: Easy Twitter Feed Widget
4
+ * Widget Description: Add twitter feeds on your WordPress site.
5
+ *
6
+ * @see https://publish.twitter.com/
7
+ * @see https://dev.twitter.com/web/embedded-timelines
8
+ */
9
+
10
+ /**
11
+ * Register the widget for use in Appearance -> Widgets
12
+ */
13
+ add_action( 'widgets_init', 'do_etfw_widget_init' );
14
+ function do_etfw_widget_init() {
15
+ register_widget( 'DO_ETFW_Widget' );
16
+ }
17
+
18
+ /**
19
+ * Post Carousel widget class
20
+ */
21
+ class DO_ETFW_Widget extends WP_Widget {
22
+
23
+ /**
24
+ * Registers the widget with WordPress.
25
+ */
26
+ public function __construct() {
27
+
28
+ parent::__construct(
29
+ 'do-etfw',
30
+ apply_filters( 'do_etfw_widget_name', esc_html__( 'Twitter Timeline (Easy Twitter Feed Widget)', 'do-etfw' ) ),
31
+ array(
32
+ 'classname' => 'widget-do-etfw',
33
+ 'description' => esc_html__( 'Display an official Twitter Embedded Timeline widget.', 'do-etfw' )
34
+ )
35
+ );
36
+
37
+ if ( is_active_widget( false, false, $this->id_base ) && do_etfw_option( 'twitter_script' ) ) {
38
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
39
+ }
40
+
41
+ }
42
+
43
+ /**
44
+ * Enqueue scripts for front-end.
45
+ */
46
+ public function enqueue_scripts() {
47
+ wp_enqueue_script( 'do-etfw-twitter-widgets', DO_ETFW_URI . '/js/twitter-widgets.js', array( 'jquery' ), '1.0', true );
48
+ }
49
+
50
+ /**
51
+ * Front-end display of widget.
52
+ *
53
+ * @see WP_Widget::widget()
54
+ *
55
+ * @param array $args Widget arguments.
56
+ * @param array $instance Saved values from database.
57
+ */
58
+ function widget( $args, $instance ) {
59
+
60
+ // Defaults
61
+ $defaults = $this->defaults();
62
+
63
+ // Merge the user-selected arguments with the defaults.
64
+ $instance = wp_parse_args( (array) $instance, $defaults );
65
+
66
+ // Open the output of the widget.
67
+ echo $args['before_widget'];
68
+
69
+ ?>
70
+ <?php if ( ! empty( $instance['title'] ) ) : ?>
71
+ <?php echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $args['after_title']; ?>
72
+ <?php endif; ?>
73
+
74
+ <?php
75
+ // Build Twitter Markup
76
+ // @see https://dev.twitter.com/web/embedded-timelines
77
+ $timeline = '<a class="twitter-timeline"';
78
+
79
+ // Data Attributes
80
+ $data_attribs = array (
81
+ 'twitter_widget_width' => 'width',
82
+ 'twitter_widget_height' => 'height',
83
+ 'twitter_widget_tweet_limit' => 'tweet-limit',
84
+ 'twitter_widget_theme' => 'theme',
85
+ 'twitter_widget_link_color' => 'link-color',
86
+ 'twitter_widget_border_color' => 'border-color',
87
+ );
88
+ foreach ( $data_attribs as $key => $val ) {
89
+ if ( ! empty( $instance[ $key ] ) ) {
90
+ $timeline .= ' data-' . esc_attr( $val ) . '="' . esc_attr( $instance[ $key ] ) . '"';
91
+ }
92
+ }
93
+
94
+ // Chrome Settings
95
+ if ( ! empty( $instance['twitter_widget_chrome'] ) && is_array( $instance['twitter_widget_chrome'] ) ) {
96
+ $timeline .= ' data-chrome="' . esc_attr( join ( ' ', $instance['twitter_widget_chrome'] ) ) . '"';
97
+ }
98
+
99
+ // Widget Timeline Route
100
+ switch ( $instance['twitter_timeline_type'] ) {
101
+ case 'username':
102
+ $timeline .= ' href="https://twitter.com/' . esc_attr( $instance['twitter_widget_username'] ) . '"';
103
+ break;
104
+ case 'widget-id':
105
+ default:
106
+ $timeline .= ' data-widget-id="' . esc_attr( $instance['twitter_widget_id'] ) . '"';
107
+ break;
108
+ }
109
+
110
+ // Close Twitter Markup
111
+ $timeline .= '>';
112
+ $timeline .= esc_html__( 'Tweets by @', 'do-etfw' ) . $instance['twitter_widget_username'];
113
+ $timeline .= '</a>';
114
+
115
+ // Output Markup
116
+ echo $timeline;
117
+ ?>
118
+
119
+ <?php
120
+
121
+ /** Close the output of the widget. */
122
+ echo $args['after_widget'];
123
+
124
+ }
125
+
126
+ /**
127
+ * Sanitize widget form values as they are saved.
128
+ *
129
+ * @see WP_Widget::update()
130
+ *
131
+ * @param array $new_instance Values just sent to be saved.
132
+ * @param array $old_instance Previously saved values from database.
133
+ *
134
+ * @return array Updated safe values to be saved.
135
+ */
136
+ public function update( $new_instance, $old_instance ) {
137
+
138
+ // Instance
139
+ $instance = $old_instance;
140
+
141
+ // Sanitization
142
+ $instance['title'] = strip_tags( $new_instance['title'] );
143
+
144
+ $instance['twitter_timeline_type'] = $new_instance['twitter_timeline_type'];
145
+ if ( ! in_array( $instance['twitter_timeline_type'], array( 'widget-id', 'username' ) ) ) {
146
+ $instance['twitter_timeline_type'] = 'widget-id';
147
+ }
148
+
149
+ $instance['twitter_widget_username'] = sanitize_text_field( $new_instance['twitter_widget_username'] );
150
+ $instance['twitter_widget_id'] = sanitize_text_field( $new_instance['twitter_widget_id'] );
151
+
152
+ $twitter_widget_width = absint( $new_instance['twitter_widget_width'] );
153
+ if ( $twitter_widget_width ) {
154
+ // From publish.twitter.com: 220 <= width <= 1200
155
+ $instance['twitter_widget_width'] = min ( max ( $twitter_widget_width, 220 ), 1200 );
156
+ } else {
157
+ $instance['twitter_widget_width'] = '';
158
+ }
159
+
160
+ $twitter_widget_height = absint( $new_instance['twitter_widget_height'] );
161
+ if ( $twitter_widget_height ) {
162
+ // From publish.twitter.com: height >= 200
163
+ $instance['twitter_widget_height'] = max ( $twitter_widget_height, 200 );
164
+ } else {
165
+ $instance['twitter_widget_height'] = '';
166
+ }
167
+
168
+ $twitter_widget_tweet_limit = absint( $new_instance['twitter_widget_tweet_limit'] );
169
+ $instance['twitter_widget_tweet_limit'] = ( $twitter_widget_tweet_limit ? $twitter_widget_tweet_limit : null );
170
+
171
+ $instance['twitter_widget_theme'] = $new_instance['twitter_widget_theme'];
172
+ if ( ! in_array( $instance['twitter_widget_theme'], array( 'light', 'dark' ) ) ) {
173
+ $instance['twitter_widget_theme'] = 'light';
174
+ }
175
+
176
+ $instance['twitter_widget_link_color'] = sanitize_hex_color( $new_instance['twitter_widget_link_color'] );
177
+ $instance['twitter_widget_border_color'] = sanitize_hex_color( $new_instance['twitter_widget_border_color'] );
178
+
179
+ $instance['twitter_widget_chrome'] = array();
180
+ $chrome_settings = array(
181
+ 'noheader',
182
+ 'nofooter',
183
+ 'noborders',
184
+ 'noscrollbar',
185
+ 'transparent'
186
+ );
187
+ if ( isset( $new_instance['twitter_widget_chrome'] ) ) {
188
+ foreach ( $new_instance['twitter_widget_chrome'] as $chrome ) {
189
+ if ( in_array( $chrome, $chrome_settings ) ) {
190
+ $instance['twitter_widget_chrome'][] = $chrome;
191
+ }
192
+ }
193
+ }
194
+
195
+ return $instance;
196
+
197
+ }
198
+
199
+ /**
200
+ * Back-end widget form.
201
+ *
202
+ * @see WP_Widget::form()
203
+ *
204
+ * @param array $instance Previously saved values from database.
205
+ */
206
+ function form( $instance ) {
207
+
208
+ // Defaults
209
+ $defaults = $this->defaults();
210
+
211
+ // Merge the user-selected arguments with the defaults.
212
+ $instance = wp_parse_args( (array) $instance, $defaults );
213
+
214
+ // Controls
215
+ $twitter_timeline_type = array (
216
+ 'username' => esc_html__( 'Username', 'do-etfw'),
217
+ 'widget-id' => esc_html__( 'Widget ID', 'do-etfw'),
218
+ );
219
+
220
+ $twitter_widget_theme = array (
221
+ 'light' => esc_html__( 'Light', 'do-etfw'),
222
+ 'dark' => esc_html__( 'Dark', 'do-etfw'),
223
+ );
224
+ ?>
225
+
226
+ <p>
227
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
228
+ <?php esc_html_e( 'Title:', 'do-etfw' ); ?>
229
+ <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" />
230
+ </label>
231
+ </p>
232
+
233
+ <p>
234
+ <label for="<?php echo $this->get_field_id( 'twitter_timeline_type' ); ?>">
235
+ <?php esc_html_e( 'Timeline Type:', 'do-etfw' ); ?>
236
+ <a href="https://designorbital.com/easy-twitter-feed-widget/" target="_blank">( ? )</a>
237
+ </label>
238
+ <select class="widefat" name="<?php echo $this->get_field_name( 'twitter_timeline_type' ); ?>" id="<?php echo $this->get_field_id( 'twitter_timeline_type' ); ?>">
239
+ <?php foreach ( $twitter_timeline_type as $key => $val ): ?>
240
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_timeline_type'], $key ); ?>><?php echo esc_html( $val ); ?></option>
241
+ <?php endforeach; ?>
242
+ </select>
243
+ </p>
244
+
245
+ <p>
246
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_username' ) ); ?>">
247
+ <?php esc_html_e( 'Twitter Username:', 'do-etfw' ); ?>
248
+ <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_username' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_username' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_username'] ); ?>" />
249
+ </label>
250
+ </p>
251
+
252
+ <p>
253
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_id' ) ); ?>">
254
+ <?php esc_html_e( 'Widget ID:', 'do-etfw' ); ?>
255
+ <br /><code><?php echo esc_html__( 'It can be empty, if you are using Timeline Type "Username".', 'do-etfw' ); ?></code>
256
+ <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_id' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_id'] ); ?>" />
257
+ </label>
258
+ </p>
259
+
260
+ <p>
261
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_width' ) ); ?>">
262
+ <?php esc_html_e( 'Maximum Width (px; 220 to 1200):', 'do-etfw' ); ?>
263
+ <input type="number" min="220" max="1200" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_width' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_width'] ); ?>" />
264
+ </label>
265
+ </p>
266
+
267
+ <p>
268
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_height' ) ); ?>">
269
+ <?php esc_html_e( 'Height (px; at least 200):', 'do-etfw' ); ?>
270
+ <input type="number" min="200" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_height' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_height' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_height'] ); ?>" />
271
+ </label>
272
+ </p>
273
+
274
+ <p>
275
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_tweet_limit' ) ); ?>">
276
+ <?php esc_html_e( 'Number of Tweets Shown:', 'do-etfw' ); ?>
277
+ <input type="number" min="1" max="20" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_tweet_limit' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_tweet_limit' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_tweet_limit'] ); ?>" />
278
+ </label>
279
+ </p>
280
+
281
+ <p>
282
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_theme' ); ?>">
283
+ <?php esc_html_e( 'Theme:', 'do-etfw' ); ?>
284
+ </label>
285
+ <select class="widefat" name="<?php echo $this->get_field_name( 'twitter_widget_theme' ); ?>" id="<?php echo $this->get_field_id( 'twitter_widget_theme' ); ?>">
286
+ <?php foreach ( $twitter_widget_theme as $key => $val ): ?>
287
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_theme'], $key ); ?>><?php echo esc_html( $val ); ?></option>
288
+ <?php endforeach; ?>
289
+ </select>
290
+ </p>
291
+
292
+ <p>
293
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_link_color' ) ); ?>">
294
+ <?php esc_html_e( 'Link Color (hex):', 'do-etfw' ); ?>
295
+ <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_link_color' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_link_color' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_link_color'] ); ?>" />
296
+ </label>
297
+ </p>
298
+
299
+ <p>
300
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_border_color' ) ); ?>">
301
+ <?php esc_html_e( 'Border Color (hex):', 'do-etfw' ); ?>
302
+ <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_border_color' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_border_color' ) ); ?>" value="<?php echo esc_attr( $instance['twitter_widget_border_color'] ); ?>" />
303
+ </label>
304
+ </p>
305
+
306
+ <p>
307
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome' ); ?>">
308
+ <?php esc_html_e( 'Layout Options:', 'do-etfw' ); ?>
309
+ </label>
310
+ <br />
311
+ <input type="checkbox" <?php checked( in_array( 'noheader', $instance['twitter_widget_chrome'] ) ); ?> id="<?php echo $this->get_field_id( 'twitter_widget_chrome_header' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome' ); ?>[]" value="noheader" />
312
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_header' ); ?>">
313
+ <?php esc_html_e( 'No Header', 'do-etfw' ); ?>
314
+ </label>
315
+ <br />
316
+ <input type="checkbox"<?php checked( in_array( 'nofooter', $instance['twitter_widget_chrome'] ) ); ?> id="<?php echo $this->get_field_id( 'twitter_widget_chrome_footer' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome' ); ?>[]" value="nofooter" />
317
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_footer' ); ?>">
318
+ <?php esc_html_e( 'No Footer', 'do-etfw' ); ?>
319
+ </label>
320
+ <br />
321
+ <input type="checkbox"<?php checked( in_array( 'noborders', $instance['twitter_widget_chrome'] ) ); ?> id="<?php echo $this->get_field_id( 'twitter_widget_chrome_border' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome' ); ?>[]" value="noborders" />
322
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_border' ); ?>">
323
+ <?php esc_html_e( 'No Borders', 'do-etfw' ); ?>
324
+ </label>
325
+ <br />
326
+ <input type="checkbox"<?php checked( in_array( 'noscrollbar', $instance['twitter_widget_chrome'] ) ); ?> id="<?php echo $this->get_field_id( 'twitter_widget_chrome_scrollbar' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome' ); ?>[]" value="noscrollbar" />
327
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_scrollbar' ); ?>">
328
+ <?php esc_html_e( 'No Scrollbar', 'do-etfw' ); ?>
329
+ </label>
330
+ <br />
331
+ <input type="checkbox"<?php checked( in_array( 'transparent', $instance['twitter_widget_chrome'] ) ); ?> id="<?php echo $this->get_field_id( 'twitter_widget_chrome_transparent' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_chrome' ); ?>[]" value="transparent" />
332
+ <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_transparent' ); ?>">
333
+ <?php esc_html_e( 'Transparent Background', 'do-etfw' ); ?>
334
+ </label>
335
+ </p>
336
+
337
+ <?php
338
+ }
339
+
340
+ // Defaults
341
+ public function defaults() {
342
+
343
+ $defaults = array(
344
+ 'title' => esc_html__( 'Follow me on Twitter', 'do-etfw' ),
345
+ 'twitter_timeline_type' => 'username',
346
+ 'twitter_widget_username' => 'DesignOrbital',
347
+ 'twitter_widget_id' => '',
348
+ 'twitter_widget_width' => '',
349
+ 'twitter_widget_height' => 400,
350
+ 'twitter_widget_tweet_limit' => null,
351
+ 'twitter_widget_theme' => 'light',
352
+ 'twitter_widget_link_color' => '#3b94d9',
353
+ 'twitter_widget_border_color' => '#f5f5f5',
354
+ 'twitter_widget_chrome' => array(),
355
+ );
356
+
357
+ return $defaults;
358
+
359
+ }
360
+
361
+ }
inc/widgets.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Widgets
4
+ */
5
+
6
+ // Twitter Widget
7
+ require DO_ETFW_DIR . '/inc/widget-twitter.php';
js/admin.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * WSNB Admin v1.0
3
+ * DesignOrbital.com
4
+ *
5
+ * Copyright (c) 2013-2014 DesignOrbital.com
6
+ *
7
+ * License: GNU General Public License v2 or later
8
+ * http://www.gnu.org/licenses/gpl-2.0.html
9
+ *
10
+ */
11
+
12
+ ( function( $ ) {
13
+
14
+ /** Document Ready */
15
+ $( document ).ready( function() {
16
+
17
+ // Easytabs
18
+ $( '#do-etfw-tabs' ).easytabs({
19
+ defaultTab: ( $.cookie( 'do-etfw-tab' ) != 'undefined' )? $.cookie( 'do-etfw-tab' ) : 'li#tab-2',
20
+ updateHash: false
21
+ });
22
+ $( '#do-etfw-tabs' ).bind( 'easytabs:after', function() {
23
+ $activeTab = $( '.do-etfw-tabs-container' ).find( 'li.active' );
24
+ $.cookie( 'do-etfw-tab', 'li#' + $activeTab.attr( 'id' ), { path: '/' } );
25
+ });
26
+
27
+ } );
28
+
29
+ } )( jQuery );
js/cookie.js ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Cookie Plugin v1.4.0
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2013 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd) {
10
+ // AMD
11
+ define(['jquery'], factory);
12
+ } else if (typeof exports === 'object') {
13
+ // CommonJS
14
+ factory(require('jquery'));
15
+ } else {
16
+ // Browser globals
17
+ factory(jQuery);
18
+ }
19
+ }(function ($) {
20
+
21
+ var pluses = /\+/g;
22
+
23
+ function encode(s) {
24
+ return config.raw ? s : encodeURIComponent(s);
25
+ }
26
+
27
+ function decode(s) {
28
+ return config.raw ? s : decodeURIComponent(s);
29
+ }
30
+
31
+ function stringifyCookieValue(value) {
32
+ return encode(config.json ? JSON.stringify(value) : String(value));
33
+ }
34
+
35
+ function parseCookieValue(s) {
36
+ if (s.indexOf('"') === 0) {
37
+ // This is a quoted cookie as according to RFC2068, unescape...
38
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
39
+ }
40
+
41
+ try {
42
+ // Replace server-side written pluses with spaces.
43
+ // If we can't decode the cookie, ignore it, it's unusable.
44
+ // If we can't parse the cookie, ignore it, it's unusable.
45
+ s = decodeURIComponent(s.replace(pluses, ' '));
46
+ return config.json ? JSON.parse(s) : s;
47
+ } catch(e) {}
48
+ }
49
+
50
+ function read(s, converter) {
51
+ var value = config.raw ? s : parseCookieValue(s);
52
+ return $.isFunction(converter) ? converter(value) : value;
53
+ }
54
+
55
+ var config = $.cookie = function (key, value, options) {
56
+
57
+ // Write
58
+
59
+ if (value !== undefined && !$.isFunction(value)) {
60
+ options = $.extend({}, config.defaults, options);
61
+
62
+ if (typeof options.expires === 'number') {
63
+ var days = options.expires, t = options.expires = new Date();
64
+ t.setTime(+t + days * 864e+5);
65
+ }
66
+
67
+ return (document.cookie = [
68
+ encode(key), '=', stringifyCookieValue(value),
69
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70
+ options.path ? '; path=' + options.path : '',
71
+ options.domain ? '; domain=' + options.domain : '',
72
+ options.secure ? '; secure' : ''
73
+ ].join(''));
74
+ }
75
+
76
+ // Read
77
+
78
+ var result = key ? undefined : {};
79
+
80
+ // To prevent the for loop in the first place assign an empty array
81
+ // in case there are no cookies at all. Also prevents odd result when
82
+ // calling $.cookie().
83
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
84
+
85
+ for (var i = 0, l = cookies.length; i < l; i++) {
86
+ var parts = cookies[i].split('=');
87
+ var name = decode(parts.shift());
88
+ var cookie = parts.join('=');
89
+
90
+ if (key && key === name) {
91
+ // If second argument (value) is a function it's a converter...
92
+ result = read(cookie, value);
93
+ break;
94
+ }
95
+
96
+ // Prevent storing a cookie that we couldn't decode.
97
+ if (!key && (cookie = read(cookie)) !== undefined) {
98
+ result[name] = cookie;
99
+ }
100
+ }
101
+
102
+ return result;
103
+ };
104
+
105
+ config.defaults = {};
106
+
107
+ $.removeCookie = function (key, options) {
108
+ if ($.cookie(key) === undefined) {
109
+ return false;
110
+ }
111
+
112
+ // Must not alter options, thus extending a fresh object...
113
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
114
+ return !$.cookie(key);
115
+ };
116
+
117
+ }));
js/easytabs.js ADDED
@@ -0,0 +1,704 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery EasyTabs plugin 3.2.0
3
+ *
4
+ * Copyright (c) 2010-2011 Steve Schwartz (JangoSteve)
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Date: Thu May 09 17:30:00 2013 -0500
11
+ */
12
+ ( function($) {
13
+
14
+ $.easytabs = function(container, options) {
15
+
16
+ // Attach to plugin anything that should be available via
17
+ // the $container.data('easytabs') object
18
+ var plugin = this,
19
+ $container = $(container),
20
+
21
+ defaults = {
22
+ animate: true,
23
+ panelActiveClass: "active",
24
+ tabActiveClass: "active",
25
+ defaultTab: "li:first-child",
26
+ animationSpeed: "normal",
27
+ tabs: "> ul > li",
28
+ updateHash: true,
29
+ cycle: false,
30
+ collapsible: false,
31
+ collapsedClass: "collapsed",
32
+ collapsedByDefault: true,
33
+ uiTabs: false,
34
+ transitionIn: 'fadeIn',
35
+ transitionOut: 'fadeOut',
36
+ transitionInEasing: 'swing',
37
+ transitionOutEasing: 'swing',
38
+ transitionCollapse: 'slideUp',
39
+ transitionUncollapse: 'slideDown',
40
+ transitionCollapseEasing: 'swing',
41
+ transitionUncollapseEasing: 'swing',
42
+ containerClass: "",
43
+ tabsClass: "",
44
+ tabClass: "",
45
+ panelClass: "",
46
+ cache: true,
47
+ event: 'click',
48
+ panelContext: $container
49
+ },
50
+
51
+ // Internal instance variables
52
+ // (not available via easytabs object)
53
+ $defaultTab,
54
+ $defaultTabLink,
55
+ transitions,
56
+ lastHash,
57
+ skipUpdateToHash,
58
+ animationSpeeds = {
59
+ fast: 200,
60
+ normal: 400,
61
+ slow: 600
62
+ },
63
+
64
+ // Shorthand variable so that we don't need to call
65
+ // plugin.settings throughout the plugin code
66
+ settings;
67
+
68
+ // =============================================================
69
+ // Functions available via easytabs object
70
+ // =============================================================
71
+
72
+ plugin.init = function() {
73
+
74
+ plugin.settings = settings = $.extend({}, defaults, options);
75
+ settings.bind_str = settings.event+".easytabs";
76
+
77
+ // Add jQuery UI's crazy class names to markup,
78
+ // so that markup will match theme CSS
79
+ if ( settings.uiTabs ) {
80
+ settings.tabActiveClass = 'ui-tabs-selected';
81
+ settings.containerClass = 'ui-tabs ui-widget ui-widget-content ui-corner-all';
82
+ settings.tabsClass = 'ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all';
83
+ settings.tabClass = 'ui-state-default ui-corner-top';
84
+ settings.panelClass = 'ui-tabs-panel ui-widget-content ui-corner-bottom';
85
+ }
86
+
87
+ // If collapsible is true and defaultTab specified, assume user wants defaultTab showing (not collapsed)
88
+ if ( settings.collapsible && options.defaultTab !== undefined && options.collpasedByDefault === undefined ) {
89
+ settings.collapsedByDefault = false;
90
+ }
91
+
92
+ // Convert 'normal', 'fast', and 'slow' animation speed settings to their respective speed in milliseconds
93
+ if ( typeof(settings.animationSpeed) === 'string' ) {
94
+ settings.animationSpeed = animationSpeeds[settings.animationSpeed];
95
+ }
96
+
97
+ $('a.anchor').remove().prependTo('body');
98
+
99
+ // Store easytabs object on container so we can easily set
100
+ // properties throughout
101
+ $container.data('easytabs', {});
102
+
103
+ plugin.setTransitions();
104
+
105
+ plugin.getTabs();
106
+
107
+ addClasses();
108
+
109
+ setDefaultTab();
110
+
111
+ bindToTabClicks();
112
+
113
+ initHashChange();
114
+
115
+ initCycle();
116
+
117
+ // Append data-easytabs HTML attribute to make easy to query for
118
+ // easytabs instances via CSS pseudo-selector
119
+ $container.attr('data-easytabs', true);
120
+ };
121
+
122
+ // Set transitions for switching between tabs based on options.
123
+ // Could be used to update transitions if settings are changes.
124
+ plugin.setTransitions = function() {
125
+ transitions = ( settings.animate ) ? {
126
+ show: settings.transitionIn,
127
+ hide: settings.transitionOut,
128
+ speed: settings.animationSpeed,
129
+ collapse: settings.transitionCollapse,
130
+ uncollapse: settings.transitionUncollapse,
131
+ halfSpeed: settings.animationSpeed / 2
132
+ } :
133
+ {
134
+ show: "show",
135
+ hide: "hide",
136
+ speed: 0,
137
+ collapse: "hide",
138
+ uncollapse: "show",
139
+ halfSpeed: 0
140
+ };
141
+ };
142
+
143
+ // Find and instantiate tabs and panels.
144
+ // Could be used to reset tab and panel collection if markup is
145
+ // modified.
146
+ plugin.getTabs = function() {
147
+ var $matchingPanel;
148
+
149
+ // Find the initial set of elements matching the setting.tabs
150
+ // CSS selector within the container
151
+ plugin.tabs = $container.find(settings.tabs),
152
+
153
+ // Instantiate panels as empty jquery object
154
+ plugin.panels = $(),
155
+
156
+ plugin.tabs.each(function(){
157
+ var $tab = $(this),
158
+ $a = $tab.children('a'),
159
+
160
+ // targetId is the ID of the panel, which is either the
161
+ // `href` attribute for non-ajax tabs, or in the
162
+ // `data-target` attribute for ajax tabs since the `href` is
163
+ // the ajax URL
164
+ targetId = $tab.children('a').data('target');
165
+
166
+ $tab.data('easytabs', {});
167
+
168
+ // If the tab has a `data-target` attribute, and is thus an ajax tab
169
+ if ( targetId !== undefined && targetId !== null ) {
170
+ $tab.data('easytabs').ajax = $a.attr('href');
171
+ } else {
172
+ targetId = $a.attr('href');
173
+ }
174
+ targetId = targetId.match(/#([^\?]+)/)[1];
175
+
176
+ $matchingPanel = settings.panelContext.find("#" + targetId);
177
+
178
+ // If tab has a matching panel, add it to panels
179
+ if ( $matchingPanel.length ) {
180
+
181
+ // Store panel height before hiding
182
+ $matchingPanel.data('easytabs', {
183
+ position: $matchingPanel.css('position'),
184
+ visibility: $matchingPanel.css('visibility')
185
+ });
186
+
187
+ // Don't hide panel if it's active (allows `getTabs` to be called manually to re-instantiate tab collection)
188
+ $matchingPanel.not(settings.panelActiveClass).hide();
189
+
190
+ plugin.panels = plugin.panels.add($matchingPanel);
191
+
192
+ $tab.data('easytabs').panel = $matchingPanel;
193
+
194
+ // Otherwise, remove tab from tabs collection
195
+ } else {
196
+ plugin.tabs = plugin.tabs.not($tab);
197
+ if ('console' in window) {
198
+ console.warn('Warning: tab without matching panel for selector \'#' + targetId +'\' removed from set');
199
+ }
200
+ }
201
+ });
202
+ };
203
+
204
+ // Select tab and fire callback
205
+ plugin.selectTab = function($clicked, callback) {
206
+ var url = window.location,
207
+ hash = url.hash.match(/^[^\?]*/)[0],
208
+ $targetPanel = $clicked.parent().data('easytabs').panel,
209
+ ajaxUrl = $clicked.parent().data('easytabs').ajax;
210
+
211
+ // Tab is collapsible and active => toggle collapsed state
212
+ if( settings.collapsible && ! skipUpdateToHash && ($clicked.hasClass(settings.tabActiveClass) || $clicked.hasClass(settings.collapsedClass)) ) {
213
+ plugin.toggleTabCollapse($clicked, $targetPanel, ajaxUrl, callback);
214
+
215
+ // Tab is not active and panel is not active => select tab
216
+ } else if( ! $clicked.hasClass(settings.tabActiveClass) || ! $targetPanel.hasClass(settings.panelActiveClass) ){
217
+ activateTab($clicked, $targetPanel, ajaxUrl, callback);
218
+
219
+ // Cache is disabled => reload (e.g reload an ajax tab).
220
+ } else if ( ! settings.cache ){
221
+ activateTab($clicked, $targetPanel, ajaxUrl, callback);
222
+ }
223
+
224
+ };
225
+
226
+ // Toggle tab collapsed state and fire callback
227
+ plugin.toggleTabCollapse = function($clicked, $targetPanel, ajaxUrl, callback) {
228
+ plugin.panels.stop(true,true);
229
+
230
+ if( fire($container,"easytabs:before", [$clicked, $targetPanel, settings]) ){
231
+ plugin.tabs.filter("." + settings.tabActiveClass).removeClass(settings.tabActiveClass).children().removeClass(settings.tabActiveClass);
232
+
233
+ // If panel is collapsed, uncollapse it
234
+ if( $clicked.hasClass(settings.collapsedClass) ){
235
+
236
+ // If ajax panel and not already cached
237
+ if( ajaxUrl && (!settings.cache || !$clicked.parent().data('easytabs').cached) ) {
238
+ $container.trigger('easytabs:ajax:beforeSend', [$clicked, $targetPanel]);
239
+
240
+ $targetPanel.load(ajaxUrl, function(response, status, xhr){
241
+ $clicked.parent().data('easytabs').cached = true;
242
+ $container.trigger('easytabs:ajax:complete', [$clicked, $targetPanel, response, status, xhr]);
243
+ });
244
+ }
245
+
246
+ // Update CSS classes of tab and panel
247
+ $clicked.parent()
248
+ .removeClass(settings.collapsedClass)
249
+ .addClass(settings.tabActiveClass)
250
+ .children()
251
+ .removeClass(settings.collapsedClass)
252
+ .addClass(settings.tabActiveClass);
253
+
254
+ $targetPanel
255
+ .addClass(settings.panelActiveClass)
256
+ [transitions.uncollapse](transitions.speed, settings.transitionUncollapseEasing, function(){
257
+ $container.trigger('easytabs:midTransition', [$clicked, $targetPanel, settings]);
258
+ if(typeof callback == 'function') callback();
259
+ });
260
+
261
+ // Otherwise, collapse it
262
+ } else {
263
+
264
+ // Update CSS classes of tab and panel
265
+ $clicked.addClass(settings.collapsedClass)
266
+ .parent()
267
+ .addClass(settings.collapsedClass);
268
+
269
+ $targetPanel
270
+ .removeClass(settings.panelActiveClass)
271
+ [transitions.collapse](transitions.speed, settings.transitionCollapseEasing, function(){
272
+ $container.trigger("easytabs:midTransition", [$clicked, $targetPanel, settings]);
273
+ if(typeof callback == 'function') callback();
274
+ });
275
+ }
276
+ }
277
+ };
278
+
279
+
280
+ // Find tab with target panel matching value
281
+ plugin.matchTab = function(hash) {
282
+ return plugin.tabs.find("[href='" + hash + "'],[data-target='" + hash + "']").first();
283
+ };
284
+
285
+ // Find panel with `id` matching value
286
+ plugin.matchInPanel = function(hash) {
287
+ return ( hash && plugin.validId(hash) ? plugin.panels.filter(':has(' + hash + ')').first() : [] );
288
+ };
289
+
290
+ // Make sure hash is a valid id value (admittedly strict in that HTML5 allows almost anything without a space)
291
+ // but jQuery has issues with such id values anyway, so we can afford to be strict here.
292
+ plugin.validId = function(id) {
293
+ return id.substr(1).match(/^[A-Za-z][A-Za-z0-9\-_:\.]*$/);
294
+ };
295
+
296
+ // Select matching tab when URL hash changes
297
+ plugin.selectTabFromHashChange = function() {
298
+ var hash = window.location.hash.match(/^[^\?]*/)[0],
299
+ $tab = plugin.matchTab(hash),
300
+ $panel;
301
+
302
+ if ( settings.updateHash ) {
303
+
304
+ // If hash directly matches tab
305
+ if( $tab.length ){
306
+ skipUpdateToHash = true;
307
+ plugin.selectTab( $tab );
308
+
309
+ } else {
310
+ $panel = plugin.matchInPanel(hash);
311
+
312
+ // If panel contains element matching hash
313
+ if ( $panel.length ) {
314
+ hash = '#' + $panel.attr('id');
315
+ $tab = plugin.matchTab(hash);
316
+ skipUpdateToHash = true;
317
+ plugin.selectTab( $tab );
318
+
319
+ // If default tab is not active...
320
+ } else if ( ! $defaultTab.hasClass(settings.tabActiveClass) && ! settings.cycle ) {
321
+
322
+ // ...and hash is blank or matches a parent of the tab container or
323
+ // if the last tab (before the hash updated) was one of the other tabs in this container.
324
+ if ( hash === '' || plugin.matchTab(lastHash).length || $container.closest(hash).length ) {
325
+ skipUpdateToHash = true;
326
+ plugin.selectTab( $defaultTabLink );
327
+ }
328
+ }
329
+ }
330
+ }
331
+ };
332
+
333
+ // Cycle through tabs
334
+ plugin.cycleTabs = function(tabNumber){
335
+ if(settings.cycle){
336
+ tabNumber = tabNumber % plugin.tabs.length;
337
+ $tab = $( plugin.tabs[tabNumber] ).children("a").first();
338
+ skipUpdateToHash = true;
339
+ plugin.selectTab( $tab, function() {
340
+ setTimeout(function(){ plugin.cycleTabs(tabNumber + 1); }, settings.cycle);
341
+ });
342
+ }
343
+ };
344
+
345
+ // Convenient public methods
346
+ plugin.publicMethods = {
347
+ select: function(tabSelector){
348
+ var $tab;
349
+
350
+ // Find tab container that matches selector (like 'li#tab-one' which contains tab link)
351
+ if ( ($tab = plugin.tabs.filter(tabSelector)).length === 0 ) {
352
+
353
+ // Find direct tab link that matches href (like 'a[href="#panel-1"]')
354
+ if ( ($tab = plugin.tabs.find("a[href='" + tabSelector + "']")).length === 0 ) {
355
+
356
+ // Find direct tab link that matches selector (like 'a#tab-1')
357
+ if ( ($tab = plugin.tabs.find("a" + tabSelector)).length === 0 ) {
358
+
359
+ // Find direct tab link that matches data-target (lik 'a[data-target="#panel-1"]')
360
+ if ( ($tab = plugin.tabs.find("[data-target='" + tabSelector + "']")).length === 0 ) {
361
+
362
+ // Find direct tab link that ends in the matching href (like 'a[href$="#panel-1"]', which would also match http://example.com/currentpage/#panel-1)
363
+ if ( ($tab = plugin.tabs.find("a[href$='" + tabSelector + "']")).length === 0 ) {
364
+
365
+ $.error('Tab \'' + tabSelector + '\' does not exist in tab set');
366
+ }
367
+ }
368
+ }
369
+ }
370
+ } else {
371
+ // Select the child tab link, since the first option finds the tab container (like <li>)
372
+ $tab = $tab.children("a").first();
373
+ }
374
+ plugin.selectTab($tab);
375
+ }
376
+ };
377
+
378
+ // =============================================================
379
+ // Private functions
380
+ // =============================================================
381
+
382
+ // Triggers an event on an element and returns the event result
383
+ var fire = function(obj, name, data) {
384
+ var event = $.Event(name);
385
+ obj.trigger(event, data);
386
+ return event.result !== false;
387
+ }
388
+
389
+ // Add CSS classes to markup (if specified), called by init
390
+ var addClasses = function() {
391
+ $container.addClass(settings.containerClass);
392
+ plugin.tabs.parent().addClass(settings.tabsClass);
393
+ plugin.tabs.addClass(settings.tabClass);
394
+ plugin.panels.addClass(settings.panelClass);
395
+ };
396
+
397
+ // Set the default tab, whether from hash (bookmarked) or option,
398
+ // called by init
399
+ var setDefaultTab = function(){
400
+ var hash = window.location.hash.match(/^[^\?]*/)[0],
401
+ $selectedTab = plugin.matchTab(hash).parent(),
402
+ $panel;
403
+
404
+ // If hash directly matches one of the tabs, active on page-load
405
+ if( $selectedTab.length === 1 ){
406
+ $defaultTab = $selectedTab;
407
+ settings.cycle = false;
408
+
409
+ } else {
410
+ $panel = plugin.matchInPanel(hash);
411
+
412
+ // If one of the panels contains the element matching the hash,
413
+ // make it active on page-load
414
+ if ( $panel.length ) {
415
+ hash = '#' + $panel.attr('id');
416
+ $defaultTab = plugin.matchTab(hash).parent();
417
+
418
+ // Otherwise, make the default tab the one that's active on page-load
419
+ } else {
420
+ $defaultTab = plugin.tabs.parent().find(settings.defaultTab);
421
+ if ( $defaultTab.length === 0 ) {
422
+ $.error("The specified default tab ('" + settings.defaultTab + "') could not be found in the tab set ('" + settings.tabs + "') out of " + plugin.tabs.length + " tabs.");
423
+ }
424
+ }
425
+ }
426
+
427
+ $defaultTabLink = $defaultTab.children("a").first();
428
+
429
+ activateDefaultTab($selectedTab);
430
+ };
431
+
432
+ // Activate defaultTab (or collapse by default), called by setDefaultTab
433
+ var activateDefaultTab = function($selectedTab) {
434
+ var defaultPanel,
435
+ defaultAjaxUrl;
436
+
437
+ if ( settings.collapsible && $selectedTab.length === 0 && settings.collapsedByDefault ) {
438
+ $defaultTab
439
+ .addClass(settings.collapsedClass)
440
+ .children()
441
+ .addClass(settings.collapsedClass);
442
+
443
+ } else {
444
+
445
+ defaultPanel = $( $defaultTab.data('easytabs').panel );
446
+ defaultAjaxUrl = $defaultTab.data('easytabs').ajax;
447
+
448
+ if ( defaultAjaxUrl && (!settings.cache || !$defaultTab.data('easytabs').cached) ) {
449
+ $container.trigger('easytabs:ajax:beforeSend', [$defaultTabLink, defaultPanel]);
450
+ defaultPanel.load(defaultAjaxUrl, function(response, status, xhr){
451
+ $defaultTab.data('easytabs').cached = true;
452
+ $container.trigger('easytabs:ajax:complete', [$defaultTabLink, defaultPanel, response, status, xhr]);
453
+ });
454
+ }
455
+
456
+ $defaultTab.data('easytabs').panel
457
+ .show()
458
+ .addClass(settings.panelActiveClass);
459
+
460
+ $defaultTab
461
+ .addClass(settings.tabActiveClass)
462
+ .children()
463
+ .addClass(settings.tabActiveClass);
464
+ }
465
+
466
+ // Fire event when the plugin is initialised
467
+ $container.trigger("easytabs:initialised", [$defaultTabLink, defaultPanel]);
468
+ };
469
+
470
+ // Bind tab-select funtionality to namespaced click event, called by
471
+ // init
472
+ var bindToTabClicks = function() {
473
+ plugin.tabs.children("a").bind(settings.bind_str, function(e) {
474
+
475
+ // Stop cycling when a tab is clicked
476
+ settings.cycle = false;
477
+
478
+ // Hash will be updated when tab is clicked,
479
+ // don't cause tab to re-select when hash-change event is fired
480
+ skipUpdateToHash = false;
481
+
482
+ // Select the panel for the clicked tab
483
+ plugin.selectTab( $(this) );
484
+
485
+ // Don't follow the link to the anchor
486
+ e.preventDefault ? e.preventDefault() : e.returnValue = false;
487
+ });
488
+ };
489
+
490
+ // Activate a given tab/panel, called from plugin.selectTab:
491
+ //
492
+ // * fire `easytabs:before` hook
493
+ // * get ajax if new tab is an uncached ajax tab
494
+ // * animate out previously-active panel
495
+ // * fire `easytabs:midTransition` hook
496
+ // * update URL hash
497
+ // * animate in newly-active panel
498
+ // * update CSS classes for inactive and active tabs/panels
499
+ //
500
+ // TODO: This could probably be broken out into many more modular
501
+ // functions
502
+ var activateTab = function($clicked, $targetPanel, ajaxUrl, callback) {
503
+ plugin.panels.stop(true,true);
504
+
505
+ if( fire($container,"easytabs:before", [$clicked, $targetPanel, settings]) ){
506
+ var $visiblePanel = plugin.panels.filter(":visible"),
507
+ $panelContainer = $targetPanel.parent(),
508
+ targetHeight,
509
+ visibleHeight,
510
+ heightDifference,
511
+ showPanel,
512
+ hash = window.location.hash.match(/^[^\?]*/)[0];
513
+
514
+ if (settings.animate) {
515
+ targetHeight = getHeightForHidden($targetPanel);
516
+ visibleHeight = $visiblePanel.length ? setAndReturnHeight($visiblePanel) : 0;
517
+ heightDifference = targetHeight - visibleHeight;
518
+ }
519
+
520
+ // Set lastHash to help indicate if defaultTab should be
521
+ // activated across multiple tab instances.
522
+ lastHash = hash;
523
+
524
+ // TODO: Move this function elsewhere
525
+ showPanel = function() {
526
+ // At this point, the previous panel is hidden, and the new one will be selected
527
+ $container.trigger("easytabs:midTransition", [$clicked, $targetPanel, settings]);
528
+
529
+ // Gracefully animate between panels of differing heights, start height change animation *after* panel change if panel needs to contract,
530
+ // so that there is no chance of making the visible panel overflowing the height of the target panel
531
+ if (settings.animate && settings.transitionIn == 'fadeIn') {
532
+ if (heightDifference < 0)
533
+ $panelContainer.animate({
534
+ height: $panelContainer.height() + heightDifference
535
+ }, transitions.halfSpeed ).css({ 'min-height': '' });
536
+ }
537
+
538
+ if ( settings.updateHash && ! skipUpdateToHash ) {
539
+ //window.location = url.toString().replace((url.pathname + hash), (url.pathname + $clicked.attr("href")));
540
+ // Not sure why this behaves so differently, but it's more straight forward and seems to have less side-effects
541
+ window.location.hash = '#' + $targetPanel.attr('id');
542
+ } else {
543
+ skipUpdateToHash = false;
544
+ }
545
+
546
+ $targetPanel
547
+ [transitions.show](transitions.speed, settings.transitionInEasing, function(){
548
+ $panelContainer.css({height: '', 'min-height': ''}); // After the transition, unset the height
549
+ $container.trigger("easytabs:after", [$clicked, $targetPanel, settings]);
550
+ // callback only gets called if selectTab actually does something, since it's inside the if block
551
+ if(typeof callback == 'function'){
552
+ callback();
553
+ }
554
+ });
555
+ };
556
+
557
+ if ( ajaxUrl && (!settings.cache || !$clicked.parent().data('easytabs').cached) ) {
558
+ $container.trigger('easytabs:ajax:beforeSend', [$clicked, $targetPanel]);
559
+ $targetPanel.load(ajaxUrl, function(response, status, xhr){
560
+ $clicked.parent().data('easytabs').cached = true;
561
+ $container.trigger('easytabs:ajax:complete', [$clicked, $targetPanel, response, status, xhr]);
562
+ });
563
+ }
564
+
565
+ // Gracefully animate between panels of differing heights, start height change animation *before* panel change if panel needs to expand,
566
+ // so that there is no chance of making the target panel overflowing the height of the visible panel
567
+ if( settings.animate && settings.transitionOut == 'fadeOut' ) {
568
+ if( heightDifference > 0 ) {
569
+ $panelContainer.animate({
570
+ height: ( $panelContainer.height() + heightDifference )
571
+ }, transitions.halfSpeed );
572
+ } else {
573
+ // Prevent height jumping before height transition is triggered at midTransition
574
+ $panelContainer.css({ 'min-height': $panelContainer.height() });
575
+ }
576
+ }
577
+
578
+ // Change the active tab *first* to provide immediate feedback when the user clicks
579
+ plugin.tabs.filter("." + settings.tabActiveClass).removeClass(settings.tabActiveClass).children().removeClass(settings.tabActiveClass);
580
+ plugin.tabs.filter("." + settings.collapsedClass).removeClass(settings.collapsedClass).children().removeClass(settings.collapsedClass);
581
+ $clicked.parent().addClass(settings.tabActiveClass).children().addClass(settings.tabActiveClass);
582
+
583
+ plugin.panels.filter("." + settings.panelActiveClass).removeClass(settings.panelActiveClass);
584
+ $targetPanel.addClass(settings.panelActiveClass);
585
+
586
+ if( $visiblePanel.length ) {
587
+ $visiblePanel
588
+ [transitions.hide](transitions.speed, settings.transitionOutEasing, showPanel);
589
+ } else {
590
+ $targetPanel
591
+ [transitions.uncollapse](transitions.speed, settings.transitionUncollapseEasing, showPanel);
592
+ }
593
+ }
594
+ };
595
+
596
+ // Get heights of panels to enable animation between panels of
597
+ // differing heights, called by activateTab
598
+ var getHeightForHidden = function($targetPanel){
599
+
600
+ if ( $targetPanel.data('easytabs') && $targetPanel.data('easytabs').lastHeight ) {
601
+ return $targetPanel.data('easytabs').lastHeight;
602
+ }
603
+
604
+ // this is the only property easytabs changes, so we need to grab its value on each tab change
605
+ var display = $targetPanel.css('display'),
606
+ outerCloak,
607
+ height;
608
+
609
+ // Workaround with wrapping height, because firefox returns wrong
610
+ // height if element itself has absolute positioning.
611
+ // but try/catch block needed for IE7 and IE8 because they throw
612
+ // an "Unspecified error" when trying to create an element
613
+ // with the css position set.
614
+ try {
615
+ outerCloak = $('<div></div>', {'position': 'absolute', 'visibility': 'hidden', 'overflow': 'hidden'});
616
+ } catch (e) {
617
+ outerCloak = $('<div></div>', {'visibility': 'hidden', 'overflow': 'hidden'});
618
+ }
619
+ height = $targetPanel
620
+ .wrap(outerCloak)
621
+ .css({'position':'relative','visibility':'hidden','display':'block'})
622
+ .outerHeight();
623
+
624
+ $targetPanel.unwrap();
625
+
626
+ // Return element to previous state
627
+ $targetPanel.css({
628
+ position: $targetPanel.data('easytabs').position,
629
+ visibility: $targetPanel.data('easytabs').visibility,
630
+ display: display
631
+ });
632
+
633
+ // Cache height
634
+ $targetPanel.data('easytabs').lastHeight = height;
635
+
636
+ return height;
637
+ };
638
+
639
+ // Since the height of the visible panel may have been manipulated due to interaction,
640
+ // we want to re-cache the visible height on each tab change, called
641
+ // by activateTab
642
+ var setAndReturnHeight = function($visiblePanel) {
643
+ var height = $visiblePanel.outerHeight();
644
+
645
+ if( $visiblePanel.data('easytabs') ) {
646
+ $visiblePanel.data('easytabs').lastHeight = height;
647
+ } else {
648
+ $visiblePanel.data('easytabs', {lastHeight: height});
649
+ }
650
+ return height;
651
+ };
652
+
653
+ // Setup hash-change callback for forward- and back-button
654
+ // functionality, called by init
655
+ var initHashChange = function(){
656
+
657
+ // enabling back-button with jquery.hashchange plugin
658
+ // http://benalman.com/projects/jquery-hashchange-plugin/
659
+ if(typeof $(window).hashchange === 'function'){
660
+ $(window).hashchange( function(){
661
+ plugin.selectTabFromHashChange();
662
+ });
663
+ } else if ($.address && typeof $.address.change === 'function') { // back-button with jquery.address plugin http://www.asual.com/jquery/address/docs/
664
+ $.address.change( function(){
665
+ plugin.selectTabFromHashChange();
666
+ });
667
+ }
668
+ };
669
+
670
+ // Begin cycling if set in options, called by init
671
+ var initCycle = function(){
672
+ var tabNumber;
673
+ if (settings.cycle) {
674
+ tabNumber = plugin.tabs.index($defaultTab);
675
+ setTimeout( function(){ plugin.cycleTabs(tabNumber + 1); }, settings.cycle);
676
+ }
677
+ };
678
+
679
+
680
+ plugin.init();
681
+
682
+ };
683
+
684
+ $.fn.easytabs = function(options) {
685
+ var args = arguments;
686
+
687
+ return this.each(function() {
688
+ var $this = $(this),
689
+ plugin = $this.data('easytabs');
690
+
691
+ // Initialization was called with $(el).easytabs( { options } );
692
+ if (undefined === plugin) {
693
+ plugin = new $.easytabs(this, options);
694
+ $this.data('easytabs', plugin);
695
+ }
696
+
697
+ // User called public method
698
+ if ( plugin.publicMethods[options] ){
699
+ return plugin.publicMethods[options](Array.prototype.slice.call( args, 1 ));
700
+ }
701
+ });
702
+ };
703
+
704
+ })(jQuery);
js/hashchange.js ADDED
@@ -0,0 +1,390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery hashchange event - v1.3 - 7/21/2010
3
+ * http://benalman.com/projects/jquery-hashchange-plugin/
4
+ *
5
+ * Copyright (c) 2010 "Cowboy" Ben Alman
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://benalman.com/about/license/
8
+ */
9
+
10
+ // Script: jQuery hashchange event
11
+ //
12
+ // *Version: 1.3, Last updated: 7/21/2010*
13
+ //
14
+ // Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
15
+ // GitHub - http://github.com/cowboy/jquery-hashchange/
16
+ // Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
17
+ // (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
18
+ //
19
+ // About: License
20
+ //
21
+ // Copyright (c) 2010 "Cowboy" Ben Alman,
22
+ // Dual licensed under the MIT and GPL licenses.
23
+ // http://benalman.com/about/license/
24
+ //
25
+ // About: Examples
26
+ //
27
+ // These working examples, complete with fully commented code, illustrate a few
28
+ // ways in which this plugin can be used.
29
+ //
30
+ // hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
31
+ // document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
32
+ //
33
+ // About: Support and Testing
34
+ //
35
+ // Information about what version or versions of jQuery this plugin has been
36
+ // tested with, what browsers it has been tested in, and where the unit tests
37
+ // reside (so you can test it yourself).
38
+ //
39
+ // jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
40
+ // Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
41
+ // Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
42
+ // Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/
43
+ //
44
+ // About: Known issues
45
+ //
46
+ // While this jQuery hashchange event implementation is quite stable and
47
+ // robust, there are a few unfortunate browser bugs surrounding expected
48
+ // hashchange event-based behaviors, independent of any JavaScript
49
+ // window.onhashchange abstraction. See the following examples for more
50
+ // information:
51
+ //
52
+ // Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
53
+ // Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
54
+ // WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
55
+ // Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
56
+ //
57
+ // Also note that should a browser natively support the window.onhashchange
58
+ // event, but not report that it does, the fallback polling loop will be used.
59
+ //
60
+ // About: Release History
61
+ //
62
+ // 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
63
+ // "removable" for mobile-only development. Added IE6/7 document.title
64
+ // support. Attempted to make Iframe as hidden as possible by using
65
+ // techniques from http://www.paciellogroup.com/blog/?p=604. Added
66
+ // support for the "shortcut" format $(window).hashchange( fn ) and
67
+ // $(window).hashchange() like jQuery provides for built-in events.
68
+ // Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
69
+ // lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
70
+ // and <jQuery.fn.hashchange.src> properties plus document-domain.html
71
+ // file to address access denied issues when setting document.domain in
72
+ // IE6/7.
73
+ // 1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin
74
+ // from a page on another domain would cause an error in Safari 4. Also,
75
+ // IE6/7 Iframe is now inserted after the body (this actually works),
76
+ // which prevents the page from scrolling when the event is first bound.
77
+ // Event can also now be bound before DOM ready, but it won't be usable
78
+ // before then in IE6/7.
79
+ // 1.1 - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug
80
+ // where browser version is incorrectly reported as 8.0, despite
81
+ // inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
82
+ // 1.0 - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special
83
+ // window.onhashchange functionality into a separate plugin for users
84
+ // who want just the basic event & back button support, without all the
85
+ // extra awesomeness that BBQ provides. This plugin will be included as
86
+ // part of jQuery BBQ, but also be available separately.
87
+
88
+ (function($,window,undefined){
89
+ '$:nomunge'; // Used by YUI compressor.
90
+
91
+ // Reused string.
92
+ var str_hashchange = 'hashchange',
93
+
94
+ // Method / object references.
95
+ doc = document,
96
+ fake_onhashchange,
97
+ special = $.event.special,
98
+
99
+ // Does the browser support window.onhashchange? Note that IE8 running in
100
+ // IE7 compatibility mode reports true for 'onhashchange' in window, even
101
+ // though the event isn't supported, so also test document.documentMode.
102
+ doc_mode = doc.documentMode,
103
+ supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 );
104
+
105
+ // Get location.hash (or what you'd expect location.hash to be) sans any
106
+ // leading #. Thanks for making this necessary, Firefox!
107
+ function get_fragment( url ) {
108
+ url = url || location.href;
109
+ return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );
110
+ };
111
+
112
+ // Method: jQuery.fn.hashchange
113
+ //
114
+ // Bind a handler to the window.onhashchange event or trigger all bound
115
+ // window.onhashchange event handlers. This behavior is consistent with
116
+ // jQuery's built-in event handlers.
117
+ //
118
+ // Usage:
119
+ //
120
+ // > jQuery(window).hashchange( [ handler ] );
121
+ //
122
+ // Arguments:
123
+ //
124
+ // handler - (Function) Optional handler to be bound to the hashchange
125
+ // event. This is a "shortcut" for the more verbose form:
126
+ // jQuery(window).bind( 'hashchange', handler ). If handler is omitted,
127
+ // all bound window.onhashchange event handlers will be triggered. This
128
+ // is a shortcut for the more verbose
129
+ // jQuery(window).trigger( 'hashchange' ). These forms are described in
130
+ // the <hashchange event> section.
131
+ //
132
+ // Returns:
133
+ //
134
+ // (jQuery) The initial jQuery collection of elements.
135
+
136
+ // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and
137
+ // $(elem).hashchange() for triggering, like jQuery does for built-in events.
138
+ $.fn[ str_hashchange ] = function( fn ) {
139
+ return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange );
140
+ };
141
+
142
+ // Property: jQuery.fn.hashchange.delay
143
+ //
144
+ // The numeric interval (in milliseconds) at which the <hashchange event>
145
+ // polling loop executes. Defaults to 50.
146
+
147
+ // Property: jQuery.fn.hashchange.domain
148
+ //
149
+ // If you're setting document.domain in your JavaScript, and you want hash
150
+ // history to work in IE6/7, not only must this property be set, but you must
151
+ // also set document.domain BEFORE jQuery is loaded into the page. This
152
+ // property is only applicable if you are supporting IE6/7 (or IE8 operating
153
+ // in "IE7 compatibility" mode).
154
+ //
155
+ // In addition, the <jQuery.fn.hashchange.src> property must be set to the
156
+ // path of the included "document-domain.html" file, which can be renamed or
157
+ // modified if necessary (note that the document.domain specified must be the
158
+ // same in both your main JavaScript as well as in this file).
159
+ //
160
+ // Usage:
161
+ //
162
+ // jQuery.fn.hashchange.domain = document.domain;
163
+
164
+ // Property: jQuery.fn.hashchange.src
165
+ //
166
+ // If, for some reason, you need to specify an Iframe src file (for example,
167
+ // when setting document.domain as in <jQuery.fn.hashchange.domain>), you can
168
+ // do so using this property. Note that when using this property, history
169
+ // won't be recorded in IE6/7 until the Iframe src file loads. This property
170
+ // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7
171
+ // compatibility" mode).
172
+ //
173
+ // Usage:
174
+ //
175
+ // jQuery.fn.hashchange.src = 'path/to/file.html';
176
+
177
+ $.fn[ str_hashchange ].delay = 50;
178
+ /*
179
+ $.fn[ str_hashchange ].domain = null;
180
+ $.fn[ str_hashchange ].src = null;
181
+ */
182
+
183
+ // Event: hashchange event
184
+ //
185
+ // Fired when location.hash changes. In browsers that support it, the native
186
+ // HTML5 window.onhashchange event is used, otherwise a polling loop is
187
+ // initialized, running every <jQuery.fn.hashchange.delay> milliseconds to
188
+ // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7
189
+ // compatibility" mode), a hidden Iframe is created to allow the back button
190
+ // and hash-based history to work.
191
+ //
192
+ // Usage as described in <jQuery.fn.hashchange>:
193
+ //
194
+ // > // Bind an event handler.
195
+ // > jQuery(window).hashchange( function(e) {
196
+ // > var hash = location.hash;
197
+ // > ...
198
+ // > });
199
+ // >
200
+ // > // Manually trigger the event handler.
201
+ // > jQuery(window).hashchange();
202
+ //
203
+ // A more verbose usage that allows for event namespacing:
204
+ //
205
+ // > // Bind an event handler.
206
+ // > jQuery(window).bind( 'hashchange', function(e) {
207
+ // > var hash = location.hash;
208
+ // > ...
209
+ // > });
210
+ // >
211
+ // > // Manually trigger the event handler.
212
+ // > jQuery(window).trigger( 'hashchange' );
213
+ //
214
+ // Additional Notes:
215
+ //
216
+ // * The polling loop and Iframe are not created until at least one handler
217
+ // is actually bound to the 'hashchange' event.
218
+ // * If you need the bound handler(s) to execute immediately, in cases where
219
+ // a location.hash exists on page load, via bookmark or page refresh for
220
+ // example, use jQuery(window).hashchange() or the more verbose
221
+ // jQuery(window).trigger( 'hashchange' ).
222
+ // * The event can be bound before DOM ready, but since it won't be usable
223
+ // before then in IE6/7 (due to the necessary Iframe), recommended usage is
224
+ // to bind it inside a DOM ready handler.
225
+
226
+ // Override existing $.event.special.hashchange methods (allowing this plugin
227
+ // to be defined after jQuery BBQ in BBQ's source code).
228
+ special[ str_hashchange ] = $.extend( special[ str_hashchange ], {
229
+
230
+ // Called only when the first 'hashchange' event is bound to window.
231
+ setup: function() {
232
+ // If window.onhashchange is supported natively, there's nothing to do..
233
+ if ( supports_onhashchange ) { return false; }
234
+
235
+ // Otherwise, we need to create our own. And we don't want to call this
236
+ // until the user binds to the event, just in case they never do, since it
237
+ // will create a polling loop and possibly even a hidden Iframe.
238
+ $( fake_onhashchange.start );
239
+ },
240
+
241
+ // Called only when the last 'hashchange' event is unbound from window.
242
+ teardown: function() {
243
+ // If window.onhashchange is supported natively, there's nothing to do..
244
+ if ( supports_onhashchange ) { return false; }
245
+
246
+ // Otherwise, we need to stop ours (if possible).
247
+ $( fake_onhashchange.stop );
248
+ }
249
+
250
+ });
251
+
252
+ // fake_onhashchange does all the work of triggering the window.onhashchange
253
+ // event for browsers that don't natively support it, including creating a
254
+ // polling loop to watch for hash changes and in IE 6/7 creating a hidden
255
+ // Iframe to enable back and forward.
256
+ fake_onhashchange = (function(){
257
+ var self = {},
258
+ timeout_id,
259
+
260
+ // Remember the initial hash so it doesn't get triggered immediately.
261
+ last_hash = get_fragment(),
262
+
263
+ fn_retval = function(val){ return val; },
264
+ history_set = fn_retval,
265
+ history_get = fn_retval;
266
+
267
+ // Start the polling loop.
268
+ self.start = function() {
269
+ timeout_id || poll();
270
+ };
271
+
272
+ // Stop the polling loop.
273
+ self.stop = function() {
274
+ timeout_id && clearTimeout( timeout_id );
275
+ timeout_id = undefined;
276
+ };
277
+
278
+ // This polling loop checks every $.fn.hashchange.delay milliseconds to see
279
+ // if location.hash has changed, and triggers the 'hashchange' event on
280
+ // window when necessary.
281
+ function poll() {
282
+ var hash = get_fragment(),
283
+ history_hash = history_get( last_hash );
284
+
285
+ if ( hash !== last_hash ) {
286
+ history_set( last_hash = hash, history_hash );
287
+
288
+ $(window).trigger( str_hashchange );
289
+
290
+ } else if ( history_hash !== last_hash ) {
291
+ location.href = location.href.replace( /#.*/, '' ) + history_hash;
292
+ }
293
+
294
+ timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
295
+ };
296
+
297
+ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
298
+ // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
299
+ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
300
+ $.browser.msie && !supports_onhashchange && (function(){
301
+ // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
302
+ // when running in "IE7 compatibility" mode.
303
+
304
+ var iframe,
305
+ iframe_src;
306
+
307
+ // When the event is bound and polling starts in IE 6/7, create a hidden
308
+ // Iframe for history handling.
309
+ self.start = function(){
310
+ if ( !iframe ) {
311
+ iframe_src = $.fn[ str_hashchange ].src;
312
+ iframe_src = iframe_src && iframe_src + get_fragment();
313
+
314
+ // Create hidden Iframe. Attempt to make Iframe as hidden as possible
315
+ // by using techniques from http://www.paciellogroup.com/blog/?p=604.
316
+ iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
317
+
318
+ // When Iframe has completely loaded, initialize the history and
319
+ // start polling.
320
+ .one( 'load', function(){
321
+ iframe_src || history_set( get_fragment() );
322
+ poll();
323
+ })
324
+
325
+ // Load Iframe src if specified, otherwise nothing.
326
+ .attr( 'src', iframe_src || 'javascript:0' )
327
+
328
+ // Append Iframe after the end of the body to prevent unnecessary
329
+ // initial page scrolling (yes, this works).
330
+ .insertAfter( 'body' )[0].contentWindow;
331
+
332
+ // Whenever `document.title` changes, update the Iframe's title to
333
+ // prettify the back/next history menu entries. Since IE sometimes
334
+ // errors with "Unspecified error" the very first time this is set
335
+ // (yes, very useful) wrap this with a try/catch block.
336
+ doc.onpropertychange = function(){
337
+ try {
338
+ if ( event.propertyName === 'title' ) {
339
+ iframe.document.title = doc.title;
340
+ }
341
+ } catch(e) {}
342
+ };
343
+
344
+ }
345
+ };
346
+
347
+ // Override the "stop" method since an IE6/7 Iframe was created. Even
348
+ // if there are no longer any bound event handlers, the polling loop
349
+ // is still necessary for back/next to work at all!
350
+ self.stop = fn_retval;
351
+
352
+ // Get history by looking at the hidden Iframe's location.hash.
353
+ history_get = function() {
354
+ return get_fragment( iframe.location.href );
355
+ };
356
+
357
+ // Set a new history item by opening and then closing the Iframe
358
+ // document, *then* setting its location.hash. If document.domain has
359
+ // been set, update that as well.
360
+ history_set = function( hash, history_hash ) {
361
+ var iframe_doc = iframe.document,
362
+ domain = $.fn[ str_hashchange ].domain;
363
+
364
+ if ( hash !== history_hash ) {
365
+ // Update Iframe with any initial `document.title` that might be set.
366
+ iframe_doc.title = doc.title;
367
+
368
+ // Opening the Iframe's document after it has been closed is what
369
+ // actually adds a history entry.
370
+ iframe_doc.open();
371
+
372
+ // Set document.domain for the Iframe document as well, if necessary.
373
+ domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
374
+
375
+ iframe_doc.close();
376
+
377
+ // Update the Iframe's hash, for great justice.
378
+ iframe.location.hash = hash;
379
+ }
380
+ };
381
+
382
+ })();
383
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
384
+ // ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
385
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
386
+
387
+ return self;
388
+ })();
389
+
390
+ })(jQuery,this);
js/twitter-widgets.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Twitter Embeddable Widget
3
+ * https://dev.twitter.com/web/javascript/loading
4
+ */
5
+ window.twttr = (function(d, s, id) {
6
+ var js, fjs = d.getElementsByTagName(s)[0],
7
+ t = window.twttr || {};
8
+ if (d.getElementById(id)) return t;
9
+ js = d.createElement(s);
10
+ js.id = id;
11
+ js.src = "https://platform.twitter.com/widgets.js";
12
+ fjs.parentNode.insertBefore(js, fjs);
13
+
14
+ t._e = [];
15
+ t.ready = function(f) {
16
+ t._e.push(f);
17
+ };
18
+
19
+ return t;
20
+ }(document, "script", "twitter-wjs"));
languages/do-etfw.pot ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: Easy Twitter Feed Widget\n"
6
+ "POT-Creation-Date: 2016-12-18 13:45+0500\n"
7
+ "PO-Revision-Date: 2016-12-18 13:44+0500\n"
8
+ "Last-Translator: DesignOrbital <care@designorbital.com>\n"
9
+ "Language-Team: DesignOrbital <care@designorbital.com>\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.11\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-WPHeader: easy-twitter-feed-widget.php\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
22
+
23
+ #. Plugin Name of the plugin/theme
24
+ #: inc/admin.php:10
25
+ msgid "Easy Twitter Feed Widget"
26
+ msgstr ""
27
+
28
+ #: inc/admin.php:70
29
+ #, php-format
30
+ msgid "%1$s is a project of %2$s. You can reach us via contact page."
31
+ msgstr ""
32
+
33
+ #: inc/admin.php:76
34
+ msgid "Plugin Support"
35
+ msgstr ""
36
+
37
+ #: inc/admin.php:82
38
+ msgid "For more information:"
39
+ msgstr ""
40
+
41
+ #: inc/admin.php:84
42
+ msgid "Plugin Author"
43
+ msgstr ""
44
+
45
+ #: inc/admin.php:87
46
+ msgid "Plugin Official Page"
47
+ msgstr ""
48
+
49
+ #: inc/admin.php:103 inc/settings-page.php:59
50
+ msgid "Configuration"
51
+ msgstr ""
52
+
53
+ #: inc/admin.php:104
54
+ msgid "Load Twitter Script"
55
+ msgstr ""
56
+
57
+ #: inc/admin.php:114
58
+ msgid "yes"
59
+ msgstr ""
60
+
61
+ #: inc/admin.php:115
62
+ msgid "no"
63
+ msgstr ""
64
+
65
+ #: inc/admin.php:139
66
+ msgid "Configure twitter feed widget by using the following settings."
67
+ msgstr ""
68
+
69
+ #: inc/admin.php:155
70
+ msgid "Select \"no\" if your theme loads Twitter script."
71
+ msgstr ""
72
+
73
+ #: inc/settings-page.php:6
74
+ msgid "Settings"
75
+ msgstr ""
76
+
77
+ #: inc/settings-page.php:14
78
+ msgid "Premium WordPress Themes"
79
+ msgstr ""
80
+
81
+ #: inc/settings-page.php:17
82
+ msgid "Free WordPress Themes"
83
+ msgstr ""
84
+
85
+ #: inc/settings-page.php:20
86
+ msgid "Like Us On Facebook"
87
+ msgstr ""
88
+
89
+ #: inc/settings-page.php:23
90
+ msgid "Follow On Twitter"
91
+ msgstr ""
92
+
93
+ #: inc/settings-page.php:32
94
+ msgid "Support Us for the Development and Maintenance of Plugin"
95
+ msgstr ""
96
+
97
+ #: inc/settings-page.php:53 inc/settings-page.php:70
98
+ msgid "Save Changes"
99
+ msgstr ""
100
+
101
+ #: inc/widget-twitter.php:30
102
+ msgid "Twitter Timeline (Easy Twitter Feed Widget)"
103
+ msgstr ""
104
+
105
+ #: inc/widget-twitter.php:33
106
+ msgid "Display an official Twitter Embedded Timeline widget."
107
+ msgstr ""
108
+
109
+ #: inc/widget-twitter.php:112
110
+ msgid "Tweets by @"
111
+ msgstr ""
112
+
113
+ #: inc/widget-twitter.php:216
114
+ msgid "Username"
115
+ msgstr ""
116
+
117
+ #: inc/widget-twitter.php:217
118
+ msgid "Widget ID"
119
+ msgstr ""
120
+
121
+ #: inc/widget-twitter.php:221
122
+ msgid "Light"
123
+ msgstr ""
124
+
125
+ #: inc/widget-twitter.php:222
126
+ msgid "Dark"
127
+ msgstr ""
128
+
129
+ #: inc/widget-twitter.php:228
130
+ msgid "Title:"
131
+ msgstr ""
132
+
133
+ #: inc/widget-twitter.php:235
134
+ msgid "Timeline Type:"
135
+ msgstr ""
136
+
137
+ #: inc/widget-twitter.php:247
138
+ msgid "Twitter Username:"
139
+ msgstr ""
140
+
141
+ #: inc/widget-twitter.php:254
142
+ msgid "Widget ID:"
143
+ msgstr ""
144
+
145
+ #: inc/widget-twitter.php:255
146
+ msgid "It can be empty, if you are using Timeline Type \"Username\"."
147
+ msgstr ""
148
+
149
+ #: inc/widget-twitter.php:262
150
+ msgid "Maximum Width (px; 220 to 1200):"
151
+ msgstr ""
152
+
153
+ #: inc/widget-twitter.php:269
154
+ msgid "Height (px; at least 200):"
155
+ msgstr ""
156
+
157
+ #: inc/widget-twitter.php:276
158
+ msgid "Number of Tweets Shown:"
159
+ msgstr ""
160
+
161
+ #: inc/widget-twitter.php:283
162
+ msgid "Theme:"
163
+ msgstr ""
164
+
165
+ #: inc/widget-twitter.php:294
166
+ msgid "Link Color (hex):"
167
+ msgstr ""
168
+
169
+ #: inc/widget-twitter.php:301
170
+ msgid "Border Color (hex):"
171
+ msgstr ""
172
+
173
+ #: inc/widget-twitter.php:308
174
+ msgid "Layout Options:"
175
+ msgstr ""
176
+
177
+ #: inc/widget-twitter.php:313
178
+ msgid "No Header"
179
+ msgstr ""
180
+
181
+ #: inc/widget-twitter.php:318
182
+ msgid "No Footer"
183
+ msgstr ""
184
+
185
+ #: inc/widget-twitter.php:323
186
+ msgid "No Borders"
187
+ msgstr ""
188
+
189
+ #: inc/widget-twitter.php:328
190
+ msgid "No Scrollbar"
191
+ msgstr ""
192
+
193
+ #: inc/widget-twitter.php:333
194
+ msgid "Transparent Background"
195
+ msgstr ""
196
+
197
+ #: inc/widget-twitter.php:344
198
+ msgid "Follow me on Twitter"
199
+ msgstr ""
200
+
201
+ #. Plugin URI of the plugin/theme
202
+ msgid "https://designorbital.com/easy-twitter-feed-widget/"
203
+ msgstr ""
204
+
205
+ #. Description of the plugin/theme
206
+ msgid ""
207
+ "Add twitter feeds on your WordPress site by using the Easy Twitter Feed "
208
+ "Widget plugin."
209
+ msgstr ""
210
+
211
+ #. Author of the plugin/theme
212
+ msgid "DesignOrbital.com"
213
+ msgstr ""
214
+
215
+ #. Author URI of the plugin/theme
216
+ msgid "https://designorbital.com"
217
+ msgstr ""
languages/kamn-easy-twitter-feed-widget.pot DELETED
@@ -1,199 +0,0 @@
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.3\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-importer\n"
7
- "POT-Creation-Date: 2014-11-13 16:22+0500\n"
8
- "PO-Revision-Date: 2014-11-13 16:22+0500\n"
9
- "Last-Translator: DesignOrbital <designorbital@live.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.10\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr\n"
18
- "X-Poedit-Basepath: /Applications/MAMP/htdocs/wpplugin/wp-content/plugins/"
19
- "easy-twitter-feed-widget/\n"
20
- "X-Poedit-SearchPath-0: .\n"
21
-
22
- #: lib/admin/admin.php:26
23
- msgid "Easy Twitter Feed Widget Options"
24
- msgstr ""
25
-
26
- #: lib/admin/admin.php:42
27
- msgid "Load Twitter Script"
28
- msgstr ""
29
-
30
- #: lib/admin/admin.php:46
31
- msgid "Reset Easy Twitter Feed Widget Options"
32
- msgstr ""
33
-
34
- #: lib/admin/admin.php:65
35
- msgid "Plugin Support"
36
- msgstr ""
37
-
38
- #: lib/admin/admin.php:75
39
- msgid "License"
40
- msgstr ""
41
-
42
- #: lib/admin/admin.php:85
43
- msgid "Changelog"
44
- msgstr ""
45
-
46
- #: lib/admin/admin.php:92
47
- msgid "For more information:"
48
- msgstr ""
49
-
50
- #: lib/admin/admin.php:94
51
- msgid "Easy Twitter Feed Widget Plugin"
52
- msgstr ""
53
-
54
- #: lib/admin/admin.php:97
55
- msgid "Easy Twitter Feed Widget Official Page"
56
- msgstr ""
57
-
58
- #: lib/admin/admin.php:149
59
- msgid "yes"
60
- msgstr ""
61
-
62
- #: lib/admin/admin.php:150
63
- msgid "no"
64
- msgstr ""
65
-
66
- #: lib/admin/admin.php:180
67
- msgid "Customize Twitter Embeddable Widget by using the following settings."
68
- msgstr ""
69
-
70
- #: lib/admin/admin.php:197
71
- msgid "Select \"no\" if your theme supports Twitter Embeddable Widget."
72
- msgstr ""
73
-
74
- #: lib/admin/admin.php:204
75
- msgid ""
76
- "Here are the general settings to customize easy twitter feed widget plugin."
77
- msgstr ""
78
-
79
- #: lib/admin/admin.php:210
80
- msgid "Reset EasyTwitterFeedWidget Options."
81
- msgstr ""
82
-
83
- #: lib/admin/page.php:9
84
- #, php-format
85
- msgid "%1$s Settings"
86
- msgstr ""
87
-
88
- #: lib/admin/page.php:14
89
- msgid "Premium WordPress Themes"
90
- msgstr ""
91
-
92
- #: lib/admin/page.php:15
93
- msgid "Free WordPress Themes"
94
- msgstr ""
95
-
96
- #: lib/admin/page.php:16
97
- msgid "Like Us On Facebook"
98
- msgstr ""
99
-
100
- #: lib/admin/page.php:17
101
- msgid "Follow On Twitter"
102
- msgstr ""
103
-
104
- #: lib/admin/page.php:23 lib/admin/page.php:52
105
- msgid "Save Changes"
106
- msgstr ""
107
-
108
- #: lib/admin/page.php:31
109
- msgid "Twitter Script Settings"
110
- msgstr ""
111
-
112
- #: lib/admin/page.php:32
113
- msgid "General Settings"
114
- msgstr ""
115
-
116
- #: lib/widget-easy-twitter-feed-widget.php:27
117
- msgid "Easy Twitter Feed Widget"
118
- msgstr ""
119
-
120
- #: lib/widget-easy-twitter-feed-widget.php:98
121
- msgid "Tweets by @"
122
- msgstr ""
123
-
124
- #: lib/widget-easy-twitter-feed-widget.php:161
125
- msgid "Title:"
126
- msgstr ""
127
-
128
- #: lib/widget-easy-twitter-feed-widget.php:165
129
- msgid "Easy Twitter Feed Widget Settings"
130
- msgstr ""
131
-
132
- #: lib/widget-easy-twitter-feed-widget.php:169
133
- msgid "Twitter Widget ID:"
134
- msgstr ""
135
-
136
- #: lib/widget-easy-twitter-feed-widget.php:174
137
- msgid "Twitter Screen Name:"
138
- msgstr ""
139
-
140
- #: lib/widget-easy-twitter-feed-widget.php:179
141
- msgid "Tweet Limit:"
142
- msgstr ""
143
-
144
- #: lib/widget-easy-twitter-feed-widget.php:188
145
- msgid "Show Replies:"
146
- msgstr ""
147
-
148
- #: lib/widget-easy-twitter-feed-widget.php:197
149
- msgid "Twitter Widget Width:"
150
- msgstr ""
151
-
152
- #: lib/widget-easy-twitter-feed-widget.php:206
153
- msgid "Twitter Widget Height:"
154
- msgstr ""
155
-
156
- #: lib/widget-easy-twitter-feed-widget.php:212
157
- msgid "Height setting will work only @ Tweet Limit \"default\"."
158
- msgstr ""
159
-
160
- #: lib/widget-easy-twitter-feed-widget.php:216
161
- msgid "Twitter Widget Theme:"
162
- msgstr ""
163
-
164
- #: lib/widget-easy-twitter-feed-widget.php:225
165
- msgid "Twitter Widget Link Color:"
166
- msgstr ""
167
-
168
- #: lib/widget-easy-twitter-feed-widget.php:225
169
- #: lib/widget-easy-twitter-feed-widget.php:257
170
- msgid "e.g #333333"
171
- msgstr ""
172
-
173
- #: lib/widget-easy-twitter-feed-widget.php:230
174
- msgid "Show Twitter Widget Header:"
175
- msgstr ""
176
-
177
- #: lib/widget-easy-twitter-feed-widget.php:239
178
- msgid "Show Twitter Widget Footer:"
179
- msgstr ""
180
-
181
- #: lib/widget-easy-twitter-feed-widget.php:248
182
- msgid "Show Twitter Widget Border:"
183
- msgstr ""
184
-
185
- #: lib/widget-easy-twitter-feed-widget.php:257
186
- msgid "Twitter Widget Border Color:"
187
- msgstr ""
188
-
189
- #: lib/widget-easy-twitter-feed-widget.php:262
190
- msgid "Show Twitter Widget Scrollbar:"
191
- msgstr ""
192
-
193
- #: lib/widget-easy-twitter-feed-widget.php:268
194
- msgid "Scrollbar setting will work only @ Tweet Limit \"default\"."
195
- msgstr ""
196
-
197
- #: lib/widget-easy-twitter-feed-widget.php:272
198
- msgid "Use Twitter Widget Background Color:"
199
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/admin/admin.php DELETED
@@ -1,215 +0,0 @@
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 DELETED
@@ -1,4 +0,0 @@
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 DELETED
@@ -1,18 +0,0 @@
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 DELETED
@@ -1,2 +0,0 @@
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 DELETED
@@ -1,57 +0,0 @@
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 DELETED
@@ -1,195 +0,0 @@
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 DELETED
@@ -1,67 +0,0 @@
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 DELETED
@@ -1,69 +0,0 @@
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 DELETED
@@ -1,85 +0,0 @@
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 DELETED
@@ -1,12 +0,0 @@
1
- /*!
2
- * Twitter Embeddable Widget
3
- * https://dev.twitter.com/web/javascript/loading
4
- */
5
- window.twttr = (function (d, s, id) {
6
- var t, js, fjs = d.getElementsByTagName(s)[0];
7
- if (d.getElementById(id)) return;
8
- js = d.createElement(s); js.id = id;
9
- js.src= "https://platform.twitter.com/widgets.js";
10
- fjs.parentNode.insertBefore(js, fjs);
11
- return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
12
- }(document, "script", "twitter-wjs"));
 
 
 
 
 
 
 
 
 
 
 
 
lib/modules.php DELETED
@@ -1,81 +0,0 @@
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 DELETED
@@ -1,23 +0,0 @@
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 DELETED
@@ -1,303 +0,0 @@
1
- <?php
2
- /**********************************************
3
- * Twitterwidget Widget
4
- * https://dev.twitter.com/web/embedded-timelines
5
- **********************************************/
6
-
7
- class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
8
-
9
- /**
10
- * Set up the widget's unique name, ID, class, description, and other options.
11
- */
12
- function __construct() {
13
-
14
- parent::__construct(
15
- 'widget-easy-twitter-feed-widget-kamn',
16
- apply_filters( 'kamn_easy_twitter_feed_widget_name', __( 'Easy Twitter Feed Widget', 'kamn-easy-twitter-feed-widget') ),
17
- array(
18
- 'classname' => 'widget-easy-twitter-feed-widget-kamn',
19
- 'description' => __( 'A widget to display Twitter feed.', 'kamn-easy-twitter-feed-widget' )
20
- )
21
- );
22
- }
23
-
24
- /**
25
- * Outputs the widget based on the arguments input through the widget controls.
26
- *
27
- * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
28
- * @param array $instance The settings for the particular instance of the widget
29
- */
30
-
31
- function widget( $args, $instance ) {
32
-
33
- /** Global Data */
34
- global $post;
35
-
36
- /** Extract Args */
37
- extract( $args );
38
-
39
- /** Set up the default form values. */
40
- $defaults = $this->kamn_defaults();
41
-
42
- /** Merge the user-selected arguments with the defaults. */
43
- $instance = wp_parse_args( (array) $instance, $defaults );
44
-
45
- /** Data Chrome */
46
- $data_chrome = array();
47
- $data_chrome[] = ( $instance['twitter_widget_chrome_header'] == 0 )? 'noheader': '';
48
- $data_chrome[] = ( $instance['twitter_widget_chrome_footer'] == 0 )? 'nofooter': '';
49
- $data_chrome[] = ( $instance['twitter_widget_chrome_border'] == 0 )? 'noborders': '';
50
- $data_chrome[] = ( $instance['twitter_widget_chrome_scrollbar'] == 0 )? 'noscrollbar': '';
51
- $data_chrome[] = ( $instance['twitter_widget_chrome_background'] == 0 )? 'transparent': '';
52
-
53
- /** Data Attributes */
54
- $data_twitter_widget = array(
55
- 'data-widget-id' => $instance['twitter_widget_id'],
56
- 'data-screen-name' => $instance['twitter_widget_screen_name'],
57
- 'data-show-replies' => $instance['twitter_widget_show_replies'],
58
- 'data-theme' => $instance['twitter_widget_theme'],
59
- 'data-link-color' => $instance['twitter_widget_link_color'],
60
- 'data-border-color' => $instance['twitter_widget_border_color'],
61
- 'data-chrome' => trim( join( ' ', $data_chrome ) )
62
- );
63
-
64
- /** Twitter only manages scrollbar / height at default value. So this is for it :) */
65
- if( $instance['twitter_widget_tweet_limit'] != 0 ) {
66
- $data_twitter_widget['data-tweet-limit'] = $instance['twitter_widget_tweet_limit'];
67
- }
68
-
69
- /** Data Attributes as name=value */
70
- $data_twitter_widget_nv = '';
71
- foreach ( $data_twitter_widget as $key => $val ) {
72
- $data_twitter_widget_nv .= $key . '=' . '"' . esc_attr( $val ) . '"' . ' ';
73
- }
74
-
75
- /** Open the output of the widget. */
76
- echo $before_widget;
77
-
78
- ?>
79
- <div class="widget-easy-twitter-feed-widget-global-wrapper">
80
- <div class="widget-easy-twitter-feed-widget-container">
81
-
82
- <?php if ( ! empty( $instance['title'] ) ) : ?>
83
- <div class="row">
84
- <div class="col-lg-12">
85
- <?php echo $before_title . '<span>' . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . '</span>' . $after_title; ?>
86
- </div>
87
- </div>
88
- <?php endif; ?>
89
-
90
- <div class="widget-easy-twitter-feed-widget-row">
91
- <div class="widget-easy-twitter-feed-widget-col">
92
- <div class="twitterwidget <?php echo $widget_id; ?>">
93
- <a class="twitter-timeline" width="<?php echo $instance['twitter_widget_width']; ?>" height="<?php echo $instance['twitter_widget_height']; ?>" href="https://twitter.com/twitterdev" <?php echo trim( $data_twitter_widget_nv ); ?>><?php _e( 'Tweets by @', 'kamn-easy-twitter-feed-widget' ); ?><?php echo $instance['twitter_widget_screen_name']; ?></a>
94
- </div>
95
- </div>
96
- </div>
97
-
98
- </div> <!-- End .widget-global-wrapper -->
99
- </div>
100
-
101
- <?php
102
-
103
- /** Close the output of the widget. */
104
- echo $after_widget;
105
-
106
- }
107
-
108
- /** Updates the widget control options for the particular instance of the widget.
109
- *
110
- * This function should check that $new_instance is set correctly.
111
- * The newly calculated value of $instance should be returned.
112
- * If "false" is returned, the instance won't be saved/updated.
113
- *
114
- * @param array $new_instance New settings for this instance as input by the user via form()
115
- * @param array $old_instance Old settings for this instance
116
- * @return array Settings to save or bool false to cancel saving
117
- */
118
- function update( $new_instance, $old_instance ) {
119
-
120
- /** Default Args */
121
- $defaults = $this->kamn_defaults();
122
-
123
- /** Update Logic */
124
- $instance = $old_instance;
125
- foreach( $defaults as $key => $val ) {
126
- $instance[$key] = strip_tags( $new_instance[$key] );
127
- }
128
- return $instance;
129
-
130
- }
131
-
132
- /**
133
- *
134
- * Displays the widget control options in the Widgets admin screen.
135
- *
136
- * @param array $instance Current settings
137
- */
138
- function form( $instance ) {
139
-
140
- /** Set up the default form values. */
141
- $defaults = $this->kamn_defaults();
142
-
143
- /** Merge the user-selected arguments with the defaults. */
144
- $instance = wp_parse_args( (array) $instance, $defaults );
145
-
146
- $title = strip_tags( $instance['title'] );
147
- $twitter_widget_tweet_limit = array_merge( array( 0 => 'default' ), array_combine( range( 1, 20 ), range( 1, 20 ) ) );
148
- $twitter_widget_show_replies = array( 'true' => 'Yes', 'false' => 'No' );
149
- $twitter_widget_width = range( 180, 520, 20 );
150
- $twitter_widget_height = range( 200, 600, 50 );
151
- $twitter_widget_theme = array( 'light' => 'Light', 'dark' => 'Dark' );
152
- $boolean = array( 1 => 'Yes', 0 => 'No' );
153
- ?>
154
-
155
- <p>
156
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'kamn-easy-twitter-feed-widget' ); ?></label>
157
- <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'] ); ?>" />
158
- </p>
159
-
160
- <p><strong><?php _e( 'Easy Twitter Feed Widget Settings', 'kamn-easy-twitter-feed-widget' ); ?></strong></p>
161
- <hr />
162
-
163
- <p>
164
- <label for="<?php echo $this->get_field_id( 'twitter_widget_id' ); ?>"><?php _e( 'Twitter Widget ID:', 'kamn-easy-twitter-feed-widget' ); ?></label>
165
- <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'] ); ?>" />
166
- </p>
167
-
168
- <p>
169
- <label for="<?php echo $this->get_field_id( 'twitter_widget_screen_name' ); ?>"><?php _e( 'Twitter Screen Name:', 'kamn-easy-twitter-feed-widget' ); ?></label>
170
- <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'] ); ?>" />
171
- </p>
172
-
173
- <p>
174
- <label for="<?php echo $this->get_field_id( 'twitter_widget_tweet_limit' ); ?>"><?php _e( 'Tweet Limit:', 'kamn-easy-twitter-feed-widget' ); ?></label>
175
- <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' ); ?>">
176
- <?php foreach ( $twitter_widget_tweet_limit as $key => $val ): ?>
177
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_tweet_limit'], $key ); ?>><?php echo esc_html( $val ); ?></option>
178
- <?php endforeach; ?>
179
- </select>
180
- </p>
181
-
182
- <p>
183
- <label for="<?php echo $this->get_field_id( 'twitter_widget_show_replies' ); ?>"><?php _e( 'Show Replies:', 'kamn-easy-twitter-feed-widget' ); ?></label>
184
- <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' ); ?>">
185
- <?php foreach ( $twitter_widget_show_replies as $key => $val ): ?>
186
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_show_replies'], $key ); ?>><?php echo esc_html( $val ); ?></option>
187
- <?php endforeach; ?>
188
- </select>
189
- </p>
190
-
191
- <p>
192
- <label for="<?php echo $this->get_field_id( 'twitter_widget_width' ); ?>"><?php _e( 'Twitter Widget Width:', 'kamn-easy-twitter-feed-widget' ); ?></label>
193
- <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_width' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_width' ); ?>">
194
- <?php foreach ( $twitter_widget_width as $val ): ?>
195
- <option value="<?php echo esc_attr( $val ); ?>" <?php selected( $instance['twitter_widget_width'], $val ); ?>><?php echo esc_html( $val ); ?></option>
196
- <?php endforeach; ?>
197
- </select>
198
- </p>
199
-
200
- <p>
201
- <label for="<?php echo $this->get_field_id( 'twitter_widget_height' ); ?>"><?php _e( 'Twitter Widget Height:', 'kamn-easy-twitter-feed-widget' ); ?></label>
202
- <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_height' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_height' ); ?>">
203
- <?php foreach ( $twitter_widget_height as $val ): ?>
204
- <option value="<?php echo esc_attr( $val ); ?>" <?php selected( $instance['twitter_widget_height'], $val ); ?>><?php echo esc_html( $val ); ?></option>
205
- <?php endforeach; ?>
206
- </select>
207
- <small><?php _e( 'Height setting will work only @ Tweet Limit "default".', 'kamn-easy-twitter-feed-widget' ); ?></small>
208
- </p>
209
-
210
- <p>
211
- <label for="<?php echo $this->get_field_id( 'twitter_widget_theme' ); ?>"><?php _e( 'Twitter Widget Theme:', 'kamn-easy-twitter-feed-widget' ); ?></label>
212
- <select class="widefat" id="<?php echo $this->get_field_id( 'twitter_widget_theme' ); ?>" name="<?php echo $this->get_field_name( 'twitter_widget_theme' ); ?>">
213
- <?php foreach ( $twitter_widget_theme as $key => $val ): ?>
214
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_theme'], $key ); ?>><?php echo esc_html( $val ); ?></option>
215
- <?php endforeach; ?>
216
- </select>
217
- </p>
218
-
219
- <p>
220
- <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 />
221
- <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'] ); ?>" />
222
- </p>
223
-
224
- <p>
225
- <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_header' ); ?>"><?php _e( 'Show Twitter Widget Header:', 'kamn-easy-twitter-feed-widget' ); ?></label>
226
- <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' ); ?>">
227
- <?php foreach ( $boolean as $key => $val ): ?>
228
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_header'], $key ); ?>><?php echo esc_html( $val ); ?></option>
229
- <?php endforeach; ?>
230
- </select>
231
- </p>
232
-
233
- <p>
234
- <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_footer' ); ?>"><?php _e( 'Show Twitter Widget Footer:', 'kamn-easy-twitter-feed-widget' ); ?></label>
235
- <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' ); ?>">
236
- <?php foreach ( $boolean as $key => $val ): ?>
237
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_footer'], $key ); ?>><?php echo esc_html( $val ); ?></option>
238
- <?php endforeach; ?>
239
- </select>
240
- </p>
241
-
242
- <p>
243
- <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_border' ); ?>"><?php _e( 'Show Twitter Widget Border:', 'kamn-easy-twitter-feed-widget' ); ?></label>
244
- <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' ); ?>">
245
- <?php foreach ( $boolean as $key => $val ): ?>
246
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_border'], $key ); ?>><?php echo esc_html( $val ); ?></option>
247
- <?php endforeach; ?>
248
- </select>
249
- </p>
250
-
251
- <p>
252
- <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 />
253
- <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'] ); ?>" />
254
- </p>
255
-
256
- <p>
257
- <label for="<?php echo $this->get_field_id( 'twitter_widget_chrome_scrollbar' ); ?>"><?php _e( 'Show Twitter Widget Scrollbar:', 'kamn-easy-twitter-feed-widget' ); ?></label>
258
- <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' ); ?>">
259
- <?php foreach ( $boolean as $key => $val ): ?>
260
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_scrollbar'], $key ); ?>><?php echo esc_html( $val ); ?></option>
261
- <?php endforeach; ?>
262
- </select>
263
- <small><?php _e( 'Scrollbar setting will work only @ Tweet Limit "default".', 'kamn-easy-twitter-feed-widget' ); ?></small>
264
- </p>
265
-
266
- <p>
267
- <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>
268
- <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' ); ?>">
269
- <?php foreach ( $boolean as $key => $val ): ?>
270
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_chrome_background'], $key ); ?>><?php echo esc_html( $val ); ?></option>
271
- <?php endforeach; ?>
272
- </select>
273
- </p>
274
-
275
- <?php
276
- }
277
-
278
- /** Set up the default form values. */
279
- function kamn_defaults() {
280
-
281
- $defaults = array(
282
- 'title' => esc_attr__( 'Twitter Widget', 'kamn-easy-twitter-feed-widget'),
283
- 'twitter_widget_id' => '344713329262084096',
284
- 'twitter_widget_screen_name' => 'designorbital',
285
- 'twitter_widget_tweet_limit' => 0,
286
- 'twitter_widget_show_replies' => 'false',
287
- 'twitter_widget_width' => 300,
288
- 'twitter_widget_height' => 250,
289
- 'twitter_widget_theme' => 'light',
290
- 'twitter_widget_link_color' => '',
291
- 'twitter_widget_border_color' => '',
292
- 'twitter_widget_chrome_header' => 1,
293
- 'twitter_widget_chrome_footer' => 1,
294
- 'twitter_widget_chrome_border' => 1,
295
- 'twitter_widget_chrome_scrollbar' => 1,
296
- 'twitter_widget_chrome_background' => 1
297
- );
298
-
299
- return $defaults;
300
-
301
- }
302
-
303
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ 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: 4.5
7
  Tested up to: 4.7
8
- Stable tag: 0.5
9
 
10
  Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
11
 
@@ -13,7 +13,7 @@ Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget p
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.
@@ -21,7 +21,7 @@ If you are planning to display tweets on your blog's sidebar without bells and w
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](https://designorbital.com/) or [Free WordPress Themes](https://designorbital.com/free-wordpress-themes/) to run your website under the clean and SEO optimized code.
25
 
26
  == Installation ==
27
 
@@ -30,13 +30,28 @@ Easy Twitter Feed Widget plugin is developed by DesignOrbital. You may be intere
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
 
@@ -47,6 +62,13 @@ Easy Twitter Feed Widget plugin is developed by DesignOrbital. You may be intere
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
 
 
50
  = 0.5 - December 18, 2015 =
51
 
52
  * Enhancement: WP_Widget is deprecated and replaced with __construct().
5
  Tags: twitter, twitter feed, tweet, twitter widget, feed, widget, twitter sidebar, social, social media, sidebar, plugin
6
  Requires at least: 4.5
7
  Tested up to: 4.7
8
+ Stable tag: 0.6
9
 
10
  Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
11
 
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 twitter timeline 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.
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 interested to use our [Premium WordPress Themes](https://designorbital.com/) or [Free WordPress Themes](https://designorbital.com/free-wordpress-themes/) to run your website under the clean and SEO optimized code.
25
 
26
  == Installation ==
27
 
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
+ = Timeline Type =
34
+
35
+ You can display tweets by using one of the following two methods.
36
+
37
+ 1. Twitter Username
38
+ 1. Twitter Widget ID
39
+
40
+ = Twitter Username =
41
+
42
+ 1. It is easy method to setup twitter widget. You only need to enter your twitter username in the Twitter Username field.
43
+
44
+ = Twitter Widget ID =
45
+
46
+ 1. You can setup twitter widget by using Widget ID. Here are the steps to get your Twitter Widget ID.
47
+
48
  = How to get Twitter Widget ID =
49
 
50
  1. Sign In to your `Twitter Account`
51
  1. Go to `Settings > Widgets > Create new`
52
  1. Click `Create Widget` button
53
+ 1. You can copy the Widget ID from `Browser Address Bar` e.g. `344713329262084096`
54
+ 1. OR You can copy the Widget ID from the given HTML under the Widget Preview i.e. `data-widget-id="344713329262084096"`
55
 
56
  == Screenshots ==
57
 
62
 
63
  == Changelog ==
64
 
65
+ = 0.6 - December 18, 2016 =
66
+
67
+ * New: Twitter embedded timeline can be displayed by using Twitter username.
68
+ * New: Widget Id is optional now.
69
+ * Enhancement: Plugin is re-written to provide an easy interface and secured code.
70
+ * Hardening: Code hardening.
71
+
72
  = 0.5 - December 18, 2015 =
73
 
74
  * Enhancement: WP_Widget is deprecated and replaced with __construct().