layers_allow_json_uploads

The Layers layers allow json uploads function.

Description

layers_allow_json_uploads( $mime_types ); 

Parameters (1)

0. $mime_types
The mime types.

Usage

  1. if ( !function_exists( 'layers_allow_json_uploads' ) ) { 
  2. require_once '/core/helpers/template.php'; 
  3.  
  4. // The mime types. 
  5. $mime_types = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = layers_allow_json_uploads($mime_types); 
  9.  

Defined (1)

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

/core/helpers/template.php  
  1. function layers_allow_json_uploads( $mime_types ) { 
  2. //Creating a new array will reset the allowed filetypes 
  3. $mime_types[ 'json|JSON' ] = 'application/json'; 
  4.  
  5. return $mime_types;