wp/wp-admin/network/settings.php
author ymh <ymh.work@gmail.com>
Tue, 09 Jun 2015 03:35:32 +0200
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
permissions -rw-r--r--
upgrade wordpress + plugins
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * Multisite network settings administration panel.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
 * @package WordPress
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 * @subpackage Multisite
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 * @since 3.0.0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
/** Load WordPress Administration Bootstrap */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
require_once( dirname( __FILE__ ) . '/admin.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    13
/** WordPress Translation Install API */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    14
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    15
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
if ( ! is_multisite() )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
	wp_die( __( 'Multisite support is not enabled.' ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
if ( ! current_user_can( 'manage_network_options' ) )
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    20
	wp_die( __( 'You do not have permission to access this page.' ), 403 );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
$title = __( 'Network Settings' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
$parent_file = 'settings.php';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    25
/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    26
 * Print JavaScript in the header on the Network Settings screen.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    27
 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    28
 * @since 4.1.0
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    29
*/
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    30
function network_settings_add_js() {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    31
?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    32
<script type="text/javascript">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    33
jQuery(document).ready( function($) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    34
	var languageSelect = $( '#WPLANG' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    35
	$( 'form' ).submit( function() {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    36
		// Don't show a spinner for English and installed languages,
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    37
		// as there is nothing to download.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    38
		if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    39
			$( '#submit', this ).after( '<span class="spinner language-install-spinner" />' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    40
		}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    41
	});
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    42
});
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    43
</script>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    44
<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    45
}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    46
add_action( 'admin_head', 'network_settings_add_js' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    47
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
		'id'      => 'overview',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
		'title'   => __('Overview'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
		'content' =>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
			'<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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
			'<p>' . __('Operational settings has fields for the network&#8217;s name and admin email.') . '</p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
			'<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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
			'<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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
			'<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>' .
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    57
			'<p>' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '</p>' .
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
			'<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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
			'<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>'
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
get_current_screen()->set_help_sidebar(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
	'<p><strong>' . __('For more information:') . '</strong></p>' .
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    64
	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen" target="_blank">Documentation on Network Settings</a>') . '</p>' .
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    65
	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
if ( $_POST ) {
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    69
	/** This action is documented in wp-admin/network/edit.php */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    70
	do_action( 'wpmuadminedit' );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
	check_admin_referer( 'siteoptions' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
	$checked_options = array( 'menu_items' => array(), 'registrationnotification' => 'no', 'upload_space_check_disabled' => 1, 'add_new_users' => 0 );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
	foreach ( $checked_options as $option_name => $option_unchecked_value ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
		if ( ! isset( $_POST[$option_name] ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
			$_POST[$option_name] = $option_unchecked_value;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
	$options = array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
		'registrationnotification', 'registration', 'add_new_users', 'menu_items',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
		'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
		'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
		'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
		'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
	);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    88
	// Handle translation install.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    89
	if ( ! empty( $_POST['WPLANG'] ) && wp_can_install_language_pack() ) {  // @todo: Skip if already installed
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    90
		$language = wp_download_language_pack( $_POST['WPLANG'] );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    91
		if ( $language ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    92
			$_POST['WPLANG'] = $language;
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    93
		}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    94
	}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    95
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
	foreach ( $options as $option_name ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
		if ( ! isset($_POST[$option_name]) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
			continue;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
		$value = wp_unslash( $_POST[$option_name] );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
		update_site_option( $option_name, $value );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   103
	/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   104
	 * Fires after the network options are updated.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   105
	 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   106
	 * @since MU
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   107
	 */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
	do_action( 'update_wpmu_options' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
	wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
	exit();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
include( ABSPATH . 'wp-admin/admin-header.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
if ( isset( $_GET['updated'] ) ) {
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   117
	?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Options saved.' ) ?></p></div><?php
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
<div class="wrap">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
	<h2><?php echo esc_html( $title ); ?></h2>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   123
	<form method="post" action="settings.php" novalidate="novalidate">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
		<?php wp_nonce_field( 'siteoptions' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
		<h3><?php _e( 'Operational Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
		<table class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   127
			<tr>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   128
				<th scope="row"><label for="site_name"><?php _e( 'Network Title' ) ?></label></th>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
					<input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( $current_site->site_name ) ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   134
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
				<th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   137
					<input name="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' ) ) ?>" />
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   138
					<p class="description" id="admin-email-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   139
						<?php _e( 'This email address will receive notifications. Registration and support emails will also come from this address.' ); ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   140
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
		<h3><?php _e( 'Registration Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
		<table class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   146
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
				<th scope="row"><?php _e( 'Allow new registrations' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
				<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
				if ( !get_site_option( 'registration' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
					update_site_option( 'registration', 'none' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
				$reg = get_site_option( 'registration' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
				?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   154
					<fieldset>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   155
					<legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
					<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
					<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
					<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 />
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   159
					<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>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   160
					<?php if ( is_subdomain_install() ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   161
						echo '<p class="description">' . __( '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>';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   162
					} ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   163
					</fieldset>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   167
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
				<th scope="row"><?php _e( 'Registration notification' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
				<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
				if ( !get_site_option( 'registrationnotification' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
					update_site_option( 'registrationnotification', 'yes' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
				?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
					<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>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   178
			<tr id="addnewusers">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
				<th scope="row"><?php _e( 'Add New Users' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
					<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>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   185
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
				<th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   188
					<input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   189
					<p class="description" id="illegal-names-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   190
						<?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   191
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   195
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
				<th scope="row"><label for="limited_email_domains"><?php _e( 'Limited Email Registrations' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
					<?php $limited_email_domains = get_site_option( 'limited_email_domains' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
					$limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   200
					<textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
<?php echo esc_textarea( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   202
					<p class="description" id="limited-email-domains-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   203
						<?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   204
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   205
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   208
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   209
				<th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   210
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   211
					<textarea name="banned_email_domains" id="banned_email_domains" aria-describedby="banned-email-domains-desc" cols="45" rows="5">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
<?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   213
					<p class="description" id="banned-email-domains-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   214
						<?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   215
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   216
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   217
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   218
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   219
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   220
		<h3><?php _e('New Site Settings'); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   221
		<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   222
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   223
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   224
				<th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   225
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   226
					<textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
<?php echo esc_textarea( get_site_option( 'welcome_email' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   228
					<p class="description" id="welcome-email-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   229
						<?php _e( 'The welcome email sent to new site owners.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   230
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   233
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   234
				<th scope="row"><label for="welcome_user_email"><?php _e( 'Welcome User Email' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   235
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   236
					<textarea name="welcome_user_email" id="welcome_user_email" aria-describedby="welcome-user-email-desc" rows="5" cols="45" class="large-text">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
<?php echo esc_textarea( get_site_option( 'welcome_user_email' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   238
					<p class="description" id="welcome-user-email-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   239
						<?php _e( 'The welcome email sent to new users.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   240
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   243
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   244
				<th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   246
					<textarea name="first_post" id="first_post" aria-describedby="first-post-desc" rows="5" cols="45" class="large-text">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   247
<?php echo esc_textarea( get_site_option( 'first_post' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   248
					<p class="description" id="first-post-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   249
						<?php _e( 'The first post on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   250
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   251
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   253
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   254
				<th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   255
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   256
					<textarea name="first_page" id="first_page" aria-describedby="first-page-desc" rows="5" cols="45" class="large-text">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   257
<?php echo esc_textarea( get_site_option( 'first_page' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   258
					<p class="description" id="first-page-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   259
						<?php _e( 'The first page on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   260
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   261
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   263
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   264
				<th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   265
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   266
					<textarea name="first_comment" id="first_comment" aria-describedby="first-comment-desc" rows="5" cols="45" class="large-text">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
<?php echo esc_textarea( get_site_option( 'first_comment' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   268
					<p class="description" id="first-comment-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   269
						<?php _e( 'The first comment on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   270
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   271
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   272
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   273
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   274
				<th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   276
					<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_site_option('first_comment_author') ?>" />
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   277
					<p class="description" id="first-comment-author-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   278
						<?php _e( 'The author of the first comment on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   279
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   280
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   281
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   282
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
				<th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   284
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   285
					<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' ) ) ?>" />
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   286
					<p class="description" id="first-comment-url-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   287
						<?php _e( 'The URL for the first comment on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   288
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   291
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
		<h3><?php _e( 'Upload Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
		<table class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   294
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
				<th scope="row"><?php _e( 'Site upload space' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   297
					<label><input type="checkbox" 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' ), '</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) ) . '" />' ); ?></label><br />
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   298
					<p class="screen-reader-text" id="blog-upload-space-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   299
						<?php _e( 'Size in megabytes' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   300
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   301
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   302
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   303
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   304
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   305
				<th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ) ?></label></th>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   306
				<td>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   307
					<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" />
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   308
					<p class="description" id="upload-filetypes-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   309
						<?php _e( 'Allowed file types. Separate types by spaces.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   310
					</p>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   311
				</td>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   312
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   313
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   314
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   315
				<th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   316
				<td>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   317
					<?php printf( _x( '%s KB', 'File size in kilobytes' ), '<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 ) ) . '" />' ); ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   318
					<p class="screen-reader-text" id="fileupload-maxk-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   319
						<?php _e( 'Size in kilobytes' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   320
					</p>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   321
				</td>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   322
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   323
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   324
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   325
		<?php
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   326
		$languages = get_available_languages();
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   327
		$translations = wp_get_available_translations();
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   328
		if ( ! empty( $languages ) || ! empty( $translations ) ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   329
			?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   330
			<h3><?php _e( 'Language Settings' ); ?></h3>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   331
			<table class="form-table">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   332
				<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   333
					<th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   334
					<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   335
						<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   336
						$lang = get_site_option( 'WPLANG' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   337
						if ( ! in_array( $lang, $languages ) ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   338
							$lang = '';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   339
						}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   340
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   341
						wp_dropdown_languages( array(
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   342
							'name'         => 'WPLANG',
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   343
							'id'           => 'WPLANG',
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   344
							'selected'     => $lang,
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   345
							'languages'    => $languages,
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   346
							'translations' => $translations,
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   347
							'show_available_translations' => wp_can_install_language_pack(),
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   348
						) );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   349
						?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   350
					</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   351
				</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   352
			</table>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   353
			<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   354
		}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   355
		?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   356
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   357
		<h3><?php _e( 'Menu Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   358
		<table id="menu" class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   359
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   360
				<th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   361
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   362
			<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   363
			$menu_perms = get_site_option( 'menu_items' );
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   364
			/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   365
			 * Filter available network-wide administration menu options.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   366
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   367
			 * Options returned to this filter are output as individual checkboxes that, when selected,
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   368
			 * enable site administrator access to the specified administration menu in certain contexts.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   369
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   370
			 * Adding options for specific menus here hinges on the appropriate checks and capabilities
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   371
			 * being in place in the site dashboard on the other side. For instance, when the single
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   372
			 * default option, 'plugins' is enabled, site administrators are granted access to the Plugins
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   373
			 * screen in their individual sites' dashboards.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   374
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   375
			 * @since MU
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   376
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   377
			 * @param array $admin_menus The menu items available.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   378
			 */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   379
			$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   380
			$fieldset_end = '';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   381
			if ( count( (array) $menu_items ) > 1 ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   382
				echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   383
				$fieldset_end = '</fieldset>';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   384
			}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   385
			foreach ( (array) $menu_items as $key => $val ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   386
				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/>";
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   387
			}
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   388
			echo $fieldset_end;
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   389
			?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   390
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   391
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   392
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   393
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   394
		<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   395
		/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   396
		 * Fires at the end of the Network Settings form, before the submit button.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   397
		 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   398
		 * @since MU
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   399
		 */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   400
		do_action( 'wpmu_options' ); ?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   401
		<?php submit_button(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   402
	</form>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   403
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   404
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   405
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>