Don't require titles for attachments. Props caesarsgrunt. fixes #11052

git-svn-id: http://svn.automattic.com/wordpress/trunk@12273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-11-24 16:52:32 +00:00
parent 049b5321d6
commit 4c1c30fbd6
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