Description
Register a custom "category" taxonomy
Usage
bw_register_custom_category( $taxonomy, $object_type, $arg );Parameters
- $taxonomy
- ( string ) required – the taxonomy name
- $object_type
- ( array|string ) optional – post types to associate the taxonomy to
- $arg
- ( mixed ) optional –
Returns
voidSource
File name: oik/includes/bw_register.phpLines:
1 to 10 of 10
function bw_register_custom_category( $taxonomy, $object_type=null, $arg=null ) { $args = bw_default_taxonomy_args( $taxonomy, $arg ); $args['hierarchical'] = true; if ( !isset( $args['rewrite']['hierarchical'] ) ) { $args['rewrite']['hierarchical']=true; } $args['show_in_rest'] = true; $args['show_in_nav_menus'] = bw_array_get( $args, 'show_in_nav_menus', false); bw_register_taxonomy( $taxonomy, $object_type, $args ); }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 2 of 2
