WordPress.org

Make WordPress Core

Ticket #35761: 35761.patch

File 35761.patch, 995 bytes (added by ramiy, 9 months ago)
  • wp-includes/link-template.php

     
    18541854         */
    18551855        $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post, $order );
    18561856
    1857         $query     = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort";
     1857        $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort";
     1858
     1859        /**
     1860         * Filters the final SQL for an adjacent post query.
     1861         *
     1862         * The dynamic portion of the hook name, `$adjacent`, refers to the type
     1863         * of adjacency, 'next' or 'previous'.
     1864         *
     1865         * @since 5.6.0
     1866         *
     1867         * @param string  $query The final SQL.
     1868         * @param WP_Post $post  WP_Post object.
     1869         */
     1870        $query = apply_filters( "get_{$adjacent}_post_query", $query, $post );
     1871
    18581872        $query_key = 'adjacent_post_' . md5( $query );
    18591873        $result    = wp_cache_get( $query_key, 'counts' );
    18601874        if ( false !== $result ) {