Ticket #24575: 24575.patch
File 24575.patch, 834 bytes (added by , 10 years ago) |
---|
-
wp-includes/link-template.php
1175 1175 $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 ); 1176 1176 $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" ); 1177 1177 1178 $query = "SELECT p. idFROM $wpdb->posts AS p $join $where $sort";1178 $query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort"; 1179 1179 $query_key = 'adjacent_post_' . md5($query); 1180 1180 $result = wp_cache_get($query_key, 'counts'); 1181 1181 if ( false !== $result ) {