2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.