Co-Authors Plus - Version 2.1

Version Description

Download this release

Release Info

Developer batmoo
Plugin Icon wp plugin Co-Authors Plus
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

Files changed (5) hide show
  1. admin.js +1 -1
  2. co-authors-plus.pot +18 -17
  3. co-authors.php +26 -19
  4. readme.txt +21 -9
  5. template-tags.php +18 -18
admin.js CHANGED
@@ -461,7 +461,7 @@ jQuery(document).ready(function () {
461
  jQuery('#post_author_override').hide();
462
 
463
  // Show help text
464
- var help = jQuery('<p></p>').text(i18n.coauthors.help_text);
465
  jQuery('#authordiv .inside').append(help);
466
  jQuery('#pageauthordiv .inside').append(help);
467
 
461
  jQuery('#post_author_override').hide();
462
 
463
  // Show help text
464
+ var help = jQuery('<p></p>').html(i18n.coauthors.help_text);
465
  jQuery('#authordiv .inside').append(help);
466
  jQuery('#pageauthordiv .inside').append(help);
467
 
co-authors-plus.pot CHANGED
@@ -7,7 +7,7 @@ msgid ""
7
  msgstr ""
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/co-authors-plus\n"
10
- "POT-Creation-Date: 2009-10-11 14:33+0000\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -15,66 +15,67 @@ msgstr ""
15
  "Content-Type: text/plain; charset=CHARSET\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
 
18
- #: co-authors.php:31
19
  msgid " and "
20
  msgstr ""
21
 
22
- #: co-authors.php:120 co-authors.php:530
23
  msgid "Co-Authors Plus"
24
  msgstr ""
25
 
26
- #: co-authors.php:134
27
  msgid "Authors"
28
  msgstr ""
29
 
30
- #: co-authors.php:378
31
  msgid "Post Author(s)"
32
  msgstr ""
33
 
34
- #: co-authors.php:379
35
  msgid "Page Author(s)"
36
  msgstr ""
37
 
38
- #: co-authors.php:380
39
  msgid "Edit"
40
  msgstr ""
41
 
42
- #: co-authors.php:381
43
  msgid "Delete"
44
  msgstr ""
45
 
46
- #: co-authors.php:382
47
  msgid "Are you sure you want to delete this author?"
48
  msgstr ""
49
 
50
- #: co-authors.php:383
51
  msgid "Click to change this author"
52
  msgstr ""
53
 
54
- #: co-authors.php:384
55
  msgid "Search for an author"
56
  msgstr ""
57
 
58
- #: co-authors.php:385
59
  msgid ""
60
- "Click on an author to change them. Click on \\\"Delete\\\" to remove them."
 
61
  msgstr ""
62
 
63
- #: co-authors.php:537
64
  msgid "Roles"
65
  msgstr ""
66
 
67
- #: co-authors.php:541
68
  msgid "Allow subscribers as authors"
69
  msgstr ""
70
 
71
- #: co-authors.php:543
72
  msgid ""
73
  "Enabling this option will allow you to add users with the subscriber role as "
74
  "authors for posts."
75
  msgstr ""
76
 
77
- #: co-authors.php:551
78
  msgid "Save Changes"
79
  msgstr ""
80
 
7
  msgstr ""
8
  "Project-Id-Version: PACKAGE VERSION\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/co-authors-plus\n"
10
+ "POT-Creation-Date: 2009-10-14 00:39+0000\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "Content-Type: text/plain; charset=CHARSET\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
 
18
+ #: co-authors.php:35
19
  msgid " and "
20
  msgstr ""
21
 
22
+ #: co-authors.php:124 co-authors.php:534
23
  msgid "Co-Authors Plus"
24
  msgstr ""
25
 
26
+ #: co-authors.php:138
27
  msgid "Authors"
28
  msgstr ""
29
 
30
+ #: co-authors.php:382
31
  msgid "Post Author(s)"
32
  msgstr ""
33
 
34
+ #: co-authors.php:383
35
  msgid "Page Author(s)"
36
  msgstr ""
37
 
38
+ #: co-authors.php:384
39
  msgid "Edit"
40
  msgstr ""
41
 
42
+ #: co-authors.php:385
43
  msgid "Delete"
44
  msgstr ""
45
 
46
+ #: co-authors.php:386
47
  msgid "Are you sure you want to delete this author?"
48
  msgstr ""
49
 
50
+ #: co-authors.php:387
51
  msgid "Click to change this author"
52
  msgstr ""
53
 
54
+ #: co-authors.php:388
55
  msgid "Search for an author"
56
  msgstr ""
57
 
58
+ #: co-authors.php:389
59
  msgid ""
60
+ "Click on an author to change them. Click on <strong>Delete</strong> to "
61
+ "remove them."
62
  msgstr ""
63
 
64
+ #: co-authors.php:541
65
  msgid "Roles"
66
  msgstr ""
67
 
68
+ #: co-authors.php:545
69
  msgid "Allow subscribers as authors"
70
  msgstr ""
71
 
72
+ #: co-authors.php:547
73
  msgid ""
74
  "Enabling this option will allow you to add users with the subscriber role as "
75
  "authors for posts."
76
  msgstr ""
77
 
78
+ #: co-authors.php:555
79
  msgid "Save Changes"
80
  msgstr ""
81
 
co-authors.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. Co-authored posts appear on a co-author's posts page and feed. New template tags allow listing of co-authors. Editors may assign co-authors to a post via the 'Post Author' box. <em>This plugin is an extended version of the Co-Authors plugin originally developed at [Shepherd Interactive](http://www.shepherd-interactive.com/ "Shepherd Interactive specializes in web design and development in Portland, Oregon") (2007). Their plugin was inspired by 'Multiple Authors' plugin by Mark Jaquith (2005).</em>
6
- Version: 2.0
7
  Author: Mohammad Jangda
8
  Author URI: http://digitalize.ca
9
  Copyright: Some parts (C) 2009, Mohammad Jangda; Other parts (C) 2008, Weston Ruter, Shepherd Interactive
@@ -25,12 +25,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
 
26
  */
27
 
 
 
 
 
28
  define('COAUTHORS_FILE_PATH', '');
29
  define('COAUTHORS_DEFAULT_BEFORE', '');
30
  define('COAUTHORS_DEFAULT_BETWEEN', ', ');
31
- define('COAUTHORS_DEFAULT_BETWEEN_LAST', __(' and '));
32
  define('COAUTHORS_DEFAULT_AFTER', '');
33
- define('COAUTHORS_PLUS_VERSION', '2.0');
34
 
35
  require_once('template-tags.php');
36
 
@@ -117,7 +121,7 @@ class coauthors_plus {
117
  */
118
  function add_menu_items ( ) {
119
  // Add sub-menu page for Custom statuses
120
- add_options_page(__('Co-Authors Plus'), __('Co-Authors Plus'), 8, __FILE__, array(&$this, 'settings_page'));
121
  }
122
 
123
  /**
@@ -131,7 +135,7 @@ class coauthors_plus {
131
  $new_columns[$key] = $value;
132
  if ($key == 'author') {
133
  unset($new_columns[$key]);
134
- $new_columns['coauthors'] = __('Authors');
135
  }
136
  }
137
  return $new_columns;
@@ -375,14 +379,14 @@ class coauthors_plus {
375
 
376
  var coauthors_can_edit_others_posts = "<?php echo ($current_user->has_cap('edit_others_posts') ? 'true' : 'false')?>";
377
 
378
- i18n.coauthors.post_metabox_title = "<?php _e('Post Author(s)', 'co-authors')?>";
379
- i18n.coauthors.page_metabox_title = "<?php _e('Page Author(s)', 'co-authors')?>";
380
- i18n.coauthors.edit_label = "<?php _e('Edit', 'co-authors')?>";
381
- i18n.coauthors.delete_label = "<?php _e('Delete', 'co-authors')?>";
382
- i18n.coauthors.confirm_delete = "<?php _e('Are you sure you want to delete this author?', 'co-authors')?>";
383
- i18n.coauthors.input_box_title = "<?php _e('Click to change this author', 'co-authors')?>";
384
- i18n.coauthors.search_box_text = "<?php _e('Search for an author', 'co-authors')?>";
385
- i18n.coauthors.help_text = "<?php _e('Click on an author to change them. Click on \"Delete\" to remove them.', 'co-authors')?>";
386
 
387
  <?php if(is_array($coauthors) && !(empty($coauthors))) : ?>
388
  var post_coauthors = [
@@ -527,20 +531,20 @@ class coauthors_plus {
527
  ?>
528
  <div class="wrap">
529
  <div class="icon32" id="icon-options-general"><br/></div>
530
- <h2><?php _e('Co-Authors Plus') ?></h2>
531
 
532
  <form method="post" action="options.php">
533
  <?php settings_fields($this->options_group); ?>
534
 
535
  <table class="form-table">
536
  <tr valign="top">
537
- <th scope="row"><strong><?php _e('Roles') ?></strong></th>
538
  <td>
539
  <p>
540
  <label for="allow_subscribers_as_authors">
541
- <input type="checkbox" name="<?php echo $this->get_plugin_option_fullname('allow_subscribers_as_authors') ?>" value="1" <?php echo ($this->get_plugin_option('allow_subscribers_as_authors')) ? 'checked="checked"' : ''; ?> id="allow_subscribers_as_authors" /> <?php _e('Allow subscribers as authors') ?>
542
  </label> <br />
543
- <span class="description"><?php _e('Enabling this option will allow you to add users with the subscriber role as authors for posts.') ?></span>
544
  </p>
545
  </td>
546
  </tr>
@@ -548,7 +552,7 @@ class coauthors_plus {
548
  </table>
549
 
550
  <p class="submit">
551
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
552
  </p>
553
  </form>
554
  </div>
@@ -570,6 +574,9 @@ class coauthors_plus {
570
  if(is_array($all_posts)) {
571
  foreach($all_posts as $single_post) {
572
 
 
 
 
573
  // create new array
574
  $coauthors = array();
575
  // get author id -- try to use get_profile
@@ -600,7 +607,7 @@ class coauthors_plus {
600
  * @TODO
601
  * - Add new author
602
  * - Add search-as-you-type to QuikcEdit
603
- * get_coauthor_meta function
604
  */
605
 
606
  }
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. Co-authored posts appear on a co-author's posts page and feed. New template tags allow listing of co-authors. Editors may assign co-authors to a post via the 'Post Author' box. <em>This plugin is an extended version of the Co-Authors plugin originally developed at [Shepherd Interactive](http://www.shepherd-interactive.com/ "Shepherd Interactive specializes in web design and development in Portland, Oregon") (2007). Their plugin was inspired by 'Multiple Authors' plugin by Mark Jaquith (2005).</em>
6
+ Version: 2.1
7
  Author: Mohammad Jangda
8
  Author URI: http://digitalize.ca
9
  Copyright: Some parts (C) 2009, Mohammad Jangda; Other parts (C) 2008, Weston Ruter, Shepherd Interactive
25
 
26
  */
27
 
28
+ $plugin_dir = basename(dirname(__FILE__));
29
+ load_plugin_textdomain( 'co-authors-plus','wp-content/plugins/'.$plugin_dir, $plugin_dir);
30
+
31
+
32
  define('COAUTHORS_FILE_PATH', '');
33
  define('COAUTHORS_DEFAULT_BEFORE', '');
34
  define('COAUTHORS_DEFAULT_BETWEEN', ', ');
35
+ define('COAUTHORS_DEFAULT_BETWEEN_LAST', __(' and ', 'co-authors-plus'));
36
  define('COAUTHORS_DEFAULT_AFTER', '');
37
+ define('COAUTHORS_PLUS_VERSION', '2.1');
38
 
39
  require_once('template-tags.php');
40
 
121
  */
122
  function add_menu_items ( ) {
123
  // Add sub-menu page for Custom statuses
124
+ add_options_page(__('Co-Authors Plus', 'co-authors-plus'), __('Co-Authors Plus', 'co-authors-plus'), 8, __FILE__, array(&$this, 'settings_page'));
125
  }
126
 
127
  /**
135
  $new_columns[$key] = $value;
136
  if ($key == 'author') {
137
  unset($new_columns[$key]);
138
+ $new_columns['coauthors'] = __('Authors', 'co-authors-plus');
139
  }
140
  }
141
  return $new_columns;
379
 
380
  var coauthors_can_edit_others_posts = "<?php echo ($current_user->has_cap('edit_others_posts') ? 'true' : 'false')?>";
381
 
382
+ i18n.coauthors.post_metabox_title = "<?php _e('Post Author(s)', 'co-authors-plus')?>";
383
+ i18n.coauthors.page_metabox_title = "<?php _e('Page Author(s)', 'co-authors-plus')?>";
384
+ i18n.coauthors.edit_label = "<?php _e('Edit', 'co-authors-plus')?>";
385
+ i18n.coauthors.delete_label = "<?php _e('Delete', 'co-authors-plus')?>";
386
+ i18n.coauthors.confirm_delete = "<?php _e('Are you sure you want to delete this author?', 'co-authors-plus')?>";
387
+ i18n.coauthors.input_box_title = "<?php _e('Click to change this author', 'co-authors-plus')?>";
388
+ i18n.coauthors.search_box_text = "<?php _e('Search for an author', 'co-authors-plus')?>";
389
+ i18n.coauthors.help_text = "<?php _e('Click on an author to change them. Click on <strong>Delete</strong> to remove them.', 'co-authors-plus')?>";
390
 
391
  <?php if(is_array($coauthors) && !(empty($coauthors))) : ?>
392
  var post_coauthors = [
531
  ?>
532
  <div class="wrap">
533
  <div class="icon32" id="icon-options-general"><br/></div>
534
+ <h2><?php _e('Co-Authors Plus', 'co-authors-plus') ?></h2>
535
 
536
  <form method="post" action="options.php">
537
  <?php settings_fields($this->options_group); ?>
538
 
539
  <table class="form-table">
540
  <tr valign="top">
541
+ <th scope="row"><strong><?php _e('Roles', 'co-authors-plus') ?></strong></th>
542
  <td>
543
  <p>
544
  <label for="allow_subscribers_as_authors">
545
+ <input type="checkbox" name="<?php echo $this->get_plugin_option_fullname('allow_subscribers_as_authors') ?>" value="1" <?php echo ($this->get_plugin_option('allow_subscribers_as_authors')) ? 'checked="checked"' : ''; ?> id="allow_subscribers_as_authors" /> <?php _e('Allow subscribers as authors', 'co-authors-plus') ?>
546
  </label> <br />
547
+ <span class="description"><?php _e('Enabling this option will allow you to add users with the subscriber role as authors for posts.', 'co-authors-plus') ?></span>
548
  </p>
549
  </td>
550
  </tr>
552
  </table>
553
 
554
  <p class="submit">
555
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'co-authors-plus') ?>" />
556
  </p>
557
  </form>
558
  </div>
574
  if(is_array($all_posts)) {
575
  foreach($all_posts as $single_post) {
576
 
577
+ // reset execution time limit
578
+ set_time_limit( 60 );
579
+
580
  // create new array
581
  $coauthors = array();
582
  // get author id -- try to use get_profile
607
  * @TODO
608
  * - Add new author
609
  * - Add search-as-you-type to QuikcEdit
610
+ * - get_coauthor_meta function
611
  */
612
 
613
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://digitalize.ca/donate
4
  Tags: authors, users, multiple authors, coauthors, multi-author
5
  Tested up to: 2.8
6
  Requires at least: 2.6
7
- Stable tag: 2.0
8
 
9
  Allows multiple authors to be assigned to a Post or Page via search-as-you-type input boxes.
10
 
@@ -12,7 +12,7 @@ Allows multiple authors to be assigned to a Post or Page via search-as-you-type
12
 
13
  Allows multiple authors to be assigned to a Post or Page via the search-as-you-type inputs. Co-authored posts appear on a co-author's posts page and feed. New template tags allow listing of co-authors. Editors and Administrators may assign co-authors to a post. Additionally, co-authors may edit the posts they are associated with, and co-authors who are contributors may only edit posts if they have not been published (as is usual).
14
 
15
- This plugin is an almost complete rewrite of the Co-Authors plugin originally developed at [Shepherd Interactive](http://www.shepherd-interactive.com/ "Shepherd Interactive specializes in web design and development in Portland, Oregon") (2007). Their plugin was inspired by 'Multiple Authors' plugin by Mark Jaquith (2005).
16
 
17
  The extended version is created by [Mohammad Jangda](http://digitalize.ca), and incorporates search-as-you-type functionality for adding users, which aims to make easy the task of adding multiple users to posts and pages, especially when dealing with a system with hundreds of users (typical of newspaper and magazine sites).
18
 
@@ -22,7 +22,13 @@ Version 2.0 is a major re-write of the plugin to utilize the WordPress taxonomy
22
 
23
  == Changelog ==
24
 
 
 
 
 
 
25
  =2009-10-11 / 2.0=
 
26
  * Plugin mostly rewritten to make use of taxonomy instead of post_meta
27
  * Can now see all authors of a post under the author column from Edit Posts page
28
  * All authors of a post are now notified on a new comment
@@ -33,6 +39,7 @@ Version 2.0 is a major re-write of the plugin to utilize the WordPress taxonomy
33
  * FIX: Issues with coauthored posts not showing up on author archives
34
 
35
  =2009-06-16 / 1.2.0=
 
36
  * FIX: Added compatibility for WordPress 2.8
37
  * FIX: Added new template tags (get_the_coauthor_meta & the_coauthor_meta) to fix issues related to displaying author info on author archive pages. See [Other Notes](http://wordpress.org/extend/plugins/co-authors-plus/other_notes/) for details.
38
  * FIX: Plugin should now work for plugins not using the 'wp_' DB prefix
@@ -40,29 +47,35 @@ Version 2.0 is a major re-write of the plugin to utilize the WordPress taxonomy
40
  * FIX: Plugin now used WordPress native AJAX calls to tighten security
41
  * DOCS: Added details about the new template tags
42
 
43
- =2009-04-26 / 1.1.5=
 
44
  * FIX: Not searching Updated SQL query for autosuggest to search through first name, last name, and nickname
45
  * FIX: When editing an author, and clicking on a suggested author, the original author was not be removed
46
  * DOCS: Added code comments to javascript; more still to be added
47
  * DOCS: Updated readme information
48
 
49
- =2009-04-25 / 1.1.4=
 
50
  * Disabled "New Author" output in suggest box, for now
51
  * Hopefully fixed SVN issue (if you're having trouble with the plugin, please delete the plugin and reinstall)
52
 
53
- =2009-04-23 / 1.1.3=
 
54
  * Add blur event to disable input box
55
  * Limit only one edit at a time.
56
  * Checked basic cross-browser compatibility (Firefox 3 OS X, Safari 3 OS X, IE7 Vista).
57
  * Add suggest javascript plugin to Edit Page.
58
 
59
- =2009-04-19 / 1.1.2=
 
60
  * Disabled form submit when enter pressed.
61
 
62
- =2009-04-15 / 1.1.1=
 
63
  * Changed SQL query to return only contributer-level and above users.
64
 
65
- =2009-04-14: 1.1.0=
 
66
  * Initial beta release.
67
 
68
 
@@ -159,7 +172,6 @@ This function returns an array of coauthors for the specified post, or if used i
159
  This function allows you to check whether the specified user is coauthor for a post. The $user attribute can be the user ID or username.
160
 
161
 
162
-
163
  == Frequently Asked Questions ==
164
 
165
  = What is the main difference between Co-Authors and Co-Authors Plus? =
4
  Tags: authors, users, multiple authors, coauthors, multi-author
5
  Tested up to: 2.8
6
  Requires at least: 2.6
7
+ Stable tag: 2.1
8
 
9
  Allows multiple authors to be assigned to a Post or Page via search-as-you-type input boxes.
10
 
12
 
13
  Allows multiple authors to be assigned to a Post or Page via the search-as-you-type inputs. Co-authored posts appear on a co-author's posts page and feed. New template tags allow listing of co-authors. Editors and Administrators may assign co-authors to a post. Additionally, co-authors may edit the posts they are associated with, and co-authors who are contributors may only edit posts if they have not been published (as is usual).
14
 
15
+ This plugin is an almost complete rewrite of the Co-Authors plugin originally developed at [Shepherd Interactive](http://www.shepherd-interactive.com/ "Shepherd Interactive specializes in web design and development in Portland, Oregon") (2007). The original plugin was inspired by the 'Multiple Authors' plugin by Mark Jaquith (2005).
16
 
17
  The extended version is created by [Mohammad Jangda](http://digitalize.ca), and incorporates search-as-you-type functionality for adding users, which aims to make easy the task of adding multiple users to posts and pages, especially when dealing with a system with hundreds of users (typical of newspaper and magazine sites).
18
 
22
 
23
  == Changelog ==
24
 
25
+ =2009-10-11 / 2.1=
26
+
27
+ * Fixed issues related to localization. Thanks to Jan Zombik <zombik@students.uni-mainz.de> for the fixes.
28
+ * Added set_time_limit to update function to get around timeout issues when upgrading plugin
29
+
30
  =2009-10-11 / 2.0=
31
+
32
  * Plugin mostly rewritten to make use of taxonomy instead of post_meta
33
  * Can now see all authors of a post under the author column from Edit Posts page
34
  * All authors of a post are now notified on a new comment
39
  * FIX: Issues with coauthored posts not showing up on author archives
40
 
41
  =2009-06-16 / 1.2.0=
42
+
43
  * FIX: Added compatibility for WordPress 2.8
44
  * FIX: Added new template tags (get_the_coauthor_meta & the_coauthor_meta) to fix issues related to displaying author info on author archive pages. See [Other Notes](http://wordpress.org/extend/plugins/co-authors-plus/other_notes/) for details.
45
  * FIX: Plugin should now work for plugins not using the 'wp_' DB prefix
47
  * FIX: Plugin now used WordPress native AJAX calls to tighten security
48
  * DOCS: Added details about the new template tags
49
 
50
+ =2009-04-26 / 1.1.5=
51
+
52
  * FIX: Not searching Updated SQL query for autosuggest to search through first name, last name, and nickname
53
  * FIX: When editing an author, and clicking on a suggested author, the original author was not be removed
54
  * DOCS: Added code comments to javascript; more still to be added
55
  * DOCS: Updated readme information
56
 
57
+ =2009-04-25 / 1.1.4=
58
+
59
  * Disabled "New Author" output in suggest box, for now
60
  * Hopefully fixed SVN issue (if you're having trouble with the plugin, please delete the plugin and reinstall)
61
 
62
+ =2009-04-23 / 1.1.3=
63
+
64
  * Add blur event to disable input box
65
  * Limit only one edit at a time.
66
  * Checked basic cross-browser compatibility (Firefox 3 OS X, Safari 3 OS X, IE7 Vista).
67
  * Add suggest javascript plugin to Edit Page.
68
 
69
+ =2009-04-19 / 1.1.2=
70
+
71
  * Disabled form submit when enter pressed.
72
 
73
+ =2009-04-15 / 1.1.1=
74
+
75
  * Changed SQL query to return only contributer-level and above users.
76
 
77
+ =2009-04-14: 1.1.0=
78
+
79
  * Initial beta release.
80
 
81
 
172
  This function allows you to check whether the specified user is coauthor for a post. The $user attribute can be the user ID or username.
173
 
174
 
 
175
  == Frequently Asked Questions ==
176
 
177
  = What is the main difference between Co-Authors and Co-Authors Plus? =
template-tags.php CHANGED
@@ -54,7 +54,7 @@ class CoAuthorsIterator {
54
  if(!$postID && $post)
55
  $postID = (int)$post->ID;
56
  if(!$postID)
57
- trigger_error(__('No post ID provided for CoAuthorsIterator constructor. Are you not in a loop or is $post not set?', 'co-authors')); //return null;
58
 
59
  $this->original_authordata = $authordata;
60
  $this->authordata_array = get_coauthors($postID);
@@ -127,20 +127,20 @@ function coauthors__return($tag){
127
  //Provide co-author equivalents to the existing author template tags
128
  function coauthors($between = null, $betweenLast = null, $before = null, $after = null){
129
  if($between === NULL)
130
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
131
  if($betweenLast === NULL)
132
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
133
  if($before === NULL)
134
- $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
135
  if($after === NULL)
136
- $after = COAUTHORS_DEFAULT_AFTER; //__(COAUTHORS_DEFAULT_AFTER, 'co-authors');
137
  coauthors__echo('the_author', $between, $betweenLast, $before, $after);
138
  }
139
  function coauthors_posts_links($between = null, $betweenLast = null, $before = null, $after = null){
140
  if($between === NULL)
141
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
142
  if($betweenLast === NULL)
143
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
144
  if($before === NULL)
145
  $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
146
  if($after === NULL)
@@ -149,9 +149,9 @@ function coauthors_posts_links($between = null, $betweenLast = null, $before = n
149
  }
150
  function coauthors_firstnames($between = null, $betweenLast = null, $before = null, $after = null){
151
  if($between === NULL)
152
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
153
  if($betweenLast === NULL)
154
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
155
  if($before === NULL)
156
  $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
157
  if($after === NULL)
@@ -160,9 +160,9 @@ function coauthors_firstnames($between = null, $betweenLast = null, $before = nu
160
  }
161
  function coauthors_lastnames($between = null, $betweenLast = null, $before = null, $after = null){
162
  if($between === NULL)
163
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
164
  if($betweenLast === NULL)
165
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
166
  if($before === NULL)
167
  $before = COAUTHORS_DEFAULT_BEFORE;
168
  if($after === NULL)
@@ -171,9 +171,9 @@ function coauthors_lastnames($between = null, $betweenLast = null, $before = nul
171
  }
172
  function coauthors_nicknames($between = null, $betweenLast = null, $before = null, $after = null){
173
  if($between === NULL)
174
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
175
  if($betweenLast === NULL)
176
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
177
  if($before === NULL)
178
  $before = COAUTHORS_DEFAULT_BEFORE;
179
  if($after === NULL)
@@ -182,9 +182,9 @@ function coauthors_nicknames($between = null, $betweenLast = null, $before = nul
182
  }
183
  function coauthors_links($between = null, $betweenLast = null, $before = null, $after = null){
184
  if($between === NULL)
185
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
186
  if($betweenLast === NULL)
187
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
188
  if($before === NULL)
189
  $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
190
  if($after === NULL)
@@ -193,9 +193,9 @@ function coauthors_links($between = null, $betweenLast = null, $before = null, $
193
  }
194
  function coauthors_IDs($between = null, $betweenLast = null, $before = null, $after = null){
195
  if($between === NULL)
196
- $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors');
197
  if($betweenLast === NULL)
198
- $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors');
199
  if($before === NULL)
200
  $before = COAUTHORS_DEFAULT_BEFORE;
201
  if($after === NULL)
@@ -301,7 +301,7 @@ function coauthors_wp_list_authors($args = '') {
301
  if ( ! $hide_empty )
302
  $link = $name;
303
  } else {
304
- $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $author->display_name) ) . '">' . $name . '</a>';
305
 
306
  if ( (! empty($feed_image)) || (! empty($feed)) ) {
307
  $link .= ' ';
54
  if(!$postID && $post)
55
  $postID = (int)$post->ID;
56
  if(!$postID)
57
+ trigger_error(__('No post ID provided for CoAuthorsIterator constructor. Are you not in a loop or is $post not set?', 'co-authors-plus')); //return null;
58
 
59
  $this->original_authordata = $authordata;
60
  $this->authordata_array = get_coauthors($postID);
127
  //Provide co-author equivalents to the existing author template tags
128
  function coauthors($between = null, $betweenLast = null, $before = null, $after = null){
129
  if($between === NULL)
130
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
131
  if($betweenLast === NULL)
132
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
133
  if($before === NULL)
134
+ $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors-plus');
135
  if($after === NULL)
136
+ $after = COAUTHORS_DEFAULT_AFTER; //__(COAUTHORS_DEFAULT_AFTER, 'co-authors-plus');
137
  coauthors__echo('the_author', $between, $betweenLast, $before, $after);
138
  }
139
  function coauthors_posts_links($between = null, $betweenLast = null, $before = null, $after = null){
140
  if($between === NULL)
141
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
142
  if($betweenLast === NULL)
143
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
144
  if($before === NULL)
145
  $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
146
  if($after === NULL)
149
  }
150
  function coauthors_firstnames($between = null, $betweenLast = null, $before = null, $after = null){
151
  if($between === NULL)
152
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
153
  if($betweenLast === NULL)
154
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
155
  if($before === NULL)
156
  $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
157
  if($after === NULL)
160
  }
161
  function coauthors_lastnames($between = null, $betweenLast = null, $before = null, $after = null){
162
  if($between === NULL)
163
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
164
  if($betweenLast === NULL)
165
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
166
  if($before === NULL)
167
  $before = COAUTHORS_DEFAULT_BEFORE;
168
  if($after === NULL)
171
  }
172
  function coauthors_nicknames($between = null, $betweenLast = null, $before = null, $after = null){
173
  if($between === NULL)
174
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
175
  if($betweenLast === NULL)
176
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
177
  if($before === NULL)
178
  $before = COAUTHORS_DEFAULT_BEFORE;
179
  if($after === NULL)
182
  }
183
  function coauthors_links($between = null, $betweenLast = null, $before = null, $after = null){
184
  if($between === NULL)
185
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
186
  if($betweenLast === NULL)
187
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
188
  if($before === NULL)
189
  $before = COAUTHORS_DEFAULT_BEFORE; //__(COAUTHORS_DEFAULT_BEFORE, 'co-authors');
190
  if($after === NULL)
193
  }
194
  function coauthors_IDs($between = null, $betweenLast = null, $before = null, $after = null){
195
  if($between === NULL)
196
+ $between = __(COAUTHORS_DEFAULT_BETWEEN, 'co-authors-plus');
197
  if($betweenLast === NULL)
198
+ $betweenLast = __(COAUTHORS_DEFAULT_BETWEEN_LAST, 'co-authors-plus');
199
  if($before === NULL)
200
  $before = COAUTHORS_DEFAULT_BEFORE;
201
  if($after === NULL)
301
  if ( ! $hide_empty )
302
  $link = $name;
303
  } else {
304
+ $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr( sprintf(__("Posts by %s", 'co-authors-plus'), $author->display_name) ) . '">' . $name . '</a>';
305
 
306
  if ( (! empty($feed_image)) || (! empty($feed)) ) {
307
  $link .= ' ';