is_comments_popup()
云策文档标注
概述
is_comments_popup() 函数用于判断当前 URL 是否在评论弹出窗口中,但自 WordPress 4.5.0 起已被弃用,始终返回 false。
关键要点
- 函数 is_comments_popup() 已弃用,从 WordPress 4.5.0 版本开始不建议使用。
- 该函数始终返回 false,不再提供实际功能。
- 开发者应参考主题开发者手册中的条件标签文章,了解替代方案。
代码示例
function is_comments_popup() {
_deprecated_function( __FUNCTION__, '4.5.0' );
return false;
}注意事项
- 使用此函数会触发 _deprecated_function() 警告,建议更新代码以避免依赖已弃用的功能。
- 相关函数 _deprecated_function() 位于 wp-includes/functions.php 中,用于标记弃用函数。
原文内容
Determines whether the current URL is within the comments popup window.
Description
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Source
function is_comments_popup() {
_deprecated_function( __FUNCTION__, '4.5.0' );
return false;
}