You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

更新Phlox Pro主题后WordPress及Elementor编辑器故障求助

解决Phlox Pro更新后Elementor失效及auxin_kses()未定义错误

问题现象

  • 更新Phlox Pro主题后,网站显示异常,Elementor编辑器无法正常运行
  • 尝试重装主题、插件等操作后问题仍未解决
  • 开启PHP日志后出现以下致命错误:
[21-Nov-2024 12:25:30 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function auxin_kses() in /www/htdocs/w01b33af/homepage.de/wp-content/plugins/auxin-elements/includes/elements/image.php:563
Stack trace:
#0 /www/htdocs/w01b33af/homepage.de/wp-content/plugins/auxin-elements/includes/elementor/widgets/image.php(729): auxin_widget_image_callback(Array)
#1 /www/htdocs/w01b33af/homepage.de/wp-content/plugins/elementor/includes/base/controls-stack.php(2325): Auxin\Plugin\CoreElements\Elementor\Elements\Image->render()
#2 /www/htdocs/w01b33af/homepage.de/wp-content/plugins/elementor/includes/base/widget-base.php(635): Elementor\Controls_Stack->render_by_mode()
#3 /www/htdocs/w01b33af/homepage.de/wp-content/plugins/elementor/includes/base/widget-base.php(776): Elementor\Widget_Base->render_content()
#4 /www/htdocs/w01b33af/homepage.de/wp-content/plugins/elementor/includes/base/element-base.php(483): Elementor\Widget_Base->print_content()
#5 /www/htdocs/w01b33af/homepage.de/wp-content/plugins/elementor/includes/base/element-base.php(144 in /www/htdocs/w01b33af/homepage.de/wp-content/plugins/auxin-elements/includes/elements/image.php on line 563

解决方案

  • 更新Auxin Elements插件:错误根源是Auxin Elements插件调用了Phlox Pro主题的auxin_kses()函数,但更新后的主题可能调整了该函数,升级插件到最新版本,确保与当前主题版本兼容。
  • 回滚Phlox Pro主题版本:如果最新版主题存在兼容性bug,暂时回滚到更新前的稳定版本,等待主题开发者发布修复补丁。
  • 临时添加缺失函数:若无法立即更新或回滚,可在Phlox Pro主题的functions.php文件末尾添加以下代码(操作前务必备份主题文件):
function auxin_kses( $content ) {
    return wp_kses_post( $content );
}

该代码用WordPress原生的wp_kses_post()函数模拟原auxin_kses()的功能,临时修复函数未定义问题。

内容的提问来源于stack exchange,提问作者Berkay Codes

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 05:27:34