get_header_video_url
云策文档标注
概述
本文档介绍 WordPress 中的 get_header_video_url 过滤器,用于修改自定义头部视频的 URL。该过滤器在 get_header_video_url() 函数中被调用,允许开发者动态调整视频源。
关键要点
- 过滤器名称:get_header_video_url
- 参数:$url(字符串类型,表示头部视频的 URL)
- 用法:通过 apply_filters 在主题文件中应用,例如 $url = apply_filters( 'get_header_video_url', $url );
- 相关函数:get_header_video_url(),位于 wp-includes/theme.php 文件中
- 引入版本:WordPress 4.7.3
原文内容
Filters the header video URL.
Parameters
$urlstring-
Header video URL, if available.
Source
$url = apply_filters( 'get_header_video_url', $url );
Changelog
| Version | Description |
|---|---|
| 4.7.3 | Introduced. |