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:
parent
6d3ae66a3b
commit
94737b9d3b
@ -5246,7 +5246,7 @@ function wp_quickpress_form( $args = array(), $post_type = 'post'){
|
|||||||
*/
|
*/
|
||||||
function get_post_format_strings() {
|
function get_post_format_strings() {
|
||||||
$strings = array(
|
$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' ),
|
'aside' => _x( 'Aside', 'Post format' ),
|
||||||
'chat' => _x( 'Chat', 'Post format' ),
|
'chat' => _x( 'Chat', 'Post format' ),
|
||||||
'gallery' => _x( 'Gallery', 'Post format' ),
|
'gallery' => _x( 'Gallery', 'Post format' ),
|
||||||
@ -5269,6 +5269,9 @@ function get_post_format_strings() {
|
|||||||
*/
|
*/
|
||||||
function get_post_format_string( $slug ) {
|
function get_post_format_string( $slug ) {
|
||||||
$strings = get_post_format_strings();
|
$strings = get_post_format_strings();
|
||||||
|
if ( !$slug )
|
||||||
|
return $strings['default'];
|
||||||
|
else
|
||||||
return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
|
return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user