I'm not sure if this answers the question directly but I was trying to get a "URL" column on the Media Library page (to avoid clicking the edit link every time...) and found this code snippet which does exactly that.
I played with it a little to get it to sort the URLs alphabetically and to strip the domain, to improve my workflow a bit more. Check it out:
<?php
function muc_column($cols) {
$cols["media_url"] = "URL";
return $cols;
}
function muc_value($column_name, $id) {
if ($column_name == "media_url")
$subject = wp_get_attachment_url($id);
$grab = array("http://example.com", "http://another.example.com");
$replaceWith = '';
$path = str_replace($grab, $replaceWith, $subject);
echo '<input
type="text"
width="100%"
onclick="jQuery(this).select();"
value="'.$path.'" />';
}
function muc_column_sortable($cols) {
$cols["media_url"] = "name";
return $cols;
}
add_filter('manage_media_columns', 'muc_column');
add_action('manage_media_custom_column', 'muc_value', 10, 2);
add_filter('manage_upload_sortable_columns', 'muc_column_sortable');
?>
I should mention it also presents the URL in an <input>
that automatically selects the text when clicked, a nice feature for a quick copy and paste.