How to upload swf banner?

In latest WordPress versions starting from 3.6.1, .swf extention is no longer allowed by default. WordPress has disabled swf file uploads for security reasons.

But still if you want to uload the swf file as a banner on your site – please do below mentioned changes.

Open functions.php file from WPAdCenter folder and add new function to it

if ( !function_exists( ‘WPAdCenter_addSwf’ ) )
function WPAdCenter_addSwf($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;

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk