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

git-svn-id: http://core.svn.wordpress.org/trunk@21240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-07-09 04:56:50 +00:00
parent 3e371b4587
commit 109768b788

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;