wp/wp-admin/network/settings.php
author ymh <ymh.work@gmail.com>
Wed, 06 Nov 2013 03:21:17 +0000
changeset 0 d970ebf37754
child 5 5e2f62d02dcd
permissions -rw-r--r--
first import
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
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
if ( ! is_multisite() )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
	wp_die( __( 'Multisite support is not enabled.' ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
if ( ! current_user_can( 'manage_network_options' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
	wp_die( __( 'You do not have permission to access this page.' ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
$title = __( 'Network Settings' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
$parent_file = 'settings.php';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
		'id'      => 'overview',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
		'title'   => __('Overview'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
		'content' =>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
			'<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
    27
			'<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
    28
			'<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
    29
			'<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
    30
			'<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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
			'<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
    32
			'<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
    33
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
get_current_screen()->set_help_sidebar(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
	'<p><strong>' . __('For more information:') . '</strong></p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
	'<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Settings_Screen" target="_blank">Documentation on Network Settings</a>') . '</p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
	'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
if ( $_POST ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
	do_action( 'wpmuadminedit' , '' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
	check_admin_referer( 'siteoptions' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
	$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
    47
	foreach ( $checked_options as $option_name => $option_unchecked_value ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
		if ( ! isset( $_POST[$option_name] ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
			$_POST[$option_name] = $option_unchecked_value;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
	$options = array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
		'registrationnotification', 'registration', 'add_new_users', 'menu_items',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
		'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
		'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
		'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
		'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
	);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
	foreach ( $options as $option_name ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
		if ( ! isset($_POST[$option_name]) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
			continue;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
		$value = wp_unslash( $_POST[$option_name] );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
		update_site_option( $option_name, $value );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
	// Update more options here
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
	do_action( 'update_wpmu_options' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
	wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
	exit();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
include( ABSPATH . 'wp-admin/admin-header.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
if ( isset( $_GET['updated'] ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
	?><div id="message" class="updated"><p><?php _e( 'Options saved.' ) ?></p></div><?php
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
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
<div class="wrap">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
	<?php screen_icon('options-general'); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
	<h2><?php echo esc_html( $title ); ?></h2>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
	<form method="post" action="settings.php">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
		<?php wp_nonce_field( 'siteoptions' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
		<h3><?php _e( 'Operational Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
		<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
				<th scope="row"><label for="site_name"><?php _e( 'Network Name' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
					<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
    92
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
					<?php _e( 'What you would like to call this network.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
				<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
    99
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
					<input name="admin_email" type="text" id="admin_email" class="regular-text" value="<?php echo esc_attr( get_site_option('admin_email') ) ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
					<?php printf( __( 'Registration and support emails will come from this address. An address such as <code>support@%s</code> is recommended.' ), $current_site->domain ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
		<h3><?php _e( 'Registration Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
		<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
				<th scope="row"><?php _e( 'Allow new registrations' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
				<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
				if ( !get_site_option( 'registration' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
					update_site_option( 'registration', 'none' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
				$reg = get_site_option( 'registration' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
				?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
					<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
   117
					<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
   118
					<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 />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
					<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><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
					<?php if ( is_subdomain_install() )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
						_e( '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.' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
					?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
				<th scope="row"><?php _e( 'Registration notification' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
				<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
				if ( !get_site_option( 'registrationnotification' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
					update_site_option( 'registrationnotification', 'yes' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
				?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
					<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
   134
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
			<tr valign="top" id="addnewusers">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
				<th scope="row"><?php _e( 'Add New Users' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
					<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
   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
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
				<th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
					<input name="illegal_names" type="text" id="illegal_names" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
					<?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
				<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
   155
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
					<?php $limited_email_domains = get_site_option( 'limited_email_domains' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
					$limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
					<textarea name="limited_email_domains" id="limited_email_domains" cols="45" rows="5">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
<?php echo esc_textarea( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
					<?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
				<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
   167
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
					<textarea name="banned_email_domains" id="banned_email_domains" cols="45" rows="5">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
<?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
					<?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
		<h3><?php _e('New Site Settings'); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
		<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
				<th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
					<textarea name="welcome_email" id="welcome_email" rows="5" cols="45" class="large-text">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
<?php echo esc_textarea( get_site_option( 'welcome_email' ) ) ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
					<?php _e( 'The welcome email sent to new site owners.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
				<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
   190
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
					<textarea name="welcome_user_email" id="welcome_user_email" rows="5" cols="45" class="large-text">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
<?php echo esc_textarea( get_site_option( 'welcome_user_email' ) ) ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
					<?php _e( 'The welcome email sent to new users.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   195
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
				<th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
					<textarea name="first_post" id="first_post" rows="5" cols="45" class="large-text">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
<?php echo esc_textarea( get_site_option( 'first_post' ) ) ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   202
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   203
					<?php _e( 'The first post on a new site.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   204
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   205
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
				<th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   208
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   209
					<textarea name="first_page" id="first_page" rows="5" cols="45" class="large-text">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   210
<?php echo esc_textarea( get_site_option( 'first_page' ) ) ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   211
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
					<?php _e( 'The first page on a new site.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   213
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   214
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   215
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   216
				<th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   217
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   218
					<textarea name="first_comment" id="first_comment" rows="5" cols="45" class="large-text">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   219
<?php echo esc_textarea( get_site_option( 'first_comment' ) ) ?></textarea>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   220
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   221
					<?php _e( 'The first comment on a new site.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   222
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   223
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   224
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   225
				<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
   226
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
					<input type="text" size="40" name="first_comment_author" id="first_comment_author" value="<?php echo get_site_option('first_comment_author') ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   229
					<?php _e( 'The author of the first comment on a new site.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   230
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
				<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
   234
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   235
					<input type="text" size="40" name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   236
					<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
					<?php _e( 'The URL for the first comment on a new site.' ) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   238
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   239
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   240
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
		<h3><?php _e( 'Upload Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
		<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   243
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   244
				<th scope="row"><?php _e( 'Site upload space' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
				<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" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   247
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   249
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   250
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   251
				<th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
				<td><input name="upload_filetypes" type="text" id="upload_filetypes" class="large-text" value="<?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?>" size="45" /></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   254
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   255
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   256
				<th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   257
				<td><?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   258
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   259
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   260
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   261
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
		$languages = get_available_languages();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
		if ( ! empty( $languages ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   264
			$lang = get_site_option( 'WPLANG' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   265
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   266
		<h3><?php _e( 'Language Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
		<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   268
				<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   269
					<th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   270
					<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   271
						<select name="WPLANG" id="WPLANG">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   272
							<?php mu_dropdown_languages( $languages, get_site_option( 'WPLANG' ) ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   273
						</select>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   274
					</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
				</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   276
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   277
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   278
		} // languages
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   279
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   280
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   281
		<h3><?php _e( 'Menu Settings' ); ?></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   282
		<table id="menu" class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
			<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   284
				<th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   285
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   286
			<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   287
			$menu_perms = get_site_option( 'menu_items' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   288
			$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
			foreach ( (array) $menu_items as $key => $val ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
				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
   291
			}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
			?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   294
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   297
		<?php do_action( 'wpmu_options' ); // Add more options here ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   298
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   299
		<?php submit_button(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   300
	</form>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   301
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   302
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   303
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>