wp_embed_handler_googlevideo()
云策文档标注
概述
wp_embed_handler_googlevideo() 是一个已弃用的 WordPress 函数,用于将 Google Video URL 转换为嵌入代码,但该服务已关闭,函数返回空字符串。
关键要点
- 函数已弃用,自 WordPress 4.6.0 版本起标记为 deprecated。
- 返回空字符串,不再处理 Google Video 嵌入。
- Google Video 服务已关闭,函数功能失效。
代码示例
function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
_deprecated_function( __FUNCTION__, '4.6.0' );
return '';
}注意事项
- 开发者应避免使用此函数,改用其他视频嵌入方案。
- 调用此函数会触发 _deprecated_function() 警告。
原文内容
The Google Video embed handler callback.
Description
Deprecated function that previously assisted in turning Google Video URLs into embeds but that service has since been shut down.
Source
function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
_deprecated_function( __FUNCTION__, '4.6.0' );
return '';
}