WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r29375 r30405  
    258258    $post_type = get_post_type_object($post->post_type);
    259259
     260    if ( $post_type->hierarchical ) {
     261        $slug = get_page_uri( $id );
     262    }
     263
    260264    if ( !empty($post_link) && ( !$draft_or_pending || $sample ) ) {
    261265        if ( ! $leavename ) {
    262             if ( $post_type->hierarchical )
    263                 $slug = get_page_uri($id);
    264266            $post_link = str_replace("%$post->post_type%", $slug, $post_link);
    265267        }
     
    15121514
    15131515        if ( ! empty( $excluded_terms ) ) {
    1514             $where .= " AND p.ID NOT IN ( SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id IN (" . implode( $excluded_terms, ',' ) . ') )';
     1516            $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, ',' ) . ') )';
    15151517        }
    15161518    }
Note: See TracChangeset for help on using the changeset viewer.