Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if ( $params instanceof Term ) {
  2.                     $term = Term::get( (string)$params );
  3.                     if ( $term ) {
  4.                         $this->term = $term;
  5.                     }
  6.                     else {
  7.                         $this->term = $params;
  8.                     }
  9.                 }
  10.                 else if ( is_array( $params ) ) {
  11.                     $term = Term::get( $params['tag_text'] );
  12.                     if ( $term ) {
  13.                         $this->term = $term;
  14.                     }
  15.                     else {
  16.                         if ( isset( $params['tag_slug '] ) ) {
  17.                             $this->term = new Term( array( 'term_display ' => $params['tag_text'], 'term' => $params['tag_slug'] ) );
  18.                         }
  19.                         else {
  20.                             $this->term = new Term( array( 'term_display' => $params['tag_text'] ) );
  21.                         }
  22.                     }
  23.                 }