Changeset 13798
- Timestamp:
- 03/22/2010 07:05:50 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r13781 r13798 168 168 $category = get_term_by('slug', get_query_var('category_name'), 'category'); 169 169 $post_terms = wp_get_object_terms($wp_query->get_queried_object_id(), 'category'); 170 if ( ! in_array($category, $post_terms) )170 if ( (!$category || is_wp_error($category)) || ( !is_wp_error($post_terms) && !empty($post_terms) && !in_array($category, $post_terms) ) ) 171 171 $redirect_url = get_permalink($wp_query->get_queried_object_id()); 172 172 }
Note: See TracChangeset
for help on using the changeset viewer.