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

Remove orderby from comment counting queries. #4553

Conversation

peterwilsoncc
Copy link
Contributor

Modifies all the WP_Comment_Query calls to remove the orderby if count === true.

I can never remember what comes from the GB repo, so it is possible src/wp-includes/blocks/comments.php should be changed upstream.

Trac ticket: https://core.trac.wordpress.org/ticket/58368


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link
Member

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems good to me. As this is a bug, I think we can get this into WP 6.3. Thoughts @peterwilsoncc ?

@peterwilsoncc
Copy link
Contributor Author

@spacedmonkey Do you have any thoughts on tests I should add?

@spacedmonkey
Copy link
Member

@spacedmonkey Do you have any thoughts on tests I should add?

@peterwilsoncc I don't personally think this needs to have unit tests.

@spacedmonkey
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants