Changeset 28984
- Timestamp:
- 07/03/2014 10:55:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/install.php
r28983 r28984 61 61 $body = wp_remote_retrieve_body( $response ); 62 62 if ( $body && $body = json_decode( $body, true ) ) { 63 $languages = array(); 64 // Key the language array with the language code 65 foreach ( $body['languages'] as $language ) { 66 $languages[$language['language']] = $language; 67 } 68 $body['languages'] = $languages; 63 69 return $body; 64 70 } … … 211 217 echo "\n"; 212 218 219 if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && ( 'en_US' !== WPLANG ) ) { 220 if ( isset( $body['languages'][WPLANG] ) ) { 221 $language = $body['languages'][WPLANG]; 222 echo '<input type="radio" name="language" checked="checked" class="' . esc_attr( $language['language'] ) . ' screen-reader-input" id="language_wplang" value="' . esc_attr( $language['language'] ) . '">'; 223 echo '<label for="language_wplang">' . esc_html( $language['native_name'] ) . "</label>\n"; 224 } 225 } 226 213 227 foreach ( $body['languages'] as $language ) { 214 228 echo '<input type="radio" name="language" class="' . esc_attr( $language['language'] ) . ' screen-reader-input" id="language_'. esc_attr( $language['language'] ) .'" value="' . esc_attr( $language['language'] ) . '">'; 215 229 echo '<label for="language_' . esc_attr( $language['language'] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n"; 216 230 } 217 218 231 echo "</fieldset>\n"; 219 232 echo '<p class="step"><input type="submit" class="button button-primary button-hero" value="»" /></p>';
Note: See TracChangeset
for help on using the changeset viewer.