WordPress.org

Make WordPress Core

Changeset 23986


Ignore:
Timestamp:
04/14/2013 01:43:01 AM (8 years ago)
Author:
markjaquith
Message:

Allow the content of no-title audio, video, quote, and image posts to be blanked.

props wonderboymusic. fixes #23623.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r23823 r23986  
    26562656    }
    26572657
     2658    if ( empty( $post_format ) )
     2659        $post_format = '';
     2660
    26582661    $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' );
     2662        && post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'excerpt' )
     2663        && ! in_array( $post_format, array( 'audio', 'video', 'quote', 'image' ) );
     2664
    26602665    if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
    26612666        if ( $wp_error )
Note: See TracChangeset for help on using the changeset viewer.