Core Function
View Source on Trac ↗ get_object_taxonomies()
get_object_taxonomies( mixed $object_type, mixed $output = 'names' ) Returns the names or objects of the taxonomies which are registered for the requested object or object type,
Parameters 2 required
| Name / Type | Description |
|---|---|
| (string | | string[] | WP_Post) $object_type Name of the type of taxonomy object, or an object (row from posts). Required |
| string | $output Optional. The type of output to return in the array. Accepts either 'names' or 'objects'. Default 'names'. Required |
Return Value
((string[])
| WP_Taxonomy[]) The names or objects of all taxonomies of `$object_type`.
Function Information
Since Version
2.3.0
Source File
wp-includes/taxonomy.php
Advertisement