这里会显示出您选择的修订版和当前版本之间的差别。
— |
zblogphp:development:plugin:interfacestc:filter_plugin_postcategory_core [2020/07/29 10:25] (当前版本) 唐朝 创建 |
||
---|---|---|---|
行 1: | 行 1: | ||
+ | 案例(禁止修改分类1的名称): | ||
+ | <code php> | ||
+ | function ActivePlugin_tc_cs() { | ||
+ | Add_Filter_Plugin('Filter_Plugin_PostCategory_Core','ytecn_postcategory_core'); | ||
+ | } | ||
+ | |||
+ | function ytecn_postcategory_core(&$cate) { | ||
+ | if($cate->ID == 1){ | ||
+ | $article->Name="公司新闻"; | ||
+ | } | ||
+ | } | ||
+ | </code> |