WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/05/2010 03:04:13 AM (10 years ago)
Author:
markjaquith
Message:

get_post_format_string() to get nice version of a post format slug. Try appending post format as a post-status label. Enclose in square brackets to help it stand out. Remove post format strings filter. If this is going to be standard, it should be standard. see #14746

File:
1 edited

Legend:

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

    r16196 r16198  
    159159$post_formats = get_theme_support( 'post-formats' );
    160160
    161 $post_formats_display = get_post_format_strings();
    162 
    163161if ( is_array( $post_formats[0] ) ) :
    164162    $post_format = get_post_format( $post->ID );
    165163    if ( !$post_format )
    166164        $post_format = '0';
    167     $post_format_display = $post_formats_display[$post_format];
     165    $post_format_display = get_post_format_string( $post_format );
    168166?>
    169167<div class="misc-pub-section" id="post-formats"><label for="post-format"><?php _e( 'Format:' ); ?></label>
     
    176174    <option value="0" <?php selected( $post_format, '0' ); ?>><?php _e('Default'); ?></option>
    177175    <?php foreach ( $post_formats[0] as $format ) : ?>
    178     <option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( $post_formats_display[$format] ); ?></option>
     176    <option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
    179177    <?php endforeach; ?>
    180178</select>
Note: See TracChangeset for help on using the changeset viewer.