It´s not a good idea make changes in WP´s core files. Instead, use the following code:
function custom_attachment_fields_to_edit($form_fields, $post) {
$form_fields["image_url"] = '';
$form_fields["url"] = '';
$form_fields["url"]["input"] = "hidden";
$form_fields["url"]["value"] = wp_get_attachment_url($post->ID);
return $form_fields;
}
add_filter("attachment_fields_to_edit", "custom_attachment_fields_to_edit", null, 2);
Hope it helps 🙂
Im having that problem too. Are there any solution for this?
In fact, this code is working very well. My apologies.
Case closed 🙂
Thanks tschramm! I used your code to also implement a next and previous thumbnail with next/prev links 😉