Skip to content

Instantly share code, notes, and snippets.

@chrisvanpatten
Created July 10, 2013 17:33
Show Gist options
  • Select an option

  • Save chrisvanpatten/5968350 to your computer and use it in GitHub Desktop.

Select an option

Save chrisvanpatten/5968350 to your computer and use it in GitHub Desktop.
Custom taxonomy mu-plugin
<?php
/*
Plugin Name: emoji Custom Taxonomy
Plugin URI: http://www.vanpattenmedia.com/
Description: Custom taxonomy registration
Author: Van Patten Media
Version: 1.0
Author URI: http://www.vanpattenmedia.com/
*/
if ( !taxonomy_exists('emoji') ) {
function register_emoji_taxonomy() {
register_taxonomy (
'emoji',
array (
'moment',
),
array (
'hierarchical' => true,
'label' => 'Emoji',
'show_ui' => true,
'query_var' => true,
)
);
}
add_action('init', 'register_emoji_taxonomy');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment