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"

m (Usage)
(Return Values: Format return)
Line 7: Line 7:
 
== Parameters ==
 
== Parameters ==
 
== Return Values ==
 
== Return Values ==
{{Return||array|Array of mime types keyed by the file extension regex corresponding to those types.}}
+
  +
; (array) : Array of mime types keyed by the file extension regex corresponding to those types.
  +
 
== Examples ==
 
== Examples ==
   

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