CMC | MK | Tools | Extra view types
if ( ! function_exists( 'mk_extra_view_type_taxonomy' ) ) {
// Register Custom Taxonomy
function mk_extra_view_type_taxonomy() {
$labels = array(
'name' => _x( 'Extra view types', 'Taxonomy General Name', 'mktools' ),
'singular_name' => _x( 'Extra view type', 'Taxonomy Singular Name', 'mktools' ),
'menu_name' => __( 'Extra view type', 'mktools' ),
'all_items' => __( 'All view types', 'mktools' ),
'parent_item' => __( 'Parent view type', 'mktools' ),
'parent_item_colon' => __( 'Parent view type:', 'mktools' ),
'new_item_name' => __( 'New view type name', 'mktools' ),
'add_new_item' => __( 'Add new view type', 'mktools' ),
'edit_item' => __( 'Edit view type', 'mktools' ),
'update_item' => __( 'Update view type', 'mktools' ),
'separate_items_with_commas' => __( 'Separate view types with commas', 'mktools' ),
'search_items' => __( 'Search view types', 'mktools' ),
'add_or_remove_items' => __( 'Add or remove view types', 'mktools' ),
'choose_from_most_used' => __( 'Choose from the most used view types', 'mktools' ),
'not_found' => __( 'Not Found', 'mktools' ),
);
$capabilities = array(
'manage_terms' => 'manage_options',
'edit_terms' => 'manage_options',
'delete_terms' => 'manage_options',
'assign_terms' => 'edit_posts',
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => false,
'show_tagcloud' => false,
'capabilities' => $capabilities,
);
register_taxonomy( 'mk_extra_view_type', array( 'extra_view' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'mk_extra_view_type_taxonomy', 0 );
}