我有一个函数可以在每次发布或更新帖子时运行。现在我正在做
function myFunction(){
//Do Something
}
add_filter(\'publish_post\',\'myFunction\');
add_filter(\'wp_update_post\',\'myFunction\');
现在,当我这样做时,当我发布帖子或对
Status: Draft/Pending Review
(如附图所示),不调用该函数。要钩住哪个函数来运行我的函数
Status
改变

Got it to work. Answer below