Version Description
July 27, 2015 =
Enhancement: No widget title HTML markup will print when the widget title is empty.
Download this release
Release Info
Developer | designorbital |
Plugin | Easy Twitter Feed Widget Plugin |
Version | 0.4 |
Comparing to | |
See all releases |
Code changes from version 0.1 to 0.4
- easy-twitter-feed-widget.php +2 -2
- languages/kamn-easy-twitter-feed-widget.pot +103 -91
- lib/admin/page.php +4 -2
- lib/js/widget-easy-twitter-feed-widget.js +10 -3
- lib/widget-easy-twitter-feed-widget.php +50 -46
- readme.txt +18 -5
easy-twitter-feed-widget.php
CHANGED
@@ -7,7 +7,7 @@ Author: DesignOrbital.com
|
|
7 |
Author URI: http://designorbital.com
|
8 |
Text Domain: kamn-easy-twitter-feed-widget
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 0.
|
11 |
License: GPL v3
|
12 |
|
13 |
Easy Twitter Feed Widget Plugin
|
@@ -47,4 +47,4 @@ if ( !defined( 'KAMN_EASY_TWITTER_FEED_WIDGET_URI' ) ) {
|
|
47 |
}
|
48 |
|
49 |
/** Plugin Init */
|
50 |
-
require_once( KAMN_EASY_TWITTER_FEED_WIDGET_DIR . 'lib/init.php' );
|
7 |
Author URI: http://designorbital.com
|
8 |
Text Domain: kamn-easy-twitter-feed-widget
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 0.4
|
11 |
License: GPL v3
|
12 |
|
13 |
Easy Twitter Feed Widget Plugin
|
47 |
}
|
48 |
|
49 |
/** Plugin Init */
|
50 |
+
require_once( KAMN_EASY_TWITTER_FEED_WIDGET_DIR . 'lib/init.php' );
|
languages/kamn-easy-twitter-feed-widget.pot
CHANGED
@@ -2,104 +2,23 @@
|
|
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.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-importer\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
-
"PO-Revision-Date: 2014-
|
9 |
-
"Last-Translator:
|
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.
|
17 |
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr\n"
|
18 |
-
"X-Poedit-Basepath:
|
19 |
-
"feed-widget
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
-
#: lib/widget-twitter-feed-widget.php:26
|
23 |
-
msgid "Easy Twitter Feed Widget"
|
24 |
-
msgstr ""
|
25 |
-
|
26 |
-
#: lib/widget-twitter-feed-widget.php:159
|
27 |
-
msgid "Title:"
|
28 |
-
msgstr ""
|
29 |
-
|
30 |
-
#: lib/widget-twitter-feed-widget.php:163
|
31 |
-
msgid "Easy Twitter Feed Widget Settings"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: lib/widget-twitter-feed-widget.php:167
|
35 |
-
msgid "Twitter Widget ID:"
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: lib/widget-twitter-feed-widget.php:172
|
39 |
-
msgid "Twitter Screen Name:"
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: lib/widget-twitter-feed-widget.php:177
|
43 |
-
msgid "Tweet Limit:"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: lib/widget-twitter-feed-widget.php:186
|
47 |
-
msgid "Show Replies:"
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: lib/widget-twitter-feed-widget.php:195
|
51 |
-
msgid "Twitter Widget Width:"
|
52 |
-
msgstr ""
|
53 |
-
|
54 |
-
#: lib/widget-twitter-feed-widget.php:204
|
55 |
-
msgid "Twitter Widget Height:"
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
-
#: lib/widget-twitter-feed-widget.php:210
|
59 |
-
msgid "Height setting will work only @ Tweet Limit \"default\"."
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: lib/widget-twitter-feed-widget.php:214
|
63 |
-
msgid "Twitter Widget Theme:"
|
64 |
-
msgstr ""
|
65 |
-
|
66 |
-
#: lib/widget-twitter-feed-widget.php:223
|
67 |
-
msgid "Twitter Widget Link Color:"
|
68 |
-
msgstr ""
|
69 |
-
|
70 |
-
#: lib/widget-twitter-feed-widget.php:223
|
71 |
-
#: lib/widget-twitter-feed-widget.php:255
|
72 |
-
msgid "e.g #333333"
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: lib/widget-twitter-feed-widget.php:228
|
76 |
-
msgid "Show Twitter Widget Header:"
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: lib/widget-twitter-feed-widget.php:237
|
80 |
-
msgid "Show Twitter Widget Footer:"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: lib/widget-twitter-feed-widget.php:246
|
84 |
-
msgid "Show Twitter Widget Border:"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: lib/widget-twitter-feed-widget.php:255
|
88 |
-
msgid "Twitter Widget Border Color:"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: lib/widget-twitter-feed-widget.php:260
|
92 |
-
msgid "Show Twitter Widget Scrollbar:"
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: lib/widget-twitter-feed-widget.php:266
|
96 |
-
msgid "Scrollbar setting will work only @ Tweet Limit \"default\"."
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: lib/widget-twitter-feed-widget.php:270
|
100 |
-
msgid "Use Twitter Widget Background Color:"
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
#: lib/admin/admin.php:26
|
104 |
msgid "Easy Twitter Feed Widget Options"
|
105 |
msgstr ""
|
@@ -174,14 +93,107 @@ msgstr ""
|
|
174 |
msgid "Free WordPress Themes"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: lib/admin/page.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
msgid "Save Changes"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: lib/admin/page.php:
|
182 |
msgid "Twitter Script Settings"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: lib/admin/page.php:
|
186 |
msgid "General Settings"
|
187 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 ""
|
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/page.php
CHANGED
@@ -11,8 +11,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
|
15 |
-
<a href="http://designorbital.com/free-wordpress-themes
|
|
|
|
|
16 |
</div>
|
17 |
|
18 |
<form action="options.php" method="post" id="kamn-easy-twitter-feed-widget-form-wrapper">
|
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">
|
lib/js/widget-easy-twitter-feed-widget.js
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
/*!
|
2 |
-
*
|
|
|
3 |
*/
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
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/widget-easy-twitter-feed-widget.php
CHANGED
@@ -1,50 +1,51 @@
|
|
1 |
<?php
|
2 |
/**********************************************
|
3 |
* Twitterwidget Widget
|
|
|
4 |
**********************************************/
|
5 |
|
6 |
class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
7 |
-
|
8 |
/**
|
9 |
* Set up the widget's unique name, ID, class, description, and other options.
|
10 |
-
*/
|
11 |
function __construct() {
|
12 |
-
|
13 |
/* Set up the widget options. */
|
14 |
-
$widget_options = array(
|
15 |
-
'classname' => 'widget-easy-twitter-feed-widget-kamn',
|
16 |
'description' => esc_html__( 'A widget to display Twitter feed.', 'kamn-easy-twitter-feed-widget' )
|
17 |
);
|
18 |
-
|
19 |
/* Set up the widget control options. */
|
20 |
$control_options = array(
|
21 |
'width' => 300,
|
22 |
'height' => 250
|
23 |
);
|
24 |
-
|
25 |
/* Create the widget. */
|
26 |
$this->WP_Widget( 'widget-easy-twitter-feed-widget-kamn', __( 'Easy Twitter Feed Widget', 'kamn-easy-twitter-feed-widget'), $widget_options, $control_options );
|
27 |
-
|
28 |
}
|
29 |
-
|
30 |
/**
|
31 |
* Outputs the widget based on the arguments input through the widget controls.
|
32 |
*
|
33 |
* @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
|
34 |
* @param array $instance The settings for the particular instance of the widget
|
35 |
*/
|
36 |
-
|
37 |
function widget( $args, $instance ) {
|
38 |
-
|
39 |
/** Global Data */
|
40 |
global $post;
|
41 |
-
|
42 |
/** Extract Args */
|
43 |
extract( $args );
|
44 |
-
|
45 |
/** Set up the default form values. */
|
46 |
$defaults = $this->kamn_defaults();
|
47 |
-
|
48 |
/** Merge the user-selected arguments with the defaults. */
|
49 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
50 |
|
@@ -80,35 +81,37 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
80 |
|
81 |
/** Open the output of the widget. */
|
82 |
echo $before_widget;
|
83 |
-
|
84 |
?>
|
85 |
-
<div class="widget-easy-twitter-feed-widget-global-wrapper">
|
86 |
<div class="widget-easy-twitter-feed-widget-container">
|
87 |
|
|
|
88 |
<div class="row">
|
89 |
<div class="col-lg-12">
|
90 |
<?php echo $before_title . '<span>' . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . '</span>' . $after_title; ?>
|
91 |
</div>
|
92 |
</div>
|
93 |
-
|
|
|
94 |
<div class="widget-easy-twitter-feed-widget-row">
|
95 |
<div class="widget-easy-twitter-feed-widget-col">
|
96 |
<div class="twitterwidget <?php echo $widget_id; ?>">
|
97 |
-
<a class="twitter-timeline" width="<?php echo $instance['twitter_widget_width']; ?>" height="<?php echo $instance['twitter_widget_height']; ?>" href="https://twitter.com/
|
98 |
-
</div>
|
99 |
</div>
|
100 |
</div>
|
101 |
-
|
102 |
-
</div> <!-- End .widget-global-wrapper -->
|
103 |
</div>
|
104 |
-
|
105 |
-
<?php
|
106 |
-
|
107 |
/** Close the output of the widget. */
|
108 |
echo $after_widget;
|
109 |
-
|
110 |
}
|
111 |
-
|
112 |
/** Updates the widget control options for the particular instance of the widget.
|
113 |
*
|
114 |
* This function should check that $new_instance is set correctly.
|
@@ -123,19 +126,19 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
123 |
|
124 |
/** Default Args */
|
125 |
$defaults = $this->kamn_defaults();
|
126 |
-
|
127 |
-
/** Update Logic */
|
128 |
$instance = $old_instance;
|
129 |
-
foreach( $defaults as $key => $val ) {
|
130 |
-
$instance[$key] = strip_tags( $new_instance[$key] );
|
131 |
}
|
132 |
return $instance;
|
133 |
|
134 |
}
|
135 |
-
|
136 |
/**
|
137 |
*
|
138 |
-
* Displays the widget control options in the Widgets admin screen.
|
139 |
*
|
140 |
* @param array $instance Current settings
|
141 |
*/
|
@@ -143,12 +146,13 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
143 |
|
144 |
/** Set up the default form values. */
|
145 |
$defaults = $this->kamn_defaults();
|
146 |
-
|
147 |
/** Merge the user-selected arguments with the defaults. */
|
148 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
149 |
-
|
150 |
$title = strip_tags( $instance['title'] );
|
151 |
$twitter_widget_tweet_limit = array_merge( array( 0 => 'default' ), array_combine( range( 1, 20 ), range( 1, 20 ) ) );
|
|
|
152 |
$twitter_widget_width = range( 180, 520, 20 );
|
153 |
$twitter_widget_height = range( 200, 600, 50 );
|
154 |
$twitter_widget_theme = array( 'light' => 'Light', 'dark' => 'Dark' );
|
@@ -162,7 +166,7 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
162 |
|
163 |
<p><strong><?php _e( 'Easy Twitter Feed Widget Settings', 'kamn-easy-twitter-feed-widget' ); ?></strong></p>
|
164 |
<hr />
|
165 |
-
|
166 |
<p>
|
167 |
<label for="<?php echo $this->get_field_id( 'twitter_widget_id' ); ?>"><?php _e( 'Twitter Widget ID:', 'kamn-easy-twitter-feed-widget' ); ?></label>
|
168 |
<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'] ); ?>" />
|
@@ -185,7 +189,7 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
185 |
<p>
|
186 |
<label for="<?php echo $this->get_field_id( 'twitter_widget_show_replies' ); ?>"><?php _e( 'Show Replies:', 'kamn-easy-twitter-feed-widget' ); ?></label>
|
187 |
<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' ); ?>">
|
188 |
-
<?php foreach ( $
|
189 |
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_show_replies'], $key ); ?>><?php echo esc_html( $val ); ?></option>
|
190 |
<?php endforeach; ?>
|
191 |
</select>
|
@@ -275,18 +279,18 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
275 |
</select>
|
276 |
</p>
|
277 |
|
278 |
-
<?php
|
279 |
}
|
280 |
-
|
281 |
-
/** Set up the default form values. */
|
282 |
function kamn_defaults() {
|
283 |
-
|
284 |
$defaults = array(
|
285 |
'title' => esc_attr__( 'Twitter Widget', 'kamn-easy-twitter-feed-widget'),
|
286 |
'twitter_widget_id' => '344713329262084096',
|
287 |
'twitter_widget_screen_name' => 'designorbital',
|
288 |
'twitter_widget_tweet_limit' => 0,
|
289 |
-
'twitter_widget_show_replies' =>
|
290 |
'twitter_widget_width' => 300,
|
291 |
'twitter_widget_height' => 250,
|
292 |
'twitter_widget_theme' => 'light',
|
@@ -296,11 +300,11 @@ class Kamn_Widget_Easytwitterfeedwidget extends WP_Widget {
|
|
296 |
'twitter_widget_chrome_footer' => 1,
|
297 |
'twitter_widget_chrome_border' => 1,
|
298 |
'twitter_widget_chrome_scrollbar' => 1,
|
299 |
-
'twitter_widget_chrome_background' => 1
|
300 |
);
|
301 |
-
|
302 |
return $defaults;
|
303 |
-
|
304 |
}
|
305 |
-
|
306 |
-
}
|
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 |
/* Set up the widget options. */
|
15 |
+
$widget_options = array(
|
16 |
+
'classname' => 'widget-easy-twitter-feed-widget-kamn',
|
17 |
'description' => esc_html__( 'A widget to display Twitter feed.', 'kamn-easy-twitter-feed-widget' )
|
18 |
);
|
19 |
+
|
20 |
/* Set up the widget control options. */
|
21 |
$control_options = array(
|
22 |
'width' => 300,
|
23 |
'height' => 250
|
24 |
);
|
25 |
+
|
26 |
/* Create the widget. */
|
27 |
$this->WP_Widget( 'widget-easy-twitter-feed-widget-kamn', __( 'Easy Twitter Feed Widget', 'kamn-easy-twitter-feed-widget'), $widget_options, $control_options );
|
28 |
+
|
29 |
}
|
30 |
+
|
31 |
/**
|
32 |
* Outputs the widget based on the arguments input through the widget controls.
|
33 |
*
|
34 |
* @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
|
35 |
* @param array $instance The settings for the particular instance of the widget
|
36 |
*/
|
37 |
+
|
38 |
function widget( $args, $instance ) {
|
39 |
+
|
40 |
/** Global Data */
|
41 |
global $post;
|
42 |
+
|
43 |
/** Extract Args */
|
44 |
extract( $args );
|
45 |
+
|
46 |
/** Set up the default form values. */
|
47 |
$defaults = $this->kamn_defaults();
|
48 |
+
|
49 |
/** Merge the user-selected arguments with the defaults. */
|
50 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
51 |
|
81 |
|
82 |
/** Open the output of the widget. */
|
83 |
echo $before_widget;
|
84 |
+
|
85 |
?>
|
86 |
+
<div class="widget-easy-twitter-feed-widget-global-wrapper">
|
87 |
<div class="widget-easy-twitter-feed-widget-container">
|
88 |
|
89 |
+
<?php if ( ! empty( $instance['title'] ) ) : ?>
|
90 |
<div class="row">
|
91 |
<div class="col-lg-12">
|
92 |
<?php echo $before_title . '<span>' . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . '</span>' . $after_title; ?>
|
93 |
</div>
|
94 |
</div>
|
95 |
+
<?php endif; ?>
|
96 |
+
|
97 |
<div class="widget-easy-twitter-feed-widget-row">
|
98 |
<div class="widget-easy-twitter-feed-widget-col">
|
99 |
<div class="twitterwidget <?php echo $widget_id; ?>">
|
100 |
+
<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>
|
101 |
+
</div>
|
102 |
</div>
|
103 |
</div>
|
104 |
+
|
105 |
+
</div> <!-- End .widget-global-wrapper -->
|
106 |
</div>
|
107 |
+
|
108 |
+
<?php
|
109 |
+
|
110 |
/** Close the output of the widget. */
|
111 |
echo $after_widget;
|
112 |
+
|
113 |
}
|
114 |
+
|
115 |
/** Updates the widget control options for the particular instance of the widget.
|
116 |
*
|
117 |
* This function should check that $new_instance is set correctly.
|
126 |
|
127 |
/** Default Args */
|
128 |
$defaults = $this->kamn_defaults();
|
129 |
+
|
130 |
+
/** Update Logic */
|
131 |
$instance = $old_instance;
|
132 |
+
foreach( $defaults as $key => $val ) {
|
133 |
+
$instance[$key] = strip_tags( $new_instance[$key] );
|
134 |
}
|
135 |
return $instance;
|
136 |
|
137 |
}
|
138 |
+
|
139 |
/**
|
140 |
*
|
141 |
+
* Displays the widget control options in the Widgets admin screen.
|
142 |
*
|
143 |
* @param array $instance Current settings
|
144 |
*/
|
146 |
|
147 |
/** Set up the default form values. */
|
148 |
$defaults = $this->kamn_defaults();
|
149 |
+
|
150 |
/** Merge the user-selected arguments with the defaults. */
|
151 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
152 |
+
|
153 |
$title = strip_tags( $instance['title'] );
|
154 |
$twitter_widget_tweet_limit = array_merge( array( 0 => 'default' ), array_combine( range( 1, 20 ), range( 1, 20 ) ) );
|
155 |
+
$twitter_widget_show_replies = array( 'true' => 'Yes', 'false' => 'No' );
|
156 |
$twitter_widget_width = range( 180, 520, 20 );
|
157 |
$twitter_widget_height = range( 200, 600, 50 );
|
158 |
$twitter_widget_theme = array( 'light' => 'Light', 'dark' => 'Dark' );
|
166 |
|
167 |
<p><strong><?php _e( 'Easy Twitter Feed Widget Settings', 'kamn-easy-twitter-feed-widget' ); ?></strong></p>
|
168 |
<hr />
|
169 |
+
|
170 |
<p>
|
171 |
<label for="<?php echo $this->get_field_id( 'twitter_widget_id' ); ?>"><?php _e( 'Twitter Widget ID:', 'kamn-easy-twitter-feed-widget' ); ?></label>
|
172 |
<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'] ); ?>" />
|
189 |
<p>
|
190 |
<label for="<?php echo $this->get_field_id( 'twitter_widget_show_replies' ); ?>"><?php _e( 'Show Replies:', 'kamn-easy-twitter-feed-widget' ); ?></label>
|
191 |
<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' ); ?>">
|
192 |
+
<?php foreach ( $twitter_widget_show_replies as $key => $val ): ?>
|
193 |
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_show_replies'], $key ); ?>><?php echo esc_html( $val ); ?></option>
|
194 |
<?php endforeach; ?>
|
195 |
</select>
|
279 |
</select>
|
280 |
</p>
|
281 |
|
282 |
+
<?php
|
283 |
}
|
284 |
+
|
285 |
+
/** Set up the default form values. */
|
286 |
function kamn_defaults() {
|
287 |
+
|
288 |
$defaults = array(
|
289 |
'title' => esc_attr__( 'Twitter Widget', 'kamn-easy-twitter-feed-widget'),
|
290 |
'twitter_widget_id' => '344713329262084096',
|
291 |
'twitter_widget_screen_name' => 'designorbital',
|
292 |
'twitter_widget_tweet_limit' => 0,
|
293 |
+
'twitter_widget_show_replies' => 'false',
|
294 |
'twitter_widget_width' => 300,
|
295 |
'twitter_widget_height' => 250,
|
296 |
'twitter_widget_theme' => 'light',
|
300 |
'twitter_widget_chrome_footer' => 1,
|
301 |
'twitter_widget_chrome_border' => 1,
|
302 |
'twitter_widget_chrome_scrollbar' => 1,
|
303 |
+
'twitter_widget_chrome_background' => 1
|
304 |
);
|
305 |
+
|
306 |
return $defaults;
|
307 |
+
|
308 |
}
|
309 |
+
|
310 |
+
}
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: designorbital
|
|
3 |
License: GPLv3
|
4 |
License URI: http://www.gnu.org/licenses/gpl.html
|
5 |
Tags: twitter, twitter feed, tweet, twitter widget, feed, widget, twitter sidebar, social, social media, sidebar, plugin
|
6 |
-
Requires at least:
|
7 |
-
Tested up to: 3
|
8 |
-
Stable tag: 0.
|
9 |
|
10 |
Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
|
11 |
|
@@ -18,7 +18,7 @@ If you are planning to display tweets on your blog's sidebar without bells and w
|
|
18 |
= Features =
|
19 |
* Easy Twitter Feed Widget Plugin is very easy to setup and use.
|
20 |
* You can blend your tweets professionally with the layout of any WordPress theme.
|
21 |
-
* Make it your own by customizing the link color, border color, background choice and other useful options.
|
22 |
|
23 |
= Further Useful Stuff =
|
24 |
Easy Twitter Feed Widget plugin is developed by DesignOrbital. You may be interesed to use our [Premium WordPress Themes](http://designorbital.com/) or [Free WordPress Themes](http://designorbital.com/free-wordpress-themes/) to run your website under the clean and SEO optimized code.
|
@@ -47,6 +47,19 @@ Easy Twitter Feed Widget plugin is developed by DesignOrbital. You may be intere
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
= 0.1 =
|
51 |
|
52 |
-
* Initial release
|
3 |
License: GPLv3
|
4 |
License URI: http://www.gnu.org/licenses/gpl.html
|
5 |
Tags: twitter, twitter feed, tweet, twitter widget, feed, widget, twitter sidebar, social, social media, sidebar, plugin
|
6 |
+
Requires at least: 4.0
|
7 |
+
Tested up to: 4.2.3
|
8 |
+
Stable tag: 0.4
|
9 |
|
10 |
Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
|
11 |
|
18 |
= Features =
|
19 |
* Easy Twitter Feed Widget Plugin is very easy to setup and use.
|
20 |
* You can blend your tweets professionally with the layout of any WordPress theme.
|
21 |
+
* Make it your own by customizing the link color, border color, background choice and other useful options.
|
22 |
|
23 |
= Further Useful Stuff =
|
24 |
Easy Twitter Feed Widget plugin is developed by DesignOrbital. You may be interesed to use our [Premium WordPress Themes](http://designorbital.com/) or [Free WordPress Themes](http://designorbital.com/free-wordpress-themes/) to run your website under the clean and SEO optimized code.
|
47 |
|
48 |
== Changelog ==
|
49 |
|
50 |
+
= 0.4 - July 27, 2015 =
|
51 |
+
|
52 |
+
* Enhancement: No widget title HTML markup will print when the widget title is empty.
|
53 |
+
|
54 |
+
= 0.3 - November 13, 2014 =
|
55 |
+
|
56 |
+
* Enhancement: Speed Improvements.
|
57 |
+
* Update: Twitter widget JS.
|
58 |
+
|
59 |
+
= 0.2 - June 09, 2014 =
|
60 |
+
|
61 |
+
* Bug Fix: Fixed `Show Replies` option.
|
62 |
+
|
63 |
= 0.1 =
|
64 |
|
65 |
+
* Initial release.
|