案例(在分类调用页面添加新的自定义函数)
function ActivePlugin_tc_cs() { Add_Filter_Plugin('Filter_Plugin_Category_Call', 'ytecn_category_call'); } function ytecn_category_call($ca,$method, $args){ global $zbp; if($method == 'abc'){ $GLOBALS['hooks']['Filter_Plugin_Post_Call']['ytecn_category_call']=PLUGIN_EXITSIGNAL_RETURN; return "这里输出abc"; } }
然后在分类页调用
{$cate->abc()}就会输出“这里输出abc”