balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

settings.php (21494B)


      1 <?php
      2 /**
      3  * Multisite network settings administration panel.
      4  *
      5  * @package WordPress
      6  * @subpackage Multisite
      7  * @since 3.0.0
      8  */
      9 
     10 /** Load WordPress Administration Bootstrap */
     11 require_once __DIR__ . '/admin.php';
     12 
     13 /** WordPress Translation Installation API */
     14 require_once ABSPATH . 'wp-admin/includes/translation-install.php';
     15 
     16 if ( ! current_user_can( 'manage_network_options' ) ) {
     17 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
     18 }
     19 
     20 $title       = __( 'Network Settings' );
     21 $parent_file = 'settings.php';
     22 
     23 // Handle network admin email change requests.
     24 if ( ! empty( $_GET['network_admin_hash'] ) ) {
     25 	$new_admin_details = get_site_option( 'network_admin_hash' );
     26 	$redirect          = 'settings.php?updated=false';
     27 	if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details['hash'], $_GET['network_admin_hash'] ) && ! empty( $new_admin_details['newemail'] ) ) {
     28 		update_site_option( 'admin_email', $new_admin_details['newemail'] );
     29 		delete_site_option( 'network_admin_hash' );
     30 		delete_site_option( 'new_admin_email' );
     31 		$redirect = 'settings.php?updated=true';
     32 	}
     33 	wp_redirect( network_admin_url( $redirect ) );
     34 	exit;
     35 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_network_admin_email' === $_GET['dismiss'] ) {
     36 	check_admin_referer( 'dismiss_new_network_admin_email' );
     37 	delete_site_option( 'network_admin_hash' );
     38 	delete_site_option( 'new_admin_email' );
     39 	wp_redirect( network_admin_url( 'settings.php?updated=true' ) );
     40 	exit;
     41 }
     42 
     43 add_action( 'admin_head', 'network_settings_add_js' );
     44 
     45 get_current_screen()->add_help_tab(
     46 	array(
     47 		'id'      => 'overview',
     48 		'title'   => __( 'Overview' ),
     49 		'content' =>
     50 			'<p>' . __( 'This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site&#8217;s options.' ) . '</p>' .
     51 			'<p>' . __( 'Operational settings has fields for the network&#8217;s name and admin email.' ) . '</p>' .
     52 			'<p>' . __( 'Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.' ) . '</p>' .
     53 			'<p>' . __( 'New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what&#8127;s put in the first post, page, comment, comment author, and comment URL.' ) . '</p>' .
     54 			'<p>' . __( 'Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).' ) . '</p>' .
     55 			'<p>' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '</p>' .
     56 			'<p>' . __( 'Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.' ) . '</p>' .
     57 			'<p>' . __( 'Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.' ) . '</p>',
     58 	)
     59 );
     60 
     61 get_current_screen()->set_help_sidebar(
     62 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
     63 	'<p>' . __( '<a href="https://wordpress.org/support/article/network-admin-settings-screen/">Documentation on Network Settings</a>' ) . '</p>' .
     64 	'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
     65 );
     66 
     67 if ( $_POST ) {
     68 	/** This action is documented in wp-admin/network/edit.php */
     69 	do_action( 'wpmuadminedit' );
     70 
     71 	check_admin_referer( 'siteoptions' );
     72 
     73 	$checked_options = array(
     74 		'menu_items'                  => array(),
     75 		'registrationnotification'    => 'no',
     76 		'upload_space_check_disabled' => 1,
     77 		'add_new_users'               => 0,
     78 	);
     79 	foreach ( $checked_options as $option_name => $option_unchecked_value ) {
     80 		if ( ! isset( $_POST[ $option_name ] ) ) {
     81 			$_POST[ $option_name ] = $option_unchecked_value;
     82 		}
     83 	}
     84 
     85 	$options = array(
     86 		'registrationnotification',
     87 		'registration',
     88 		'add_new_users',
     89 		'menu_items',
     90 		'upload_space_check_disabled',
     91 		'blog_upload_space',
     92 		'upload_filetypes',
     93 		'site_name',
     94 		'first_post',
     95 		'first_page',
     96 		'first_comment',
     97 		'first_comment_url',
     98 		'first_comment_author',
     99 		'welcome_email',
    100 		'welcome_user_email',
    101 		'fileupload_maxk',
    102 		'global_terms_enabled',
    103 		'illegal_names',
    104 		'limited_email_domains',
    105 		'banned_email_domains',
    106 		'WPLANG',
    107 		'new_admin_email',
    108 		'first_comment_email',
    109 	);
    110 
    111 	// Handle translation installation.
    112 	if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) {
    113 		$language = wp_download_language_pack( $_POST['WPLANG'] );
    114 		if ( $language ) {
    115 			$_POST['WPLANG'] = $language;
    116 		}
    117 	}
    118 
    119 	foreach ( $options as $option_name ) {
    120 		if ( ! isset( $_POST[ $option_name ] ) ) {
    121 			continue;
    122 		}
    123 		$value = wp_unslash( $_POST[ $option_name ] );
    124 		update_site_option( $option_name, $value );
    125 	}
    126 
    127 	/**
    128 	 * Fires after the network options are updated.
    129 	 *
    130 	 * @since MU (3.0.0)
    131 	 */
    132 	do_action( 'update_wpmu_options' );
    133 
    134 	wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) );
    135 	exit;
    136 }
    137 
    138 require_once ABSPATH . 'wp-admin/admin-header.php';
    139 
    140 if ( isset( $_GET['updated'] ) ) {
    141 	?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ); ?></p></div>
    142 	<?php
    143 }
    144 ?>
    145 
    146 <div class="wrap">
    147 	<h1><?php echo esc_html( $title ); ?></h1>
    148 	<form method="post" action="settings.php" novalidate="novalidate">
    149 		<?php wp_nonce_field( 'siteoptions' ); ?>
    150 		<h2><?php _e( 'Operational Settings' ); ?></h2>
    151 		<table class="form-table" role="presentation">
    152 			<tr>
    153 				<th scope="row"><label for="site_name"><?php _e( 'Network Title' ); ?></label></th>
    154 				<td>
    155 					<input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( get_network()->site_name ); ?>" />
    156 				</td>
    157 			</tr>
    158 
    159 			<tr>
    160 				<th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ); ?></label></th>
    161 				<td>
    162 					<input name="new_admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ); ?>" />
    163 					<p class="description" id="admin-email-desc">
    164 						<?php _e( 'This address is used for admin purposes. If you change this, we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
    165 					</p>
    166 					<?php
    167 					$new_admin_email = get_site_option( 'new_admin_email' );
    168 					if ( $new_admin_email && get_site_option( 'admin_email' ) !== $new_admin_email ) :
    169 						?>
    170 						<div class="updated inline">
    171 						<p>
    172 						<?php
    173 							printf(
    174 								/* translators: %s: New network admin email. */
    175 								__( 'There is a pending change of the network admin email to %s.' ),
    176 								'<code>' . esc_html( $new_admin_email ) . '</code>'
    177 							);
    178 							printf(
    179 								' <a href="%1$s">%2$s</a>',
    180 								esc_url( wp_nonce_url( network_admin_url( 'settings.php?dismiss=new_network_admin_email' ), 'dismiss_new_network_admin_email' ) ),
    181 								__( 'Cancel' )
    182 							);
    183 						?>
    184 						</p>
    185 						</div>
    186 					<?php endif; ?>
    187 				</td>
    188 			</tr>
    189 		</table>
    190 		<h2><?php _e( 'Registration Settings' ); ?></h2>
    191 		<table class="form-table" role="presentation">
    192 			<tr>
    193 				<th scope="row"><?php _e( 'Allow new registrations' ); ?></th>
    194 				<?php
    195 				if ( ! get_site_option( 'registration' ) ) {
    196 					update_site_option( 'registration', 'none' );
    197 				}
    198 				$reg = get_site_option( 'registration' );
    199 				?>
    200 				<td>
    201 					<fieldset>
    202 					<legend class="screen-reader-text"><?php _e( 'New registrations settings' ); ?></legend>
    203 					<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none' ); ?> /> <?php _e( 'Registration is disabled' ); ?></label><br />
    204 					<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user' ); ?> /> <?php _e( 'User accounts may be registered' ); ?></label><br />
    205 					<label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog' ); ?> /> <?php _e( 'Logged in users may register new sites' ); ?></label><br />
    206 					<label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all' ); ?> /> <?php _e( 'Both sites and user accounts can be registered' ); ?></label>
    207 					<?php
    208 					if ( is_subdomain_install() ) {
    209 						echo '<p class="description">';
    210 						printf(
    211 							/* translators: 1: NOBLOGREDIRECT, 2: wp-config.php */
    212 							__( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ),
    213 							'<code>NOBLOGREDIRECT</code>',
    214 							'<code>wp-config.php</code>'
    215 						);
    216 						echo '</p>';
    217 					}
    218 					?>
    219 					</fieldset>
    220 				</td>
    221 			</tr>
    222 
    223 			<tr>
    224 				<th scope="row"><?php _e( 'Registration notification' ); ?></th>
    225 				<?php
    226 				if ( ! get_site_option( 'registrationnotification' ) ) {
    227 					update_site_option( 'registrationnotification', 'yes' );
    228 				}
    229 				?>
    230 				<td>
    231 					<label><input name="registrationnotification" type="checkbox" id="registrationnotification" value="yes"<?php checked( get_site_option( 'registrationnotification' ), 'yes' ); ?> /> <?php _e( 'Send the network admin an email notification every time someone registers a site or user account' ); ?></label>
    232 				</td>
    233 			</tr>
    234 
    235 			<tr id="addnewusers">
    236 				<th scope="row"><?php _e( 'Add New Users' ); ?></th>
    237 				<td>
    238 					<label><input name="add_new_users" type="checkbox" id="add_new_users" value="1"<?php checked( get_site_option( 'add_new_users' ) ); ?> /> <?php _e( 'Allow site administrators to add new users to their site via the "Users &rarr; Add New" page' ); ?></label>
    239 				</td>
    240 			</tr>
    241 
    242 			<tr>
    243 				<th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ); ?></label></th>
    244 				<td>
    245 					<?php
    246 					$illegal_names = get_site_option( 'illegal_names' );
    247 
    248 					if ( empty( $illegal_names ) ) {
    249 						$illegal_names = '';
    250 					} elseif ( is_array( $illegal_names ) ) {
    251 						$illegal_names = implode( ' ', $illegal_names );
    252 					}
    253 					?>
    254 					<input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( $illegal_names ); ?>" size="45" />
    255 					<p class="description" id="illegal-names-desc">
    256 						<?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ); ?>
    257 					</p>
    258 				</td>
    259 			</tr>
    260 
    261 			<tr>
    262 				<th scope="row"><label for="limited_email_domains"><?php _e( 'Limited Email Registrations' ); ?></label></th>
    263 				<td>
    264 					<?php
    265 					$limited_email_domains = get_site_option( 'limited_email_domains' );
    266 
    267 					if ( empty( $limited_email_domains ) ) {
    268 						$limited_email_domains = '';
    269 					} else {
    270 						// Convert from an input field. Back-compat for WPMU < 1.0.
    271 						$limited_email_domains = str_replace( ' ', "\n", $limited_email_domains );
    272 
    273 						if ( is_array( $limited_email_domains ) ) {
    274 							$limited_email_domains = implode( "\n", $limited_email_domains );
    275 						}
    276 					}
    277 					?>
    278 					<textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5">
    279 <?php echo esc_textarea( $limited_email_domains ); ?></textarea>
    280 					<p class="description" id="limited-email-domains-desc">
    281 						<?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ); ?>
    282 					</p>
    283 				</td>
    284 			</tr>
    285 
    286 			<tr>
    287 				<th scope="row"><label for="banned_email_domains"><?php _e( 'Banned Email Domains' ); ?></label></th>
    288 				<td>
    289 					<?php
    290 					$banned_email_domains = get_site_option( 'banned_email_domains' );
    291 
    292 					if ( empty( $banned_email_domains ) ) {
    293 						$banned_email_domains = '';
    294 					} elseif ( is_array( $banned_email_domains ) ) {
    295 						$banned_email_domains = implode( "\n", $banned_email_domains );
    296 					}
    297 					?>
    298 					<textarea name="banned_email_domains" id="banned_email_domains" aria-describedby="banned-email-domains-desc" cols="45" rows="5">
    299 <?php echo esc_textarea( $banned_email_domains ); ?></textarea>
    300 					<p class="description" id="banned-email-domains-desc">
    301 						<?php _e( 'If you want to ban domains from site registrations. One domain per line.' ); ?>
    302 					</p>
    303 				</td>
    304 			</tr>
    305 
    306 		</table>
    307 		<h2><?php _e( 'New Site Settings' ); ?></h2>
    308 		<table class="form-table" role="presentation">
    309 
    310 			<tr>
    311 				<th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ); ?></label></th>
    312 				<td>
    313 					<textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text">
    314 <?php echo esc_textarea( get_site_option( 'welcome_email' ) ); ?></textarea>
    315 					<p class="description" id="welcome-email-desc">
    316 						<?php _e( 'The welcome email sent to new site owners.' ); ?>
    317 					</p>
    318 				</td>
    319 			</tr>
    320 			<tr>
    321 				<th scope="row"><label for="welcome_user_email"><?php _e( 'Welcome User Email' ); ?></label></th>
    322 				<td>
    323 					<textarea name="welcome_user_email" id="welcome_user_email" aria-describedby="welcome-user-email-desc" rows="5" cols="45" class="large-text">
    324 <?php echo esc_textarea( get_site_option( 'welcome_user_email' ) ); ?></textarea>
    325 					<p class="description" id="welcome-user-email-desc">
    326 						<?php _e( 'The welcome email sent to new users.' ); ?>
    327 					</p>
    328 				</td>
    329 			</tr>
    330 			<tr>
    331 				<th scope="row"><label for="first_post"><?php _e( 'First Post' ); ?></label></th>
    332 				<td>
    333 					<textarea name="first_post" id="first_post" aria-describedby="first-post-desc" rows="5" cols="45" class="large-text">
    334 <?php echo esc_textarea( get_site_option( 'first_post' ) ); ?></textarea>
    335 					<p class="description" id="first-post-desc">
    336 						<?php _e( 'The first post on a new site.' ); ?>
    337 					</p>
    338 				</td>
    339 			</tr>
    340 			<tr>
    341 				<th scope="row"><label for="first_page"><?php _e( 'First Page' ); ?></label></th>
    342 				<td>
    343 					<textarea name="first_page" id="first_page" aria-describedby="first-page-desc" rows="5" cols="45" class="large-text">
    344 <?php echo esc_textarea( get_site_option( 'first_page' ) ); ?></textarea>
    345 					<p class="description" id="first-page-desc">
    346 						<?php _e( 'The first page on a new site.' ); ?>
    347 					</p>
    348 				</td>
    349 			</tr>
    350 			<tr>
    351 				<th scope="row"><label for="first_comment"><?php _e( 'First Comment' ); ?></label></th>
    352 				<td>
    353 					<textarea name="first_comment" id="first_comment" aria-describedby="first-comment-desc" rows="5" cols="45" class="large-text">
    354 <?php echo esc_textarea( get_site_option( 'first_comment' ) ); ?></textarea>
    355 					<p class="description" id="first-comment-desc">
    356 						<?php _e( 'The first comment on a new site.' ); ?>
    357 					</p>
    358 				</td>
    359 			</tr>
    360 			<tr>
    361 				<th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ); ?></label></th>
    362 				<td>
    363 					<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_author' ) ); ?>" />
    364 					<p class="description" id="first-comment-author-desc">
    365 						<?php _e( 'The author of the first comment on a new site.' ); ?>
    366 					</p>
    367 				</td>
    368 			</tr>
    369 			<tr>
    370 				<th scope="row"><label for="first_comment_email"><?php _e( 'First Comment Email' ); ?></label></th>
    371 				<td>
    372 					<input type="text" size="40" name="first_comment_email" id="first_comment_email" aria-describedby="first-comment-email-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_email' ) ); ?>" />
    373 					<p class="description" id="first-comment-email-desc">
    374 						<?php _e( 'The email address of the first comment author on a new site.' ); ?>
    375 					</p>
    376 				</td>
    377 			</tr>
    378 			<tr>
    379 				<th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ); ?></label></th>
    380 				<td>
    381 					<input type="text" size="40" name="first_comment_url" id="first_comment_url" aria-describedby="first-comment-url-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ); ?>" />
    382 					<p class="description" id="first-comment-url-desc">
    383 						<?php _e( 'The URL for the first comment on a new site.' ); ?>
    384 					</p>
    385 				</td>
    386 			</tr>
    387 		</table>
    388 		<h2><?php _e( 'Upload Settings' ); ?></h2>
    389 		<table class="form-table" role="presentation">
    390 			<tr>
    391 				<th scope="row"><?php _e( 'Site upload space' ); ?></th>
    392 				<td>
    393 					<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ); ?>/>
    394 						<?php
    395 						printf(
    396 							/* translators: %s: Number of megabytes to limit uploads to. */
    397 							__( 'Limit total size of files uploaded to %s MB' ),
    398 							'</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option( 'blog_upload_space', 100 ) ) . '" />'
    399 						);
    400 						?>
    401 					</label><br />
    402 					<p class="screen-reader-text" id="blog-upload-space-desc">
    403 						<?php _e( 'Size in megabytes' ); ?>
    404 					</p>
    405 				</td>
    406 			</tr>
    407 
    408 			<tr>
    409 				<th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ); ?></label></th>
    410 				<td>
    411 					<input name="upload_filetypes" type="text" id="upload_filetypes" aria-describedby="upload-filetypes-desc" class="large-text" value="<?php echo esc_attr( get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ); ?>" size="45" />
    412 					<p class="description" id="upload-filetypes-desc">
    413 						<?php _e( 'Allowed file types. Separate types by spaces.' ); ?>
    414 					</p>
    415 				</td>
    416 			</tr>
    417 
    418 			<tr>
    419 				<th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ); ?></label></th>
    420 				<td>
    421 					<?php
    422 						printf(
    423 							/* translators: %s: File size in kilobytes. */
    424 							__( '%s KB' ),
    425 							'<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />'
    426 						);
    427 						?>
    428 					<p class="screen-reader-text" id="fileupload-maxk-desc">
    429 						<?php _e( 'Size in kilobytes' ); ?>
    430 					</p>
    431 				</td>
    432 			</tr>
    433 		</table>
    434 
    435 		<?php
    436 		$languages    = get_available_languages();
    437 		$translations = wp_get_available_translations();
    438 		if ( ! empty( $languages ) || ! empty( $translations ) ) {
    439 			?>
    440 			<h2><?php _e( 'Language Settings' ); ?></h2>
    441 			<table class="form-table" role="presentation">
    442 				<tr>
    443 					<th><label for="WPLANG"><?php _e( 'Default Language' ); ?><span class="dashicons dashicons-translation" aria-hidden="true"></span></label></th>
    444 					<td>
    445 						<?php
    446 						$lang = get_site_option( 'WPLANG' );
    447 						if ( ! in_array( $lang, $languages, true ) ) {
    448 							$lang = '';
    449 						}
    450 
    451 						wp_dropdown_languages(
    452 							array(
    453 								'name'         => 'WPLANG',
    454 								'id'           => 'WPLANG',
    455 								'selected'     => $lang,
    456 								'languages'    => $languages,
    457 								'translations' => $translations,
    458 								'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(),
    459 							)
    460 						);
    461 						?>
    462 					</td>
    463 				</tr>
    464 			</table>
    465 			<?php
    466 		}
    467 		?>
    468 
    469 		<?php
    470 		$menu_perms = get_site_option( 'menu_items' );
    471 		/**
    472 		 * Filters available network-wide administration menu options.
    473 		 *
    474 		 * Options returned to this filter are output as individual checkboxes that, when selected,
    475 		 * enable site administrator access to the specified administration menu in certain contexts.
    476 		 *
    477 		 * Adding options for specific menus here hinges on the appropriate checks and capabilities
    478 		 * being in place in the site dashboard on the other side. For instance, when the single
    479 		 * default option, 'plugins' is enabled, site administrators are granted access to the Plugins
    480 		 * screen in their individual sites' dashboards.
    481 		 *
    482 		 * @since MU (3.0.0)
    483 		 *
    484 		 * @param string[] $admin_menus Associative array of the menu items available.
    485 		 */
    486 		$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
    487 
    488 		if ( $menu_items ) :
    489 			?>
    490 			<h2><?php _e( 'Menu Settings' ); ?></h2>
    491 			<table id="menu" class="form-table">
    492 				<tr>
    493 					<th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
    494 					<td>
    495 						<?php
    496 						echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
    497 
    498 						foreach ( (array) $menu_items as $key => $val ) {
    499 							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/>';
    500 						}
    501 
    502 						echo '</fieldset>';
    503 						?>
    504 					</td>
    505 				</tr>
    506 			</table>
    507 			<?php
    508 		endif;
    509 		?>
    510 
    511 		<?php
    512 		/**
    513 		 * Fires at the end of the Network Settings form, before the submit button.
    514 		 *
    515 		 * @since MU (3.0.0)
    516 		 */
    517 		do_action( 'wpmu_options' );
    518 		?>
    519 		<?php submit_button(); ?>
    520 	</form>
    521 </div>
    522 
    523 <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>