Add level-X classes to the posts list table rows.

props jhned.
fixes #25791.

Built from https://develop.svn.wordpress.org/trunk@26244


git-svn-id: http://core.svn.wordpress.org/trunk@26151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-11-17 20:40:09 +00:00
parent fb69ea9028
commit 89005c8b31
1 changed files with 7 additions and 0 deletions

View File

@ -491,6 +491,13 @@ class WP_Posts_List_Table extends WP_List_Table {
$classes .= ' wp-locked';
$lock_holder = get_userdata( $lock_holder );
}
if ( false && $post->post_parent ) {
$count = count( get_post_ancestors( $post->ID ) );
$classes .= ' level-'. $count;
} else {
$classes .= ' level-0';
}
?>
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes, $post->ID ) ); ?>" valign="top">
<?php