check_upload_mimes()判断是否为允许上传的附件类型

目录

描述

Check an array of MIME types against a whitelist. All types not on the whitelist are filtered out, and only the allowed types are returned.

WordPress ships with a set of allowed upload file types, 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.

check_upload_mimes() 描述

用法

<?php check_upload_mimes$mimes ?>

check_upload_mimes() 用法

参数

$mimes

(array) (必填) MIME types to check.

默认值: None

check_upload_mimes() 参数

示例

check_upload_mimes() 示例

历史

添加于 版本: MU (WordPress 3.0.0)

check_upload_mimes() 历史

源文件

check_upload_mimes() 函数的代码位于 wp-includes/ms-functions.php

check_upload_mimes() 源文件

相关