Don't require titles for attachments. Props caesarsgrunt. fixes #11052
git-svn-id: https://develop.svn.wordpress.org/trunk@12273 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e7b40483e9
commit
09dfc3b883
@ -1610,7 +1610,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
|
||||
$previous_status = 'new';
|
||||
}
|
||||
|
||||
if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) ) {
|
||||
if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) && ('attachment' != $post_type) ) {
|
||||
if ( $wp_error )
|
||||
return new WP_Error('empty_content', __('Content, title, and excerpt are empty.'));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user