Make WordPress Core


Ignore:
Timestamp:
11/21/2012 10:18:59 AM (12 years ago)
Author:
koopersmith
Message:

Media: Dynamically generate attachment filters using get_post_mime_types().

Moves get_post_mime_types() from wp-admin/includes/post.php to wp-includes/post.php.

fixes #22514, see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r22722 r22743  
    21812181
    21822182/**
     2183 * Get default post mime types
     2184 *
     2185 * @since 2.9.0
     2186 *
     2187 * @return array
     2188 */
     2189function get_post_mime_types() {
     2190    $post_mime_types = array(   //  array( adj, noun )
     2191        'image' => array(__('Images'), __('Manage Images'), _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),
     2192        'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),
     2193        'video' => array(__('Video'), __('Manage Video'), _n_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),
     2194    );
     2195
     2196    return apply_filters('post_mime_types', $post_mime_types);
     2197}
     2198
     2199/**
    21832200 * Check a MIME-Type against a list.
    21842201 *
Note: See TracChangeset for help on using the changeset viewer.