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:
parent
fb69ea9028
commit
89005c8b31
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue