All pastes #564887 Raw Edit

MellerTime

public php v1 · immutable
·published 2007-06-13 19:37 UTC
rendered paste body
add_filter('upload_mimes', 'custom_upload_types');function custom_upload_types ( $mimes=array() ) {		// add to the array your extension => mime_type -- google around for the mime type	$mimes['rar'] = 'application/x-rar-compressed';		// you could also use this to remove certain default types	// unset( $mimes['ext'] );		// check the wp_check_filetype function in wp-inclues/functions.php to see the default list!		// now we be sure to return the newly modified list	return $mimes;	}