Create default taxonomies upon init. Props nbachiyski. fixes #9399
git-svn-id: https://develop.svn.wordpress.org/trunk@10965 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bcd0361528
commit
b47e7b03fd
|
@ -17,10 +17,16 @@
|
|||
* @global array $wp_taxonomies
|
||||
*/
|
||||
$wp_taxonomies = array();
|
||||
|
||||
function create_initial_taxonomies() {
|
||||
global $wp_taxonomies;
|
||||
$wp_taxonomies['category'] = (object) array('name' => 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count', 'label' => __('Categories'));
|
||||
$wp_taxonomies['post_tag'] = (object) array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags'));
|
||||
$wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false);
|
||||
|
||||
}
|
||||
add_action( 'init', 'create_initial_taxonomies' );
|
||||
|
||||
/**
|
||||
* Return all of the taxonomy names that are of $object_type.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue