如何在functions文件引用文章发表、评论发表事件??
发表于 : 2019年 3月 6日 13:22
比如wordpress通过add_action这个函数出发动作,比如下面这个wp代码,在publish_post这个动作完成时,执行Clean_By_Publish:
请问,在typecho中如何实现呢???
参考连接:
https://www.wpdaxue.com/add_action.html
https://codex.wordpress.org/Plugin_API/Action_Reference
代码: 全选
add_action('publish_post', 'Clean_By_Publish', 0);
function Clean_By_Publish(){
return '111111';
}
请问,在typecho中如何实现呢???
参考连接:
https://www.wpdaxue.com/add_action.html
https://codex.wordpress.org/Plugin_API/Action_Reference