Title: media_row_actions
Published: April 25, 2014
Last modified: February 24, 2026

---

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

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#wp--skip-link--target)

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#parameters)󠁿

 `$actions`string[]

An array of action links for each attachment.
 Includes `'Edit'`, ‘Delete Permanently’,`'
View'`, ‘Copy URL’ and ‘Download file’.

`$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)

[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/) object for
the current attachment.

`$detached`bool

Whether the list table contains media not attached to any posts. Default true.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-media-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-wp-media-list-table.php#L874)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-media-list-table.php#L874-L874)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Media_List_Table::_get_row_actions()](https://developer.wordpress.org/reference/classes/wp_media_list_table/_get_row_actions/)`wp-admin/includes/class-wp-media-list-table.php` |  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/media_row_actions/?output_format=md#comment-content-7395)
 2.   [jakeparis](https://profiles.wordpress.org/jakeparis/)  [  6 months ago  ](https://developer.wordpress.org/reference/hooks/media_row_actions/#comment-7395)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fmedia_row_actions%2F%23comment-7395)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fmedia_row_actions%2F%23comment-7395)
 4. 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`.
 5. Each key’s value is html to display in the action row.
 6. For example:
     ` array( 'edit' => '<a href="https://example.com/wp-admin/post.php?
    post=123&action=edit" aria-label="Edit “YardScaping_Spring-Lawn-Article_final_5-
    23-08”">Edit</a>', 'view' => '<a href="https://trustees.ddev.site/?attachment_id
    =43897" aria-label="View “YardScaping_Spring-Lawn-Article_final_5-23-08”" rel="
    bookmark">View</a>', ... )
 7.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fmedia_row_actions%2F%3Freplytocom%3D7395%23feedback-editor-7395)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fmedia_row_actions%2F)
before being able to contribute a note or feedback.