Taxonomy: Add level-n
classes to rows on edit-tags.php.
Props johnjamesjacoby. Fixes #38810. git-svn-id: https://develop.svn.wordpress.org/trunk@44804 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8b9f7b4d6b
commit
0cc536e173
@ -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>';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user