<!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">         &lt;h2&gt;&lt;?php _e('Network Options') ?&gt;&lt;/h2&gt;
</span><span class="cx">         &lt;form method=&quot;post&quot; action=&quot;ms-edit.php?action=siteoptions&quot;&gt;
</span><span class="cx">                 &lt;?php wp_nonce_field( &quot;siteoptions&quot; ); ?&gt;
</span><del>-                &lt;h3&gt;&lt;?php _e('Operational Settings &lt;em&gt;(These settings cannot be modified by site owners)&lt;/em&gt;') ?&gt;&lt;/h3&gt;
</del><ins>+                &lt;h3&gt;&lt;?php _e('Operational Settings'); ?&gt;&lt;/h3&gt;
</ins><span class="cx">                 &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Network Name') ?&gt;&lt;/th&gt;
</span><span class="lines">@@ -61,31 +61,10 @@
</span><span class="cx">                                         } ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><del>-
</del><ins>+                &lt;/table&gt;
+                &lt;h3&gt;&lt;?php _e('Dashboard Settings'); ?&gt;&lt;/h3&gt;
+                &lt;table class=&quot;form-table&quot;&gt;
</ins><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><del>-                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Registration notification') ?&gt;&lt;/th&gt;
-                                &lt;?php
-                                if ( !get_site_option('registrationnotification') )
-                                        update_site_option( 'registrationnotification', 'yes' );
-                                ?&gt;
-                                &lt;td&gt;
-                                        &lt;input name=&quot;registrationnotification&quot; type=&quot;radio&quot; id=&quot;registrationnotification1&quot; value='yes' &lt;?php checked( get_site_option('registrationnotification'), 'yes') ?&gt; /&gt; &lt;?php _e('Yes'); ?&gt;&lt;br /&gt;
-                                        &lt;input name=&quot;registrationnotification&quot; type=&quot;radio&quot; id=&quot;registrationnotification2&quot; value='no' &lt;?php checked( get_site_option('registrationnotification'), 'no') ?&gt; /&gt; &lt;?php _e('No'); ?&gt;&lt;br /&gt;
-                                        &lt;?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?&gt;
-                                &lt;/td&gt;
-                        &lt;/tr&gt;
-
-                        &lt;tr valign=&quot;top&quot;&gt;
-                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Add New Users') ?&gt;&lt;/th&gt;
-                                &lt;td&gt;
-                                        &lt;a name='addnewusers'&gt;&lt;/a&gt;
-                                        &lt;input name=&quot;add_new_users&quot; type=&quot;radio&quot; id=&quot;add_new_users1&quot; value='1' &lt;?php checked( get_site_option('add_new_users'), 1 ) ?&gt; /&gt; &lt;?php _e('Yes'); ?&gt;&lt;br /&gt;
-                                        &lt;input name=&quot;add_new_users&quot; type=&quot;radio&quot; id=&quot;add_new_users2&quot; value='0' &lt;?php checked( get_site_option('add_new_users'), 0 ) ?&gt; /&gt; &lt;?php _e('No'); ?&gt;&lt;br /&gt;
-                                        &lt;?php _e('Allow site administrators to add new users to their site via the Users-&gt;Add New page.') ?&gt;
-                                &lt;/td&gt;
-                        &lt;/tr&gt;
-
-                        &lt;tr valign=&quot;top&quot;&gt;
</del><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Dashboard Site') ?&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;?php
</span><span class="lines">@@ -112,8 +91,40 @@
</span><span class="cx">                                         &lt;?php _e( &quot;The default role for new users on the Dashboard site. This should probably be 'Subscriber' or maybe 'Contributor'.&quot; ); ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><ins>+                        &lt;tr valign=&quot;top&quot;&gt;
+                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Admin Notice Feed') ?&gt;&lt;/th&gt;
+                                &lt;td&gt;&lt;input name=&quot;admin_notice_feed&quot; style=&quot;width: 95%&quot; type=&quot;text&quot; id=&quot;admin_notice_feed&quot; value=&quot;&lt;?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?&gt;&quot; size=&quot;80&quot; /&gt;&lt;br /&gt;
+                                &lt;?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?&gt;&lt;br /&gt;
+                                &lt;?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'feed/' )
+                                        echo __( &quot;A good one to use would be the feed from your main site: &quot; ) . 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'feed/'; ?&gt;&lt;/td&gt;
+                        &lt;/tr&gt;
+                &lt;/table&gt;
+                &lt;h3&gt;&lt;?php _e('Registration Settings'); ?&gt;&lt;/h3&gt;
+                &lt;table class=&quot;form-table&quot;&gt;
+                        &lt;tr valign=&quot;top&quot;&gt;
+                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Registration notification') ?&gt;&lt;/th&gt;
+                                &lt;?php
+                                if ( !get_site_option('registrationnotification') )
+                                        update_site_option( 'registrationnotification', 'yes' );
+                                ?&gt;
+                                &lt;td&gt;
+                                        &lt;input name=&quot;registrationnotification&quot; type=&quot;radio&quot; id=&quot;registrationnotification1&quot; value='yes' &lt;?php checked( get_site_option('registrationnotification'), 'yes') ?&gt; /&gt; &lt;?php _e('Yes'); ?&gt;&lt;br /&gt;
+                                        &lt;input name=&quot;registrationnotification&quot; type=&quot;radio&quot; id=&quot;registrationnotification2&quot; value='no' &lt;?php checked( get_site_option('registrationnotification'), 'no') ?&gt; /&gt; &lt;?php _e('No'); ?&gt;&lt;br /&gt;
+                                        &lt;?php _e('Send the network admin an email notification every time someone registers a site or user account.') ?&gt;
+                                &lt;/td&gt;
+                        &lt;/tr&gt;
</ins><span class="cx"> 
</span><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><ins>+                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Add New Users') ?&gt;&lt;/th&gt;
+                                &lt;td&gt;
+                                        &lt;a name='addnewusers'&gt;&lt;/a&gt;
+                                        &lt;input name=&quot;add_new_users&quot; type=&quot;radio&quot; id=&quot;add_new_users1&quot; value='1' &lt;?php checked( get_site_option('add_new_users'), 1 ) ?&gt; /&gt; &lt;?php _e('Yes'); ?&gt;&lt;br /&gt;
+                                        &lt;input name=&quot;add_new_users&quot; type=&quot;radio&quot; id=&quot;add_new_users2&quot; value='0' &lt;?php checked( get_site_option('add_new_users'), 0 ) ?&gt; /&gt; &lt;?php _e('No'); ?&gt;&lt;br /&gt;
+                                        &lt;?php _e('Allow site administrators to add new users to their site via the Users-&gt;Add New page.') ?&gt;
+                                &lt;/td&gt;
+                        &lt;/tr&gt;
+
+                        &lt;tr valign=&quot;top&quot;&gt;
</ins><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Banned Names') ?&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;input name=&quot;illegal_names&quot; type=&quot;text&quot; id=&quot;illegal_names&quot; style=&quot;width: 95%&quot; value=&quot;&lt;?php echo esc_attr( implode( &quot; &quot;, get_site_option('illegal_names') ) ); ?&gt;&quot; size=&quot;45&quot; /&gt;
</span><span class="lines">@@ -142,6 +153,10 @@
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><span class="cx"> 
</span><ins>+                &lt;/table&gt;
+                &lt;h3&gt;&lt;?php _e('New Site Settings'); ?&gt;&lt;/h3&gt;
+                &lt;table class=&quot;form-table&quot;&gt;
+
</ins><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Welcome Email') ?&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="lines">@@ -198,7 +213,9 @@
</span><span class="cx">                                         &lt;?php _e('URL on first comment on a new site.') ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><del>-
</del><ins>+                &lt;/table&gt;
+                &lt;h3&gt;&lt;?php _e('Upload Settings'); ?&gt;&lt;/h3&gt;
+                &lt;table class=&quot;form-table&quot;&gt;
</ins><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Upload media button') ?&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;?php $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); ?&gt;
</span><span class="lines">@@ -221,56 +238,52 @@
</span><span class="cx"> 
</span><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Upload File Types') ?&gt;&lt;/th&gt;
</span><del>-                                &lt;td&gt;&lt;input name=&quot;upload_filetypes&quot; type=&quot;text&quot; id=&quot;upload_filetypes&quot; value=&quot;&lt;?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?&gt;&quot; size=&quot;45&quot; /&gt;&lt;/td&gt;
</del><ins>+                                &lt;td&gt;&lt;input name=&quot;upload_filetypes&quot; type=&quot;text&quot; id=&quot;upload_filetypes&quot; class=&quot;large-text&quot; value=&quot;&lt;?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?&gt;&quot; size=&quot;45&quot; /&gt;&lt;/td&gt;
</ins><span class="cx">                         &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="cx">                         &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Max upload file size') ?&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;&lt;input name=&quot;fileupload_maxk&quot; type=&quot;text&quot; id=&quot;fileupload_maxk&quot; value=&quot;&lt;?php echo esc_attr( get_site_option('fileupload_maxk', 300) ) ?&gt;&quot; size=&quot;5&quot; /&gt; KB&lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><del>-                        &lt;tr valign=&quot;top&quot;&gt;
-                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Admin Notice Feed') ?&gt;&lt;/th&gt;
-                                &lt;td&gt;&lt;input name=&quot;admin_notice_feed&quot; style=&quot;width: 95%&quot; type=&quot;text&quot; id=&quot;admin_notice_feed&quot; value=&quot;&lt;?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?&gt;&quot; size=&quot;80&quot; /&gt;&lt;br /&gt;
-                                &lt;?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?&gt;&lt;br /&gt;
-                                &lt;?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'feed/' )
-                                        echo __( &quot;A good one to use would be the feed from your main site: &quot; ) . 'http://' . $current_site-&gt;domain . $current_site-&gt;path . 'feed/'; ?&gt;&lt;/td&gt;
-                        &lt;/tr&gt;
</del><span class="cx">                 &lt;/table&gt;
</span><span class="cx"> 
</span><del>-                &lt;h3&gt;&lt;?php _e('Network Wide Settings &lt;em&gt;(These settings may be overridden by site owners)&lt;/em&gt;') ?&gt;&lt;/h3&gt;
</del><ins>+&lt;?php
+                $languages = get_available_languages();
+                $lang = get_site_option('WPLANG');
+                if ( ! empty( $languages ) ) {
+?&gt;
+                &lt;h3&gt;&lt;?php _e('Network Wide Settings'); ?&gt;&lt;/h3&gt;
+                &lt;div class=&quot;updated inline&quot;&gt;&lt;p&gt;&lt;strong&gt;&lt;?php _e( 'Notice:' ); ?&gt;&lt;/strong&gt; &lt;?php _e( 'These settings may be overridden by site owners.' ); ?&gt;&lt;/p&gt;&lt;/div&gt;
</ins><span class="cx">                 &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx">                         &lt;?php
</span><del>-                        $languages = get_available_languages();
-                        $lang = get_site_option('WPLANG');
-                        if ( !empty($languages) ) {
</del><span class="cx">                                 ?&gt;
</span><span class="cx">                                 &lt;tr valign=&quot;top&quot;&gt;
</span><del>-                                        &lt;th width=&quot;33%&quot;&gt;&lt;?php _e('Default Language') ?&gt;&lt;/th&gt;
</del><ins>+                                        &lt;th&gt;&lt;?php _e('Default Language') ?&gt;&lt;/th&gt;
</ins><span class="cx">                                         &lt;td&gt;
</span><span class="cx">                                                 &lt;select name=&quot;WPLANG&quot; id=&quot;WPLANG&quot;&gt;
</span><span class="cx">                                                         &lt;?php mu_dropdown_languages( $languages, get_site_option('WPLANG') ); ?&gt;
</span><span class="cx">                                                 &lt;/select&gt;
</span><span class="cx">                                         &lt;/td&gt;
</span><span class="cx">                                 &lt;/tr&gt;
</span><del>-                                &lt;?php
-                        } // languages
-                        ?&gt;
</del><span class="cx">                 &lt;/table&gt;
</span><ins>+&lt;?php
+                } // languages
+?&gt;
</ins><span class="cx"> 
</span><del>-                &lt;h3&gt;&lt;?php _e('Menus &lt;em&gt;(Enable or disable WordPress Backend Menus)&lt;/em&gt;') ?&gt;&lt;/h3&gt;
-                &lt;table class=&quot;form-table&quot;&gt;
-                        &lt;tr&gt;
-                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e(&quot;Menu&quot;); ?&gt;&lt;/th&gt;
-                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e(&quot;Enabled&quot;); ?&gt;&lt;/th&gt;
-                        &lt;/tr&gt;
-                        &lt;a name='menu'&gt;&lt;/a&gt;
</del><ins>+                &lt;h3&gt;&lt;?php _e('Menu Settings'); ?&gt;&lt;/h3&gt;
+                &lt;table id=&quot;menu&quot; class=&quot;form-table&quot;&gt;
+                        &lt;tr valign=&quot;top&quot;&gt;
+                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Enable administration menus' ); ?&gt;&lt;/th&gt;
+                                &lt;td&gt;
</ins><span class="cx">                         &lt;?php
</span><span class="cx">                         $menu_perms = get_site_option( 'menu_items' );
</span><del>-                        $menu_items = apply_filters( 'mu_menu_items', array('plugins' =&gt; __('Plugins')) );
</del><ins>+                        $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' =&gt; __( 'Plugins' ) ) );
</ins><span class="cx">                         foreach ( (array) $menu_items as $key =&gt; $val ) {
</span><del>-                                echo &quot;&lt;tr&gt;&lt;th scope='row'&gt;&quot; . esc_html($val) . &quot;&lt;/th&gt;&lt;td&gt;&lt;input type='checkbox' name='menu_items[&quot; . $key . &quot;]' value='1'&quot; .  ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . &quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
</del><ins>+                                echo &quot;&lt;label&gt;&lt;input type='checkbox' name='menu_items[&quot; . $key . &quot;]' value='1'&quot; .  ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . &quot; /&gt; &quot; . esc_html( $val ) . &quot;&lt;/label&gt;&lt;br/&gt;&quot;;
</ins><span class="cx">                         }
</span><span class="cx">                         ?&gt;
</span><ins>+                                &lt;/td&gt;
+                        &lt;/tr&gt;
</ins><span class="cx">                 &lt;/table&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;?php do_action( 'wpmu_options' ); // Add more options here ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>