We don’t have a specific hook to do that, but since we use the wp_insert_post method on one of our custom ajax calls, you could use one of the default WordPress hooks. The following snippet will set the post status to publish when it was created by the quick add feature.
function ac_set_published_on_quick_add( $postID ) {
// Check fo the Quick Add ajax call
if ( 'acp_add_new_inline' !== filter_input( INPUT_POST, 'ac_action' ) ) {
return;
}
// Remove hook again, otherwise it will loop endlessly
remove_action( 'wp_insert_post', 'ac_set_published_on_quick_add', 10 );
// Set post status to Publish
wp_update_post( array(
'ID' => $postID,
'post_status' => 'publish',
) );
}
add_action( 'wp_insert_post', 'ac_set_published_on_quick_add', 10 );