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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-11-05 03:04:13 +00:00
parent 7616a6cafb
commit a4ac7eca6f
6 changed files with 24 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -1503,6 +1503,11 @@ th.sorted-desc .sorting-indicator, th.sorted-asc:hover .sorting-indicator {
padding: 0 0 .2em 1px;
}
span.post-state span {
font-weight: normal;
color: #555;
}
/*------------------------------------------------------------------------------
10.1 - Inline Editing

View File

@ -158,13 +158,11 @@ echo esc_html( $visibility_trans ); ?></span>
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) :
$post_formats = get_theme_support( 'post-formats' );
$post_formats_display = get_post_format_strings();
if ( is_array( $post_formats[0] ) ) :
$post_format = get_post_format( $post->ID );
if ( !$post_format )
$post_format = '0';
$post_format_display = $post_formats_display[$post_format];
$post_format_display = get_post_format_string( $post_format );
?>
<div class="misc-pub-section" id="post-formats"><label for="post-format"><?php _e( 'Format:' ); ?></label>
@ -175,7 +173,7 @@ if ( is_array( $post_formats[0] ) ) :
<select id="post-format" name="post_format">
<option value="0" <?php selected( $post_format, '0' ); ?>><?php _e('Default'); ?></option>
<?php foreach ( $post_formats[0] as $format ) : ?>
<option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( $post_formats_display[$format] ); ?></option>
<option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
<?php endforeach; ?>
</select>
<a href="#post-formats" class="save-post-format hide-if-no-js button"><?php _e('OK'); ?></a>

View File

@ -1608,6 +1608,8 @@ function _post_states($post) {
$post_states[] = _x('Pending', 'post state');
if ( is_sticky($post->ID) )
$post_states[] = __('Sticky');
if ( get_post_format( $post->ID ) )
$post_states[] = '<span>[</span>' . get_post_format_string( get_post_format( $post->ID ) ) . '<span>]</span>';
$post_states = apply_filters( 'display_post_states', $post_states );

View File

@ -5229,7 +5229,18 @@ function get_post_format_strings() {
'status' => _x( 'Status', 'Post format' ),
'video' => _x( 'Video', 'Post format' )
);
return apply_filters( 'post_format_strings', $strings );
return $strings;
}
?>
/**
* Returns a pretty, translated version of a post format slug
*
* @param string $slug A post format slug
* @return string The translated post format name
*/
function get_post_format_string( $slug ) {
$strings = get_post_format_strings();
return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
}
?>

View File

@ -467,7 +467,7 @@ function wp_default_styles( &$styles ) {
// Any rtl stylesheets that don't have a .dev version for ltr
$no_suffix = array( 'farbtastic' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20101104' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20101104b' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );