protected function _createObject( $args ) {
		$args = array_merge( array( 'taxonomy' => $this->_taxonomy ), $args );
		$term_id_pair = wp_insert_term( $args['name'], $args['taxonomy'], $args );
		if ( is_wp_error( $term_id_pair ) ) {
			$this->_debug(
				'Term generation failed with message [%s] %s',
				$term_id_pair->get_error_code(),
				$term_id_pair->get_error_messages()
			);

			return $term_id_pair;
		}

		$this->_debug( 'Generated term ID: ' . $term_id_pair['term_id'] );

		return $term_id_pair['term_id'];
	}
protected function _createObject( $args ) {
		$args = array_merge( array( 'taxonomy' => $this->_taxonomy ), $args );
		$term_id_pair = wp_insert_term( $args['name'], $args['taxonomy'], $args );
		if ( is_wp_error( $term_id_pair ) ) {
			$this->_debug(
				'Term generation failed with message [%s] %s',
				$term_id_pair->get_error_code(),
				$term_id_pair->get_error_messages()
			);

			return $term_id_pair;
		}

		$this->_debug( 'Generated term ID: ' . $term_id_pair['term_id'] );

		return $term_id_pair['term_id'];
	}
protected function _createObject ( $ args ) { $ args = array_merge ( array ( 'taxonomy' => $ this -> _taxonomy ) , $ args ) ; $ term_id_pair = wp_insert_term ( $ args [ 'name' ] , $ args [ 'taxonomy' ] , $ args ) ; if ( is_wp_error ( $ term_id_pair ) ) { $ this -> _debug ( 'Term generation failed with message [%s] %s' , $ term_id_pair -> get_error_code ( ) , $ term_id_pair -> get_error_messages ( ) ) ; return $ term_id_pair ; } $ this -> _debug ( 'Generated term ID: ' . $ term_id_pair [ 'term_id' ] ) ; return $ term_id_pair [ 'term_id' ] ; }
Generates a new term.

@since 1.0.0

@access protected
@param array $args The array of arguments to use during a new term creation.
@return int|\WP_Error The newly created term's ID on success, otherwise a WP_Error object.
Generates a new term .