Move wp-ajax_add-tax hook back to registration. Reverts part of [13924]. see #10437

git-svn-id: https://develop.svn.wordpress.org/trunk@13946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-04-02 17:07:30 +00:00
parent 44fb71915d
commit af71e20215
2 changed files with 3 additions and 3 deletions

View File

@ -104,9 +104,6 @@ foreach ( get_object_taxonomies($post_type) as $tax_name ) {
add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core');
else
add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));
// register callback handling for metabox
add_filter('wp_ajax_add-' . $tax_name, '_wp_ajax_add_hierarchical_term');
}
if ( post_type_supports($post_type, 'page-attributes') )

View File

@ -294,6 +294,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');
}
/**