apply_filters( ‘media_row_actions’, string[] $actions, WP_Post $post, bool $detached )

Filters the action links for each attachment in the Media list table.

Parameters

$actionsstring[]
An array of action links for each attachment.
Includes 'Edit', ‘Delete Permanently’, 'View', ‘Copy URL’ and ‘Download file’.
$postWP_Post
WP_Post object for the current attachment.
$detachedbool
Whether the list table contains media not attached to any posts. Default true.

Source

return apply_filters( 'media_row_actions', $actions, $post, $this->detached );

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    The above description of the $action parameter is confusing. The paramter consists of keys, which by default (as of this writing) are:
    edit, delete, view, copy, and download.

    Each key’s value is html to display in the action row.

    For example:

    array(
    'edit' => '<a href="proxy.php?url=https%3A%2F%2Fexample.com%2Fwp-admin%2Fpost.php%3Fpost%3D123%26amp%3Baction%3Dedit" aria-label="Edit “YardScaping_Spring-Lawn-Article_final_5-23-08”">Edit</a>',
    'view' => '<a href="proxy.php?url=https%3A%2F%2Ftrustees.ddev.site%2F%3Fattachment_id%3D43897" aria-label="View “YardScaping_Spring-Lawn-Article_final_5-23-08”" rel="bookmark">View</a>',
    ...
    )

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