WP_Posts_List_Table::column_cb

Advertisement

Summery Summery

Handles the checkbox column output.

Syntax Syntax

WP_Posts_List_Table::column_cb( WP_Post $post )

Parameters Parameters

$post

(Required) The current WP_Post object.

Source Source

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

		unset( $children_pages[ $parent ] ); // Required in order to keep track of orphans.
	}

	/**
	 * Handles the checkbox column output.
	 *
	 * @since 4.3.0
	 *
	 * @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 the_ID(); ?>">
				<?php
					/* translators: %s: Post title. */
					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">
				<span class="locked-indicator-icon" aria-hidden="true"></span>
				<span class="screen-reader-text">
				<?php
				printf(

Advertisement

Changelog Changelog

Changelog
Version Description
4.3.0 Introduced.

Advertisement

Leave a Reply