Testimonials by WooThemes - Version 1.5.2

Version Description

  • 2014-07-02.
  • Tweak - If a URL is set the avatar will link to it.
  • Tweak - More tag works as expected.
  • Fix - Dont override global $post variable.
Download this release

Release Info

Developer jameskoster
Plugin Icon wp plugin Testimonials by WooThemes
Version 1.5.2
Comparing to
See all releases

Code changes from version 1.5.1 to 1.5.2

lang/testimonials-by-woothemes.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-by-woothemes\n"
7
- "POT-Creation-Date: 2014-03-26 16:03:57+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -302,10 +302,14 @@ msgstr ""
302
  msgid "Descending"
303
  msgstr ""
304
 
305
- #: woothemes-testimonials-template.php:162
 
 
 
 
306
  msgid "Previous"
307
  msgstr ""
308
 
309
- #: woothemes-testimonials-template.php:163
310
  msgid "Next"
311
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/testimonials-by-woothemes\n"
7
+ "POT-Creation-Date: 2014-07-02 12:07:09+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
302
  msgid "Descending"
303
  msgstr ""
304
 
305
+ #: woothemes-testimonials-template.php:149
306
+ msgid "Read full testimonial..."
307
+ msgstr ""
308
+
309
+ #: woothemes-testimonials-template.php:167
310
  msgid "Previous"
311
  msgstr ""
312
 
313
+ #: woothemes-testimonials-template.php:168
314
  msgid "Next"
315
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: woothemes, mattyza, jameskoster
3
  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.8.1
7
- Stable tag: 1.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -130,6 +130,12 @@ We encourage everyone to contribute their ideas, thoughts and code snippets. Thi
130
 
131
  == Changelog ==
132
 
 
 
 
 
 
 
133
  = 1.5.1 =
134
  * 2014-03-26.
135
  Fix - Potential division by zero notice.
3
  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.9.1
7
+ Stable tag: 1.5.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
130
 
131
  == Changelog ==
132
 
133
+ = 1.5.2 =
134
+ * 2014-07-02.
135
+ * Tweak - If a URL is set the avatar will link to it.
136
+ * Tweak - More tag works as expected.
137
+ * Fix - Dont override global $post variable.
138
+
139
  = 1.5.1 =
140
  * 2014-03-26.
141
  Fix - Potential division by zero notice.
woothemes-testimonials-template.php CHANGED
@@ -29,7 +29,7 @@ if ( ! function_exists( 'woothemes_testimonials' ) ) {
29
  * @return string
30
  */
31
  function woothemes_testimonials ( $args = '' ) {
32
- global $post;
33
 
34
  $defaults = apply_filters( 'woothemes_testimonials_default_args', array(
35
  'limit' => 5,
@@ -134,16 +134,21 @@ function woothemes_testimonials ( $args = '' ) {
134
  $template = str_replace( '%%ID%%', get_the_ID(), $template );
135
  $template = str_replace( '%%CLASS%%', esc_attr( $css_class ), $template );
136
 
137
- if ( isset( $post->image ) && ( '' != $post->image ) && true == $args['display_avatar'] ) {
 
 
138
  $template = str_replace( '%%AVATAR%%', $post->image, $template );
139
  } else {
140
  $template = str_replace( '%%AVATAR%%', '', $template );
141
  }
142
 
143
  // Remove any remaining %%AVATAR%% template tags.
144
- $template = str_replace( '%%AVATAR%%', '', $template );
145
- $content = apply_filters( 'woothemes_testimonials_content', apply_filters( 'the_content', get_the_content() ), $post );
146
- $template = str_replace( '%%TEXT%%', $content, $template );
 
 
 
147
 
148
  // Assign for output.
149
  $html .= $template;
29
  * @return string
30
  */
31
  function woothemes_testimonials ( $args = '' ) {
32
+ global $more;
33
 
34
  $defaults = apply_filters( 'woothemes_testimonials_default_args', array(
35
  'limit' => 5,
134
  $template = str_replace( '%%ID%%', get_the_ID(), $template );
135
  $template = str_replace( '%%CLASS%%', esc_attr( $css_class ), $template );
136
 
137
+ if ( isset( $post->image ) && ( '' != $post->image ) && true == $args['display_avatar'] && ( '' != $post->url ) ) {
138
+ $template = str_replace( '%%AVATAR%%', '<a href="' . esc_url( $post->url ) . '" class="avatar-link">' . $post->image . '</a>', $template );
139
+ } elseif ( isset( $post->image ) && ( '' != $post->image ) && true == $args['display_avatar'] ) {
140
  $template = str_replace( '%%AVATAR%%', $post->image, $template );
141
  } else {
142
  $template = str_replace( '%%AVATAR%%', '', $template );
143
  }
144
 
145
  // Remove any remaining %%AVATAR%% template tags.
146
+ $template = str_replace( '%%AVATAR%%', '', $template );
147
+ $real_more = $more;
148
+ $more = 0;
149
+ $content = apply_filters( 'woothemes_testimonials_content', apply_filters( 'the_content', get_the_content( __( 'Read full testimonial...', 'our-team-by-woothemes' ) ) ), $post );
150
+ $more = $real_more;
151
+ $template = str_replace( '%%TEXT%%', $content, $template );
152
 
153
  // Assign for output.
154
  $html .= $template;
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.5.1
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
@@ -19,4 +19,4 @@ require_once( 'woothemes-testimonials-template.php' );
19
  require_once( 'classes/class-woothemes-widget-testimonials.php' );
20
  global $woothemes_testimonials;
21
  $woothemes_testimonials = new Woothemes_Testimonials( __FILE__ );
22
- $woothemes_testimonials->version = '1.5.1';
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.5.2
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
19
  require_once( 'classes/class-woothemes-widget-testimonials.php' );
20
  global $woothemes_testimonials;
21
  $woothemes_testimonials = new Woothemes_Testimonials( __FILE__ );
22
+ $woothemes_testimonials->version = '1.5.2';