You appear to be a bot. Output may be restricted
Description
Creates a term object.
Usage
$array|WP_Error = WP_UnitTest_Factory_For_Term::create_object( $args );
Parameters
- $args
- ( array ) required – Array or string of arguments for inserting a term.
Returns
array|WP_Error
Source
File name: wordpress-develop-tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php
Lines:
1 to 8 of 8
public function create_object( $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 ) ) { return $term_id_pair; } return $term_id_pair['term_id']; }