Make WordPress Core


Ignore:
Timestamp:
01/18/2010 10:21:36 PM (15 years ago)
Author:
ryan
Message:

Use cap checks instead of multisite and super admin checks. Add some new caps. Merge cleanup. see #11644.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r12752 r12753  
    293293<?php do_settings_fields('general', 'default'); ?>
    294294<?php
    295 if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) )
    296     while( ( $lang_file = readdir( $dh ) ) !== false )
     295
     296$lang_files = array();
     297if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) ) {
     298    while ( ( $lang_file = readdir( $dh ) ) !== false ) {
    297299        if ( substr( $lang_file, -3 ) == '.mo' )
    298300            $lang_files[] = $lang_file;
    299 $lang = get_option('WPLANG');
    300 
    301 if ( is_array($lang_files) && !empty($lang_files) ) {
    302     ?>
     301    }
     302}
     303
     304if ( !empty($lang_files) ) {
     305?>
    303306    <tr valign="top">
    304307        <th width="33%" scope="row"><?php _e('Blog language:') ?></th>
     
    309312        </td>
    310313    </tr>
    311     <?php
     314<?php
    312315} // languages
    313316?>
Note: See TracChangeset for help on using the changeset viewer.