WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/wp get mime types"

(Include more information about the function)
m (Usage)
Line 3: Line 3:
 
== Usage ==
 
== Usage ==
   
%%% <?php $mime_types = wp_get_mime_types() ?> %%%
+
<?php $mime_types = wp_get_mime_types() ?>
   
 
== Parameters ==
 
== Parameters ==

Revision as of 07:21, 14 December 2012

Description

Retrieve list of mime types and file extensions.

Usage

<?php $mime_types = wp_get_mime_types() ?>

Parameters

Return Values

(array) 
Array of mime types keyed by the file extension regex corresponding to those types.

Examples

Default Usage

Notes

Applies the filter mime_types to return value, passing the array of mime types. This filter should be used to add types, not remove them. To remove types use the upload_mimes filter.

Change Log

Source File

wp_get_mime_types() is located in wp-includes/functions.php

Related