Ticket #18713: 18713.2.diff
File 18713.2.diff, 873 bytes (added by , 14 years ago) |
---|
-
wp-includes/post.php
2439 2439 $previous_status = 'new'; 2440 2440 } 2441 2441 2442 if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) && ('attachment' != $post_type) ) { 2442 $empty_content = ! $post_content && ! $post_title && ! $post_excerpt && post_type_supports( $post_type, 'editor' ) 2443 && post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'excerpt' ); 2444 if ( apply_filters( 'wp_insert_post_empty_content', $empty_content, $postarr ) ) { 2443 2445 if ( $wp_error ) 2444 return new WP_Error( 'empty_content', __('Content, title, and excerpt are empty.'));2446 return new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.' ) ); 2445 2447 else 2446 2448 return 0; 2447 2449 }