palasthotel / wp-additional-authors

WordPress Plugin for multiple authors on posts
3 stars 1 forks source link

Additional Authors are being removed / We need another filter #21

Open benthebear opened 3 months ago

benthebear commented 3 months ago

@EdwardBock FYI … We have the following problem / situation …

  1. You add an additional author with any regular role (like author or editor) to a post.
  2. You publish the post, everythings fine.
  3. You set the additional author to "no role". Some teams do that when the offboard interns or guest authors.
  4. You edit the same post as in 1.
  5. The additional author with no role is not shown anymore.
  6. You save the post.
  7. The additional author is deleted from the post.

In order to allow editorial teams to keep the role-less authors on the posts, we need anothter filter, where the metabox collects the authors. Currently we filter only on edit_posts

https://github.com/palasthotel/wp-additional-authors/blob/487af76806f8d052e98da96a43b9262edcb7e9ce/public/classes/MetaBox.php#L72

… but it would be nice to allow developers to filter the filter. So I did exactly that …

https://github.com/palasthotel/wp-additional-authors/commit/068efa4c8471b0e13e33d2b6b225974295957140

benthebear commented 3 months ago

@EdwardBock How to we get the code to wordpress.org? Do you do that?

benthebear commented 3 months ago

@EdwardBock … @JanaME also mentioned the following … the Wordpress-Core behavior is like this …

  1. You set an user with any regular role (like author or editor) as the author of a post.
  2. You remove any roles from that user.
  3. The user stays author of that post, is shown in the frontend as author of the post, but their name is not linked to an author-page.

Our plugin probably should better simulate that behavoir …