Skip to content

Commit

Permalink
Merge pull request #1397 from bolt/bugfix/taxonomy-match-slug
Browse files Browse the repository at this point in the history
Get taxonomy by slug
  • Loading branch information
bobdenotter authored May 22, 2020
2 parents d79a26c + 0adf088 commit 7e7bdce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Configuration/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function getTaxonomy(string $name): ?Collection
/** @var Collection $taxos */
$taxos = $this->get('taxonomies');

foreach (['singular_slug', 'name', 'singular_name'] as $key) {
foreach (['slug', 'singular_slug', 'name', 'singular_name'] as $key) {
if ($taxos->firstWhere($key, $name)) {
return $taxos->firstWhere($key, $name);
}
Expand Down

0 comments on commit 7e7bdce

Please sign in to comment.