Skip to content

Instantly share code, notes, and snippets.

@imjjss
Created May 17, 2012 05:09
Show Gist options
  • Save imjjss/2716576 to your computer and use it in GitHub Desktop.
Save imjjss/2716576 to your computer and use it in GitHub Desktop.
add media form fields to a specific mime type
<? php
$post_mime_type = ( 'audio/mpeg' == get_post_mime_type( $post ) ) ? 1 : 0;
if( 1 == $post_mime_type ) {
$form_fields[...] = array(...);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment