Skip to content

Commit

Permalink
Allow any post format to be default, not just ones with explicit supp…
Browse files Browse the repository at this point in the history
…ort.

props SergeyBiryukov. fixes #24036.

git-svn-id: http://core.svn.wordpress.org/trunk@24089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed Apr 25, 2013
1 parent 601c0c2 commit 30d5fe1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions wp-admin/options-writing.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,21 @@
</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">
Expand Down

0 comments on commit 30d5fe1

Please sign in to comment.