Changeset 25322 for branches/3.6
- Timestamp:
- 09/10/2013 06:41:43 PM (11 years ago)
- Location:
- branches/3.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.6
- Property svn:mergeinfo changed
/trunk/src merged: 25317
- Property svn:mergeinfo changed
-
branches/3.6/wp-includes/functions.php
r24918 r25322 2007 2007 * @uses wp_get_upload_mime_types() to fetch the list of mime types 2008 2008 * 2009 * @param int|WP_User $user Optional. User to check. Defaults to current user. 2009 2010 * @return array Array of mime types keyed by the file extension regex corresponding to those types. 2010 2011 */ 2011 function get_allowed_mime_types() { 2012 return apply_filters( 'upload_mimes', wp_get_mime_types() ); 2012 function get_allowed_mime_types( $user = null ) { 2013 $t = wp_get_mime_types(); 2014 2015 unset( $t['swf'], $t['exe'] ); 2016 $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' ); 2017 if ( ! $unfiltered ) 2018 unset( $t['htm|html'] ); 2019 2020 return apply_filters( 'upload_mimes', $t, $user ); 2013 2021 } 2014 2022
Note: See TracChangeset
for help on using the changeset viewer.