diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 00069cd04a..96466b5743 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -247,7 +247,7 @@ function post_format_meta_box( $post, $box ) { if ( is_array( $post_formats[0] ) ) : $post_format = get_post_format( $post->ID ); if ( !$post_format ) - $post_format = get_option('default_post_format', '0'); + $post_format = '0'; $post_format_display = get_post_format_string( $post_format ); // Add in the current one if it isn't there yet, in case the current theme doesn't support it if ( $post_format && !in_array( $post_format, $post_formats[0] ) ) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index ce6c8b3bd7..9cacef3cf8 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -391,6 +391,8 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) wp_delete_post( $delete, true ); // Force delete $post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) ); $post = get_post( $post_id ); + if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) + set_post_format( $post, get_option( 'default_post_format' ) ); } else { $post->ID = 0; $post->post_author = '';