Testimonials by WooThemes - Version 1.1.0

Version Description

  • Added avatar display options and performed routine plugin maintenance.
Download this release

Release Info

Developer woothemes
Plugin Icon wp plugin Testimonials by WooThemes
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.0 to 1.1.0

classes/class-woothemes-widget-testimonials.php CHANGED
@@ -85,6 +85,7 @@ class Woothemes_Widget_Testmonials extends WP_Widget {
85
 
86
  // Boolean values.
87
  if ( isset( $instance['display_author'] ) && ( 1 == $instance['display_author'] ) ) { $args['display_author'] = true; } else { $args['display_author'] = false; }
 
88
  if ( isset( $instance['display_url'] ) && ( 1 == $instance['display_url'] ) ) { $args['display_url'] = true; } else { $args['display_url'] = false; }
89
 
90
  // Select boxes.
@@ -126,6 +127,7 @@ class Woothemes_Widget_Testmonials extends WP_Widget {
126
 
127
  /* The checkbox is returning a Boolean (true/false), so we check for that. */
128
  $instance['display_author'] = (bool) esc_attr( $new_instance['display_author'] );
 
129
  $instance['display_url'] = (bool) esc_attr( $new_instance['display_url'] );
130
 
131
  return $instance;
@@ -149,6 +151,7 @@ class Woothemes_Widget_Testmonials extends WP_Widget {
149
  'order' => 'DESC',
150
  'specific_id' => '',
151
  'display_author' => true,
 
152
  'display_url' => true,
153
  'effect' => 'fade', // Options: 'fade', 'none'
154
  'pagination' => false,
@@ -195,6 +198,11 @@ class Woothemes_Widget_Testmonials extends WP_Widget {
195
  <input id="<?php echo $this->get_field_id( 'display_author' ); ?>" name="<?php echo $this->get_field_name( 'display_author' ); ?>" type="checkbox"<?php checked( $instance['display_author'], 1 ); ?> />
196
  <label for="<?php echo $this->get_field_id( 'display_author' ); ?>"><?php _e( 'Display Author', 'woothemes-testimonials' ); ?></label>
197
  </p>
 
 
 
 
 
198
  <!-- Widget Display URL: Checkbox Input -->
199
  <p>
200
  <input id="<?php echo $this->get_field_id( 'display_url' ); ?>" name="<?php echo $this->get_field_name( 'display_url' ); ?>" type="checkbox"<?php checked( $instance['display_url'], 1 ); ?> />
85
 
86
  // Boolean values.
87
  if ( isset( $instance['display_author'] ) && ( 1 == $instance['display_author'] ) ) { $args['display_author'] = true; } else { $args['display_author'] = false; }
88
+ if ( isset( $instance['display_avatar'] ) && ( 1 == $instance['display_avatar'] ) ) { $args['display_avatar'] = true; } else { $args['display_avatar'] = false; }
89
  if ( isset( $instance['display_url'] ) && ( 1 == $instance['display_url'] ) ) { $args['display_url'] = true; } else { $args['display_url'] = false; }
90
 
91
  // Select boxes.
127
 
128
  /* The checkbox is returning a Boolean (true/false), so we check for that. */
129
  $instance['display_author'] = (bool) esc_attr( $new_instance['display_author'] );
130
+ $instance['display_avatar'] = (bool) esc_attr( $new_instance['display_avatar'] );
131
  $instance['display_url'] = (bool) esc_attr( $new_instance['display_url'] );
132
 
133
  return $instance;
151
  'order' => 'DESC',
152
  'specific_id' => '',
153
  'display_author' => true,
154
+ 'display_avatar' => true,
155
  'display_url' => true,
156
  'effect' => 'fade', // Options: 'fade', 'none'
157
  'pagination' => false,
198
  <input id="<?php echo $this->get_field_id( 'display_author' ); ?>" name="<?php echo $this->get_field_name( 'display_author' ); ?>" type="checkbox"<?php checked( $instance['display_author'], 1 ); ?> />
199
  <label for="<?php echo $this->get_field_id( 'display_author' ); ?>"><?php _e( 'Display Author', 'woothemes-testimonials' ); ?></label>
200
  </p>
201
+ <!-- Widget Display Avatar: Checkbox Input -->
202
+ <p>
203
+ <input id="<?php echo $this->get_field_id( 'display_avatar' ); ?>" name="<?php echo $this->get_field_name( 'display_avatar' ); ?>" type="checkbox"<?php checked( $instance['display_avatar'], 1 ); ?> />
204
+ <label for="<?php echo $this->get_field_id( 'display_avatar' ); ?>"><?php _e( 'Display Avatar', 'woothemes-testimonials' ); ?></label>
205
+ </p>
206
  <!-- Widget Display URL: Checkbox Input -->
207
  <p>
208
  <input id="<?php echo $this->get_field_id( 'display_url' ); ?>" name="<?php echo $this->get_field_name( 'display_url' ); ?>" type="checkbox"<?php checked( $instance['display_url'], 1 ); ?> />
lang/woothemes-testimonials-en_GB.po CHANGED
@@ -3,7 +3,7 @@ msgstr ""
3
  "Project-Id-Version: Testimonials v1.0.0\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2012-10-17 09:22:43+0000\n"
7
  "Last-Translator: Matty <matt@woothemes.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -216,93 +216,98 @@ msgstr ""
216
  msgid "Recent testimonials on your site."
217
  msgstr ""
218
 
219
- #: classes/class-woothemes-widget-testimonials.php:162
220
  #@ woothemes-testimonials
221
  msgid "Title (optional):"
222
  msgstr ""
223
 
224
- #: classes/class-woothemes-widget-testimonials.php:167
225
  #@ woothemes-testimonials
226
  msgid "Limit:"
227
  msgstr ""
228
 
229
- #: classes/class-woothemes-widget-testimonials.php:172
230
  #@ woothemes-testimonials
231
  msgid "Image Size (in pixels):"
232
  msgstr ""
233
 
234
- #: classes/class-woothemes-widget-testimonials.php:177
235
  #@ woothemes-testimonials
236
  msgid "Order By:"
237
  msgstr ""
238
 
239
- #: classes/class-woothemes-widget-testimonials.php:186
240
  #@ woothemes-testimonials
241
  msgid "Order Direction:"
242
  msgstr ""
243
 
244
- #: classes/class-woothemes-widget-testimonials.php:196
245
  #@ woothemes-testimonials
246
  msgid "Display Author"
247
  msgstr ""
248
 
249
- #: classes/class-woothemes-widget-testimonials.php:201
250
  #@ woothemes-testimonials
251
  msgid "Display URL"
252
  msgstr ""
253
 
254
- #: classes/class-woothemes-widget-testimonials.php:205
255
  #@ woothemes-testimonials
256
  msgid "Specific ID (optional):"
257
  msgstr ""
258
 
259
- #: classes/class-woothemes-widget-testimonials.php:208
260
  #@ woothemes-testimonials
261
  msgid "Display a specific testimonial, rather than a list."
262
  msgstr ""
263
 
264
- #: classes/class-woothemes-widget-testimonials.php:219
265
  #@ woothemes-testimonials
266
  msgid "No Order"
267
  msgstr ""
268
 
269
- #: classes/class-woothemes-widget-testimonials.php:220
270
  #@ woothemes-testimonials
271
  msgid "Entry ID"
272
  msgstr ""
273
 
274
- #: classes/class-woothemes-widget-testimonials.php:221
275
  #@ woothemes-testimonials
276
  msgid "Title"
277
  msgstr ""
278
 
279
- #: classes/class-woothemes-widget-testimonials.php:222
280
  #@ woothemes-testimonials
281
  msgid "Date Added"
282
  msgstr ""
283
 
284
- #: classes/class-woothemes-widget-testimonials.php:223
285
  #@ woothemes-testimonials
286
  msgid "Specified Order Setting"
287
  msgstr ""
288
 
289
- #: classes/class-woothemes-widget-testimonials.php:234
290
  #@ woothemes-testimonials
291
  msgid "Ascending"
292
  msgstr ""
293
 
294
- #: classes/class-woothemes-widget-testimonials.php:235
295
  #@ woothemes-testimonials
296
  msgid "Descending"
297
  msgstr ""
298
 
299
- #: woothemes-testimonials-template.php:110
300
  #@ woothemes-testimonials
301
  msgid "Previous"
302
  msgstr ""
303
 
304
- #: woothemes-testimonials-template.php:111
305
  #@ woothemes-testimonials
306
  msgid "Next"
307
  msgstr ""
308
 
 
 
 
 
 
3
  "Project-Id-Version: Testimonials v1.0.0\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2012-11-08 07:48:44+0000\n"
7
  "Last-Translator: Matty <matt@woothemes.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
216
  msgid "Recent testimonials on your site."
217
  msgstr ""
218
 
219
+ #: classes/class-woothemes-widget-testimonials.php:165
220
  #@ woothemes-testimonials
221
  msgid "Title (optional):"
222
  msgstr ""
223
 
224
+ #: classes/class-woothemes-widget-testimonials.php:170
225
  #@ woothemes-testimonials
226
  msgid "Limit:"
227
  msgstr ""
228
 
229
+ #: classes/class-woothemes-widget-testimonials.php:175
230
  #@ woothemes-testimonials
231
  msgid "Image Size (in pixels):"
232
  msgstr ""
233
 
234
+ #: classes/class-woothemes-widget-testimonials.php:180
235
  #@ woothemes-testimonials
236
  msgid "Order By:"
237
  msgstr ""
238
 
239
+ #: classes/class-woothemes-widget-testimonials.php:189
240
  #@ woothemes-testimonials
241
  msgid "Order Direction:"
242
  msgstr ""
243
 
244
+ #: classes/class-woothemes-widget-testimonials.php:199
245
  #@ woothemes-testimonials
246
  msgid "Display Author"
247
  msgstr ""
248
 
249
+ #: classes/class-woothemes-widget-testimonials.php:209
250
  #@ woothemes-testimonials
251
  msgid "Display URL"
252
  msgstr ""
253
 
254
+ #: classes/class-woothemes-widget-testimonials.php:213
255
  #@ woothemes-testimonials
256
  msgid "Specific ID (optional):"
257
  msgstr ""
258
 
259
+ #: classes/class-woothemes-widget-testimonials.php:216
260
  #@ woothemes-testimonials
261
  msgid "Display a specific testimonial, rather than a list."
262
  msgstr ""
263
 
264
+ #: classes/class-woothemes-widget-testimonials.php:227
265
  #@ woothemes-testimonials
266
  msgid "No Order"
267
  msgstr ""
268
 
269
+ #: classes/class-woothemes-widget-testimonials.php:228
270
  #@ woothemes-testimonials
271
  msgid "Entry ID"
272
  msgstr ""
273
 
274
+ #: classes/class-woothemes-widget-testimonials.php:229
275
  #@ woothemes-testimonials
276
  msgid "Title"
277
  msgstr ""
278
 
279
+ #: classes/class-woothemes-widget-testimonials.php:230
280
  #@ woothemes-testimonials
281
  msgid "Date Added"
282
  msgstr ""
283
 
284
+ #: classes/class-woothemes-widget-testimonials.php:231
285
  #@ woothemes-testimonials
286
  msgid "Specified Order Setting"
287
  msgstr ""
288
 
289
+ #: classes/class-woothemes-widget-testimonials.php:242
290
  #@ woothemes-testimonials
291
  msgid "Ascending"
292
  msgstr ""
293
 
294
+ #: classes/class-woothemes-widget-testimonials.php:243
295
  #@ woothemes-testimonials
296
  msgid "Descending"
297
  msgstr ""
298
 
299
+ #: woothemes-testimonials-template.php:140
300
  #@ woothemes-testimonials
301
  msgid "Previous"
302
  msgstr ""
303
 
304
+ #: woothemes-testimonials-template.php:141
305
  #@ woothemes-testimonials
306
  msgid "Next"
307
  msgstr ""
308
 
309
+ #: classes/class-woothemes-widget-testimonials.php:204
310
+ #@ woothemes-testimonials
311
+ msgid "Display Avatar"
312
+ msgstr ""
313
+
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://woothemes.com/
4
  Tags: testimonials, widget, shortcode, template-tag, feedback, customers
5
  Requires at least: 3.4.2
6
  Tested up to: 3.5-beta2
7
- Stable tag: 1.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ Show off what your customers are saying about your business and how great they s
14
 
15
  "Testimonials by WooThemes" is a clean and easy-to-use testimonials management system for WordPress. Load in what your customers are saying about your business, and display the testimonials via a shortcode, widget or template tag on your website.
16
 
17
- === Usage ===
18
 
19
  To display your testimonials via a theme or a custom plugin, please use the following code:
20
 
@@ -27,6 +27,7 @@ To add arguments to this, please use any of the following arguments, using the s
27
  * 'order' => 'DESC' (the order direction)
28
  * 'id' => 0 (display a specific item)
29
  * 'display_author' => true (whether or not to display the author information)
 
30
  * 'display_url' => true (whether or not to display the URL information)
31
  * 'echo' => true (whether to display or return the data - useful with the template tag)
32
  * 'size' => 50 (the pixel dimensions of the image)
@@ -61,10 +62,19 @@ We encourage everyone to contribute their ideas, thoughts and code snippets. Thi
61
 
62
  == Upgrade Notice ==
63
 
 
 
 
64
  = 1.0.0 =
65
  * Initial release. Woo!
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
69
  = 1.0.0 =
 
70
  * Initial release. Woo!
4
  Tags: testimonials, widget, shortcode, template-tag, feedback, customers
5
  Requires at least: 3.4.2
6
  Tested up to: 3.5-beta2
7
+ Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  "Testimonials by WooThemes" is a clean and easy-to-use testimonials management system for WordPress. Load in what your customers are saying about your business, and display the testimonials via a shortcode, widget or template tag on your website.
16
 
17
+ == Usage ==
18
 
19
  To display your testimonials via a theme or a custom plugin, please use the following code:
20
 
27
  * 'order' => 'DESC' (the order direction)
28
  * 'id' => 0 (display a specific item)
29
  * 'display_author' => true (whether or not to display the author information)
30
+ * 'display_avatar' => true (whether or not to display the author avatar)
31
  * 'display_url' => true (whether or not to display the URL information)
32
  * 'echo' => true (whether to display or return the data - useful with the template tag)
33
  * 'size' => 50 (the pixel dimensions of the image)
62
 
63
  == Upgrade Notice ==
64
 
65
+ = 1.1.0 =
66
+ * Added avatar display options and performed routine plugin maintenance.
67
+
68
  = 1.0.0 =
69
  * Initial release. Woo!
70
 
71
  == Changelog ==
72
 
73
+ = 1.1.0 =
74
+ * 2012-11-08
75
+ * Added option to display or hide the avatar.
76
+ * Fixed bug where %%AVATAR%% tag was displaying if no avatar image was available for a testimonial.
77
+
78
  = 1.0.0 =
79
+ * 2012-10-23
80
  * Initial release. Woo!
woothemes-testimonials-template.php CHANGED
@@ -37,6 +37,7 @@ function woothemes_testimonials ( $args = '' ) {
37
  'order' => 'DESC',
38
  'id' => 0,
39
  'display_author' => true,
 
40
  'display_url' => true,
41
  'effect' => 'fade', // Options: 'fade', 'none'
42
  'pagination' => false,
@@ -117,10 +118,15 @@ function woothemes_testimonials ( $args = '' ) {
117
  $template = str_replace( '%%ID%%', get_the_ID(), $template );
118
  $template = str_replace( '%%CLASS%%', esc_attr( $css_class ), $template );
119
 
120
- if ( isset( $post->image ) && ( '' != $post->image ) ) {
121
  $template = str_replace( '%%AVATAR%%', '<a href="' . esc_url( $post->url ) . '" class="avatar-link">' . $post->image . '</a>', $template );
 
 
122
  }
123
 
 
 
 
124
  $template = str_replace( '%%TEXT%%', get_the_content(), $template );
125
 
126
  // Assign for output.
@@ -162,6 +168,7 @@ function woothemes_testimonials_shortcode ( $atts, $content = null ) {
162
  'order' => 'DESC',
163
  'id' => 0,
164
  'display_author' => true,
 
165
  'display_url' => true,
166
  'effect' => 'fade', // Options: 'fade', 'none'
167
  'pagination' => false,
@@ -180,7 +187,7 @@ function woothemes_testimonials_shortcode ( $atts, $content = null ) {
180
  if ( isset( $args['size'] ) && ( 0 < intval( $args['size'] ) ) ) $args['size'] = intval( $args['size'] );
181
 
182
  // Fix booleans.
183
- foreach ( array( 'display_author', 'display_url', 'pagination' ) as $k => $v ) {
184
  if ( isset( $args[$v] ) && ( 'true' == $args[$v] ) ) {
185
  $args[$v] = true;
186
  } else {
37
  'order' => 'DESC',
38
  'id' => 0,
39
  'display_author' => true,
40
+ 'display_avatar' => true,
41
  'display_url' => true,
42
  'effect' => 'fade', // Options: 'fade', 'none'
43
  'pagination' => false,
118
  $template = str_replace( '%%ID%%', get_the_ID(), $template );
119
  $template = str_replace( '%%CLASS%%', esc_attr( $css_class ), $template );
120
 
121
+ if ( isset( $post->image ) && ( '' != $post->image ) && true == $args['display_avatar'] ) {
122
  $template = str_replace( '%%AVATAR%%', '<a href="' . esc_url( $post->url ) . '" class="avatar-link">' . $post->image . '</a>', $template );
123
+ } else {
124
+ $template = str_replace( '%%AVATAR%%', '', $template );
125
  }
126
 
127
+ // Remove any remaining %%AVATAR%% template tags.
128
+ $template = str_replace( '%%AVATAR%%', '', $template );
129
+
130
  $template = str_replace( '%%TEXT%%', get_the_content(), $template );
131
 
132
  // Assign for output.
168
  'order' => 'DESC',
169
  'id' => 0,
170
  'display_author' => true,
171
+ 'display_avatar' => true,
172
  'display_url' => true,
173
  'effect' => 'fade', // Options: 'fade', 'none'
174
  'pagination' => false,
187
  if ( isset( $args['size'] ) && ( 0 < intval( $args['size'] ) ) ) $args['size'] = intval( $args['size'] );
188
 
189
  // Fix booleans.
190
+ foreach ( array( 'display_author', 'display_url', 'pagination', 'display_avatar' ) as $k => $v ) {
191
  if ( isset( $args[$v] ) && ( 'true' == $args[$v] ) ) {
192
  $args[$v] = true;
193
  } else {
woothemes-testimonials.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://woothemes.com/
5
  * Description: Hi, I'm your testimonials management plugin for WordPress. Show off what your customers or website users are saying about your business and how great they say you are, using our shortcode, widget or template tag.
6
  * Author: WooThemes
7
- * Version: 1.0.0
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
4
  * Plugin URI: http://woothemes.com/
5
  * Description: Hi, I'm your testimonials management plugin for WordPress. Show off what your customers or website users are saying about your business and how great they say you are, using our shortcode, widget or template tag.
6
  * Author: WooThemes
7
+ * Version: 1.1.0
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress