Make WordPress Core

Changeset 32752


Ignore:
Timestamp:
06/13/2015 03:13:47 PM (11 years ago)
Author:
wonderboymusic
Message:

In WP_Posts_List_Table, move the <th> markup out of ->column_cb().

See #29881, [32740].

File:
1 edited

Legend:

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

    r32749 r32752  
    683683         */
    684684        public function column_cb( $post ) {
    685                 $can_edit_post = current_user_can( 'edit_post', $post->ID );
    686                 $title = _draft_or_post_title();
    687                 ?>
    688                 <th scope="row" class="check-column">
    689                 <?php if ( $can_edit_post ) { ?>
    690                         <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php printf( __( 'Select %s' ), $title ); ?></label>
     685                if ( current_user_can( 'edit_post', $post->ID ) ): ?>
     686                        <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php
     687                                printf( __( 'Select %s' ), _draft_or_post_title() );
     688                        ?></label>
    691689                        <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
    692690                        <div class="locked-indicator"></div>
    693                 <?php } ?>
    694                 </th>
    695                 <?php
     691                <?php endif;
    696692        }
    697693
     
    981977
    982978                        if ( 'cb' === $column_name ) {
     979                                echo '<th scope="row" class="check-column">';
     980
    983981                                $this->column_cb( $item );
     982
     983                                echo '</th>';
    984984                        } else {
    985985                                echo "<td $attributes>";
Note: See TracChangeset for help on using the changeset viewer.