Allow any post format to be default, not just ones with explicit support.

props SergeyBiryukov. fixes #24036.

git-svn-id: https://develop.svn.wordpress.org/trunk@24089 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2013-04-25 06:08:29 +00:00
parent 77731b116b
commit 25e521f40d
1 changed files with 6 additions and 8 deletions

View File

@ -79,23 +79,21 @@ wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'o
</td>
</tr>
<?php
if ( current_theme_supports( 'post-formats' ) ) :
$post_formats = get_theme_support( 'post-formats' );
if ( is_array( $post_formats[0] ) ) :
$post_formats = get_post_format_strings();
unset( $post_formats['standard'] );
?>
<tr valign="top">
<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
<td>
<select name="default_post_format" id="default_post_format">
<option value="0"><?php _e('Standard'); ?></option>
<?php foreach ( $post_formats[0] as $format ): ?>
<option<?php selected( get_option('default_post_format'), $format ); ?> value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
<?php foreach ( $post_formats as $format_slug => $format_name ): ?>
<option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<?php endif; endif;
<?php
if ( get_option( 'link_manager_enabled' ) ) :
?>
<tr valign="top">