- public function display_rows() {
- global $post;
-
- add_filter( 'the_title','esc_html' );
- $alt = '';
-
- while ( have_posts() ) : the_post();
- $user_can_edit = current_user_can( 'edit_post', $post->ID );
-
- if ( $this->is_trash && $post->post_status != 'trash'
- || !$this->is_trash && $post->post_status == 'trash' )
- continue;
-
- $alt = ( 'alternate' == $alt ) ? '' : 'alternate';
- $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
- $att_title = _draft_or_post_title();
-?>
- <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
-<?php
-
-list( $columns, $hidden ) = $this->get_column_info();
-foreach ( $columns as $column_name => $column_display_name ) {
- $class = "class='$column_name column-$column_name'";
-
- $style = '';
- if ( in_array( $column_name, $hidden ) )
- $style = ' style="display:none;"';
+ /**
+ * Handles the checkbox column output.
+ *
+ * @since 4.3.0
+ * @access public
+ *
+ * @param WP_Post $post The current WP_Post object.
+ */
+ public function column_cb( $post ) {
+ if ( current_user_can( 'edit_post', $post->ID ) ) { ?>
+ <label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>"><?php
+ echo sprintf( __( 'Select %s' ), _draft_or_post_title() );
+ ?></label>
+ <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
+ <?php }
+ }