Z-Blog Wiki Z-Blog Wiki

Z-Blog官方文库

用户工具

站点工具


zblogphp:development:plugin:interfacestc:filter_plugin_category_call

案例(在分类调用页面添加新的自定义函数)

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”

zblogphp/development/plugin/interfacestc/filter_plugin_category_call.txt · 最后更改: 2020/07/29 11:35 由 唐朝