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 {
$languages[] = array(
'language' => $translation['language'],
'native_name' => $translation['native_name'],
- 'lang' => $translation['iso'][1],
+ 'lang' => current( $translation['iso'] ),
);
// Remove installed language from available translations.
$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'] )
);