WordPress函数文档check_upload_mimes()

判断是否为允许上传的附件类型 描述 Check an array of MIME types against …

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

描述

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.

用法

<?php check_upload_mimes$mimes ?>

参数

$mimes

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

默认值: None

示例

历史

添加于 版本: MU (WordPress 3.0.0)

源文件

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

相关

wp_get_mime_types(),
get_allowed_mime_types(),
wp_check_filetype_and_ext()

  • 原文:http://codex.wordpress.org/Function_Reference/check_upload_mimes
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT