public function hasTerm($term_id)
    {
        $taxonomy_terms = $this->getTerms();
        if (!Arr::iterable($taxonomy_terms)) {
            return false;
        }

        foreach ($taxonomy_terms as $taxonomy_key => $terms) {
            if (!Arr::iterable($terms)) {
                continue;
            }

            foreach ($terms as $term) {
                if ((int) $term->term_id === (int) $term_id) {
                    return true;
                }
            }
        }

        return false;
    }
public function hasTerm($term_id)
    {
        $taxonomy_terms = $this->getTerms();
        if (!Arr::iterable($taxonomy_terms)) {
            return false;
        }

        foreach ($taxonomy_terms as $taxonomy_key => $terms) {
            if (!Arr::iterable($terms)) {
                continue;
            }

            foreach ($terms as $term) {
                if ((int) $term->term_id === (int) $term_id) {
                    return true;
                }
            }
        }

        return false;
    }
public function hasTerm ( $ term_id ) { $ taxonomy_terms = $ this -> getTerms ( ) ; if ( ! Arr :: iterable ( $ taxonomy_terms ) ) { return false ; } foreach ( $ taxonomy_terms as $ taxonomy_key => $ terms ) { if ( ! Arr :: iterable ( $ terms ) ) { continue ; } foreach ( $ terms as $ term ) { if ( ( int ) $ term -> term_id === ( int ) $ term_id ) { return true ; } } } return false ; }
Does this post have this term?
@param integer $term_id
@return bool
Does this post have this term?