From 9ad08bb69f5c783da1973b3771a6b5e0fe747e85 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sun, 10 Jan 2010 18:29:37 +0000 Subject: [PATCH] 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 --- wp-admin/edit-page-form.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index fb62af48e3..056ec302d1 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -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') )