get_post_mime_types

Get default post mime types.

Description

(array) get_post_mime_types(); 

Returns (array)

List of post mime types.


Usage

  1. if ( !function_exists( 'get_post_mime_types' ) ) { 
  2. require_once ABSPATH . WPINC . '/post.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_post_mime_types(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post.php  
  1. function get_post_mime_types() { 
  2. $post_mime_types = array( // array( adj, noun ) 
  3. 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),  
  4. 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),  
  5. 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),  
  6. ); 
  7.  
  8. /** 
  9. * Filters the default list of post mime types. 
  10. * @since 2.5.0 
  11. * @param array $post_mime_types Default list of post mime types. 
  12. */ 
  13. return apply_filters( 'post_mime_types', $post_mime_types );