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

See #29881, [32740].

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


git-svn-id: http://core.svn.wordpress.org/trunk@32723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-13 15:14:24 +00:00
parent 18827ed337
commit b8eb353590
2 changed files with 10 additions and 10 deletions

View File

@ -682,17 +682,13 @@ class WP_Posts_List_Table extends WP_List_Table {
* @param WP_Post $post
*/
public function column_cb( $post ) {
$can_edit_post = current_user_can( 'edit_post', $post->ID );
$title = _draft_or_post_title();
?>
<th scope="row" class="check-column">
<?php if ( $can_edit_post ) { ?>
<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php printf( __( 'Select %s' ), $title ); ?></label>
if ( current_user_can( 'edit_post', $post->ID ) ): ?>
<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php
printf( __( 'Select %s' ), _draft_or_post_title() );
?></label>
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
<div class="locked-indicator"></div>
<?php } ?>
</th>
<?php
<?php endif;
}
/**
@ -980,7 +976,11 @@ class WP_Posts_List_Table extends WP_List_Table {
$attributes = "class='$classes'";
if ( 'cb' === $column_name ) {
echo '<th scope="row" class="check-column">';
$this->column_cb( $item );
echo '</th>';
} else {
echo "<td $attributes>";

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32751';
$wp_version = '4.3-alpha-32752';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.