Testimonials by WooThemes - Version 1.4.1

Version Description

  • Fixes display of testimonials when no "id" parameter is set.
Download this release

Release Info

Developer mattyza
Plugin Icon wp plugin Testimonials by WooThemes
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

classes/class-woothemes-testimonials.php CHANGED
@@ -428,9 +428,9 @@ class Woothemes_Testimonials {
428
  $query_args['suppress_filters'] = false;
429
 
430
  $ids = explode( ',', $args['id'] );
431
- $ids = array_map( 'intval', $ids );
432
 
433
- if ( 0 < count( $ids ) ) {
 
434
  if ( 1 == count( $ids ) && is_numeric( $ids[0] ) && ( 0 < intval( $ids[0] ) ) ) {
435
  $query_args['p'] = intval( $args['id'] );
436
  } else {
428
  $query_args['suppress_filters'] = false;
429
 
430
  $ids = explode( ',', $args['id'] );
 
431
 
432
+ if ( 0 < intval( $args['id'] ) && 0 < count( $ids ) ) {
433
+ $ids = array_map( 'intval', $ids );
434
  if ( 1 == count( $ids ) && is_numeric( $ids[0] ) && ( 0 < intval( $ids[0] ) ) ) {
435
  $query_args['p'] = intval( $args['id'] );
436
  } else {
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.6.0
7
- Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,9 @@ We encourage everyone to contribute their ideas, thoughts and code snippets. Thi
97
 
98
  == Upgrade Notice =
99
 
 
 
 
100
  = 1.4.0 =
101
  * Adds "per_row" functionality, a "columns-X" CSS class on the wrapper, support for multiple comma-separated ID values in the "id" argument and a "no-image" CSS class if no image is available for the item.
102
 
@@ -127,6 +130,10 @@ We encourage everyone to contribute their ideas, thoughts and code snippets. Thi
127
 
128
  == Changelog ==
129
 
 
 
 
 
130
  = 1.4.0 =
131
  * 2013-08-20.
132
  * Adds "per_row" functionality and a "columns-X" CSS class on the wrapper.
4
  Tags: testimonials, widget, shortcode, template-tag, feedback, customers
5
  Requires at least: 3.4.2
6
  Tested up to: 3.6.0
7
+ Stable tag: 1.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Upgrade Notice =
99
 
100
+ = 1.4.1 =
101
+ * Fixes display of testimonials when no "id" parameter is set.
102
+
103
  = 1.4.0 =
104
  * Adds "per_row" functionality, a "columns-X" CSS class on the wrapper, support for multiple comma-separated ID values in the "id" argument and a "no-image" CSS class if no image is available for the item.
105
 
130
 
131
  == Changelog ==
132
 
133
+ = 1.4.1 =
134
+ * 2013-08-22.
135
+ * Fixes display of testimonials when no "id" parameter is set.
136
+
137
  = 1.4.0 =
138
  * 2013-08-20.
139
  * Adds "per_row" functionality and a "columns-X" CSS class on the wrapper.
woothemes-testimonials-template.php CHANGED
@@ -93,8 +93,8 @@ function woothemes_testimonials ( $args = '' ) {
93
  $template = $tpl;
94
 
95
  $css_class = 'quote';
96
- if ( 1 == $count ) { $css_class .= ' first'; }
97
- if ( $per_row == $count || count( $query ) == $count ) { $css_class .= ' last'; }
98
 
99
  // Add a CSS class if no image is available.
100
  if ( isset( $post->image ) && ( '' == $post->image ) ) {
@@ -148,7 +148,7 @@ function woothemes_testimonials ( $args = '' ) {
148
  // Assign for output.
149
  $html .= $template;
150
 
151
- if( ( 0 == $count % $args['per_row'] ) ) {
152
  $html .= '<div class="fix"></div>' . "\n";
153
  }
154
  }
93
  $template = $tpl;
94
 
95
  $css_class = 'quote';
96
+ if ( ( is_numeric( $args['per_row'] ) && ( 0 == ( $count - 1 ) % $args['per_row'] ) ) || 1 == $count ) { $css_class .= ' first'; }
97
+ if ( ( is_numeric( $args['per_row'] ) && ( 0 == $count % $args['per_row'] ) ) || count( $query ) == $count ) { $css_class .= ' last'; }
98
 
99
  // Add a CSS class if no image is available.
100
  if ( isset( $post->image ) && ( '' == $post->image ) ) {
148
  // Assign for output.
149
  $html .= $template;
150
 
151
+ if( is_numeric( $args['per_row'] ) && ( 0 == $count % $args['per_row'] ) ) {
152
  $html .= '<div class="fix"></div>' . "\n";
153
  }
154
  }
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.4.0
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
@@ -19,5 +19,5 @@ 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.4.0';
23
  ?>
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.4.1
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.4.1';
23
  ?>