Core Function
View Source on Trac ↗ register_taxonomy()
register_taxonomy( mixed $taxonomy, mixed $object_type, mixed $args = array() ) Creates or modifies a taxonomy object.
Parameters 3 required
| Name / Type | Description |
|---|---|
| string | $taxonomy Taxonomy key. Must not exceed 32 characters and may only contain lowercase alphanumeric characters, dashes, and underscores. See sanitize_key(). Required |
| (array | | string) $object_type Object type or array of object types with which the taxonomy should be associated. Required |
| mixed | (array | string) $args { Optional. Array or query string of arguments for registering a taxonomy. Required |
Return Value
((WP_Taxonomy)
| WP_Error) The registered taxonomy object on success, WP_Error object on failure.
Function Information
Since Version
2.3.0
Source File
wp-includes/taxonomy.php
Advertisement