Make WordPress Core


Ignore:
Timestamp:
01/14/2015 10:13:03 PM (10 years ago)
Author:
helen
Message:

List tables: Use CSS :nth-child() selectors for zebra striping.

Note that this does not fix issues related to comment quick edit. Internal linking also continues to use the .alternate class for now. IE8 and below gracefully degrade by not having zebra striping.

There is some hoop jumping with adding an extra table row to maintain zebra striping during quick edit. Documenting that here for future reference; it is also in the inline documentation.

fixes #30981 and #26060. see #25060.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r31162 r31181  
    269269
    270270        add_filter( 'the_title','esc_html' );
    271         $alt = '';
    272271
    273272        while ( have_posts() ) : the_post();
     
    278277                continue;
    279278
    280             $alt = ( 'alternate' == $alt ) ? '' : 'alternate';
    281279            $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
    282280            $att_title = _draft_or_post_title();
    283281?>
    284     <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
     282    <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
    285283<?php
    286284
Note: See TracChangeset for help on using the changeset viewer.