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:
parent
a08ef594ad
commit
c1cc5e3153
|
@ -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>';
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-alpha-44803';
|
||||
$wp_version = '5.2-alpha-44804';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue