title: Wordpress: check whether the current post is in any of the specified terms
body: <p>I have a custom post type <code>property</code> and a custom taxonomy <code>features</code>. On single <code>property</code> pages, I output all terms from <code>features</code>, including empty ones. However, I need to check which of these terms the current post is present in.</p>
  <p>At the exit you need to get something like: <code>✓ cleaning</code> <code>X Internet</code> <code>✓ home phone</code>.</p>
  <p>So, I get all the terms:</p>
  <pre class="lang-php prettyprint-override"><code>$features = get_terms([
          'taxonomy' =&gt; 'features',
          'hide_empty' =&gt; false,
      ]);
  </code></pre>
  <p>Then I try to sort them out and check if there is a current post in the term being checked.</p>
  <pre class="lang-php prettyprint-override"><code>foreach ($features as $feature) :
      if (has_term($feature)) {
          echo '✓' . $feature-&gt;name;
      } else {
          echo 'X' . $feature-&gt;name;
      }
  endforeach;
  </code></pre>
  <p>But I get:</p>
  <p><code>X cleaning</code> <code>X Internet</code> <code>X home phone</code></p>