public function createOrFail(array $arguments)
    {
        $term = $this->create($arguments);

        if (is_wp_error($term)) {
            throw new QueryException("Taxonomy [{$this->slug}] could not create new term.");
        }

        return $term;
    }
public function createOrFail(array $arguments)
    {
        $term = $this->create($arguments);

        if (is_wp_error($term)) {
            throw new QueryException("Taxonomy [{$this->slug}] could not create new term.");
        }

        return $term;
    }
public function createOrFail ( array $ arguments ) { $ term = $ this -> create ( $ arguments ) ; if ( is_wp_error ( $ term ) ) { throw new QueryException ( "Taxonomy [{$this->slug}] could not create new term." ) ; } return $ term ; }
Create term.

@param  array $arguments

@return array
Create term .