Make WordPress Core


Ignore:
Timestamp:
12/23/2015 08:14:12 PM (9 years ago)
Author:
boonebgorges
Message:

Improve post-filter sanitization of excluded terms in get_adjacent_post().

See [36078], #35211.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r36078 r36079  
    16151615
    16161616        if ( ! empty( $excluded_terms ) ) {
    1617             $where .= " AND p.ID NOT IN ( SELECT tr.object_id FROM $wpdb->term_relationships tr LEFT JOIN $wpdb->term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.term_id IN (" . implode( $excluded_terms, ',' ) . ') )';
     1617            $where .= " AND p.ID NOT IN ( SELECT tr.object_id FROM $wpdb->term_relationships tr LEFT JOIN $wpdb->term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.term_id IN (" . implode( ',', array_map( 'intval', $excluded_terms ) ) . ') )';
    16181618        }
    16191619    }
Note: See TracChangeset for help on using the changeset viewer.