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

git-svn-id: https://develop.svn.wordpress.org/trunk@12690 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2010-01-10 18:29:37 +00:00
parent dc9da44252
commit 20c7f2963e
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') )