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