From 94737b9d3b8a3eccc1fc920d9439557af674ae8c Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 19 Nov 2010 04:32:33 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 4fcc44991d..af325fd6c1 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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] : ''; } /**