1
我是新來的PHP,並試圖通過Wordpress學習我的方式。在我的主題的functions.php文件中,我想訪問bbPress的插件template.php文件中可用的方法。我越來越"Unexpected token ['
訪問Wordpress插件的模板方法
裏面的bbPress插件的template.php:
function bbp_topic_reply_count($topic_id = 0, $integer = false) {
echo bbp_get_topic_reply_count($topic_id, $integer);
}
我訪問我的當前主題的functions.php的這個功能:
$count = bbp_topic_reply_count(125);
我必須包括什麼從插件(即bbpress/template.php)?訪問這些模板方法的正確方法是什麼?
謝謝。