Skip to content
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

fix: only shows authors in the Link user dropdown #941

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

leogermani
Copy link
Contributor

@leogermani leogermani commented Jul 4, 2023

Description

This is a PR / question.

We have had issues with the "Link user" dropdown, under the "Unique slug" metabox when editing a Guest Author.

When a site has thousands of subscribers, the dropdown gets too big and it causes the browser to crash.

We have worked around this issue via the provided filter, but I was wondering if this makes sense to be the default behavior, as chances are that we will want to link a Guest Author to a WP author, and not a subscriber or a user without rights to write a post.

Related/similiar PR -> #872

Deploy Notes

No

Steps to Test

  • Create a site with thousands of subscribers (like 200,000).
  • Edit a Guest Author
  • You should see the dropdown causing the page to halt and maybe the browser to crash

Checkout this PR and see that the page works fine and only users with edit_posts cap are displayed.

@GaryJones
Copy link
Contributor

Not fully checked, but if the code does what I think it does, that looks sensible. This would be a bit of a breaking change (in behaviour), though, so I would suggest saving it for a minor (not point) release.

@GaryJones GaryJones added this to the 3.6 milestone Jul 22, 2023
@GaryJones GaryJones changed the base branch from main to develop August 25, 2023 15:21
@GaryJones
Copy link
Contributor

as chances are that we will want to link a Guest Author to a WP author, and not a subscriber or a user without rights to write a post

I guess there could be a case when creating a Guest Author linked to a Subscriber is exactly the use case for someone - that they don't want to give a Subscriber any higher role, but do want to be able to mark them as a co-author on a post.

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.

2 participants