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:
Ryan Boren 2009-11-24 16:52:32 +00:00
parent e7b40483e9
commit 09dfc3b883
1 changed files with 1 additions and 1 deletions

View File

@ -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