Enable custom taxonomy UI for pages as well as for posts. fixes #11290

git-svn-id: http://svn.automattic.com/wordpress/trunk@12690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-01-10 18:29:37 +00:00
parent 969bdd39f7
commit 9ad08bb69f
1 changed files with 10 additions and 0 deletions

View File

@ -79,6 +79,16 @@ $post_type = 'page';
add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'page', 'side', 'core');
// all tag-style page taxonomies
foreach ( get_object_taxonomies('page') as $tax_name ) {
if ( !is_taxonomy_hierarchical($tax_name) ) {
$taxonomy = get_taxonomy($tax_name);
$label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name;
add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core');
}
}
if ( post_type_supports($post_type, 'page-attributes') )
add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core');
if ( post_type_supports($post_type, 'custom-fields') )