WordPress.org

Make WordPress Core

Ticket #9571: 9571.2.diff

File 9571.2.diff, 841 bytes (added by Japh, 2 years ago)

Refreshed patch

  • wp-includes/link-template.php

     
    11661166        $op = $previous ? '<' : '>'; 
    11671167        $order = $previous ? 'DESC' : 'ASC'; 
    11681168 
     1169        $excluded_categories = apply_filters( "get_{$adjacent}_post_excluded", $excluded_categories ); 
    11691170        $join  = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_cat, $excluded_categories ); 
    11701171        $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 ); 
    11711172        $sort  = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" );