Permalink
Browse files

Tentative attempt to filter out the post_types not relating to this l…

…anguage from taxonomy archives
  • Loading branch information...
1 parent 604c00e commit 0238f6975c7f15d4a6b56ac0aad8eae6e4946db2 @simonwheatley simonwheatley committed Sep 19, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 class-taxonomy.php
View
@@ -494,6 +494,10 @@ public function parse_request( $wp ) {
foreach ( $taxonomies as $taxonomy ) {
$taxonomy = get_taxonomy( $taxonomy );
$post_types = array_merge( $post_types, $taxonomy->object_type );
+ // Filter out the post_types not in this language
+ foreach ( $post_types as & $post_type )
+ $post_type = bbl_get_post_type_in_lang( $post_type );
+ $post_types = array_unique( $post_types );
}
$wp->query_vars[ 'post_type' ] = $post_types;
}
@@ -511,7 +515,6 @@ public function parse_request( $wp ) {
);
}
-
}
/**

0 comments on commit 0238f69

Please sign in to comment.