Skip to content

Commit

Permalink
Merge pull request #3 from BeAPI/issue/57740
Browse files Browse the repository at this point in the history
Added empty taxonomy silo condition in main.php
  • Loading branch information
asadowski10 authored May 12, 2022
2 parents eae7463 + 2211f28 commit 963896f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,13 @@ public function where_to_localize_terms_by_default( $hide_or_display, $taxonomy,
* @return bool
*/
public function is_current_default_view( $taxonomy_name ) {
return isset( $_SERVER['REQUEST_URI'] ) && false !== strpos( $_SERVER['REQUEST_URI'], Helpers::get_taxonomy_silo( $taxonomy_name ) );
$taxonomy_silo = Helpers::get_taxonomy_silo( $taxonomy_name );

if ( empty( $taxonomy_silo ) ) {
return false;
}

return isset( $_SERVER['REQUEST_URI'] ) && false !== strpos( $_SERVER['REQUEST_URI'], $taxonomy_silo );
}

/**
Expand Down

0 comments on commit 963896f

Please sign in to comment.