Changeset 19970 for trunk/wp-includes/canonical.php
- Timestamp:
- 02/21/2012 07:00:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r19880 r19970 192 192 193 193 } 194 } elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false ) {195 $category = get_category_by_path( get_query_var('category_name'));194 } elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false && $cat = get_query_var( 'category_name' ) ) { 195 $category = get_category_by_path( $cat ); 196 196 $post_terms = wp_get_object_terms($wp_query->get_queried_object_id(), 'category', array('fields' => 'tt_ids')); 197 197 if ( (!$category || is_wp_error($category)) || ( !is_wp_error($post_terms) && !empty($post_terms) && !in_array($category->term_taxonomy_id, $post_terms) ) )
Note: See TracChangeset
for help on using the changeset viewer.