/** * Creates a new term * * @param stdClass $input Object with properties term_id, count, slug, name, color and taxonomy * @param UTCW_Plugin $plugin Reference to the plugin instance * * @since 2.0 */ public function __construct(stdClass $input, UTCW_Plugin $plugin) { $this->setInteger($input, 'term_id'); $this->setInteger($input, 'count'); $this->setSlug($input, 'slug'); $this->setString($input, 'name'); $this->setString($input, 'taxonomy'); $this->setColor($input, 'color'); if ($this->term_id && $this->taxonomy) { $this->link = $plugin->getTermLink($this->term_id, $this->taxonomy); } }