WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/19/2010 04:32:33 AM (9 years ago)
Author:
markjaquith
Message:

Use "default" as the key (not "0") for the default post format string in the translation array. props josephscott

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r16469 r16477  
    52475247function get_post_format_strings() {
    52485248    $strings = array(
    5249         '0'       => _x( 'Default', 'Post format' ),
     5249        'default' => _x( 'Default', 'Post format' ), // Special case. any value that evals to false will be considered default
    52505250        'aside'   => _x( 'Aside',   'Post format' ),
    52515251        'chat'    => _x( 'Chat',    'Post format' ),
     
    52705270function get_post_format_string( $slug ) {
    52715271    $strings = get_post_format_strings();
    5272     return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
     5272    if ( !$slug )
     5273        return $strings['default'];
     5274    else
     5275        return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
    52735276}
    52745277
Note: See TracChangeset for help on using the changeset viewer.