Changeset 13781
- Timestamp:
- 03/20/2010 06:27:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r13780 r13781 165 165 166 166 } 167 } elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false ) { 168 $category = get_term_by('slug', get_query_var('category_name'), 'category'); 169 $post_terms = wp_get_object_terms($wp_query->get_queried_object_id(), 'category'); 170 if ( ! in_array($category, $post_terms) ) 171 $redirect_url = get_permalink($wp_query->get_queried_object_id()); 167 172 } 168 173
Note: See TracChangeset
for help on using the changeset viewer.