gde_mimes_expanded

The Google Doc Embedder gde mimes expanded function.

Description

gde_mimes_expanded( array $types ); 

Parameters (1)

0. $types
The types.

Usage

  1. if ( !function_exists( 'gde_mimes_expanded' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions-admin.php'; 
  3.  
  4. // The types. 
  5. $types = array $types; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gde_mimes_expanded($types); 
  9.  

Defined (1)

The function is defined in the following location(s).

/functions-admin.php  
  1. function gde_mimes_expanded( array $types ) { 
  2. // expand the supported mime types so that every ext is its own key 
  3. foreach ( $types as $k => $v ) { 
  4. if ( strpos( "|", $k ) ) { 
  5. $subtypes = explode( "|", $k ); 
  6. foreach ( $subtypes as $type ) { 
  7. $newtypes[$type] = $v; 
  8. unset( $types[$k] ); 
  9. $types = array_merge( $types, $newtypes ); 
  10. return $types;