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