How to set default status to custom post type
Hook wp_insert_post_data filter to force a post status to be set as incomplete before it can be set as published. With the following code only a post that is set as incomplete can be saved: add_filter( ‘wp_insert_post_data’, ‘prevent_post_change’, 20, 2 ); function prevent_post_change( $data, $postarr ) { if ( ! isset($postarr[‘ID’]) || ! $postarr[‘ID’] ) … Read more