Skip to content

Make sure post is reassigned to linked guest author if possible, when original author is removed #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 306 commits into from
Closed

Make sure post is reassigned to linked guest author if possible, when original author is removed #585

wants to merge 306 commits into from

Conversation

TheCrowned
Copy link
Contributor

Fixes #582. (See issue for steps to reproduce).

This ensures that, when the original author is removed as coauthor, the post is reassigned (i.e. the post_author value updated) to one of the current coauthors. Before, only wpusers would be considered, now also Guest Authors with a linked account are allowed.

Also, manipulating $author_name in the foreach ended up making the subsequent in_array() check always fail, hence making the should-we-reassign-the-post-routine run at every post save. I have created a new variable and this is also fixed.

mjangda and others added 30 commits March 28, 2017 14:00
No need to test PHP nightly for now; 7 + 7.1 are good for now. Drop
WordPress 4.5.
Script was stopping after no co-authors was find. Now script will
display an error message and continue to the next post.
Script was stopping after no co-authors was find. Now script will
display an error message and continue to the next post.
Resolves #417

* Removed duplicate left join for optimization
TheCrowned and others added 23 commits June 8, 2018 11:33
…into fix/489-skip-filtering-for-irrelevant-caps
* [Style] Identation changed to tab

* [Feat] Added personal data exporter to guest authors

* [Feat] Added a filter to allow third part plugins add guest author data

* [Style] WPCS fixes

* [Fix] Filter name changed

* [Style] WPCS fixes

* [Fix] Filter name changed
Re-enable disabled Test_Author_Queries tests
Add post type parameter to the Mine link, so it works for Pages
🐛Only filter author template for title
Fix possible discrepancy in author search with ignored authors
…relevant-caps

Skip irrelevant capabilities filtering in filter_user_has_cap() with whitelist
…-on-multisite-test

Removed Test_Author_Queried_Object setUp function
…ount

column_posts() should use user_login when querying for linked_account
…t-authors

Fixing double posts counts for users with linked accounts
$ignored_authors in search should use user_nicename, not login.
@GaryJones
Copy link
Contributor

Only last commit is relevant.

@GaryJones GaryJones added this to the Future milestone Jul 27, 2023
@GaryJones GaryJones deleted the branch Automattic:master August 25, 2023 15:18
@GaryJones GaryJones closed this Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change post_author to Guest Author linked account, if any