Let's replace that to 
```php
<?php
if ($entity_type != 'taxonomy_term') {
  return;
}