Make WordPress Core


Ignore:
Timestamp:
11/04/2010 06:33:50 PM (14 years ago)
Author:
markjaquith
Message:

Translate and prettify post formats for display. Also, filterable by themes/plugins to add new ones. see #14746

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r16188 r16191  
    159159$post_formats = get_theme_support( 'post-formats' );
    160160
     161$post_formats_display = get_post_format_strings();
     162
    161163if ( is_array( $post_formats[0] ) ) :
    162164    $post_format = get_post_format( $post->ID );
    163165    if ( !$post_format )
    164166        $post_format = '0';
    165     $post_format_display = ( $post_format ) ? $post_format : __('Default');
     167    $post_format_display = $post_formats_display[$post_format];
    166168?>
    167169<div class="misc-pub-section" id="post-formats"><label for="post-format"><?php _e( 'Format:' ); ?></label>
     
    174176    <option value="0" <?php selected( $post_format, '0' ); ?>><?php _e('Default'); ?></option>
    175177    <?php foreach ( $post_formats[0] as $format ) : ?>
    176     <option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( $format ); ?></option>
     178    <option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( $post_formats_display[$format] ); ?></option>
    177179    <?php endforeach; ?>
    178180</select>
Note: See TracChangeset for help on using the changeset viewer.