WordPress.org

Make WordPress Core

Ticket #18713: 18713.diff

File 18713.diff, 663 bytes (added by nacin, 3 years ago)
  • wp-includes/post.php

     
    24352435                $previous_status = 'new'; 
    24362436        } 
    24372437 
    2438         if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) && ('attachment' != $post_type) ) { 
     2438        $empty_content = '' == $post_content && '' == $post_title && '' == $post_excerpt && 'attachment' != $post_type; 
     2439        if ( apply_filters( 'wp_insert_post_empty_content', $empty_content, $postarr ) ) { 
    24392440                if ( $wp_error ) 
    24402441                        return new WP_Error('empty_content', __('Content, title, and excerpt are empty.')); 
    24412442                else