I’ve been searching high and low for an answer.

I simply want to remove the Alternate Text, Caption, Description and Link URL-fields from the uploader and gallery view.

I seem that every thing else than this Media-thingy can be removed.

Thanx for helping out:)

5 Answers
5

You can do this via a filter. Add the following to functions.php. You can also add your own fields this way…

// edit fields in media upload area
add_filter('attachment_fields_to_edit', 'remove_media_upload_fields', 10000, 2);
function remove_media_upload_fields( $form_fields, $post ) {

    // remove unnecessary fields
    unset( $form_fields['image-size'] );
    unset( $form_fields['post_excerpt'] );
    unset( $form_fields['post_content'] );
    unset( $form_fields['url'] );
    unset( $form_fields['image_url'] );
    unset( $form_fields['align'] );

    return $form_fields;
}

The example above strips out more than you need to but if you do a print_r() on the $form_fields variable you’ll see what’s available to add/remove.

Leave a Reply

Your email address will not be published. Required fields are marked *