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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-04-02 17:07:30 +00:00
parent 8e0fab0d43
commit 7095a9b0d3
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');
}
/**