check_upload_mimes [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Check an array of MIME types against a whitelist.
WordPress ships with a set of allowed upload filetypes, which is defined in wp-includes/functions.php in get_allowed_mime_types(). This function is used to filter that list against the filetype whitelist provided by Multisite Super Admins at wp-admin/network/settings.php.
Source
<?php
function check_upload_mimes( $mimes ) {
$site_exts = explode( ' ', get_site_option( 'upload_filetypes' ) );
foreach ( $site_exts as $ext ) {
foreach ( $mimes as $ext_pattern => $mime ) {
if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )
$site_mimes[$ext_pattern] = $mime;
}
}
return $site_mimes;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- ms-functions.php
May 7, 2010 ... Overview. Functions add_existing_user_to_blog() add_new_user_to_blog() add_user_to_blog() check_upload_mimes() create_empty_blog() ...
www.tig12.net - PHP Invalid argument
Mar 9, 2012... do_enclose, get_allowed_mime_types, apply_filters, call_user_func_array, check_upload_mimes, get_site_option, m_wpdb->query. I am not ...
premium.wpmudev.org - Wordpress Functions History Table - Ozh
check_import_new_users, 3.0, ·. check_pass_strength, 2.5, 2.8. check_post_keyword, 2.3, 2.8.5. check_server_timer, 2.7, ·. check_upload_mimes, 3.0, · ...
planetozh.com - Docs for page ms-functions.php
check_upload_mimes (line 1502). Check an array of MIME types against a ... array check_upload_mimes (array $mimes). array $mimes. create_empty_blog ...
phpdoc.wordpress.org