WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/wp get mime types

Contents

Description

Retrieve list of mime types and file extensions.

Usage

<?php $mime_types wp_get_mime_types(); ?>

Parameters

None

Return Values

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

Examples

Default Usage

See usage above.

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