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

git-svn-id: https://develop.svn.wordpress.org/trunk@16477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2010-11-19 04:32:33 +00:00
parent 6d3ae66a3b
commit 94737b9d3b

View File

@ -5246,7 +5246,7 @@ function wp_quickpress_form( $args = array(), $post_type = 'post'){
*/
function get_post_format_strings() {
$strings = array(
'0' => _x( 'Default', 'Post format' ),
'default' => _x( 'Default', 'Post format' ), // Special case. any value that evals to false will be considered default
'aside' => _x( 'Aside', 'Post format' ),
'chat' => _x( 'Chat', 'Post format' ),
'gallery' => _x( 'Gallery', 'Post format' ),
@ -5269,7 +5269,10 @@ function get_post_format_strings() {
*/
function get_post_format_string( $slug ) {
$strings = get_post_format_strings();
return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
if ( !$slug )
return $strings['default'];
else
return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
}
/**