A filter to modify the post data to be saved. This is called when a save was initiated from the PBS editor.



Array. The final post data to be saved, this is passed directly to wp_update_post() afterwards.


Array. The raw post data sent from the editor for saving. This has already been nonce verified.


Int. The post id which we are saving.


add_filter( 'pbs_save_content_data', 'save_always_as_draft', 10, 3 );

function save_always_as_draft( $post_data, $_post, $post_id ) {

	// For some reason, we always want the post to be a draft.
	$post_data['post_status'] = 'draft';
	return $post_data;