public function setTerms($term_ids, $taxonomy = null, $append = false)
    {
        $taxonomy = ($taxonomy) ? $taxonomy : 'post_tag';
        if (!is_array($this->_terms)) {
            $this->_terms = array();
        }
        if (!array_key_exists($taxonomy, $this->_terms)) {
            $this->_terms[$taxonomy] = array();
        }

        $this->_terms[$taxonomy] = ($append)
            ? array_merge($this->_terms[$taxonomy], $term_ids)
            : $term_ids;
        return $this->_terms[$taxonomy];
    }
public function setTerms($term_ids, $taxonomy = null, $append = false)
    {
        $taxonomy = ($taxonomy) ? $taxonomy : 'post_tag';
        if (!is_array($this->_terms)) {
            $this->_terms = array();
        }
        if (!array_key_exists($taxonomy, $this->_terms)) {
            $this->_terms[$taxonomy] = array();
        }

        $this->_terms[$taxonomy] = ($append)
            ? array_merge($this->_terms[$taxonomy], $term_ids)
            : $term_ids;
        return $this->_terms[$taxonomy];
    }
public function setTerms ( $ term_ids , $ taxonomy = null , $ append = false ) { $ taxonomy = ( $ taxonomy ) ? $ taxonomy : 'post_tag' ; if ( ! is_array ( $ this -> _terms ) ) { $ this -> _terms = array ( ) ; } if ( ! array_key_exists ( $ taxonomy , $ this -> _terms ) ) { $ this -> _terms [ $ taxonomy ] = array ( ) ; } $ this -> _terms [ $ taxonomy ] = ( $ append ) ? array_merge ( $ this -> _terms [ $ taxonomy ] , $ term_ids ) : $ term_ids ; return $ this -> _terms [ $ taxonomy ] ; }
Set the terms
@param array $term_ids
@param string $taxonomy
@param bool $append
@return array
Set the terms