You can manually hook into the save_post
action and update the post’s content on save. Here’s a simple piece of code that does it:
add_action( 'save_post', 'update_post_content' );
function update_post_content($post_id) {
// If this is a revision, get real post ID
if ( $parent_id = wp_is_post_revision( $post_id ) ) {
$post_id = $parent_id;
}
// Get the current post type
$post_type = get_post_type($post_id);
// Check if it's a custom post type
if ( 'posttypehere' != $post_type ) return;
// unhook this function so it doesn't loop infinitely
remove_action( 'save_post', 'update_post_content' );
// update the post, which calls save_post again
wp_update_post(
array(
'ID' => $post_id,
'post_content' => 'content here'
)
);
// re-hook this function
add_action( 'save_post', 'update_post_content' );
}