{$type}_upload_iframe_src
云策文档标注
概述
此文档介绍了一个 WordPress 过滤器钩子,用于修改特定媒体类型上传 iframe 的源 URL。钩子名称是动态的,基于媒体类型。
关键要点
- 钩子名称:{$type}_upload_iframe_src,其中 $type 是媒体类型(例如 image 或 media)。
- 参数:$upload_iframe_src(字符串),表示上传 iframe 的源 URL。
- 用法:通过 apply_filters 调用,允许开发者过滤和修改 URL。
- 相关函数:get_upload_iframe_src() 用于检索上传 iframe 源 URL。
- 版本历史:自 WordPress 3.0.0 版本引入。
原文内容
Filters the upload iframe source URL for a specific media type.
Description
The dynamic portion of the hook name, $type, refers to the type of media uploaded.
Possible hook names include:
image_upload_iframe_srcmedia_upload_iframe_src
Parameters
$upload_iframe_srcstring-
The upload iframe source URL.
Source
$upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |