WordPress.org

Make WordPress Core

Ticket #24036: 24036.patch

File 24036.patch, 1.4 KB (added by SergeyBiryukov, 2 years ago)
  • wp-admin/options-writing.php

     
    7979</td> 
    8080</tr> 
    8181<?php 
    82 if ( current_theme_supports( 'post-formats' ) ) : 
    83         $post_formats = get_theme_support( 'post-formats' ); 
    84         if ( is_array( $post_formats[0] ) ) : 
     82$post_formats = get_post_format_strings(); 
     83unset( $post_formats['standard'] ); 
    8584?> 
    8685<tr valign="top"> 
    8786<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th> 
    8887<td> 
    8988        <select name="default_post_format" id="default_post_format"> 
    90                 <option value="0"><?php _e('Standard'); ?></option> 
    91 <?php foreach ( $post_formats[0] as $format ): ?> 
    92                 <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> 
     89                <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option> 
     90<?php foreach ( $post_formats as $format_slug => $format_name ): ?> 
     91                <option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option> 
    9392<?php endforeach; ?> 
    9493        </select> 
    9594</td> 
    9695</tr> 
    97 <?php endif; endif; 
    98  
     96<?php 
    9997if ( get_option( 'link_manager_enabled' ) ) : 
    10098?> 
    10199<tr valign="top">