-
Notifications
You must be signed in to change notification settings - Fork 3.2k
get_adjacent_post: adjacent post query plugin compatibility #10620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1814,6 +1814,8 @@ function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = | |||||
| * Can either be next or previous post. | ||||||
| * | ||||||
| * @since 2.5.0 | ||||||
| * @since 6.9.0 Introduce deterministic fallback based in IDs to account for date collisions. | ||||||
| * @since 6.9.1 Remove deterministic fallback for sites modifying the WHERE clause via a filter. See #64390. | ||||||
|
||||||
| * @since 6.9.1 Remove deterministic fallback for sites modifying the WHERE clause via a filter. See #64390. | |
| * @since 6.9.1 Remove deterministic fallback for sites modifying the WHERE or SORT clause via filters. See #64390. |
ramonjd marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name in the docblock was changed from "$where" to "$where_prepared", but this parameter represents the actual value passed to the filter (the prepared WHERE clause). However, this is a breaking change to the filter documentation. Plugins that read the documentation would expect the parameter to be named "$where" as it has been historically. Consider keeping the parameter name as "$where" in the docblock for consistency with the historical API, even though internally the variable is named "$where_prepared".
| * @param string $where_prepared The `WHERE` clause in the SQL. | |
| * @param string $where The `WHERE` clause in the SQL. |
ramonjd marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @SInCE 6.9.0 note in the docblock states "Adds ID sort to ensure deterministic ordering" which is now conditional on whether the filter modifies the clause. This documentation should be updated or removed since it no longer accurately describes the behavior in 6.9.1 where the ID sort is only applied if filters don't modify the SORT clause.
| * @since 6.9.0 Adds ID sort to ensure deterministic ordering for posts with identical dates. | |
| * @since 6.9.0 Introduced ID sort for posts with identical dates. |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @SInCE 6.9.1 note mentions "Remove deterministic fallback for sites modifying the SORT clause" but should be more specific. It should clarify that the deterministic sort is still applied by default, but NOT applied when a filter modifies the SORT clause. Consider rewording to: "Conditionally applies deterministic fallback - skips it when filters modify the SORT clause".
| * @since 6.9.1 Remove deterministic fallback for sites modifying the SORT clause via a filter. See #64390. | |
| * @since 6.9.1 Conditionally applies deterministic fallback - skips it when filters modify the SORT clause. See #64390. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in documentation: "based in IDs" should be "based on IDs".