Tribe_Meta_Box::fix_file_array( $files )

Fixes the odd indexing of multiple file uploads from the format: $_FILES[‘field’][‘key’][‘index’] To the more standard and appropriate: $_FILES[‘field’][‘index’][‘key’]


Source

File: lib/tribe-meta-box.php

	public static function fix_file_array( &$files ) {
		$output = array();
		foreach ( $files as $key => $list ) {
			foreach ( $list as $index => $value ) {
				$output[ $index ][ $key ] = $value;
			}
		}
		$files = $output;
	}