Make WordPress Core

Ticket #24575: 24575.patch

File 24575.patch, 834 bytes (added by hypertextranch, 10 years ago)
  • wp-includes/link-template.php

     
    11751175        $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare("WHERE p.post_date $op %s AND p.post_type = %s AND p.post_status = 'publish' $posts_in_ex_cats_sql", $current_post_date, $post->post_type), $in_same_cat, $excluded_categories );
    11761176        $sort  = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" );
    11771177
    1178         $query = "SELECT p.id FROM $wpdb->posts AS p $join $where $sort";
     1178        $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort";
    11791179        $query_key = 'adjacent_post_' . md5($query);
    11801180        $result = wp_cache_get($query_key, 'counts');
    11811181        if ( false !== $result ) {