From 8cd425bf92400bf2eae6b354de7982e7790abfb9 Mon Sep 17 00:00:00 2001 From: markjaquith 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: http://svn.automattic.com/wordpress/trunk@16477 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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] : ''; } /**