wp_embed_handler_video
云策文档标注
概述
wp_embed_handler_video 是一个 WordPress 过滤器,用于修改视频嵌入的输出。它允许开发者自定义视频嵌入的渲染方式。
关键要点
- 过滤器名称:wp_embed_handler_video
- 参数:$video(视频嵌入输出字符串)、$attr(嵌入属性数组)、$url(原始匹配的 URL)、$rawattr(原始未修改的属性数组)
- 返回值:通过 apply_filters 返回修改后的视频嵌入输出
- 相关函数:wp_embed_handler_video() 作为视频嵌入处理器的回调函数
- 引入版本:WordPress 3.6.0
原文内容
Filters the video embed output.
Parameters
$videostring-
Video embed output.
$attrarray-
An array of embed attributes.
$urlstring-
The original URL that was matched by the regex.
$rawattrarray-
The original unmodified attributes.
Source
return apply_filters( 'wp_embed_handler_video', $video, $attr, $url, $rawattr );
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |