Z-Blog Wiki Z-Blog Wiki

Z-Blog官方文库

用户工具

站点工具


zblogphp:development:plugin:interfacestc:filter_plugin_postpage_core

案例(晚上10点到次日8点之间发布的页面自动转到草稿栏):

function ActivePlugin_tc_cs() {
    Add_Filter_Plugin('Filter_Plugin_PostPage_Core','ytecn_postpage_core');
}
 
function ytecn_postpage_core(&$article) {
    $a=date('H',time());
    $a=(int)$a;
    if($a>=22){
        $states=1;
    }
    if($a<8){
        $states=1;
    }
    if($states == 1){
        $article->Status=1;
    }
}

zblogphp/development/plugin/interfacestc/filter_plugin_postpage_core.txt · 最后更改: 2020/07/25 15:38 由 唐朝