[wp-trac] [WordPress Trac] #39947: REST API: Sticky post query returns unsticky posts when no posts are sticky
WordPress Trac
noreply at wordpress.org
Thu Feb 23 17:20:22 UTC 2017
#39947: REST API: Sticky post query returns unsticky posts when no posts are sticky
--------------------------+--------------------
Reporter: ryelle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.4
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+--------------------
Comment (by ryelle):
I've added a patch with the is_array check from [comment:2 this comment],
plus some tests. I also changed `$args['post__in'] = array( -1 );` to `0`,
because wp_query runs absint over the `post__in` array, and so was
converting it to post ID 1.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39947#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list