]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/l10n.php
WordPress 4.2
[autoinstalls/wordpress.git] / wp-includes / l10n.php
index 67215452b766263ccf9fa3fc1b715e6346c276ac..4c5d8b19a5028b245ca5a1a3bac9e57dce65b8bc 100644 (file)
@@ -594,7 +594,7 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path
 
        if ( false !== $plugin_rel_path ) {
                $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
-       } else if ( false !== $deprecated ) {
+       } elseif ( false !== $deprecated ) {
                _deprecated_argument( __FUNCTION__, '2.7' );
                $path = ABSPATH . trim( $deprecated, '/' );
        } else {
@@ -896,7 +896,7 @@ function wp_dropdown_languages( $args = array() ) {
                        $languages[] = array(
                                'language'    => $translation['language'],
                                'native_name' => $translation['native_name'],
-                               'lang'        => $translation['iso'][1],
+                               'lang'        => current( $translation['iso'] ),
                        );
 
                        // Remove installed language from available translations.
@@ -942,7 +942,7 @@ function wp_dropdown_languages( $args = array() ) {
                        $structure[] = sprintf(
                                '<option value="%s" lang="%s"%s>%s</option>',
                                esc_attr( $translation['language'] ),
-                               esc_attr( $translation['iso'][1] ),
+                               esc_attr( current( $translation['iso'] ) ),
                                selected( $translation['language'], $args['selected'], false ),
                                esc_html( $translation['native_name'] )
                        );