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
This commit is contained in:
parent
560574da45
commit
b922be3f71
|
@ -910,7 +910,9 @@ function wp_dropdown_languages( $args = array() ) {
|
|||
$structure = array();
|
||||
|
||||
// List installed languages.
|
||||
if ( $args['show_available_translations'] ) {
|
||||
$structure[] = '<optgroup label="' . esc_attr_x( 'Installed', 'translations' ) . '">';
|
||||
}
|
||||
$structure[] = '<option value="" lang="en" data-installed="1">English (United States)</option>';
|
||||
foreach ( $languages as $language ) {
|
||||
$structure[] = sprintf(
|
||||
|
@ -921,7 +923,9 @@ function wp_dropdown_languages( $args = array() ) {
|
|||
esc_html( $language['native_name'] )
|
||||
);
|
||||
}
|
||||
if ( $args['show_available_translations'] ) {
|
||||
$structure[] = '</optgroup>';
|
||||
}
|
||||
|
||||
// List available translations.
|
||||
if ( ! empty( $translations ) && $args['show_available_translations'] ) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue