WP_Media_List_Table::column_cb() – Handles the checkbox column output.

You appear to be a bot. Output may be restricted

Description

Handles the checkbox column output.

Usage

WP_Media_List_Table::column_cb( $item );

Parameters

$item
( WP_Post ) required – The current WP_Post object.

Returns

void

Source

File name: wordpress/wp-admin/includes/class-wp-media-list-table.php
Lines:

1 to 16 of 16
  public function column_cb( $item ) {
    // Restores the more descriptive, specific name for use within this method.
    $post = $item;

    if ( current_user_can( 'edit_post', $post->ID ) ) {
      ?>
			<label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>">
				<?php
        /* translators: Hidden accessibility text. %s: Attachment title. */
        printf( __( '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
    }
  }
 

 View on GitHub View on Trac