WP_Media_List_Table::handle_row_actions( WP_Post $item, string $column_name, string $primary ): string

Generates and displays row action links.


Parameters

$item WP_Post Required
Attachment being acted upon.
$column_name string Required
Current column name.
$primary string Required
Primary column name.

Top ↑

Return

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


Top ↑

Source

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

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

	// Restores the more descriptive, specific name for use within this method.
	$post = $item;

	$att_title = _draft_or_post_title();
	$actions   = $this->_get_row_actions( $post, $att_title );

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


Top ↑

Changelog

Changelog
Version Description
5.9.0 Renamed $post to $item to match parent class for PHP 8 named parameter support.
4.3.0 Introduced.

Top ↑

User Contributed Notes

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