<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13639] trunk/wp-admin/ms-options.php:
Bringing some order to the ms-options dumping ground.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13639">13639</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-03-09 23:40:38 +0000 (Tue, 09 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Bringing some order to the ms-options dumping ground. see <a href="http://trac.wordpress.org/ticket/11644">#11644</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (13638 => 13639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-03-09 22:42:36 UTC (rev 13638)
+++ trunk/wp-admin/ms-options.php        2010-03-09 23:40:38 UTC (rev 13639)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">         <h2><?php _e('Network Options') ?></h2>
</span><span class="cx">         <form method="post" action="ms-edit.php?action=siteoptions">
</span><span class="cx">                 <?php wp_nonce_field( "siteoptions" ); ?>
</span><del>-                <h3><?php _e('Operational Settings <em>(These settings cannot be modified by site owners)</em>') ?></h3>
</del><ins>+                <h3><?php _e('Operational Settings'); ?></h3>
</ins><span class="cx">                 <table class="form-table">
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Network Name') ?></th>
</span><span class="lines">@@ -61,31 +61,10 @@
</span><span class="cx">                                         } ?>
</span><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><del>-
</del><ins>+                </table>
+                <h3><?php _e('Dashboard Settings'); ?></h3>
+                <table class="form-table">
</ins><span class="cx">                         <tr valign="top">
</span><del>-                                <th scope="row"><?php _e('Registration notification') ?></th>
-                                <?php
-                                if ( !get_site_option('registrationnotification') )
-                                        update_site_option( 'registrationnotification', 'yes' );
-                                ?>
-                                <td>
-                                        <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php checked( get_site_option('registrationnotification'), 'yes') ?> /> <?php _e('Yes'); ?><br />
-                                        <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php checked( get_site_option('registrationnotification'), 'no') ?> /> <?php _e('No'); ?><br />
-                                        <?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?>
-                                </td>
-                        </tr>
-
-                        <tr valign="top">
-                                <th scope="row"><?php _e('Add New Users') ?></th>
-                                <td>
-                                        <a name='addnewusers'></a>
-                                        <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 />
-                                        <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 />
-                                        <?php _e('Allow site administrators to add new users to their site via the Users->Add New page.') ?>
-                                </td>
-                        </tr>
-
-                        <tr valign="top">
</del><span class="cx">                                 <th scope="row"><?php _e('Dashboard Site') ?></th>
</span><span class="cx">                                 <td>
</span><span class="cx">                                         <?php
</span><span class="lines">@@ -112,8 +91,40 @@
</span><span class="cx">                                         <?php _e( "The default role for new users on the Dashboard site. This should probably be 'Subscriber' or maybe 'Contributor'." ); ?>
</span><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><ins>+                        <tr valign="top">
+                                <th scope="row"><?php _e('Admin Notice Feed') ?></th>
+                                <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 />
+                                <?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br />
+                                <?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site->domain . $current_site->path . 'feed/' )
+                                        echo __( "A good one to use would be the feed from your main site: " ) . 'http://' . $current_site->domain . $current_site->path . 'feed/'; ?></td>
+                        </tr>
+                </table>
+                <h3><?php _e('Registration Settings'); ?></h3>
+                <table class="form-table">
+                        <tr valign="top">
+                                <th scope="row"><?php _e('Registration notification') ?></th>
+                                <?php
+                                if ( !get_site_option('registrationnotification') )
+                                        update_site_option( 'registrationnotification', 'yes' );
+                                ?>
+                                <td>
+                                        <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php checked( get_site_option('registrationnotification'), 'yes') ?> /> <?php _e('Yes'); ?><br />
+                                        <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php checked( get_site_option('registrationnotification'), 'no') ?> /> <?php _e('No'); ?><br />
+                                        <?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?>
+                                </td>
+                        </tr>
</ins><span class="cx">
</span><span class="cx">                         <tr valign="top">
</span><ins>+                                <th scope="row"><?php _e('Add New Users') ?></th>
+                                <td>
+                                        <a name='addnewusers'></a>
+                                        <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 />
+                                        <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 />
+                                        <?php _e('Allow site administrators to add new users to their site via the Users->Add New page.') ?>
+                                </td>
+                        </tr>
+
+                        <tr valign="top">
</ins><span class="cx">                                 <th scope="row"><?php _e('Banned Names') ?></th>
</span><span class="cx">                                 <td>
</span><span class="cx">                                         <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" />
</span><span class="lines">@@ -142,6 +153,10 @@
</span><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><span class="cx">
</span><ins>+                </table>
+                <h3><?php _e('New Site Settings'); ?></h3>
+                <table class="form-table">
+
</ins><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Welcome Email') ?></th>
</span><span class="cx">                                 <td>
</span><span class="lines">@@ -198,7 +213,9 @@
</span><span class="cx">                                         <?php _e('URL on first comment on a new site.') ?>
</span><span class="cx">                                 </td>
</span><span class="cx">                         </tr>
</span><del>-
</del><ins>+                </table>
+                <h3><?php _e('Upload Settings'); ?></h3>
+                <table class="form-table">
</ins><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Upload media button') ?></th>
</span><span class="cx">                                 <?php $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); ?>
</span><span class="lines">@@ -221,56 +238,52 @@
</span><span class="cx">
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Upload File Types') ?></th>
</span><del>-                                <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?>" size="45" /></td>
</del><ins>+                                <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>
</ins><span class="cx">                         </tr>
</span><span class="cx">
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Max upload file size') ?></th>
</span><span class="cx">                                 <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo esc_attr( get_site_option('fileupload_maxk', 300) ) ?>" size="5" /> KB</td>
</span><span class="cx">                         </tr>
</span><del>-                        <tr valign="top">
-                                <th scope="row"><?php _e('Admin Notice Feed') ?></th>
-                                <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 />
-                                <?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br />
-                                <?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site->domain . $current_site->path . 'feed/' )
-                                        echo __( "A good one to use would be the feed from your main site: " ) . 'http://' . $current_site->domain . $current_site->path . 'feed/'; ?></td>
-                        </tr>
</del><span class="cx">                 </table>
</span><span class="cx">
</span><del>-                <h3><?php _e('Network Wide Settings <em>(These settings may be overridden by site owners)</em>') ?></h3>
</del><ins>+<?php
+                $languages = get_available_languages();
+                $lang = get_site_option('WPLANG');
+                if ( ! empty( $languages ) ) {
+?>
+                <h3><?php _e('Network Wide Settings'); ?></h3>
+                <div class="updated inline"><p><strong><?php _e( 'Notice:' ); ?></strong> <?php _e( 'These settings may be overridden by site owners.' ); ?></p></div>
</ins><span class="cx">                 <table class="form-table">
</span><span class="cx">                         <?php
</span><del>-                        $languages = get_available_languages();
-                        $lang = get_site_option('WPLANG');
-                        if ( !empty($languages) ) {
</del><span class="cx">                                 ?>
</span><span class="cx">                                 <tr valign="top">
</span><del>-                                        <th width="33%"><?php _e('Default Language') ?></th>
</del><ins>+                                        <th><?php _e('Default Language') ?></th>
</ins><span class="cx">                                         <td>
</span><span class="cx">                                                 <select name="WPLANG" id="WPLANG">
</span><span class="cx">                                                         <?php mu_dropdown_languages( $languages, get_site_option('WPLANG') ); ?>
</span><span class="cx">                                                 </select>
</span><span class="cx">                                         </td>
</span><span class="cx">                                 </tr>
</span><del>-                                <?php
-                        } // languages
-                        ?>
</del><span class="cx">                 </table>
</span><ins>+<?php
+                } // languages
+?>
</ins><span class="cx">
</span><del>-                <h3><?php _e('Menus <em>(Enable or disable WordPress Backend Menus)</em>') ?></h3>
-                <table class="form-table">
-                        <tr>
-                                <th scope="row"><?php _e("Menu"); ?></th>
-                                <th scope="row"><?php _e("Enabled"); ?></th>
-                        </tr>
-                        <a name='menu'></a>
</del><ins>+                <h3><?php _e('Menu Settings'); ?></h3>
+                <table id="menu" class="form-table">
+                        <tr valign="top">
+                                <th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
+                                <td>
</ins><span class="cx">                         <?php
</span><span class="cx">                         $menu_perms = get_site_option( 'menu_items' );
</span><del>-                        $menu_items = apply_filters( 'mu_menu_items', array('plugins' => __('Plugins')) );
</del><ins>+                        $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
</ins><span class="cx">                         foreach ( (array) $menu_items as $key => $val ) {
</span><del>-                                echo "<tr><th scope='row'>" . esc_html($val) . "</th><td><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . " /></td></tr>";
</del><ins>+                                echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>";
</ins><span class="cx">                         }
</span><span class="cx">                         ?>
</span><ins>+                                </td>
+                        </tr>
</ins><span class="cx">                 </table>
</span><span class="cx">
</span><span class="cx">                 <?php do_action( 'wpmu_options' ); // Add more options here ?>
</span></span></pre>
</div>
</div>
</body>
</html>