There is a filter available for this. It is call document_to_private
.
If you wish to revert to standard processing, then create a file called wpdr_revert_private.php
in the directory wp-content/mu-plugins
.
You may need to create this sub-directory. Then copy this code into it:
<?php
add_filter( 'document_to_private', 'revert_private', 10, 2 );
if ( ! function_exists('revert_private') ) {
/**
* Reverts the document status from private.
*
* @since 0.5
*
* @param WP_Post $post link to (new) global post.
* @param WP_Post $post_pre link to clone of global post.
*/
function revert_private( $post, $post_pre ) {
return $post_pre;
}
}
The doc-comments are essentially those from the filter itself showing its parameters. The result will be that you get a draft post displayed that you can publish after you have uploaded a document file.
Hope this is of use,
Neil James