
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.61 KB | hits: 20 | expires: Never
if ( $params instanceof Term ) {
$term = Term::get( (string)$params );
if ( $term ) {
$this->term = $term;
}
else {
$this->term = $params;
}
}
else if ( is_array( $params ) ) {
$term = Term::get( $params['tag_text'] );
if ( $term ) {
$this->term = $term;
}
else {
if ( isset( $params['tag_slug '] ) ) {
$this->term = new Term( array( 'term_display ' => $params['tag_text'], 'term' => $params['tag_slug'] ) );
}
else {
$this->term = new Term( array( 'term_display' => $params['tag_text'] ) );
}
}
}