src/Taxonomy/Taxonomy.php
public function set(): TaxonomyInterface
    {
        if (function_exists('current_filter') && 'init' === $hook = current_filter()) {
            $this->register();
        } else {
            $this->action->add('init', [$this, 'register']);
        }

        return $this;
    }
public function set(): TaxonomyInterface
    {
        if (function_exists('current_filter') && 'init' === $hook = current_filter()) {
            $this->register();
        } else {
            $this->action->add('init', [$this, 'register']);
        }

        return $this;
    }
public function set ( ) : TaxonomyInterface { if ( function_exists ( 'current_filter' ) && 'init' === $ hook = current_filter ( ) ) { $ this -> register ( ) ; } else { $ this -> action -> add ( 'init' , [ $ this , 'register' ] ) ; } return $ this ; }
Register the taxonomy.

@return TaxonomyInterface
Register the taxonomy .