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 match mime types

Contents

Description

Check a MIME-Type against a list.

If the wildcard_mime_types parameter is a string, it must be comma separated list. If the real_mime_types is a string, it is also comma separated to create the list.

Usage

<?php wp_match_mime_types$wildcard_mime_types$real_mime_types ); ?>

Parameters

$wildcard_mime_types
(string|array) (required) e.g. audio/mpeg or image (same as image/*) or flash (same as *flash*).
Default: None
$real_mime_types
(string|array) (required) post_mime_type values
Default: None

Return Values

(array) 
Description.

Change Log

Since: 2.5

Source File

wp_match_mime_types() is located in wp-includes/post.php