Skip to content

Commit 467d7cf

Browse files
committed
Enhance WP_Query ordering by adding new fields to the orderby array. Included 'post__in', 'post_name__in', 'post_parent__in', and 'include' to improve query flexibility and support additional ordering scenarios.
1 parent bdc0550 commit 467d7cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wp-includes/class-wp-query.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,6 +2527,10 @@ public function get_posts() {
25272527
'ID',
25282528
'rand',
25292529
'relevance',
2530+
'post__in',
2531+
'post_name__in',
2532+
'post_parent__in',
2533+
'include',
25302534
);
25312535

25322536
$orderby_array = array();

0 commit comments

Comments
 (0)