WordPress at Your Fingertips
function is not described

WP_Links_List_Table::handle_row_actions() protected WP 4.3.0

Generates and displays row action links.

{} It's a method of the class: WP_Links_List_Table{}

No Hooks.

Return

String. Row actions output for links, or an empty string if the current column is not the primary column.

Usage

// protected - for code of main (parent) or child class
$result = $this->handle_row_actions( $link, $column_name, $primary );
$link(object) (required)
Link being acted upon.
$column_name(string) (required)
Current column name.
$primary(string) (required)
Primary column name.

Changelog

Since 4.3.0 Introduced.

Code of WP_Links_List_Table::handle_row_actions() WP 5.8.2

protected function handle_row_actions( $link, $column_name, $primary ) {
	if ( $primary !== $column_name ) {
		return '';
	}

	$edit_link = get_edit_bookmark_link( $link );

	$actions           = array();
	$actions['edit']   = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
	$actions['delete'] = sprintf(
		'<a class="submitdelete" href="%s" onclick="return confirm( \'%s\' );">%s</a>',
		wp_nonce_url( "link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ),
		/* translators: %s: Link name. */
		esc_js( sprintf( __( "You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ),
		__( 'Delete' )
	);

	return $this->row_actions( $actions );
}