Make WordPress Core


Ignore:
Timestamp:
03/22/2010 04:19:10 AM (16 years ago)
Author:
nacin
Message:

More cleanup of ms-options.php. Allow textarea.large-text class to be applied to inputs as well.

File:
1 edited

Legend:

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

    r13794 r13795  
    3030                <th scope="row"><?php _e('Network Name') ?></th>
    3131                <td>
    32                     <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo esc_attr($current_site->site_name) ?>" size="45" />
     32                    <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr($current_site->site_name) ?>" />
    3333                    <br />
    3434                    <?php _e('What you would like to call this website.') ?>
     
    3939                <th scope="row"><?php _e('Network Admin Email') ?></th>
    4040                <td>
    41                     <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo esc_attr( get_site_option('admin_email') ) ?>" size="45" />
     41                    <input name="admin_email" type="text" id="admin_email" class="regular-text" value="<?php echo esc_attr( get_site_option('admin_email') ) ?>" />
    4242                    <br />
    4343                    <?php printf( __( 'Registration and support emails will come from this address. An address such as "support@%s" is recommended.' ), $current_site->domain ); ?>
     
    4848                <th scope="row"><?php _e('Global Terms') ?></th>
    4949                <td>
    50                 <label><input type='radio' id="global_terms_enabled" name="global_terms_enabled" value='1' <?php checked( get_site_option( 'global_terms_enabled' ), 1 ) ?>/> <?php _e( 'Enabled' ); ?></label><br />
    51                 <label><input type='radio' id="global_terms_enabled" name="global_terms_enabled" value='0' <?php checked( get_site_option( 'global_terms_enabled' ), 0 ) ?>/> <?php _e( 'Disabled' ); ?></label><br />
     50                <label><input type='radio' id="global_terms_enabled" name="global_terms_enabled" value='1'<?php checked( get_site_option( 'global_terms_enabled' ), 1 ) ?>/> <?php _e( 'Enabled' ); ?></label><br />
     51                <label><input type='radio' id="global_terms_enabled" name="global_terms_enabled" value='0'<?php checked( get_site_option( 'global_terms_enabled' ), 0 ) ?>/> <?php _e( 'Disabled' ); ?></label><br />
    5252                <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></td>
    5353            </tr>
     
    6666                    }?>
    6767                    <input name="dashboard_blog_orig" type="hidden" id="dashboard_blog_orig" value="<?php echo esc_attr($blogname); ?>" />
    68                     <input name="dashboard_blog" type="text" id="dashboard_blog" value="<?php echo esc_attr($blogname); ?>" size="30" />
    69                     <br />
    70                     <?php _e( "Blogname ('dashboard', 'control', 'manager', etc) or blog id.<br />New users are added to this site as subscribers (or the user role defined below) if they don't have a site. Leave blank for the main site. 'Subscriber' users on old site will be moved to the new site if changed. The new site will be created if it does not exist." ); ?>
     68                    <input name="dashboard_blog" type="text" id="dashboard_blog" value="<?php echo esc_attr($blogname); ?>" class="regular-text" />
     69                    <br />
     70                    <?php _e( "Site path ('dashboard', 'control', 'manager', etc) or blog id.<br />New users are added to this site as the user role defined below if they don't have a site. Leave blank for the main site. Users with the subscriber role on old site will be moved to the new site if changed. The new site will be created if it does not exist." ); ?>
    7171                </td>
    7272            </tr>
     
    8484            <tr valign="top">
    8585                <th scope="row"><?php _e('Admin Notice Feed') ?></th>
    86                 <td><input name="admin_notice_feed" style="width: 95%" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br />
     86                <td><input name="admin_notice_feed" class="large-text" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br />
    8787                <?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br />
    8888                <?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site->domain . $current_site->path . 'feed/' )
     
    9999                ?>
    100100                <td>
    101                     <label><input name="registration" type="radio" id="registration1" value='none' <?php checked( get_site_option('registration'), 'none') ?> /> <?php _e('Registration is disabled.'); ?></label><br />
    102                     <label><input name="registration" type="radio" id="registration2" value='user' <?php checked( get_site_option('registration'), 'user') ?> /> <?php _e('User accounts may be registered.'); ?></label><br />
    103                     <label><input name="registration" type="radio" id="registration3" value='blog' <?php checked( get_site_option('registration'), 'blog') ?> /> <?php _e('Logged in users may register new sites.'); ?></label><br />
    104                     <label><input name="registration" type="radio" id="registration4" value='all' <?php checked( get_site_option('registration'), 'all') ?> /> <?php _e('Both sites and user accounts can be registered.'); ?></label><br />
    105                     <p><?php _e('Disable or enable registration and who or what can be registered. (Default = disabled)'); ?></p>
     101                    <label><input name="registration" type="radio" id="registration1" value='none'<?php checked( get_site_option('registration'), 'none') ?> /> <?php _e('Registration is disabled.'); ?></label><br />
     102                    <label><input name="registration" type="radio" id="registration2" value='user'<?php checked( get_site_option('registration'), 'user') ?> /> <?php _e('User accounts may be registered.'); ?></label><br />
     103                    <label><input name="registration" type="radio" id="registration3" value='blog'<?php checked( get_site_option('registration'), 'blog') ?> /> <?php _e('Logged in users may register new sites.'); ?></label><br />
     104                    <label><input name="registration" type="radio" id="registration4" value='all'<?php checked( get_site_option('registration'), 'all') ?> /> <?php _e('Both sites and user accounts can be registered.'); ?></label><br />
     105                    <p><?php _e('Disable or enable registration and who or what can be registered. (Default is disabled.)'); ?></p>
    106106                    <?php if ( is_subdomain_install() ) {
    107                         echo '<p>' . __('If registration is disabled, please set "NOBLOGREDIRECT" in wp-config.php to a url you will redirect visitors to if they visit a non-existent site.') . '</p>';
     107                        echo '<p>' . __('If registration is disabled, please set <code>NOBLOGREDIRECT</code> in <code>wp-config.php</code> to a url you will redirect visitors to if they visit a non-existent site.') . '</p>';
    108108                    } ?>
    109109                </td>
     
    117117                ?>
    118118                <td>
    119                     <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php checked( get_site_option('registrationnotification'), 'yes') ?> /> <?php _e('Yes'); ?><br />
    120                     <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php checked( get_site_option('registrationnotification'), 'no') ?> /> <?php _e('No'); ?><br />
     119                    <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes'<?php checked( get_site_option('registrationnotification'), 'yes') ?> /> <?php _e('Yes'); ?><br />
     120                    <input name="registrationnotification" type="radio" id="registrationnotification2" value='no'<?php checked( get_site_option('registrationnotification'), 'no') ?> /> <?php _e('No'); ?><br />
    121121                    <?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?>
    122122                </td>
     
    127127                <td>
    128128                    <a name='addnewusers'></a>
    129                     <input name="add_new_users" type="radio" id="add_new_users1" value='1' <?php checked( get_site_option('add_new_users'), 1 ) ?> /> <?php _e('Yes'); ?><br />
    130                     <input name="add_new_users" type="radio" id="add_new_users2" value='0' <?php checked( get_site_option('add_new_users'), 0 ) ?> /> <?php _e('No'); ?><br />
     129                    <input name="add_new_users" type="radio" id="add_new_users1" value='1'<?php checked( get_site_option('add_new_users'), 1 ) ?> /> <?php _e('Yes'); ?><br />
     130                    <input name="add_new_users" type="radio" id="add_new_users2" value='0'<?php checked( get_site_option('add_new_users'), 0 ) ?> /> <?php _e('No'); ?><br />
    131131                    <?php _e('Allow site administrators to add new users to their site via the "Users->Add New" page.') ?>
    132132                </td>
     
    136136                <th scope="row"><?php _e('Banned Names') ?></th>
    137137                <td>
    138                     <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo esc_attr( implode( " ", get_site_option('illegal_names') ) ); ?>" size="45" />
     138                    <input name="illegal_names" type="text" id="illegal_names" class="large-text" value="<?php echo esc_attr( implode( " ", get_site_option('illegal_names') ) ); ?>" size="45" />
    139139                    <br />
    140140                    <?php _e('Users are not allowed to register these sites. Separate names by spaces.') ?>
     
    147147                    <?php $limited_email_domains = get_site_option('limited_email_domains');
    148148                    $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
    149                     <textarea name="limited_email_domains" id="limited_email_domains" cols='40' rows='5'><?php echo $limited_email_domains == '' ? '' : @implode( "\n", $limited_email_domains ); ?></textarea>
     149                    <textarea name="limited_email_domains" id="limited_email_domains" cols='45' rows='5'><?php echo wp_htmledit_pre( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
    150150                    <br />
    151151                    <?php _e('If you want to limit site registrations to certain domains. Enter one domain per line.') ?>
     
    156156                <th scope="row"><?php _e('Banned Email Domains') ?></th>
    157157                <td>
    158                     <textarea name="banned_email_domains" id="banned_email_domains" cols='40' rows='5'><?php echo get_site_option('banned_email_domains') == '' ? '' : @implode( "\n", get_site_option('banned_email_domains') ); ?></textarea>
     158                    <textarea name="banned_email_domains" id="banned_email_domains" cols='45' rows='5'><?php echo wp_htmledit_pre( get_site_option('banned_email_domains') == '' ? '' : implode( "\n", (array) get_site_option('banned_email_domains') ) ); ?></textarea>
    159159                    <br />
    160160                    <?php _e('If you want to ban domains from site registrations. Enter one domain per line.') ?>
     
    169169                <th scope="row"><?php _e('Welcome Email') ?></th>
    170170                <td>
    171                     <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea>
     171                    <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea>
    172172                    <br />
    173173                    <?php _e('The welcome email sent to new site owners.') ?>
     
    177177                <th scope="row"><?php _e('Welcome User Email') ?></th>
    178178                <td>
    179                         <textarea name="welcome_user_email" id="welcome_user_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_user_email') ) ?></textarea>
     179                        <textarea name="welcome_user_email" id="welcome_user_email" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('welcome_user_email') ) ?></textarea>
    180180                    <br />
    181181                    <?php _e('The welcome email sent to new users.') ?>
     
    185185                <th scope="row"><?php _e('First Post') ?></th>
    186186                <td>
    187                     <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea>
     187                    <textarea name="first_post" id="first_post" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea>
    188188                    <br />
    189189                    <?php _e('The first post on a new site.') ?>
     
    193193                <th scope="row"><?php _e('First Page') ?></th>
    194194                <td>
    195                     <textarea name="first_page" id="first_page" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_page') ) ?></textarea>
     195                    <textarea name="first_page" id="first_page" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('first_page') ) ?></textarea>
    196196                    <br />
    197197                    <?php _e('The first page on a new site.') ?>
     
    201201                <th scope="row"><?php _e('First Comment') ?></th>
    202202                <td>
    203                     <textarea name="first_comment" id="first_comment" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_comment') ) ?></textarea>
     203                    <textarea name="first_comment" id="first_comment" rows='5' cols='45' class="large-text"><?php echo stripslashes( get_site_option('first_comment') ) ?></textarea>
    204204                    <br />
    205205                    <?php _e('The first comment on a new site.') ?>
     
    228228                <th scope="row"><?php _e('Upload media button') ?></th>
    229229                <?php $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); ?>
    230                 <td><label><input type='checkbox' id="mu_media_buttons_image" name="mu_media_buttons[image]" value='1' <?php checked( !empty($mu_media_buttons[ 'image' ]) ) ?>/> <?php _e( 'Images' ); ?></label><br />
    231                 <label><input type='checkbox' id="mu_media_buttons_video" name="mu_media_buttons[video]" value='1' <?php checked( !empty($mu_media_buttons[ 'video' ]) ) ?>/> <?php _e( 'Videos' ); ?></label><br />
    232                 <label><input type='checkbox' id="mu_media_buttons_audio" name="mu_media_buttons[audio]" value='1' <?php checked( !empty($mu_media_buttons[ 'audio' ]) ) ?>/> <?php _e( 'Music' ); ?></label><br />
    233                 <?php _e( 'The media upload buttons to display on the "Write Post" page. Make sure you update the "Upload File Types" below as well.' ); ?></td>
     230                <td><label><input type='checkbox' id="mu_media_buttons_image" name="mu_media_buttons[image]" value='1'<?php checked( !empty($mu_media_buttons[ 'image' ]) ) ?>/> <?php _e( 'Images' ); ?></label><br />
     231                <label><input type='checkbox' id="mu_media_buttons_video" name="mu_media_buttons[video]" value='1'<?php checked( !empty($mu_media_buttons[ 'video' ]) ) ?>/> <?php _e( 'Videos' ); ?></label><br />
     232                <label><input type='checkbox' id="mu_media_buttons_audio" name="mu_media_buttons[audio]" value='1'<?php checked( !empty($mu_media_buttons[ 'audio' ]) ) ?>/> <?php _e( 'Music' ); ?></label><br />
     233                <?php _e( 'The media upload buttons to display on the "Write Post" page. Make sure you update the allowed upload file types below as well.' ); ?></td>
    234234            </tr>
    235235
     
    237237                <th scope="row"><?php _e('Site upload space') ?></th>
    238238                <td>
    239                 <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='0' <?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '<input name="blog_upload_space" type="text" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 10) ) . '" size="3" />' ); ?></label><br />
    240                 <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='1' <?php checked( get_site_option( 'upload_space_check_disabled' ) ) ?>/> <?php _e( 'Disabled' ); ?></label><br /></td>
    241             </tr>
    242 
    243             <tr valign="top">
    244                 <th scope="row"><?php _e('Upload File Types') ?></th>
     239                <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='0'<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '<input name="blog_upload_space" type="text" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 10) ) . '" size="3" />' ); ?></label><br />
     240                <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='1'<?php checked( get_site_option( 'upload_space_check_disabled' ) ) ?>/> <?php _e( 'Disabled' ); ?></label><br /></td>
     241            </tr>
     242
     243            <tr valign="top">
     244                <th scope="row"><?php _e('Upload file types') ?></th>
    245245                <td><input name="upload_filetypes" type="text" id="upload_filetypes" class="large-text" value="<?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?>" size="45" /></td>
    246246            </tr>
     
    254254<?php
    255255        $languages = get_available_languages();
    256         $lang = get_site_option('WPLANG');
    257256        if ( ! empty( $languages ) ) {
     257            $lang = get_site_option('WPLANG');
    258258?>
    259259        <h3><?php _e('Network Wide Settings'); ?></h3>
     
    293293        <?php do_action( 'wpmu_options' ); // Add more options here ?>
    294294
    295         <p class="submit">
    296             <input type="submit" name="Submit" value="<?php esc_attr_e('Update Options') ?>" /></p>
     295        <p class="submit"><input type="submit" class="button-primary" name="Submit" value="<?php esc_attr_e('Save Changes') ?>" /></p>
    297296    </form>
    298297</div>
Note: See TracChangeset for help on using the changeset viewer.