Merge get_posts() and get_pages()#3178
Merge get_posts() and get_pages()#3178spacedmonkey wants to merge 25 commits intoWordPress:trunkfrom
Conversation
|
I pushed up a PR with just the tests to compare the results with trunk. I'm seeing a couple of minor differences in the new tests for the SQL queries but I think they may be false positives. As the legacy queries don't have ordering statements, there may end up been some unpredictable behavior across different MySQL versions/engines. Good times. |
peterwilsoncc
left a comment
There was a problem hiding this comment.
I think this is looking good but added a few notes inline.
The code makes sense but it would be good to nail down the different tests results on this branch and trunk that I mentioned before we all went on holiday.
|
|
||
| /** | ||
| * Filters the retrieved list of pages. | ||
| * |
There was a problem hiding this comment.
If there are any changes to parsed_args this will need an @since tag noting them,
There was a problem hiding this comment.
Didn't touch the $parsed_args variable. We may consider adding $query_args to this filter, for better context.
joemcgill
left a comment
There was a problem hiding this comment.
The latest updates here look good to me. @adamsilverstein or @peterwilsoncc could one of you confirm?
| clean_post_cache( $pages[0]->ID ); | ||
| $this->assertNotEquals( $time1, $time2 = wp_cache_get( 'last_changed', 'posts' ) ); | ||
|
|
||
| get_post( $pages[0]->ID ); |
There was a problem hiding this comment.
What is the addition of this function call here meant to test, a specific side effect that we're trying to catch here? An inline comment, or better yet, a single new test case for this issue would be better. Not a blocker.
|
Committed in eb6bf15 |
Trac ticket: https://core.trac.wordpress.org/ticket/12821
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.