WP_Taxonomy::__construct()
Constructor.
See the register_taxonomy() function for accepted arguments for $args.
Method of the class: WP_Taxonomy{}
No Hooks.
Return
null
. Ничего (null).
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. See register_taxonomy() for information on accepted arguments.
Default: empty array
Changelog
Since 4.7.0 | Introduced. |
WP_Taxonomy::__construct() WP Taxonomy:: construct code WP 6.3
public function __construct( $taxonomy, $object_type, $args = array() ) { $this->name = $taxonomy; $this->set_props( $object_type, $args ); }