mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-02 11:21:57 +01:00
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:
parent
18827ed337
commit
b8eb353590
@ -682,17 +682,13 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
* @param WP_Post $post
|
* @param WP_Post $post
|
||||||
*/
|
*/
|
||||||
public function column_cb( $post ) {
|
public function column_cb( $post ) {
|
||||||
$can_edit_post = current_user_can( 'edit_post', $post->ID );
|
if ( current_user_can( 'edit_post', $post->ID ) ): ?>
|
||||||
$title = _draft_or_post_title();
|
<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php
|
||||||
?>
|
printf( __( 'Select %s' ), _draft_or_post_title() );
|
||||||
<th scope="row" class="check-column">
|
?></label>
|
||||||
<?php if ( $can_edit_post ) { ?>
|
|
||||||
<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php printf( __( 'Select %s' ), $title ); ?></label>
|
|
||||||
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
|
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
|
||||||
<div class="locked-indicator"></div>
|
<div class="locked-indicator"></div>
|
||||||
<?php } ?>
|
<?php endif;
|
||||||
</th>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -980,7 +976,11 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
$attributes = "class='$classes'";
|
$attributes = "class='$classes'";
|
||||||
|
|
||||||
if ( 'cb' === $column_name ) {
|
if ( 'cb' === $column_name ) {
|
||||||
|
echo '<th scope="row" class="check-column">';
|
||||||
|
|
||||||
$this->column_cb( $item );
|
$this->column_cb( $item );
|
||||||
|
|
||||||
|
echo '</th>';
|
||||||
} else {
|
} else {
|
||||||
echo "<td $attributes>";
|
echo "<td $attributes>";
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user