Skip to content

Instantly share code, notes, and snippets.

@v9n
Created April 21, 2011 01:42
Show Gist options
  • Select an option

  • Save v9n/933491 to your computer and use it in GitHub Desktop.

Select an option

Save v9n/933491 to your computer and use it in GitHub Desktop.
media_row_actíons hook
add_filter ('media_row_actions','add_direct_link', 10, 3 );
function add_direct_link( $actions, $post, $detached ) {
$actions['file_url'] = '<a href="' . wp_get_attachment_url($post->ID) . '">Link</a>';
return $actions;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment