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

git-svn-id: https://develop.svn.wordpress.org/trunk@25344 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-09-11 04:48:43 +00:00
parent adf6fab55b
commit a1470e6161

View File

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