From 396582d836924dd4c1878ad105dd305baa85f98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Sun, 27 Oct 2013 20:36:09 +0000 Subject: [PATCH] Consolidate logic for not showing a taxonomy meta box. props ocean90. fixes #21543. Built from https://develop.svn.wordpress.org/trunk@25953 git-svn-id: http://core.svn.wordpress.org/trunk@25912 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index b2fff6e851..05eb9bbc80 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -147,7 +147,7 @@ if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, // all taxonomies foreach ( get_object_taxonomies( $post ) as $tax_name ) { $taxonomy = get_taxonomy( $tax_name ); - if ( ! $taxonomy->show_ui ) + if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb ) continue; $label = $taxonomy->labels->name; @@ -157,8 +157,7 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) { else $tax_meta_box_id = $tax_name . 'div'; - if ( false !== $taxonomy->meta_box_cb ) - add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) ); + add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) ); } if ( post_type_supports($post_type, 'page-attributes') )