如何在 redux 框架中设置模板路径?

How to set template path in redux framework?

我需要在我的主题中自定义面板模板,我使用的是 redux。我将 ReduxCore->templates->panel 文件夹复制到 mythemefolder->redux-framework->ReduxCore->templates->panel 中。

对于某些插件,这会覆盖插件中的模板,但这里不是这种情况,我发现我需要手动告诉 redux 在插件内的默认文件夹以外的其他地方寻找模板。但我不知道该怎么做。

我尝试在 redux 配置文件中添加 'templates_path' => dirname(__FILE__).'/templates/panel', ,但它只是抛出错误 Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW)

然后我在 redux docx,(https://docs.reduxframework.com/core/advanced/filter-hooks/) 中找到了另一种方式来放置 redux/{opt_name}/panel/templates_path,但它没有参考如何放置此代码或将其放置在何处。

有人可以帮我吗?

https://docs.redux.io/guides/advanced/panel-templates.html

Redux::setArgs('opt_name', array('templates_path'=> dirname(__FILE__).'/templates/panel/'));

应该这样做。