You appear to be a bot. Output may be restricted
Description
Register a custom taxonomySupports plural and singular labels; name is plural, singular_name is singular
Usage
oiktax_register_taxonomy( $taxonomy, $data );
Parameters
- $taxonomy
- ( string ) required – taxonomy name
- $data
- ( array ) required – the taxonomy attributes [args] => Array ( [type] => tags [label] => Brands [title] => Product Brand – e.g. Accuphase [singular_name] => Brand )
Returns
voidSource
File name: oik-types/oik-types.phpLines:
1 to 14 of 14
function oiktax_register_taxonomy( $taxonomy, $data ) { //bw_trace2(); $args = $data["args"]; $type = bw_array_get( $args, "type", null ); $args['labels']['name'] = bw_array_get( $args, "label", null ); $args['labels']['singular_name'] = bw_array_get( $args, "singular_name", null ); if ( $type == "tags" ) { bw_register_custom_tags( $taxonomy, null, $args ); } else { bw_register_custom_category( $taxonomy, null, $args ); } }View on GitHub