mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Create metaboxes for hierarchical taxonomies. Props prettyboymp. fixes #10122
git-svn-id: https://develop.svn.wordpress.org/trunk@12798 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -194,6 +194,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
$args['name'] = $taxonomy;
|
||||
$args['object_type'] = (array) $object_type;
|
||||
$wp_taxonomies[$taxonomy] = (object) $args;
|
||||
|
||||
// register callback handling for metabox
|
||||
add_filter('wp_ajax_add-'.$taxonomy, '_wp_ajax_add_hierarchical_term');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1573,7 +1576,7 @@ function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
|
||||
* slug has to be globally unique for every taxonomy.
|
||||
*
|
||||
* The way this works is that if the taxonomy that the term belongs to is
|
||||
* heirarchical and has a parent, it will append that parent to the $slug.
|
||||
* hierarchical and has a parent, it will append that parent to the $slug.
|
||||
*
|
||||
* If that still doesn't return an unique slug, then it try to append a number
|
||||
* until it finds a number that is truely unique.
|
||||
|
||||
Reference in New Issue
Block a user