Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

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