oembed_endpoint_url
云策文档标注
概述
本文档介绍了 WordPress 中的 oembed_endpoint_url 过滤器,用于修改 oEmbed 端点 URL。该过滤器允许开发者在获取 oEmbed 端点 URL 时自定义其值。
关键要点
- oembed_endpoint_url 是一个过滤器,用于过滤 oEmbed 端点 URL。
- 过滤器接受三个参数:$url(端点 URL)、$permalink(用于查询参数的固定链接)和 $format(请求的响应格式)。
- 该过滤器在 WordPress 4.4.0 版本中引入,常用于 get_oembed_endpoint_url() 函数中。
原文内容
Filters the oEmbed endpoint URL.
Parameters
$urlstring-
The URL to the oEmbed endpoint.
$permalinkstring-
The permalink used for the
urlquery arg. $formatstring-
The requested response format.
Source
return apply_filters( 'oembed_endpoint_url', $url, $permalink, $format );
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |