mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
049b5321d6
commit
4c1c30fbd6
@ -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