Allow resource_type to be specified in get_ancestors().

Being explicit about resource type (taxonomy vs post_type) allows for the
proper resolution of conflicts when a taxonomy and post_type share a slug.

Props filosofo.
Fixes #15029.

git-svn-id: https://develop.svn.wordpress.org/trunk@30141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges
2014-11-01 02:57:31 +00:00
parent 8dbaaf9927
commit d6b7b7aa41
3 changed files with 125 additions and 12 deletions

View File

@@ -788,7 +788,7 @@ function wp_ajax_add_tag() {
$level = 0;
if ( is_taxonomy_hierarchical($taxonomy) ) {
$level = count( get_ancestors( $tag->term_id, $taxonomy ) );
$level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
ob_start();
$wp_list_table->single_row( $tag, $level );
$noparents = ob_get_clean();