Changeset 29007
- Timestamp:
- 07/05/2014 06:18:50 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-general.php
r28848 r29007 305 305 <?php 306 306 $languages = get_available_languages(); 307 if ( is_multisite() && !empty( $languages ) ):307 if ( $languages ) : 308 308 ?> 309 309 <tr> 310 310 <th width="33%" scope="row"><?php _e('Site Language') ?></th> 311 311 <td> 312 <select name="WPLANG" id="WPLANG"> 313 <?php mu_dropdown_languages( $languages, get_option('WPLANG') ); ?> 314 </select> 312 <?php wp_dropdown_languages( array( 313 'name' => 'WPLANG', 314 'id' => 'WPLANG', 315 'selected' => get_option( 'WPLANG' ), 316 'languages' => $languages, 317 ) ); ?> 315 318 </td> 316 319 </tr> -
trunk/src/wp-admin/options.php
r28833 r29007 73 73 74 74 $whitelist_options = array( 75 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ),75 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string', 'WPLANG' ), 76 76 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), 77 77 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ), … … 108 108 } else { 109 109 $whitelist_options['general'][] = 'new_admin_email'; 110 $whitelist_options['general'][] = 'WPLANG';111 110 112 111 /** -
trunk/src/wp-includes/l10n.php
r28938 r29007 817 817 return $headers; 818 818 } 819 820 /** 821 * Language selector. More to come. 822 * 823 * @since 4.0.0 824 */ 825 function wp_dropdown_languages( $args = array() ) { 826 if ( isset( $args['languages'] ) ) { 827 $languages = $args['languages']; 828 } else { 829 $languages = get_available_languages(); 830 } 831 832 printf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) ); 833 echo '<option value="">en_US</option>'; 834 foreach ( $languages as $language ) { 835 $selected = selected( $language, $args['selected'], false ); 836 echo '<option value="' . esc_attr( $language ) .'"' . $selected . '>' . $language . '</option>'; 837 } 838 echo '</select>'; 839 }
Note: See TracChangeset
for help on using the changeset viewer.