Taxonomy: Add level-n classes to rows on edit-tags.php.
Props johnjamesjacoby. Fixes #38810. Built from https://develop.svn.wordpress.org/trunk@44804 git-svn-id: http://core.svn.wordpress.org/trunk@44636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -332,7 +332,14 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
|
||||
$this->level = $level;
|
||||
|
||||
echo '<tr id="tag-' . $tag->term_id . '">';
|
||||
if ( $tag->parent ) {
|
||||
$count = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
|
||||
$level = 'level-' . $count;
|
||||
} else {
|
||||
$level = 'level-0';
|
||||
}
|
||||
|
||||
echo '<tr id="tag-' . $tag->term_id . '" class="' . $level . '">';
|
||||
$this->single_row_columns( $tag );
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user