【发布时间】:2016-04-28 23:37:09
【问题描述】:
我有以下代码供 php 管理员使用。这段代码放在我的 WordPress 主题上,与一个插件有关:
$custom_css_style = mytheme_custom_css();
/* Enqueue The Font CSS */
$custom_font_css_style = upfw_enqueue_font_css();
//add custom style
wp_add_inline_style( 'main-stylesheet', $custom_css_style );
wp_add_inline_style( 'main-stylesheet', $custom_font_css_style );
一切正常,但当插件停用时,我收到 2 个错误:
致命错误:在第 198 行调用 D:\mytheme\SERVER-mytheme\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\mytheme\library\bones.php 中的未定义函数 upfw_enqueue_font_css()
第 198 行是:
$custom_font_css_style = upfw_enqueue_font_css();
第二个通知:
注意:未定义变量:第 201 行 D:\mytheme\SERVER-mytheme\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\mytheme\library\bones.php 中的 custom_font_css_style
第 201 行是:
wp_add_inline_style( 'main-stylesheet', $custom_font_css_style );
需要一个想法和帮助来解决我的问题。
感谢您的帮助。
问候
【问题讨论】:
标签: wordpress function plugins