WP_Links_List_Table::column_cb( object $item )

In this article

Handles the checkbox column output.

Parameters

$itemobjectrequired
The current link object.

Source

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

	?>
	<input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
	<label for="cb-select-<?php echo $link->link_id; ?>">
		<span class="screen-reader-text">
		<?php
		/* translators: Hidden accessibility text. %s: Link name. */
		printf( __( 'Select %s' ), $link->link_name );
		?>
		</span>
	</label>
	<?php
}

Changelog

VersionDescription
5.9.0Renamed $link to $item to match parent class for PHP 8 named parameter support.
4.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.