Consolidate post_mime_type code. props scribu. fixes #10992

git-svn-id: https://develop.svn.wordpress.org/trunk@12110 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2009-10-26 17:56:28 +00:00
parent ba1f1d3780
commit a556c8ce89
3 changed files with 24 additions and 20 deletions

View File

@@ -146,13 +146,7 @@ if ( isset($_GET['detached']) ) {
$page_links_total = ceil($wpdb->get_var( "SELECT FOUND_ROWS()" ) / 25);
}
$post_mime_types = array(
'image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')),
'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')),
'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')),
);
$post_mime_types = apply_filters('post_mime_types', $post_mime_types);
$post_mime_types = get_post_mime_types();
$avail_post_mime_types = get_available_post_mime_types('attachment');
if ( isset($_GET['post_mime_type']) && !array_intersect( (array) $_GET['post_mime_type'], array_keys($post_mime_types) ) )