Avoid error in ms-files.php after [25317].

Built from https://develop.svn.wordpress.org/trunk@25344


git-svn-id: http://core.svn.wordpress.org/trunk@25306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-09-11 04:49:10 +00:00
parent 1d27a97756
commit 1536779aaf
1 changed files with 4 additions and 2 deletions

View File

@ -2043,8 +2043,10 @@ function get_allowed_mime_types( $user = null ) {
$t = wp_get_mime_types(); $t = wp_get_mime_types();
unset( $t['swf'], $t['exe'] ); unset( $t['swf'], $t['exe'] );
if ( function_exists( 'current_user_can' ) )
$unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' ); $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
if ( ! $unfiltered )
if ( empty( $unfiltered ) )
unset( $t['htm|html'] ); unset( $t['htm|html'] );
return apply_filters( 'upload_mimes', $t, $user ); return apply_filters( 'upload_mimes', $t, $user );