Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // allow swf uploads
- // (swf uploads are disabled by default as a security hardening measure)
- // code goes in functions.php for your child theme
- add_filter('upload_mimes','allow_swfs');
- function allow_swfs($mimes) {
- if ( function_exists( 'current_user_can' ) )
- $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
- if ( !empty( $unfiltered ) ) {
- $mimes['swf'] = 'application/x-shockwave-flash';
- }
- return $mimes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement