Z-Blog Wiki Z-Blog Wiki

Z-Blog官方文库

用户工具

站点工具


zblogphp:development:plugin:interfacestc:filter_plugin_postcomment_core

案例(晚上10点到次日8点之间留言的评论自动转到审核栏):

function ActivePlugin_ytecn() {
    Add_Filter_Plugin('Filter_Plugin_PostComment_Core','ytecn_postcomment_core');
}
 
function ytecn_postcomment_core(&$comment) {
    $a=date('H',time());
    $a=(int)$a;
    if($a>=22){
        $states=1;
    }
    if($a<8){
        $states=1;
    }
    if($states == 1){
        $comment->IsChecking=1;
    }
}

zblogphp/development/plugin/interfacestc/filter_plugin_postcomment_core.txt · 最后更改: 2020/08/31 15:33 由 唐朝