@@ 1207-1215 (lines=9) @@ | ||
1204 | selected( '', $args['selected'], false ) |
|
1205 | ); |
|
1206 | ||
1207 | foreach ( $languages as $language ) { |
|
1208 | $structure[] = sprintf( |
|
1209 | '<option value="%s" lang="%s"%s data-installed="1">%s</option>', |
|
1210 | esc_attr( $language['language'] ), |
|
1211 | esc_attr( $language['lang'] ), |
|
1212 | selected( $language['language'], $args['selected'], false ), |
|
1213 | esc_html( $language['native_name'] ) |
|
1214 | ); |
|
1215 | } |
|
1216 | if ( $translations_available ) { |
|
1217 | $structure[] = '</optgroup>'; |
|
1218 | } |
|
@@ 1223-1231 (lines=9) @@ | ||
1220 | // List available translations. |
|
1221 | if ( $translations_available ) { |
|
1222 | $structure[] = '<optgroup label="' . esc_attr_x( 'Available', 'translations' ) . '">'; |
|
1223 | foreach ( $translations as $translation ) { |
|
1224 | $structure[] = sprintf( |
|
1225 | '<option value="%s" lang="%s"%s>%s</option>', |
|
1226 | esc_attr( $translation['language'] ), |
|
1227 | esc_attr( current( $translation['iso'] ) ), |
|
1228 | selected( $translation['language'], $args['selected'], false ), |
|
1229 | esc_html( $translation['native_name'] ) |
|
1230 | ); |
|
1231 | } |
|
1232 | $structure[] = '</optgroup>'; |
|
1233 | } |
|
1234 |