Make WordPress Core


Ignore:
Timestamp:
11/01/2014 02:57:31 AM (11 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r30055 r30141  
    789789    $level = 0;
    790790    if ( is_taxonomy_hierarchical($taxonomy) ) {
    791         $level = count( get_ancestors( $tag->term_id, $taxonomy ) );
     791        $level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
    792792        ob_start();
    793793        $wp_list_table->single_row( $tag, $level );
Note: See TracChangeset for help on using the changeset viewer.