mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
* Declare $site_mimes before using it in check_upload_mimes().
* Use the same default value for 'upload_filetypes' as on Network Settings screen. props rmccue. fixes #29512 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@29718 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1745,7 +1745,8 @@ function recurse_dirsize( $directory ) {
|
||||
* @return array
|
||||
*/
|
||||
function check_upload_mimes( $mimes ) {
|
||||
$site_exts = explode( ' ', get_site_option( 'upload_filetypes' ) );
|
||||
$site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
|
||||
$site_mimes = array();
|
||||
foreach ( $site_exts as $ext ) {
|
||||
foreach ( $mimes as $ext_pattern => $mime ) {
|
||||
if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )
|
||||
|
||||
Reference in New Issue
Block a user