WP_List_Table::handle_row_actions( object|array $item, string $column_name, string $primary ): string

In this article

Generates and display row actions links for the list table.

Parameters

$itemobject|arrayrequired
The item being acted upon.
$column_namestringrequired
Current column name.
$primarystringrequired
Primary column name.

Return

string The row actions HTML, or an empty string if the current column is not the primary column.

Source

protected function handle_row_actions( $item, $column_name, $primary ) {
	return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' .
		/* translators: Hidden accessibility text. */
		__( 'Show more details' ) .
	'</span></button>' : '';
}

Changelog

VersionDescription
4.3.0Introduced.

User Contributed Notes

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