W3cubDocs

/WordPress

WP_Term::__construct( WP_Term|object $term )

Constructor.

Parameters

$term

(WP_Term|object) (Required) Term object.

Source

File: wp-includes/class-wp-term.php

public function __construct( $term ) {
		foreach ( get_object_vars( $term ) as $key => $value ) {
			$this->$key = $value;
		}
	}

Changelog

Version Description
4.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_term/__construct