Skip to content

Instantly share code, notes, and snippets.

@TimBHowe
Created October 21, 2013 19:33
Show Gist options
  • Save TimBHowe/7089563 to your computer and use it in GitHub Desktop.
Save TimBHowe/7089563 to your computer and use it in GitHub Desktop.
Sort WordPress media library by pdf file type.
//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