You appear to be a bot. Output may be restricted
Description
Updates the term.
Usage
$int = WP_UnitTest_Factory_For_Term::update_object( $term, $fields );
Parameters
- $term
- ( int|object ) required – The term to update.
- $fields
- ( array|string ) required – The context in which to relate the term to the object.
Returns
int The term ID.
Source
File name: wordpress-develop-tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php
Lines:
1 to 8 of 8
public function update_object( $term, $fields ) { $fields = array_merge( array( 'taxonomy' => $this->taxonomy ), $fields ); if ( is_object( $term ) ) { $taxonomy = $term->taxonomy; } $term_id_pair = wp_update_term( $term, $taxonomy, $fields ); return $term_id_pair['term_id']; }