Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remcotolsma/8328b986dd0d72fdf1e6 to your computer and use it in GitHub Desktop.
Save remcotolsma/8328b986dd0d72fdf1e6 to your computer and use it in GitHub Desktop.
<?php
function orbis_timesheets_init() {
// @see http://codex.wordpress.org/Function_Reference/register_taxonomy
register_taxonomy(
'orbis_timesheets_activity', // taxonomy name
null, // object type
array( // arguments
'hierarchical' => true,
'labels' => array(
'name' => _x( 'Timesheets Activities', 'taxonomy general name', 'orbis_timesheets' ),
'singular_name' => _x( 'Timesheets Activity', 'taxonomy singular name', 'orbis_timesheets' ),
'search_items' => __( 'Search Timesheets Activities', 'orbis_timesheets' ),
'all_items' => __( 'All Timesheets Activities', 'orbis_timesheets' ),
'parent_item' => __( 'Parent Timesheets Activity', 'orbis_timesheets' ),
'parent_item_colon' => __( 'Parent Activity:', 'orbis_timesheets' ),
'edit_item' => __( 'Edit Activity', 'orbis_timesheets' ),
'update_item' => __( 'Update Activity', 'orbis_timesheets' ),
'add_new_item' => __( 'Add New Activity', 'orbis_timesheets' ),
'new_item_name' => __( 'New Activity Name', 'orbis_timesheets' ),
'menu_name' => __( 'Activities', 'orbis_timesheets' ),
),
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'genre' ),
)
);
}
add_action( 'init', 'orbis_timesheets_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment