Make WordPress Core

Ticket #41924: 41924.2.diff

File 41924.2.diff, 1.2 KB (added by manchumahara, 8 years ago)

2nd patch, added the @since tag

  • wp-includes/link-template.php

    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 
    17231723         *
    17241724         * @since 2.5.0
    17251725         * @since 4.4.0 Added the `$post` parameter.
     1726         * @since 4.9.0 Added the `$order` parameter.
    17261727         *
    17271728         * @param string $order_by The `ORDER BY` clause in the SQL.
    17281729         * @param WP_Post $post    WP_Post object.
     1730         * @param string $order    ASC or DESC order in the SQL
    17291731         */
    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 );
    17311733
    17321734        $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort";
    17331735        $query_key = 'adjacent_post_' . md5( $query );