Skip to content

Commit f63531b

Browse files
committed
formatting
1 parent 71e1817 commit f63531b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/wp-includes/link-template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
19891989
* @param WP_Post $post WP_Post object.
19901990
*/
19911991
$where = apply_filters( "get_{$adjacent}_post_where", $where_prepared, $in_same_term, $excluded_terms, $taxonomy, $post );
1992-
1992+
19931993
// Only force deterministic fallback if the where clause has not been modified by a filter.
19941994
if ( $where === $where_prepared ) {
19951995
$where = $where_prepared_with_deterministic_fallback;
@@ -2015,7 +2015,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
20152015
* @param string $order Sort order. 'DESC' for previous post, 'ASC' for next.
20162016
*/
20172017
$sort_prepared = "ORDER BY p.post_date $order LIMIT 1";
2018-
$sort = apply_filters( "get_{$adjacent}_post_sort", $sort_prepared, $post, $order );
2018+
$sort = apply_filters( "get_{$adjacent}_post_sort", $sort_prepared, $post, $order );
20192019

20202020
// Only force deterministic sort if the sort clause has not been modified by a filter.
20212021
if ( $sort === $sort_prepared ) {

tests/phpunit/tests/link/getAdjacentPost.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ public function test_get_adjacent_post_identical_dates_applies_deterministic_whe
644644
// Add a filter that doesn't modify the WHERE clause (returns unchanged).
645645
add_filter(
646646
'get_next_post_where',
647-
static function( $where ) {
647+
static function ( $where ) {
648648
// Return unchanged - deterministic fallback should be applied.
649649
return $where;
650650
}
@@ -686,7 +686,7 @@ public function test_get_adjacent_post_identical_dates_respects_modified_where_f
686686
$filter_returned = '';
687687
add_filter(
688688
'get_next_post_where',
689-
static function( $where ) use ( &$filter_received, &$filter_returned ) {
689+
static function ( $where ) use ( &$filter_received, &$filter_returned ) {
690690
$filter_received = $where;
691691
// Modify the WHERE clause - deterministic fallback should NOT be applied.
692692
// Add a harmless condition that won't affect results but proves the filter was applied.
@@ -733,7 +733,7 @@ public function test_get_adjacent_post_identical_dates_applies_deterministic_sor
733733
// Add a filter that doesn't modify the SORT clause (returns unchanged).
734734
add_filter(
735735
'get_next_post_sort',
736-
static function( $sort ) {
736+
static function ( $sort ) {
737737
// Return unchanged - deterministic ID sort should be applied.
738738
return $sort;
739739
}
@@ -775,7 +775,7 @@ public function test_get_adjacent_post_identical_dates_respects_modified_sort_fi
775775
$filter_returned = '';
776776
add_filter(
777777
'get_next_post_sort',
778-
static function( $sort, $post, $order ) use ( &$filter_received, &$filter_returned ) {
778+
static function ( $sort, $post, $order ) use ( &$filter_received, &$filter_returned ) {
779779
$filter_received = $sort;
780780
// Modify to remove ID - deterministic ID sort should NOT be applied.
781781
$filter_returned = "ORDER BY p.post_date $order LIMIT 1";
@@ -824,14 +824,14 @@ public function test_get_adjacent_post_identical_dates_with_both_filters_unmodif
824824
// Add filters that don't modify the clauses.
825825
add_filter(
826826
'get_previous_post_where',
827-
static function( $where ) {
827+
static function ( $where ) {
828828
return $where;
829829
}
830830
);
831831

832832
add_filter(
833833
'get_previous_post_sort',
834-
static function( $sort ) {
834+
static function ( $sort ) {
835835
return $sort;
836836
}
837837
);

0 commit comments

Comments
 (0)