Easy Twitter Feed Widget Plugin - Version 0.7

Version Description

  • September 5, 2017 =

  • Enhancement: Code improvements.

Download this release

Release Info

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

Code changes from version 0.6 to 0.7

Files changed (3) hide show
  1. easy-twitter-feed-widget.php +2 -2
  2. inc/widget-twitter.php +121 -116
  3. readme.txt +7 -3
easy-twitter-feed-widget.php CHANGED
@@ -7,11 +7,11 @@ 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
7
  Author URI: https://designorbital.com
8
  Text Domain: do-etfw
9
  Domain Path: /languages/
10
+ Version: 0.7
11
  License: GPL v3
12
 
13
  Easy Twitter Feed Widget Plugin
14
+ Copyright (C) 2012-2017, 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
inc/widget-twitter.php CHANGED
@@ -16,59 +16,96 @@ function do_etfw_widget_init() {
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
@@ -124,14 +161,12 @@ class DO_ETFW_Widget extends WP_Widget {
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
 
@@ -139,11 +174,11 @@ class DO_ETFW_Widget extends WP_Widget {
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'] );
@@ -169,8 +204,8 @@ class DO_ETFW_Widget extends WP_Widget {
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'] );
@@ -197,110 +232,101 @@ class DO_ETFW_Widget extends WP_Widget {
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>
@@ -337,25 +363,4 @@ class DO_ETFW_Widget extends WP_Widget {
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
- }
16
  }
17
 
18
  /**
19
+ * Core class used to implement a widget.
20
+ * @see WP_Widget
21
  */
22
  class DO_ETFW_Widget extends WP_Widget {
23
 
24
  /**
25
+ * Default instance.
26
+ */
27
+ protected $default_instance;
28
+
29
+ /**
30
+ * Form Options
31
+ */
32
+ protected $twitter_timeline_type;
33
+ protected $twitter_widget_theme;
34
+
35
+ /**
36
+ * Sets up a new widget instance.
37
  */
38
  public function __construct() {
39
 
40
+ // Initialize Default Instance
41
+ $this->default_instance = array (
42
+ 'title' => esc_html__( 'Follow me on Twitter', 'do-etfw' ),
43
+ 'twitter_timeline_type' => 'username',
44
+ 'twitter_widget_username' => 'DesignOrbital',
45
+ 'twitter_widget_id' => '',
46
+ 'twitter_widget_width' => '',
47
+ 'twitter_widget_height' => 400,
48
+ 'twitter_widget_tweet_limit' => null,
49
+ 'twitter_widget_theme' => 'light',
50
+ 'twitter_widget_link_color' => '#3b94d9',
51
+ 'twitter_widget_border_color' => '#f5f5f5',
52
+ 'twitter_widget_chrome' => array(),
53
+ );
54
+
55
+ // Initialize Form Options
56
+ $this->set_form_options();
57
+
58
+ // Widget Options
59
+ $widget_ops = array (
60
+ 'classname' => 'widget-do-etfw',
61
+ 'description' => esc_html__( 'Display an official Twitter Embedded Timeline widget.', 'do-etfw' ),
62
+ 'customize_selective_refresh' => true,
63
+ );
64
+
65
+ // Constructor
66
+ parent::__construct (
67
+ 'do-etfw', // ID
68
  apply_filters( 'do_etfw_widget_name', esc_html__( 'Twitter Timeline (Easy Twitter Feed Widget)', 'do-etfw' ) ),
69
+ $widget_ops
 
 
 
70
  );
71
 
72
+ // Scripts
73
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
 
74
 
75
  }
76
 
77
  /**
78
+ * Enqueue scripts
79
  */
80
  public function enqueue_scripts() {
81
+
82
+ if ( do_etfw_option( 'twitter_script' ) ) {
83
+ wp_enqueue_script( 'do-etfw-twitter-widgets', DO_ETFW_URI . '/js/twitter-widgets.js', array( 'jquery' ), '1.0', true );
84
+ }
85
+
86
  }
87
 
88
  /**
89
+ * Outputs the content for the current widget instance.
90
  *
91
+ * @param array $args Display arguments including 'before_title', 'after_title',
92
+ * 'before_widget', and 'after_widget'.
93
+ * @param array $instance Settings for the current Custom HTML widget instance.
 
94
  */
95
  function widget( $args, $instance ) {
96
 
97
+ // Merge the instance arguments with the defaults.
98
+ $instance = wp_parse_args( (array) $instance, $this->default_instance );
99
 
100
+ /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
101
+ $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
102
 
103
  // Open the output of the widget.
104
  echo $args['before_widget'];
105
 
106
  ?>
107
+ <?php if ( ! empty ( $title ) ) : ?>
108
+ <?php echo $args['before_title'] . $title . $args['after_title']; ?>
109
  <?php endif; ?>
110
 
111
  <?php
161
  }
162
 
163
  /**
164
+ * Handles updating settings for the current widget instance.
 
 
165
  *
166
+ * @param array $new_instance New settings for this instance as input by the user via
167
+ * WP_Widget::form().
168
+ * @param array $old_instance Old settings for this instance.
169
+ * @return array Settings to save or bool false to cancel saving.
170
  */
171
  public function update( $new_instance, $old_instance ) {
172
 
174
  $instance = $old_instance;
175
 
176
  // Sanitization
177
+ $instance['title'] = sanitize_text_field( $new_instance['title'] );
178
 
179
  $instance['twitter_timeline_type'] = $new_instance['twitter_timeline_type'];
180
+ if ( ! array_key_exists( $instance['twitter_timeline_type'], $this->twitter_timeline_type ) ) {
181
+ $instance['twitter_timeline_type'] = $this->default_instance['twitter_timeline_type'];
182
  }
183
 
184
  $instance['twitter_widget_username'] = sanitize_text_field( $new_instance['twitter_widget_username'] );
204
  $instance['twitter_widget_tweet_limit'] = ( $twitter_widget_tweet_limit ? $twitter_widget_tweet_limit : null );
205
 
206
  $instance['twitter_widget_theme'] = $new_instance['twitter_widget_theme'];
207
+ if ( ! array_key_exists( $instance['twitter_widget_theme'], $this->twitter_widget_theme ) ) {
208
+ $instance['twitter_widget_theme'] = $this->default_instance['twitter_widget_theme'];
209
  }
210
 
211
  $instance['twitter_widget_link_color'] = sanitize_hex_color( $new_instance['twitter_widget_link_color'] );
232
  }
233
 
234
  /**
235
+ * Set Form Options
 
 
236
  *
237
+ * @returns void
238
  */
239
+ public function set_form_options() {
 
 
 
 
 
 
240
 
241
+ // Timeline Type
242
+ $this->twitter_timeline_type = array (
243
  'username' => esc_html__( 'Username', 'do-etfw'),
244
  'widget-id' => esc_html__( 'Widget ID', 'do-etfw'),
245
  );
246
 
247
+ // Widget Theme
248
+ $this->twitter_widget_theme = array (
249
  'light' => esc_html__( 'Light', 'do-etfw'),
250
  'dark' => esc_html__( 'Dark', 'do-etfw'),
251
  );
252
+
253
+ }
254
+
255
+ /**
256
+ * Outputs the widget settings form.
257
+ *
258
+ * @param array $instance Current instance.
259
+ * @returns void
260
+ */
261
+ function form( $instance ) {
262
+
263
+ // Merge the instance arguments with the defaults.
264
+ $instance = wp_parse_args( (array) $instance, $this->default_instance );
265
+
266
  ?>
267
 
268
  <p>
269
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'do-etfw' ); ?></label>
270
+ <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'] ); ?>" />
 
 
271
  </p>
272
 
273
  <p>
274
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_timeline_type' ) ); ?>"><?php esc_html_e( 'Timeline Type:', 'do-etfw' ); ?></label>
275
+ <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_timeline_type' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_timeline_type' ) ); ?>">
276
+ <?php foreach ( $this->twitter_timeline_type as $key => $val ): ?>
 
 
 
277
  <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_timeline_type'], $key ); ?>><?php echo esc_html( $val ); ?></option>
278
  <?php endforeach; ?>
279
  </select>
280
  </p>
281
 
282
  <p>
283
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_username' ) ); ?>"><?php esc_html_e( 'Twitter Username:', 'do-etfw' ); ?></label>
284
+ <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'] ); ?>" />
 
 
285
  </p>
286
 
287
  <p>
288
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_id' ) ); ?>"><?php esc_html_e( 'Widget ID:', 'do-etfw' ); ?></label>
289
+ <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'] ); ?>" />
290
+ <br />
291
+ <small><?php echo esc_html__( 'It can be empty, if you are using Timeline Type "Username".', 'do-etfw' ); ?></small>
 
292
  </p>
293
 
294
  <p>
295
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_width' ) ); ?>"><?php esc_html_e( 'Maximum Width:', 'do-etfw' ); ?></label>
296
+ <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'] ); ?>" />
297
+ <br />
298
+ <small><?php echo esc_html__( 'px; 220 to 1200', 'do-etfw' ); ?></small>
299
  </p>
300
 
301
  <p>
302
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_height' ) ); ?>"><?php esc_html_e( 'Height:', 'do-etfw' ); ?></label>
303
+ <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'] ); ?>" />
304
+ <br />
305
+ <small><?php echo esc_html__( 'px; at least 200', 'do-etfw' ); ?></small>
306
  </p>
307
 
308
  <p>
309
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_tweet_limit' ) ); ?>"><?php esc_html_e( 'Number of Tweets Shown:', 'do-etfw' ); ?></label>
310
+ <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'] ); ?>" />
 
 
311
  </p>
312
 
313
  <p>
314
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_theme' ) ); ?>"><?php esc_html_e( 'Theme:', 'do-etfw' ); ?></label>
315
+ <select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_theme' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'twitter_widget_theme' ) ); ?>">
316
+ <?php foreach ( $this->twitter_widget_theme as $key => $val ): ?>
 
 
317
  <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $instance['twitter_widget_theme'], $key ); ?>><?php echo esc_html( $val ); ?></option>
318
  <?php endforeach; ?>
319
  </select>
320
  </p>
321
 
322
  <p>
323
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_link_color' ) ); ?>"><?php esc_html_e( 'Link Color (hex):', 'do-etfw' ); ?></label>
324
+ <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'] ); ?>" />
 
 
325
  </p>
326
 
327
  <p>
328
+ <label for="<?php echo esc_attr( $this->get_field_id( 'twitter_widget_border_color' ) ); ?>"><?php esc_html_e( 'Border Color (hex):', 'do-etfw' ); ?></label>
329
+ <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'] ); ?>" />
 
 
330
  </p>
331
 
332
  <p>
363
  <?php
364
  }
365
 
366
+ } // End Class DO_ETFW_Widget
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 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
 
@@ -62,6 +62,10 @@ You can display tweets by using one of the following two methods.
62
 
63
  == Changelog ==
64
 
 
 
 
 
65
  = 0.6 - December 18, 2016 =
66
 
67
  * New: Twitter embedded timeline can be displayed by using Twitter username.
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.6
7
+ Tested up to: 4.8.1
8
+ Stable tag: 0.7
9
 
10
  Add twitter feeds on your WordPress site by using the Easy Twitter Feed Widget plugin.
11
 
62
 
63
  == Changelog ==
64
 
65
+ = 0.7 - September 5, 2017 =
66
+
67
+ * Enhancement: Code improvements.
68
+
69
  = 0.6 - December 18, 2016 =
70
 
71
  * New: Twitter embedded timeline can be displayed by using Twitter username.