Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…anguage from taxonomy archives
  • Loading branch information...
commit 0238f6975c7f15d4a6b56ac0aad8eae6e4946db2 1 parent 604c00e
@simonwheatley simonwheatley authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 class-taxonomy.php
View
5 class-taxonomy.php
@@ -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 ) {
);
}
-
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.