WordPress.org

Make WordPress Core

Ticket #23887: 23887.patch

File 23887.patch, 816 bytes (added by WraithKenny, 13 months ago)
  • wp-includes/post.php

     
    26562656        } 
    26572657 
    26582658        $maybe_empty = ! $post_content && ! $post_title && ! $post_excerpt && post_type_supports( $post_type, 'editor' ) 
    2659                 && post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'excerpt' ); 
     2659                && post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'excerpt' ) 
     2660                && ! in_array( get_post_format( $post_ID ), array( 'audio', 'video', 'quote', 'image', 'link' ) ); 
     2661 
    26602662        if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) { 
    26612663                if ( $wp_error ) 
    26622664                        return new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.' ) );