Make WordPress Core


Ignore:
Timestamp:
01/24/2010 11:00:27 AM (15 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

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

    r12798 r12818  
    611611    }
    612612
    613     echo _tag_row( $tag, '', $taxonomy );
     613    $level = 0;
     614    $tag_full_name = false;
     615    if ( is_taxonomy_hierarchical($taxonomy) ) {
     616        $tag_full_name = $tag->name;
     617        $_tag = $tag;
     618        while ( $_tag->parent ) {
     619            $_tag = get_term( $_tag->parent, $taxonomy );
     620            $tag_full_name = $_tag->name . ' — ' . $tag_full_name;
     621            $level++;
     622        }
     623        $tag_full_name = esc_attr($tag_full_name); 
     624    }
     625    echo _tag_row( $tag, $level, $tag_full_name, $taxonomy );
    614626    exit;
    615627    break;
     
    12111223                    die( __('Tag not updated.') );
    12121224
    1213                 echo _tag_row($tag, '', $taxonomy);
     1225                echo _tag_row($tag, 0, '', $taxonomy);
    12141226            } else {
    12151227                die( __('Tag not updated.') );
Note: See TracChangeset for help on using the changeset viewer.