Make WordPress Core


Ignore:
Timestamp:
12/19/2010 07:22:31 PM (14 years ago)
Author:
markjaquith
Message:

Only set default post format on new posts – not old ones. props nacin. fixes #15882

File:
1 edited

Legend:

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

    r16901 r17062  
    392392        $post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) );
    393393        $post = get_post( $post_id );
     394        if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) )
     395            set_post_format( $post, get_option( 'default_post_format' ) );
    394396    } else {
    395397        $post->ID = 0;
Note: See TracChangeset for help on using the changeset viewer.