From b922be3f71d48b6f6d85771e6196ce008eca671d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 14 Nov 2014 03:24:23 +0000 Subject: [PATCH] Only use the 'Installed' optgroup in wp_dropdown_languages() if it's needed. see #30335. Built from https://develop.svn.wordpress.org/trunk@30340 git-svn-id: http://core.svn.wordpress.org/trunk@30339 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 8 ++++++-- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index e299e71579..7de619d15c 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -910,7 +910,9 @@ function wp_dropdown_languages( $args = array() ) { $structure = array(); // List installed languages. - $structure[] = ''; + if ( $args['show_available_translations'] ) { + $structure[] = ''; + } $structure[] = ''; foreach ( $languages as $language ) { $structure[] = sprintf( @@ -921,7 +923,9 @@ function wp_dropdown_languages( $args = array() ) { esc_html( $language['native_name'] ) ); } - $structure[] = ''; + if ( $args['show_available_translations'] ) { + $structure[] = ''; + } // List available translations. if ( ! empty( $translations ) && $args['show_available_translations'] ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index b14b685ef0..d36d2fb74e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30339'; +$wp_version = '4.1-alpha-30340'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.