WordPress at a glance
function is not described

get_available_post_mime_types() WP 2.5.0

Get all available post MIME types for a given post type.

  • Global. wpdb. $wpdb WordPress database abstraction object.

No Hooks.

Return

Mixed.

Usage

get_available_post_mime_types( $type );
$type(string)

Default: 'attachment'

Code of get available post mime types: wp-admin/includes/post.php VER 5.0.3

<?php
function get_available_post_mime_types($type = 'attachment') {
	global $wpdb;

	$types = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type));
	return $types;
}