On this page
WP_Term::__construct( WP_Term|object $term )
Constructor.
Parameters
$termWP_Term|object Required-
Term object.
Source
File: wp-includes/class-wp-term.php. View all references
public function __construct( $term ) {
foreach ( get_object_vars( $term ) as $key => $value ) {
$this->$key = $value;
}
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Term::get_instance() wp-includes/class-wp-term.php | Retrieve WP_Term instance. |
| get_term() wp-includes/taxonomy.php | Gets all term data from database by term ID. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_term/__construct