WordPress.org

Make WordPress Core

Ticket #4263: d

File d, 953 bytes (added by thomasq, 8 years ago)

Patch

Line 
1Index: link-template.php
2===================================================================
3--- link-template.php   (révision 5474)
4+++ link-template.php   (copie de travail)
5@@ -420,7 +420,7 @@
6        }
7 
8        $join  = apply_filters( 'get_next_post_join', $join, $in_same_cat, $excluded_categories );
9-       $where = apply_filters( 'get_next_post_where', "WHERE post_date > '$current_post_date' AND post_type = 'post' AND post_status = 'publish' $posts_in_ex_cats_sql AND ID != $post->ID", $in_same_cat, $excluded_categories );
10+       $where = apply_filters( 'get_next_post_where', "WHERE post_date > '$current_post_date' AND post_date < '".current_time('mysql')."' AND post_type = 'post' AND post_status = 'publish' $posts_in_ex_cats_sql AND ID != $post->ID", $in_same_cat, $excluded_categories );
11        $sort  = apply_filters( 'get_next_post_sort', 'ORDER BY post_date ASC LIMIT 1' );
12 
13        return @$wpdb->get_row("SELECT ID, post_title FROM $wpdb->posts $join $where $sort");