type_url_form_file()
云策文档标注
概述
type_url_form_file() 是一个已弃用的 WordPress 函数,用于获取通用文件的插入 URL 表单。它已被 wp_media_insert_url_form('file') 替代。
关键要点
- 函数 type_url_form_file() 在 WordPress 3.3.0 版本中引入并已弃用。
- 它返回一个字符串,表示插入 URL 表单。
- 替代函数是 wp_media_insert_url_form('file'),用于创建外部 URL 的表单。
- 弃用信息通过 _deprecated_function() 标记。
代码示例
function type_url_form_file() {
_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
return wp_media_insert_url_form( 'file' );
}注意事项
自 WordPress 3.3.0 起,应使用 wp_media_insert_url_form('file') 替代此函数,以避免使用弃用功能。
原文内容
Handles retrieving the insert-from-URL form for a generic file.
Description
See also
Source
function type_url_form_file() {
_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
return wp_media_insert_url_form( 'file' );
}
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |