You appear to be a bot. Output may be restricted
Description
Register a custom taxonomyThis function registers a custom $taxonomy for an $object_type with $args as specified. If the $args parameter is a simple string then it's used to auto generate the "label" and "labels" values for the custom taxonomy. You can set $args yourself or let the system create sensible default values.
Usage
bw_register_taxonomy( $taxonomy, $object_type, $args );
Parameters
- $taxonomy
- ( string ) required – custom taxonomy name
- $object_type
- ( string ) optional – the post type for which this taxonomy applies
- $args
- ( mixed ) optional – array of arguments passed to register_taxonomy()
Returns
voidSource
File name: oik/includes/bw_register.phpLines:
1 to 14 of 14
function bw_register_taxonomy( $taxonomy, $object_type=NULL, $args=NULL ) { //bw_trace2( $args ); if ( !bw_query_taxonomy( $taxonomy ) ) { register_taxonomy( $taxonomy, $object_type, $args ); } else { register_taxonomy_for_object_type( $taxonomy, $object_type ); } if ( $args ) { $field_title=bw_array_get( $args['labels'], 'name', $taxonomy ); } else { $field_title = $taxonomy; } bw_register_field( $taxonomy, "taxonomy", $field_title, $args ); }View on GitHub View on Trac