gde_mimes_expanded
The WordPress Core gde mimes expanded function.
Description
gde_mimes_expanded( array $types );
Parameters (1)
- 0. $types
- The types.
Usage
if ( !function_exists( 'gde_mimes_expanded' ) ) { require_once '/functions-admin.php'; } // The types. $types = array $types; // NOTICE! Understand what this does before running. $result = gde_mimes_expanded($types);
Defined (1)
The function is defined in the following location(s).
- /functions-admin.php
- function gde_mimes_expanded( array $types ) {
- // expand the supported mime types so that every ext is its own key
- foreach ( $types as $k => $v ) {
- if ( strpos( "|", $k ) ) {
- $subtypes = explode( "|", $k );
- foreach ( $subtypes as $type ) {
- $newtypes[$type] = $v;
- unset( $types[$k] );
- }
- $types = array_merge( $types, $newtypes );
- }
- }
- return $types;
- }