Co-Authors Plus - Version 2.5.3

Version Description

Download this release

Release Info

Developer danielbachhuber
Plugin Icon wp plugin Co-Authors Plus
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

Files changed (3) hide show
  1. co-authors-plus.php +3 -3
  2. readme.txt +6 -2
  3. template-tags.php +7 -2
co-authors-plus.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Co-Authors Plus
4
  Plugin URI: http://wordpress.org/extend/plugins/co-authors-plus/
5
  Description: Allows multiple authors to be assigned to a post. This plugin is an extended version of the Co-Authors plugin developed by Weston Ruter.
6
- Version: 2.5.2
7
  Author: Mohammad Jangda
8
  Author URI: http://digitalize.ca
9
  Copyright: Some parts (C) 2009-2011, Mohammad Jangda; Other parts (C) 2008, Weston Ruter
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
 
26
  */
27
 
28
- define( 'COAUTHORS_PLUS_VERSION', '2.5.2' );
29
 
30
  if( ! defined( 'COAUTHORS_PLUS_DEBUG' ) )
31
  define( 'COAUTHORS_PLUS_DEBUG', false );
@@ -37,7 +37,7 @@ if( ! defined( 'COAUTHORS_DEFAULT_BETWEEN' ) )
37
  define( 'COAUTHORS_DEFAULT_BETWEEN', ', ' );
38
 
39
  if( ! defined( 'COAUTHORS_DEFAULT_BETWEEN_LAST' ) )
40
- define( 'COAUTHORS_DEFAULT_BETWEEN_LAST', __( ', and ', 'co-authors-plus' ) );
41
 
42
  if( ! defined( 'COAUTHORS_DEFAULT_AFTER' ) )
43
  define( 'COAUTHORS_DEFAULT_AFTER', '' );
3
  Plugin Name: Co-Authors Plus
4
  Plugin URI: http://wordpress.org/extend/plugins/co-authors-plus/
5
  Description: Allows multiple authors to be assigned to a post. This plugin is an extended version of the Co-Authors plugin developed by Weston Ruter.
6
+ Version: 2.5.3
7
  Author: Mohammad Jangda
8
  Author URI: http://digitalize.ca
9
  Copyright: Some parts (C) 2009-2011, Mohammad Jangda; Other parts (C) 2008, Weston Ruter
25
 
26
  */
27
 
28
+ define( 'COAUTHORS_PLUS_VERSION', '2.5.3' );
29
 
30
  if( ! defined( 'COAUTHORS_PLUS_DEBUG' ) )
31
  define( 'COAUTHORS_PLUS_DEBUG', false );
37
  define( 'COAUTHORS_DEFAULT_BETWEEN', ', ' );
38
 
39
  if( ! defined( 'COAUTHORS_DEFAULT_BETWEEN_LAST' ) )
40
+ define( 'COAUTHORS_DEFAULT_BETWEEN_LAST', __( ' and ', 'co-authors-plus' ) );
41
 
42
  if( ! defined( 'COAUTHORS_DEFAULT_AFTER' ) )
43
  define( 'COAUTHORS_DEFAULT_AFTER', '' );
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: batmoo, danielbachhuber
3
  Donate link: http://digitalize.ca/donate
4
  Tags: authors, users, multiple authors, coauthors, multi-author
5
- Tested up to: 3.1
6
  Requires at least: 3.0
7
- Stable tag: 2.5.2
8
 
9
  Allows multiple authors to be assigned to a Posts via search-as-you-type input boxes.
10
 
@@ -20,6 +20,10 @@ The extended version incorporates search-as-you-type functionality for adding us
20
 
21
  == Changelog ==
22
 
 
 
 
 
23
  = 2011-04-23 / 2.5.2 =
24
 
25
  * Bug: Couldn't query terms and authors at the same time (props nbaxley)
2
  Contributors: batmoo, danielbachhuber
3
  Donate link: http://digitalize.ca/donate
4
  Tags: authors, users, multiple authors, coauthors, multi-author
5
+ Tested up to: 3.2.1
6
  Requires at least: 3.0
7
+ Stable tag: 2.5.3
8
 
9
  Allows multiple authors to be assigned to a Posts via search-as-you-type input boxes.
10
 
20
 
21
  == Changelog ==
22
 
23
+ = 2011-08-14 / 2.5.3 =
24
+
25
+ * Bug fix: Removed extra comma when only two authors were listed. If you used the COAUTHORS_DEFAULT_BETWEEN_LAST constant, double-check what you have
26
+
27
  = 2011-04-23 / 2.5.2 =
28
 
29
  * Bug: Couldn't query terms and authors at the same time (props nbaxley)
template-tags.php CHANGED
@@ -146,8 +146,13 @@ function coauthors__echo( $tag, $type = 'tag', $separators = array(), $tag_args
146
  $author_text = $i->current_author->user_login;
147
 
148
  // Append separators
149
- if( ! $i->is_first() )
150
- $output .= $i->is_last() ? $separators['betweenLast'] : $separators['between'];
 
 
 
 
 
151
 
152
  $output .= $author_text;
153
  } while( $i->iterate() );
146
  $author_text = $i->current_author->user_login;
147
 
148
  // Append separators
149
+ if ( ! $i->is_first() && $i->count() > 2 )
150
+ $output .= $separators['between'];
151
+
152
+ if ( $i->is_last() && $i->count() > 1 ) {
153
+ $output = rtrim( $output, ' ' );
154
+ $output .= ' ' . $separators['betweenLast'];
155
+ }
156
 
157
  $output .= $author_text;
158
  } while( $i->iterate() );