WordPress.org

Make WordPress Core

Ticket #38810: 38810.patch

File 38810.patch, 670 bytes (added by johnjamesjacoby, 4 years ago)
  • src/wp-admin/includes/class-wp-terms-list-table.php

    diff --git src/wp-admin/includes/class-wp-terms-list-table.php src/wp-admin/includes/class-wp-terms-list-table.php
    index 7d59624..ad8009b 100644
     
    325325
    326326                $this->level = $level;
    327327
    328                 echo '<tr id="tag-' . $tag->term_id . '">';
     328                if ( $tag->parent ) {
     329                    $count = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
     330                    $level = 'level-' . $count;
     331                } else {
     332                    $level = 'level-0';
     333                }
     334
     335                echo '<tr id="tag-' . $tag->term_id . '" class="' . $level . '">';
    329336                $this->single_row_columns( $tag );
    330337                echo '</tr>';
    331338        }