Z-Blog Wiki Z-Blog Wiki

Z-Blog官方文库

用户工具

站点工具


zblogphp:development:plugin:interfacestc:filter_plugin_post_call

案例(在文章调用页面添加新的文章属性)

function ActivePlugin_tc_cs() {
    Add_Filter_Plugin('Filter_Plugin_Post_Call', 'ytecn_post_call');
}
 
function ytecn_post_call($member,$method, $args){
    global $zbp;
    if($method == 'abc'){
        $GLOBALS['hooks']['Filter_Plugin_Post_Call']['ytecn_post_call']=PLUGIN_EXITSIGNAL_RETURN;
        return "这里输出abc";
    }
}

然后在文章页调用

{$article->abc()}
就会输出“这里输出abc”

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