Uh oh!
There was an error while loading. Please reload this page.
Add caching to get_adjacent_post. - #3366
Conversation
Uh oh!
There was an error while loading. Please reload this page.
peterwilsoncc
left a comment
There was a problem hiding this comment.
Is it possible to use WP_Query if the filters become wrappers for their Query equivalents? It might require closures but has the advantage of using the low level cache rather than a duplicate cache.
peterwilsoncc
left a comment
There was a problem hiding this comment.
Added a couple of notes/questions in case WP_Query is not a viable approach.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
spacedmonkey
commented
Dec 9, 2022
I thought that using |
peterwilsoncc
left a comment
There was a problem hiding this comment.
This looks good but I've added a few notes inline.
Sorry about the bum steer suggesting WP_Query, I appreciate you giving it a go.
I merged in trunk to avoid the false failure due to the HTTP test that was failing until recently.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
dd32
left a comment
There was a problem hiding this comment.
This looks good to me, I'd like to see this move forward :)
Uh oh!
There was an error while loading. Please reload this page.
| $this->assertEquals( $post_one, $first_run, 'Get first post when on second post' ); | ||
| $this->assertNotEquals( $post_two, $first_run, 'Do not get second post when on second post' ); |
There was a problem hiding this comment.
Thanks for adding $message as per #3366 (comment) feedback. The $message parameter should explain what went wrong in the test. This message will be displayed when the assertion fails and can help immensely when debugging a test.
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
spacedmonkey
commented
Jan 18, 2023
@mukeshpanchal27 Update messages. Your approval, I will commit this change. |
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks @spacedmonkey, Amazing work! I think this is going to work out well!
spacedmonkey
commented
Jan 18, 2023
Committed in 4108894 |
Trac ticket: https://core.trac.wordpress.org/ticket/41131
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.