Hide UI for Attachment taxonomies if show_ui is false for that taxonomy. props simonwheatley. fixes #21104

git-svn-id: https://develop.svn.wordpress.org/trunk@21240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2012-07-09 04:56:50 +00:00
parent 68ff684271
commit 4423cd9a67

View File

@@ -969,7 +969,7 @@ function get_attachment_fields_to_edit($post, $errors = null) {
foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
$t = (array) get_taxonomy($taxonomy);
if ( ! $t['public'] )
if ( ! $t['public'] || ! $t['show_ui'] )
continue;
if ( empty($t['label']) )
$t['label'] = $taxonomy;