wp/wp-admin/network/settings.php
author ymh <ymh.work@gmail.com>
Mon, 14 Oct 2019 17:39:30 +0200
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
permissions -rw-r--r--
resynchronize code repo with production
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
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    13
/** WordPress Translation Installation API */
5
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 ( ! current_user_can( 'manage_network_options' ) )
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    17
	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
0
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
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    22
// Handle network admin email change requests
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    23
if ( ! empty( $_GET[ 'network_admin_hash' ] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    24
	$new_admin_details = get_site_option( 'network_admin_hash' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    25
	$redirect = 'settings.php?updated=false';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    26
	if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details[ 'hash' ], $_GET[ 'network_admin_hash' ] ) && ! empty( $new_admin_details[ 'newemail' ] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    27
		update_site_option( 'admin_email', $new_admin_details[ 'newemail' ] );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    28
		delete_site_option( 'network_admin_hash' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    29
		delete_site_option( 'new_admin_email' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    30
		$redirect = 'settings.php?updated=true';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    31
	}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    32
	wp_redirect( network_admin_url( $redirect ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    33
	exit;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    34
} elseif ( ! empty( $_GET['dismiss'] ) && 'new_network_admin_email' == $_GET['dismiss'] ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    35
	check_admin_referer( 'dismiss_new_network_admin_email' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    36
	delete_site_option( 'network_admin_hash' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    37
	delete_site_option( 'new_admin_email' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    38
	wp_redirect( network_admin_url( 'settings.php?updated=true' ) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    39
	exit;
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    40
}
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    41
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    42
add_action( 'admin_head', 'network_settings_add_js' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    43
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
		'id'      => 'overview',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
		'title'   => __('Overview'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
		'content' =>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
			'<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
    49
			'<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
    50
			'<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
    51
			'<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
    52
			'<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
    53
			'<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
    54
			'<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
    55
			'<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
    56
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
get_current_screen()->set_help_sidebar(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
	'<p><strong>' . __('For more information:') . '</strong></p>' .
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    60
	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen">Documentation on Network Settings</a>') . '</p>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    61
	'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
if ( $_POST ) {
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    65
	/** This action is documented in wp-admin/network/edit.php */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    66
	do_action( 'wpmuadminedit' );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
	check_admin_referer( 'siteoptions' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
	$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
    71
	foreach ( $checked_options as $option_name => $option_unchecked_value ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
		if ( ! isset( $_POST[$option_name] ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
			$_POST[$option_name] = $option_unchecked_value;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
	$options = array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
		'registrationnotification', 'registration', 'add_new_users', 'menu_items',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
		'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
		'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
		'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled',
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    81
		'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'new_admin_email',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    82
		'first_comment_email',
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
	);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    85
	// Handle translation installation.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    86
	if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) {
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    87
		$language = wp_download_language_pack( $_POST['WPLANG'] );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    88
		if ( $language ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    89
			$_POST['WPLANG'] = $language;
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    90
		}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    91
	}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    92
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
	foreach ( $options as $option_name ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
		if ( ! isset($_POST[$option_name]) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
			continue;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
		$value = wp_unslash( $_POST[$option_name] );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
		update_site_option( $option_name, $value );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   100
	/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   101
	 * Fires after the network options are updated.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   102
	 *
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   103
	 * @since MU (3.0.0)
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   104
	 */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
	do_action( 'update_wpmu_options' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
	wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
	exit();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
include( ABSPATH . 'wp-admin/admin-header.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
if ( isset( $_GET['updated'] ) ) {
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   114
	?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ) ?></p></div><?php
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
<div class="wrap">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   119
	<h1><?php echo esc_html( $title ); ?></h1>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   120
	<form method="post" action="settings.php" novalidate="novalidate">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
		<?php wp_nonce_field( 'siteoptions' ); ?>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   122
		<h2><?php _e( 'Operational Settings' ); ?></h2>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
		<table class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   124
			<tr>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   125
				<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
   126
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   127
					<input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( get_network()->site_name ) ?>" />
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   131
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
				<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
   133
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   134
					<input name="new_admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" />
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   135
					<p class="description" id="admin-email-desc">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   136
						<?php _e( 'This address is used for admin purposes. If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   137
					</p>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   138
					<?php
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   139
					$new_admin_email = get_site_option( 'new_admin_email' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   140
					if ( $new_admin_email && $new_admin_email != get_site_option( 'admin_email' ) ) : ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   141
						<div class="updated inline">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   142
						<p><?php
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   143
							printf(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   144
								/* translators: %s: new network admin email */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   145
								__( 'There is a pending change of the network admin email to %s.' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   146
								'<code>' . esc_html( $new_admin_email ) . '</code>'
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   147
							);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   148
							printf(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   149
								' <a href="%1$s">%2$s</a>',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   150
								esc_url( wp_nonce_url( network_admin_url( 'settings.php?dismiss=new_network_admin_email' ), 'dismiss_new_network_admin_email' ) ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   151
								__( 'Cancel' )
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   152
							);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   153
						?></p>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   154
						</div>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   155
					<?php endif; ?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
		</table>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   159
		<h2><?php _e( 'Registration Settings' ); ?></h2>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
		<table class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   161
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
				<th scope="row"><?php _e( 'Allow new registrations' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
				<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
				if ( !get_site_option( 'registration' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
					update_site_option( 'registration', 'none' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
				$reg = get_site_option( 'registration' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
				?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   169
					<fieldset>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   170
					<legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   171
					<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled' ); ?></label><br />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   172
					<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered' ); ?></label><br />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   173
					<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 />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   174
					<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>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   175
					<?php if ( is_subdomain_install() ) {
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   176
						echo '<p class="description">';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   177
						/* translators: 1: NOBLOGREDIRECT 2: wp-config.php */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   178
						printf( __( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   179
							'<code>NOBLOGREDIRECT</code>',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   180
							'<code>wp-config.php</code>'
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   181
						);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   182
						echo '</p>';
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   183
					} ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   184
					</fieldset>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   188
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
				<th scope="row"><?php _e( 'Registration notification' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
				<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
				if ( !get_site_option( 'registrationnotification' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
					update_site_option( 'registrationnotification', 'yes' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
				?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   195
					<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>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   199
			<tr id="addnewusers">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
				<th scope="row"><?php _e( 'Add New Users' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   202
					<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>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   203
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   204
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   205
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   206
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
				<th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   208
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   209
					<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
   210
					<p class="description" id="illegal-names-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   211
						<?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
   212
					</p>
0
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
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   216
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   217
				<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
   218
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   219
					<?php $limited_email_domains = get_site_option( 'limited_email_domains' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   220
					$limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   221
					<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
   222
<?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
   223
					<p class="description" id="limited-email-domains-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   224
						<?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
   225
					</p>
0
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
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   229
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   230
				<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
   231
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   232
					<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
   233
<?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
   234
					<p class="description" id="banned-email-domains-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   235
						<?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
   236
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   238
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   239
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   240
		</table>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   241
		<h2><?php _e( 'New Site Settings' ); ?></h2>
0
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
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   244
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
				<th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   247
					<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
   248
<?php echo esc_textarea( get_site_option( 'welcome_email' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   249
					<p class="description" id="welcome-email-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   250
						<?php _e( 'The welcome email sent to new site owners.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   251
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   254
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   255
				<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
   256
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   257
					<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
   258
<?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
   259
					<p class="description" id="welcome-user-email-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   260
						<?php _e( 'The welcome email sent to new users.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   261
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   264
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   265
				<th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   266
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   267
					<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
   268
<?php echo esc_textarea( get_site_option( 'first_post' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   269
					<p class="description" id="first-post-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   270
						<?php _e( 'The first post on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   271
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   272
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   273
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   274
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
				<th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   276
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   277
					<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
   278
<?php echo esc_textarea( get_site_option( 'first_page' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   279
					<p class="description" id="first-page-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   280
						<?php _e( 'The first page on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   281
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   282
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
			</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   284
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   285
				<th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   286
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   287
					<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
   288
<?php echo esc_textarea( get_site_option( 'first_comment' ) ) ?></textarea>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   289
					<p class="description" id="first-comment-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   290
						<?php _e( 'The first comment on a new site.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   291
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
			</tr>
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"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   297
					<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo esc_attr( get_site_option('first_comment_author') ); ?>" />
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   298
					<p class="description" id="first-comment-author-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   299
						<?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
   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>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   303
			<tr>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   304
				<th scope="row"><label for="first_comment_email"><?php _e( 'First Comment Email' ) ?></label></th>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   305
				<td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   306
					<input type="text" size="40" name="first_comment_email" id="first_comment_email" aria-describedby="first-comment-email-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_email' ) ); ?>" />
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   307
					<p class="description" id="first-comment-email-desc">
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   308
						<?php _e( 'The email address of the first comment author on a new site.' ) ?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   309
					</p>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   310
				</td>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   311
			</tr>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   312
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   313
				<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
   314
				<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   315
					<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
   316
					<p class="description" id="first-comment-url-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   317
						<?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
   318
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   319
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   320
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   321
		</table>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   322
		<h2><?php _e( 'Upload Settings' ); ?></h2>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   323
		<table class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   324
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   325
				<th scope="row"><?php _e( 'Site upload space' ) ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   326
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   327
					<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ) ?>/> <?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 />
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   328
					<p class="screen-reader-text" id="blog-upload-space-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   329
						<?php _e( 'Size in megabytes' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   330
					</p>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   331
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   332
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   333
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   334
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   335
				<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
   336
				<td>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   337
					<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
   338
					<p class="description" id="upload-filetypes-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   339
						<?php _e( 'Allowed file types. Separate types by spaces.' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   340
					</p>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   341
				</td>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   342
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   343
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   344
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   345
				<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
   346
				<td>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   347
					<?php
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   348
						printf(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   349
							/* translators: %s: File size in kilobytes */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   350
							__( '%s KB' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   351
							'<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 ) ) . '" />'
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   352
						);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   353
					?>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   354
					<p class="screen-reader-text" id="fileupload-maxk-desc">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   355
						<?php _e( 'Size in kilobytes' ) ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   356
					</p>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   357
				</td>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   358
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   359
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   360
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   361
		<?php
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   362
		$languages = get_available_languages();
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   363
		$translations = wp_get_available_translations();
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   364
		if ( ! empty( $languages ) || ! empty( $translations ) ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   365
			?>
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   366
			<h2><?php _e( 'Language Settings' ); ?></h2>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   367
			<table class="form-table">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   368
				<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   369
					<th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   370
					<td>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   371
						<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   372
						$lang = get_site_option( 'WPLANG' );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   373
						if ( ! in_array( $lang, $languages ) ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   374
							$lang = '';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   375
						}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   376
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   377
						wp_dropdown_languages(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   378
							array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   379
								'name'         => 'WPLANG',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   380
								'id'           => 'WPLANG',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   381
								'selected'     => $lang,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   382
								'languages'    => $languages,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   383
								'translations' => $translations,
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   384
								'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   385
							)
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   386
						);
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   387
						?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   388
					</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   389
				</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   390
			</table>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   391
			<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   392
		}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   393
		?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   394
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   395
		<h2><?php _e( 'Menu Settings' ); ?></h2>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   396
		<table id="menu" class="form-table">
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   397
			<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   398
				<th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   399
				<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   400
			<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   401
			$menu_perms = get_site_option( 'menu_items' );
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   402
			/**
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   403
			 * Filters available network-wide administration menu options.
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   404
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   405
			 * 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
   406
			 * 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
   407
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   408
			 * 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
   409
			 * 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
   410
			 * 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
   411
			 * screen in their individual sites' dashboards.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   412
			 *
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   413
			 * @since MU (3.0.0)
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   414
			 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   415
			 * @param array $admin_menus The menu items available.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   416
			 */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   417
			$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   418
			$fieldset_end = '';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   419
			if ( count( (array) $menu_items ) > 1 ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   420
				echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   421
				$fieldset_end = '</fieldset>';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   422
			}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   423
			foreach ( (array) $menu_items as $key => $val ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   424
				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
   425
			}
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   426
			echo $fieldset_end;
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   427
			?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   428
				</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   429
			</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   430
		</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   431
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   432
		<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   433
		/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   434
		 * 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
   435
		 *
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   436
		 * @since MU (3.0.0)
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   437
		 */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   438
		do_action( 'wpmu_options' ); ?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   439
		<?php submit_button(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   440
	</form>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   441
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   442
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   443
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>