Merge Categories/Hierarchical taxonomies into edit-tags.php. See #11838

git-svn-id: https://develop.svn.wordpress.org/trunk@12818 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-01-24 11:00:27 +00:00
parent 46b0270ab7
commit bc3fbede7f
10 changed files with 155 additions and 54 deletions
+14 -2
View File
@@ -610,7 +610,19 @@ case 'add-tag' : // From Manage->Tags
exit;
}
echo _tag_row( $tag, '', $taxonomy );
$level = 0;
$tag_full_name = false;
if ( is_taxonomy_hierarchical($taxonomy) ) {
$tag_full_name = $tag->name;
$_tag = $tag;
while ( $_tag->parent ) {
$_tag = get_term( $_tag->parent, $taxonomy );
$tag_full_name = $_tag->name . ' — ' . $tag_full_name;
$level++;
}
$tag_full_name = esc_attr($tag_full_name);
}
echo _tag_row( $tag, $level, $tag_full_name, $taxonomy );
exit;
break;
case 'get-tagcloud' :
@@ -1210,7 +1222,7 @@ case 'inline-save-tax':
if ( !$tag || is_wp_error( $tag ) )
die( __('Tag not updated.') );
echo _tag_row($tag, '', $taxonomy);
echo _tag_row($tag, 0, '', $taxonomy);
} else {
die( __('Tag not updated.') );
}