of_sanitize_upload

File upload sanitization.

Description

of_sanitize_upload( $input ); 

Parameters (1)

0. $input
The input.

Usage

  1. if ( !function_exists( 'of_sanitize_upload' ) ) { 
  2. require_once '/inc/options-sanitize.php'; 
  3.  
  4. // The input. 
  5. $input = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = of_sanitize_upload($input); 
  9.  

Defined (1)

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

/inc/options-sanitize.php  
  1. function of_sanitize_upload( $input ) { 
  2. $output = ''; 
  3. $filetype = wp_check_filetype($input); 
  4. if ( $filetype["ext"] ) { 
  5. $output = $input; 
  6. return $output;