get_available_post_mime_types() – Get all available post MIME types for a given post type.
You appear to be a bot. Output may be restricted
Description
Gets all available post MIME types for a given post type.
Usage
$string[] = get_available_post_mime_types( $type );
Parameters
- $type
- ( string ) optional default: attachment –
Returns
string[] An array of MIME types.
Source
File name: wordpress/wp-includes/post.php
Lines:
1 to 6 of 6
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; }