Disable the post save process completely

function disable_save( $maybe_empty, $postarr ) {
    $maybe_empty = true;

    return $maybe_empty;
}
add_filter( 'wp_insert_post_empty_content', 'disable_save', 999999, 2 );

Because wp_insert_post_empty_content is set to true, WordPress thinks there is no title and no content and stops updating the post.

EDIT: An even shorter variant would be:

add_filter( 'wp_insert_post_empty_content', '__return_true', PHP_INT_MAX -1, 2 );

Leave a Comment