W3cubDocs

/WordPress

WP_Media_List_Table::column_cb( WP_Post $post )

Handles the checkbox column output.

Parameters

$post

(WP_Post) (Required) The current WP_Post object.

Source

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

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
				/* translators: %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
		}
	}

Changelog

Version Description
4.3.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_media_list_table/column_cb