Changeset 15632 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 09/18/2010 07:30:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r15630 r15632 560 560 561 561 $level = 0; 562 $tag_full_name = false;563 $tag_full_name = $tag->name;564 562 if ( is_taxonomy_hierarchical($taxonomy) ) { 565 $_tag = $tag; 566 while ( $_tag->parent ) { 567 $_tag = get_term( $_tag->parent, $taxonomy ); 568 $tag_full_name = $_tag->name . ' — ' . $tag_full_name; 569 $level++; 570 } 571 $noparents = $wp_list_table->single_row( $tag, $level, $taxonomy ); 572 } 573 $tag->name = $tag_full_name; 574 $parents = $wp_list_table->single_row( $tag, 0, $taxonomy); 563 $level = count( get_ancestors( $tag->term_id, $taxonomy ) ); 564 ob_start(); 565 $wp_list_table->single_row( $tag, $level ); 566 $noparents = ob_get_clean(); 567 } 568 569 ob_start(); 570 $wp_list_table->single_row( $tag ); 571 $parents = ob_get_clean(); 575 572 576 573 $x->add( array( … … 581 578 'what' => 'term', 582 579 'position' => $level, 583 'supplemental' => get_term( $tag->term_id, $taxonomy, ARRAY_A ) // Refetch as $tag has been contaminated by the full name.580 'supplemental' => $tag 584 581 ) ); 585 582 $x->send(); … … 1228 1225 } 1229 1226 1230 echo $wp_list_table->single_row( $tag , 0, $taxonomy);1227 echo $wp_list_table->single_row( $tag ); 1231 1228 } else { 1232 1229 if ( is_wp_error($updated) && $updated->get_error_message() )
Note: See TracChangeset
for help on using the changeset viewer.