Created
November 28, 2012 13:00
-
-
Save caratage/4161104 to your computer and use it in GitHub Desktop.
Remove fields from Media Uploader overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'] ); | |
unset( $form_fields['image_alt'] ); | |
return $form_fields; | |
} | |
// print_r($formfields); to see what you can add/remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment