Skip to content

Commit

Permalink
In the swap-coauthors cli command, correctly add the new coauthor to …
Browse files Browse the repository at this point in the history
…the post
  • Loading branch information
nickdaugherty committed Sep 16, 2013
1 parent e8d7b9c commit a17c757
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions php/class-wp-cli.php
Expand Up @@ -472,6 +472,9 @@ public function swap_coauthors( $args, $assoc_args ) {
}
}

// Add the 'to' author on
$coauthors[] = $to_userlogin;

// By not passing $append = false as the 3rd param, we replace all existing coauthors
$coauthors_plus->add_coauthors( $post->ID, $coauthors, false );

Expand Down

0 comments on commit a17c757

Please sign in to comment.