WordPress 3.8.2
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-posts-list-table.php
index 016a726b74b1270709ae84a1ae1258c3a7b6133f..500541119dbf504e6f05ddd5ef1c8cc64db497a7 100644 (file)
@@ -491,6 +491,13 @@ class WP_Posts_List_Table extends WP_List_Table {
                        $classes .= ' wp-locked';
                        $lock_holder = get_userdata( $lock_holder );
                }
+
+               if ( $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
@@ -832,7 +839,7 @@ class WP_Posts_List_Table extends WP_List_Table {
        <?php if ( !$bulk ) echo $authors_dropdown;
        endif; // post_type_supports author
 
-       if ( !$bulk ) :
+       if ( !$bulk && $can_publish ) :
        ?>
 
                        <div class="inline-edit-group">