Allow any post format to be default, not just ones with explicit support.
props SergeyBiryukov. fixes #24036. git-svn-id: http://core.svn.wordpress.org/trunk@24089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
601c0c2e52
commit
30d5fe1b41
|
@ -79,23 +79,21 @@ wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'o
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if ( current_theme_supports( 'post-formats' ) ) :
|
$post_formats = get_post_format_strings();
|
||||||
$post_formats = get_theme_support( 'post-formats' );
|
unset( $post_formats['standard'] );
|
||||||
if ( is_array( $post_formats[0] ) ) :
|
|
||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
|
<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="default_post_format" id="default_post_format">
|
<select name="default_post_format" id="default_post_format">
|
||||||
<option value="0"><?php _e('Standard'); ?></option>
|
<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
|
||||||
<?php foreach ( $post_formats[0] as $format ): ?>
|
<?php foreach ( $post_formats as $format_slug => $format_name ): ?>
|
||||||
<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<?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; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; endif;
|
<?php
|
||||||
|
|
||||||
if ( get_option( 'link_manager_enabled' ) ) :
|
if ( get_option( 'link_manager_enabled' ) ) :
|
||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
|
Loading…
Reference in New Issue