In WP_Posts_List_Table
, move the <th>
markup out of ->column_cb()
.
See #29881, [32740]. git-svn-id: https://develop.svn.wordpress.org/trunk@32752 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0eb50f80b9
commit
6c6638c163
@ -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>";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user