#35907 closed enhancement (fixed)
Permit sticky posts to affect the query in REST_REQUEST
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.8 | Priority: | high |
| Severity: | normal | Version: | |
| Component: | Query | Keywords: | gutenberg-merge has-patch has-unit-tests |
| Focuses: | Cc: |
Description (last modified by )
Attachments (1)
Change History (27)
This ticket was mentioned in Slack in #core by jorbin. View the logs.
10 years ago
This ticket was mentioned in Slack in #core by mike. View the logs.
10 years ago
This ticket was mentioned in Slack in #core-restapi by krogsgard. View the logs.
9 years ago
#12
@
11 months ago
I think this was fixed by #50213.
The fix should be applied to this condition in WP_REST_Posts_Controller for it to work. The isset( $query_args['ignore_sticky_posts'] ) is always false unless the value is filtered.
Fixing this will make Query block results consistent between the editor and front-end. See:
- https://github.com/WordPress/gutenberg/issues/68570
- https://github.com/WordPress/gutenberg/issues/44471
@joemcgill, @desrosj, can we move this to WP 6.8 milestone?
#13
@
11 months ago
- Milestone changed from Future Release to 6.8
- Priority changed from normal to high
Moving to milestone 6.8 with high priority as asked by @Mamaduka as it is a blocker for some bugfixes on the Editor side.
This ticket was mentioned in PR #8228 on WordPress/wordpress-develop by @Mamaduka.
11 months ago
#14
- Keywords has-unit-tests added; needs-unit-tests removed
Gutenberg ticket: https://github.com/WordPress/gutenberg/pull/68970
Trac ticket: https://core.trac.wordpress.org/ticket/35907
@peterwilsoncc commented on PR #8228:
10 months ago
#16
Let's put it in with true for ignoring the stickies.
My one last naming things question is whether it should be plural ignore_stickies
@Mamaduka commented on PR #8228:
10 months ago
#17
Let's put it in with true for ignoring the stickies.
So, merge as it is. Send ' true ' if the user doesn't want sticky posts to stick.
My one last naming things question is whether it should be plural ignore_stickies
Don't have a strong opinion here, but there's not much difference between ignore_stickies and ignore_sticky. The latter is closer to the WP_Query argument, so it is probably easier to remember.
@peterwilsoncc commented on PR #8228:
10 months ago
#18
My one last naming things question is whether it should be plural ignore_stickies
Don't have a strong opinion here, but there's not much difference between
ignore_stickiesandignore_sticky. The latter is closer to theWP_Queryargument, so it is probably easier to remember.
My thought (bike shedding??) is that the current name is singular whereas the WP_Query is plural with the _posts. The reason for my suggestion is that multiple posts made be ignored.
But the rest api has stickymaybe the opportunity has been missed and I should stop over thinking it :)
@Mamaduka commented on PR #8228:
10 months ago
#19
But the rest api has sticky maybe the opportunity has been missed
Considering the existing argument, I'm leaning towards ignore_sticky.
@peterwilsoncc commented on PR #8228:
10 months ago
#20
@Mamaduka commented on PR #8228:
10 months ago
#22
Thanks, @peterwilsoncc!
In 36696: