Created
June 29, 2014 07:05
-
-
Save bhubbard/dc256db7482fb49abb88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Add Extra Media Type Filters to the WordPress Media Manager | |
function modify_post_mime_types( $post_mime_types ) { | |
// select the mime type, here: 'application/pdf' | |
// then we define an array with the label values | |
$post_mime_types['application/pdf'] = array( __( 'PDFs' ), __( 'Manage PDFs' ), _n_noop( 'PDF (%s)', 'PDFs (%s)' ) ); | |
// then we return the $post_mime_types variable | |
return $post_mime_types; | |
} | |
// Add Filter Hook | |
add_filter( 'post_mime_types', 'modify_post_mime_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment