-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
REST API: Add support for the 'ignore_sticky_posts' argument #68970
base: trunk
Are you sure you want to change the base?
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What is different from this instead of including |
The |
Track ticket for some additional context - https://core.trac.wordpress.org/ticket/35907. |
/* | ||
* Honor the original REST API `post__in` behavior. Don't prepend sticky posts | ||
* when `post__in` has been specified. | ||
*/ | ||
if ( isset( $request['ignore_sticky'] ) && empty( $args['post__in'] ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What?
Closes #68570.
Alternative to #68595.
PR introduces a new
ignore_sticky
argument for the Posts collection endpoint, which maps toignore_sticky_posts
. This allows the Query Loop block display to be consistent between the editor and the front end.Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast