mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
I18N: Add option to hide en_US locale in wp_dropdown_languages().
Props danieltj for initial patch. Fixes #44494. git-svn-id: https://develop.svn.wordpress.org/trunk@44514 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -124,6 +124,24 @@ class Tests_L10n extends WP_UnitTestCase {
|
||||
$this->assertContains( '<option value="ja_JP" lang="ja">日本語</option>', $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 44494
|
||||
*/
|
||||
function test_wp_dropdown_languages_exclude_en_us() {
|
||||
$args = array(
|
||||
'id' => 'foo',
|
||||
'name' => 'bar',
|
||||
'languages' => array( 'de_DE' ),
|
||||
'translations' => $this->wp_dropdown_languages_filter(),
|
||||
'selected' => 'de_DE',
|
||||
'echo' => false,
|
||||
'show_option_en_us' => false,
|
||||
);
|
||||
$actual = wp_dropdown_languages( $args );
|
||||
|
||||
$this->assertNotContains( '<option value="" lang="en" data-installed="1">English (United States)</option>', $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 38632
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user