案例(在文章调用页面添加新的文章属性)
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”