WordPress at Your Fingertips
function is not described

WP_Taxonomy::__construct() public WP 4.7.0

Constructor.

See the register_taxonomy() function for accepted arguments for $args.

{} It's a method of the class: WP_Taxonomy{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Taxonomy = new WP_Taxonomy();
$WP_Taxonomy->__construct( $taxonomy, $object_type, $args );
$taxonomy(string) (required)
Taxonomy key, must not exceed 32 characters.
$object_type(array|string) (required)
Name of the object type for the taxonomy object.
$args(array|string)
Array or query string of arguments for registering a taxonomy.
Default: empty array

Notes

  • Global. WP. $wp Current WordPress environment instance.

Changelog

Since 4.7.0 Introduced.

Code of WP_Taxonomy::__construct() WP 5.8.1

public function __construct( $taxonomy, $object_type, $args = array() ) {
	$this->name = $taxonomy;

	$this->set_props( $object_type, $args );
}