Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //allow to upload swf and exe and...
- function UploadOtherMimes ($mimes) {
- if ( function_exists( 'current_user_can' ) )
- $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
- if ( !empty( $unfiltered ) ) {
- $mimes = array( 'swf' => 'application/x-shockwave-flash',
- 'exe' => 'application/x-msdownload',
- 'zip' => 'multipart/x-zip',
- 'mp3' => 'audio/x-mpeg' );
- }
- return $mimes;
- }
- add_filter('upload_mimes','UploadOtherMimes');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement