/** * Configure the title and link URL by using the specified author user ID. * * @access public */ public function setup() { // in order to continue, author user ID must be specified if (!$this->get_id()) { throw new Carbon_Breadcrumb_Exception('The author breadcrumb items must have author ID specified.'); } parent::setup(); }
/** * Configure the title and link URL by using the specified term ID. * * @access public */ public function setup() { // in order to continue, taxonomy term ID must be specified if (!$this->get_id()) { throw new Carbon_Breadcrumb_Exception('The term breadcrumb items must have term ID specified.'); } // in order to continue, taxonomy must be specified if (!$this->get_subtype()) { throw new Carbon_Breadcrumb_Exception('The term breadcrumb items must have taxonomy specified.'); } // retrieve term object $subtype = $this->get_subtype(); $this->term_object = get_term_by('id', $this->get_id(), $subtype); parent::setup(); }