admin管理员组文章数量:1130349
After saving a post I check the console and $is_autosave is simply not set
function save_func($post_id){
$is_autosave = wp_is_post_autosave( $post_id );
file_put_contents('php://stderr', print_r("Autosave: ".$is_autosave, TRUE));
}
add_action('save_post','save_func');
Output:
Autosave:
Technically since it's not an autosave the result should be:
Output:
Autosave: 0
After saving a post I check the console and $is_autosave is simply not set
function save_func($post_id){
$is_autosave = wp_is_post_autosave( $post_id );
file_put_contents('php://stderr', print_r("Autosave: ".$is_autosave, TRUE));
}
add_action('save_post','save_func');
Output:
Autosave:
Technically since it's not an autosave the result should be:
Output:
Autosave: 0
本文标签: autosaveWhy wpispostautosave doesn39t return anything
版权声明:本文标题:autosave - Why wp_is_post_autosave doesn't return anything? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749091277a2314556.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论