mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 15:16:29 +01:00
Create default taxonomies upon init. Props nbachiyski. fixes #9399
git-svn-id: http://svn.automattic.com/wordpress/trunk@10965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
38b53fb9bf
commit
2a35127359
@ -17,9 +17,15 @@
|
|||||||
* @global array $wp_taxonomies
|
* @global array $wp_taxonomies
|
||||||
*/
|
*/
|
||||||
$wp_taxonomies = array();
|
$wp_taxonomies = array();
|
||||||
$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'));
|
function create_initial_taxonomies() {
|
||||||
$wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false);
|
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.
|
* Return all of the taxonomy names that are of $object_type.
|
||||||
|
Loading…
Reference in New Issue
Block a user