From 7a236ea3ae3230cf8355005732a2fb7f3a6e6e97 Mon Sep 17 00:00:00 2001
From: Sabuj Kundu <sabuj@codeboxr.com>
Date: Thu, 21 Sep 2017 16:03:20 +0600
Subject: [PATCH] added the $oder parameter in get_{$adjacent}_post_sort filter
---
wp-includes/link-template.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index f16b8f58df..794091008a 100644
a
|
b
|
function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo |
1723 | 1723 | * |
1724 | 1724 | * @since 2.5.0 |
1725 | 1725 | * @since 4.4.0 Added the `$post` parameter. |
| 1726 | * @since 4.9.0 Added the `$order` parameter. |
1726 | 1727 | * |
1727 | 1728 | * @param string $order_by The `ORDER BY` clause in the SQL. |
1728 | 1729 | * @param WP_Post $post WP_Post object. |
| 1730 | * @param string $order ASC or DESC order in the SQL |
1729 | 1731 | */ |
1730 | | $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post ); |
| 1732 | $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post, $order ); |
1731 | 1733 | |
1732 | 1734 | $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort"; |
1733 | 1735 | $query_key = 'adjacent_post_' . md5( $query ); |