REST API: Add support for the 'ignore_sticky_posts' argument#68970
REST API: Add support for the 'ignore_sticky_posts' argument#68970
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.
fec137f to
2660fef
Compare
|
I would like to merge this to unblock #66222. The discussion is still ongoing in core backport PR, and I can backport any proposed naming changes to the query argument. |
|
Flaky tests detected in 2660fef. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/13132749302
|
|
@Mamaduka PS there is a typo in the function name: last letter "t" |
…ss#68970) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: spacedmonkey <spacedmonkey@git.wordpress.org> Co-authored-by: TimothyBJacobs <timothyblynjacobs@git.wordpress.org> Co-authored-by: iamtakashi <iamtakashi@git.wordpress.org>
- Introduced in WP 6.8. WordPress/gutenberg#68970
…ss#68970) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: spacedmonkey <spacedmonkey@git.wordpress.org> Co-authored-by: TimothyBJacobs <timothyblynjacobs@git.wordpress.org> Co-authored-by: iamtakashi <iamtakashi@git.wordpress.org>
What?
Closes #68570.
Alternative to #68595.
PR introduces a new
ignore_stickyargument 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