WP_Term::__construct() WordPress Method

The WP_Term::__construct() method is used to create a new term object. A term object represents a single term in a taxonomy.

WP_Term::__construct( WP_Term|object $term ) #

Constructor.


Parameters

$term

(WP_Term|object)(Required)Term object.


Top ↑

Source

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

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


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.