WordPress.org

Make WordPress Core

Ticket #18613: 18613.patch

File 18613.patch, 1.0 KB (added by SergeyBiryukov, 4 years ago)
  • wp-includes/link-template.php

     
    11451145        $order = $previous ? 'DESC' : 'ASC'; 
    11461146 
    11471147        $join  = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_cat, $excluded_categories ); 
    1148         $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 ); 
     1148        $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' OR p.post_status = 'private' ) $posts_in_ex_cats_sql", $current_post_date, $post->post_type), $in_same_cat, $excluded_categories ); 
    11491149        $sort  = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" ); 
    11501150 
    11511151        $query = "SELECT p.* FROM $wpdb->posts AS p $join $where $sort";