Created
October 21, 2013 19:33
-
-
Save TimBHowe/7089563 to your computer and use it in GitHub Desktop.
Sort WordPress media library by pdf file type.
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
//sort media library by pdf file type - http://wordpress.org/support/topic/filter-media-library-by-file-type | |
function modify_post_mime_types($post_mime_types) { | |
$post_mime_types['application/pdf'] = array(__('PDF'), __('Manage PDF'), _n_noop('PDF <span class="count">(%s)</span>', 'PDF <span class="count">(%s)</span>')); | |
return $post_mime_types; | |
} | |
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