preview_theme()
云策文档标注
概述
preview_theme() 函数用于启动主题预览输出缓冲区,但已在 WordPress 4.3.0 版本中被弃用。该函数仅在用户有权限且存在模板和预览查询变量时执行任务。
关键要点
- preview_theme() 函数已弃用,不建议在新代码中使用。
- 函数功能是启动主题预览输出缓冲区,但需满足权限和查询变量条件。
- 相关函数 _deprecated_function() 用于标记弃用函数并通知使用情况。
注意事项
- 自 WordPress 4.3.0 起,preview_theme() 已被弃用,开发者应避免使用并寻找替代方案。
- 函数仅在特定条件下执行,需确保用户权限和查询变量设置正确。
原文内容
Start preview theme output buffer.
Description
Will only perform task if the user has permissions and template and preview query variables exist.
Source
function preview_theme() {
_deprecated_function( __FUNCTION__, '4.3.0' );
}