8 */ |
8 */ |
9 |
9 |
10 /** Load WordPress Administration Bootstrap */ |
10 /** Load WordPress Administration Bootstrap */ |
11 require_once( dirname( __FILE__ ) . '/admin.php' ); |
11 require_once( dirname( __FILE__ ) . '/admin.php' ); |
12 |
12 |
13 /** WordPress Translation Install API */ |
13 /** WordPress Translation Installation API */ |
14 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); |
14 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); |
15 |
15 |
16 if ( ! is_multisite() ) |
|
17 wp_die( __( 'Multisite support is not enabled.' ) ); |
|
18 |
|
19 if ( ! current_user_can( 'manage_network_options' ) ) |
16 if ( ! current_user_can( 'manage_network_options' ) ) |
20 wp_die( __( 'You do not have permission to access this page.' ), 403 ); |
17 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); |
21 |
18 |
22 $title = __( 'Network Settings' ); |
19 $title = __( 'Network Settings' ); |
23 $parent_file = 'settings.php'; |
20 $parent_file = 'settings.php'; |
24 |
21 |
25 /** |
22 // Handle network admin email change requests |
26 * Print JavaScript in the header on the Network Settings screen. |
23 if ( ! empty( $_GET[ 'network_admin_hash' ] ) ) { |
27 * |
24 $new_admin_details = get_site_option( 'network_admin_hash' ); |
28 * @since 4.1.0 |
25 $redirect = 'settings.php?updated=false'; |
29 */ |
26 if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details[ 'hash' ], $_GET[ 'network_admin_hash' ] ) && ! empty( $new_admin_details[ 'newemail' ] ) ) { |
30 function network_settings_add_js() { |
27 update_site_option( 'admin_email', $new_admin_details[ 'newemail' ] ); |
31 ?> |
28 delete_site_option( 'network_admin_hash' ); |
32 <script type="text/javascript"> |
29 delete_site_option( 'new_admin_email' ); |
33 jQuery(document).ready( function($) { |
30 $redirect = 'settings.php?updated=true'; |
34 var languageSelect = $( '#WPLANG' ); |
31 } |
35 $( 'form' ).submit( function() { |
32 wp_redirect( network_admin_url( $redirect ) ); |
36 // Don't show a spinner for English and installed languages, |
33 exit; |
37 // as there is nothing to download. |
34 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_network_admin_email' == $_GET['dismiss'] ) { |
38 if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) { |
35 check_admin_referer( 'dismiss_new_network_admin_email' ); |
39 $( '#submit', this ).after( '<span class="spinner language-install-spinner" />' ); |
36 delete_site_option( 'network_admin_hash' ); |
40 } |
37 delete_site_option( 'new_admin_email' ); |
41 }); |
38 wp_redirect( network_admin_url( 'settings.php?updated=true' ) ); |
42 }); |
39 exit; |
43 </script> |
|
44 <?php |
|
45 } |
40 } |
|
41 |
46 add_action( 'admin_head', 'network_settings_add_js' ); |
42 add_action( 'admin_head', 'network_settings_add_js' ); |
47 |
43 |
48 get_current_screen()->add_help_tab( array( |
44 get_current_screen()->add_help_tab( array( |
49 'id' => 'overview', |
45 'id' => 'overview', |
50 'title' => __('Overview'), |
46 'title' => __('Overview'), |
59 '<p>' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '</p>' |
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>' |
60 ) ); |
56 ) ); |
61 |
57 |
62 get_current_screen()->set_help_sidebar( |
58 get_current_screen()->set_help_sidebar( |
63 '<p><strong>' . __('For more information:') . '</strong></p>' . |
59 '<p><strong>' . __('For more information:') . '</strong></p>' . |
64 '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen" target="_blank">Documentation on Network Settings</a>') . '</p>' . |
60 '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Settings_Screen">Documentation on Network Settings</a>') . '</p>' . |
65 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' |
61 '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>' |
66 ); |
62 ); |
67 |
63 |
68 if ( $_POST ) { |
64 if ( $_POST ) { |
69 /** This action is documented in wp-admin/network/edit.php */ |
65 /** This action is documented in wp-admin/network/edit.php */ |
70 do_action( 'wpmuadminedit' ); |
66 do_action( 'wpmuadminedit' ); |
80 $options = array( |
76 $options = array( |
81 'registrationnotification', 'registration', 'add_new_users', 'menu_items', |
77 'registrationnotification', 'registration', 'add_new_users', 'menu_items', |
82 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', |
78 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', |
83 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', |
79 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', |
84 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled', |
80 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled', |
85 'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email', |
81 'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'new_admin_email', |
|
82 'first_comment_email', |
86 ); |
83 ); |
87 |
84 |
88 // Handle translation install. |
85 // Handle translation installation. |
89 if ( ! empty( $_POST['WPLANG'] ) && wp_can_install_language_pack() ) { // @todo: Skip if already installed |
86 if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) { |
90 $language = wp_download_language_pack( $_POST['WPLANG'] ); |
87 $language = wp_download_language_pack( $_POST['WPLANG'] ); |
91 if ( $language ) { |
88 if ( $language ) { |
92 $_POST['WPLANG'] = $language; |
89 $_POST['WPLANG'] = $language; |
93 } |
90 } |
94 } |
91 } |
101 } |
98 } |
102 |
99 |
103 /** |
100 /** |
104 * Fires after the network options are updated. |
101 * Fires after the network options are updated. |
105 * |
102 * |
106 * @since MU |
103 * @since MU (3.0.0) |
107 */ |
104 */ |
108 do_action( 'update_wpmu_options' ); |
105 do_action( 'update_wpmu_options' ); |
109 |
106 |
110 wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) ); |
107 wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) ); |
111 exit(); |
108 exit(); |
112 } |
109 } |
113 |
110 |
114 include( ABSPATH . 'wp-admin/admin-header.php' ); |
111 include( ABSPATH . 'wp-admin/admin-header.php' ); |
115 |
112 |
116 if ( isset( $_GET['updated'] ) ) { |
113 if ( isset( $_GET['updated'] ) ) { |
117 ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Options saved.' ) ?></p></div><?php |
114 ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ) ?></p></div><?php |
118 } |
115 } |
119 ?> |
116 ?> |
120 |
117 |
121 <div class="wrap"> |
118 <div class="wrap"> |
122 <h2><?php echo esc_html( $title ); ?></h2> |
119 <h1><?php echo esc_html( $title ); ?></h1> |
123 <form method="post" action="settings.php" novalidate="novalidate"> |
120 <form method="post" action="settings.php" novalidate="novalidate"> |
124 <?php wp_nonce_field( 'siteoptions' ); ?> |
121 <?php wp_nonce_field( 'siteoptions' ); ?> |
125 <h3><?php _e( 'Operational Settings' ); ?></h3> |
122 <h2><?php _e( 'Operational Settings' ); ?></h2> |
126 <table class="form-table"> |
123 <table class="form-table"> |
127 <tr> |
124 <tr> |
128 <th scope="row"><label for="site_name"><?php _e( 'Network Title' ) ?></label></th> |
125 <th scope="row"><label for="site_name"><?php _e( 'Network Title' ) ?></label></th> |
129 <td> |
126 <td> |
130 <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( $current_site->site_name ) ?>" /> |
127 <input name="site_name" type="text" id="site_name" class="regular-text" value="<?php echo esc_attr( get_network()->site_name ) ?>" /> |
131 </td> |
128 </td> |
132 </tr> |
129 </tr> |
133 |
130 |
134 <tr> |
131 <tr> |
135 <th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th> |
132 <th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th> |
136 <td> |
133 <td> |
137 <input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" /> |
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' ) ) ?>" /> |
138 <p class="description" id="admin-email-desc"> |
135 <p class="description" id="admin-email-desc"> |
139 <?php _e( 'This email address will receive notifications. Registration and support emails will also come from this address.' ); ?> |
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>' ); ?> |
140 </p> |
137 </p> |
|
138 <?php |
|
139 $new_admin_email = get_site_option( 'new_admin_email' ); |
|
140 if ( $new_admin_email && $new_admin_email != get_site_option( 'admin_email' ) ) : ?> |
|
141 <div class="updated inline"> |
|
142 <p><?php |
|
143 printf( |
|
144 /* translators: %s: new network admin email */ |
|
145 __( 'There is a pending change of the network admin email to %s.' ), |
|
146 '<code>' . esc_html( $new_admin_email ) . '</code>' |
|
147 ); |
|
148 printf( |
|
149 ' <a href="%1$s">%2$s</a>', |
|
150 esc_url( wp_nonce_url( network_admin_url( 'settings.php?dismiss=new_network_admin_email' ), 'dismiss_new_network_admin_email' ) ), |
|
151 __( 'Cancel' ) |
|
152 ); |
|
153 ?></p> |
|
154 </div> |
|
155 <?php endif; ?> |
141 </td> |
156 </td> |
142 </tr> |
157 </tr> |
143 </table> |
158 </table> |
144 <h3><?php _e( 'Registration Settings' ); ?></h3> |
159 <h2><?php _e( 'Registration Settings' ); ?></h2> |
145 <table class="form-table"> |
160 <table class="form-table"> |
146 <tr> |
161 <tr> |
147 <th scope="row"><?php _e( 'Allow new registrations' ) ?></th> |
162 <th scope="row"><?php _e( 'Allow new registrations' ) ?></th> |
148 <?php |
163 <?php |
149 if ( !get_site_option( 'registration' ) ) |
164 if ( !get_site_option( 'registration' ) ) |
151 $reg = get_site_option( 'registration' ); |
166 $reg = get_site_option( 'registration' ); |
152 ?> |
167 ?> |
153 <td> |
168 <td> |
154 <fieldset> |
169 <fieldset> |
155 <legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend> |
170 <legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend> |
156 <label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br /> |
171 <label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled' ); ?></label><br /> |
157 <label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br /> |
172 <label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered' ); ?></label><br /> |
158 <label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog') ?> /> <?php _e( 'Logged in users may register new sites.' ); ?></label><br /> |
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 /> |
159 <label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all') ?> /> <?php _e( 'Both sites and user accounts can be registered.' ); ?></label> |
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> |
160 <?php if ( is_subdomain_install() ) { |
175 <?php if ( is_subdomain_install() ) { |
161 echo '<p class="description">' . __( 'If registration is disabled, please set <code>NOBLOGREDIRECT</code> in <code>wp-config.php</code> to a URL you will redirect visitors to if they visit a non-existent site.' ) . '</p>'; |
176 echo '<p class="description">'; |
|
177 /* translators: 1: NOBLOGREDIRECT 2: wp-config.php */ |
|
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.' ), |
|
179 '<code>NOBLOGREDIRECT</code>', |
|
180 '<code>wp-config.php</code>' |
|
181 ); |
|
182 echo '</p>'; |
162 } ?> |
183 } ?> |
163 </fieldset> |
184 </fieldset> |
164 </td> |
185 </td> |
165 </tr> |
186 </tr> |
166 |
187 |
169 <?php |
190 <?php |
170 if ( !get_site_option( 'registrationnotification' ) ) |
191 if ( !get_site_option( 'registrationnotification' ) ) |
171 update_site_option( 'registrationnotification', 'yes' ); |
192 update_site_option( 'registrationnotification', 'yes' ); |
172 ?> |
193 ?> |
173 <td> |
194 <td> |
174 <label><input name="registrationnotification" type="checkbox" id="registrationnotification" value="yes"<?php checked( get_site_option( 'registrationnotification' ), 'yes' ) ?> /> <?php _e( 'Send the network admin an email notification every time someone registers a site or user account.' ) ?></label> |
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> |
175 </td> |
196 </td> |
176 </tr> |
197 </tr> |
177 |
198 |
178 <tr id="addnewusers"> |
199 <tr id="addnewusers"> |
179 <th scope="row"><?php _e( 'Add New Users' ) ?></th> |
200 <th scope="row"><?php _e( 'Add New Users' ) ?></th> |
180 <td> |
201 <td> |
181 <label><input name="add_new_users" type="checkbox" id="add_new_users" value="1"<?php checked( get_site_option( 'add_new_users' ) ) ?> /> <?php _e( 'Allow site administrators to add new users to their site via the "Users → Add New" page.' ); ?></label> |
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 → Add New" page' ); ?></label> |
182 </td> |
203 </td> |
183 </tr> |
204 </tr> |
184 |
205 |
185 <tr> |
206 <tr> |
186 <th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th> |
207 <th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th> |
271 </td> |
292 </td> |
272 </tr> |
293 </tr> |
273 <tr> |
294 <tr> |
274 <th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th> |
295 <th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th> |
275 <td> |
296 <td> |
276 <input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_site_option('first_comment_author') ?>" /> |
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') ); ?>" /> |
277 <p class="description" id="first-comment-author-desc"> |
298 <p class="description" id="first-comment-author-desc"> |
278 <?php _e( 'The author of the first comment on a new site.' ) ?> |
299 <?php _e( 'The author of the first comment on a new site.' ) ?> |
|
300 </p> |
|
301 </td> |
|
302 </tr> |
|
303 <tr> |
|
304 <th scope="row"><label for="first_comment_email"><?php _e( 'First Comment Email' ) ?></label></th> |
|
305 <td> |
|
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' ) ); ?>" /> |
|
307 <p class="description" id="first-comment-email-desc"> |
|
308 <?php _e( 'The email address of the first comment author on a new site.' ) ?> |
279 </p> |
309 </p> |
280 </td> |
310 </td> |
281 </tr> |
311 </tr> |
282 <tr> |
312 <tr> |
283 <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th> |
313 <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th> |
287 <?php _e( 'The URL for the first comment on a new site.' ) ?> |
317 <?php _e( 'The URL for the first comment on a new site.' ) ?> |
288 </p> |
318 </p> |
289 </td> |
319 </td> |
290 </tr> |
320 </tr> |
291 </table> |
321 </table> |
292 <h3><?php _e( 'Upload Settings' ); ?></h3> |
322 <h2><?php _e( 'Upload Settings' ); ?></h2> |
293 <table class="form-table"> |
323 <table class="form-table"> |
294 <tr> |
324 <tr> |
295 <th scope="row"><?php _e( 'Site upload space' ) ?></th> |
325 <th scope="row"><?php _e( 'Site upload space' ) ?></th> |
296 <td> |
326 <td> |
297 <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br /> |
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 /> |
298 <p class="screen-reader-text" id="blog-upload-space-desc"> |
328 <p class="screen-reader-text" id="blog-upload-space-desc"> |
299 <?php _e( 'Size in megabytes' ) ?> |
329 <?php _e( 'Size in megabytes' ) ?> |
300 </p> |
330 </p> |
301 </td> |
331 </td> |
302 </tr> |
332 </tr> |
312 </tr> |
342 </tr> |
313 |
343 |
314 <tr> |
344 <tr> |
315 <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th> |
345 <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th> |
316 <td> |
346 <td> |
317 <?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?> |
347 <?php |
|
348 printf( |
|
349 /* translators: %s: File size in kilobytes */ |
|
350 __( '%s KB' ), |
|
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 ) ) . '" />' |
|
352 ); |
|
353 ?> |
318 <p class="screen-reader-text" id="fileupload-maxk-desc"> |
354 <p class="screen-reader-text" id="fileupload-maxk-desc"> |
319 <?php _e( 'Size in kilobytes' ) ?> |
355 <?php _e( 'Size in kilobytes' ) ?> |
320 </p> |
356 </p> |
321 </td> |
357 </td> |
322 </tr> |
358 </tr> |
325 <?php |
361 <?php |
326 $languages = get_available_languages(); |
362 $languages = get_available_languages(); |
327 $translations = wp_get_available_translations(); |
363 $translations = wp_get_available_translations(); |
328 if ( ! empty( $languages ) || ! empty( $translations ) ) { |
364 if ( ! empty( $languages ) || ! empty( $translations ) ) { |
329 ?> |
365 ?> |
330 <h3><?php _e( 'Language Settings' ); ?></h3> |
366 <h2><?php _e( 'Language Settings' ); ?></h2> |
331 <table class="form-table"> |
367 <table class="form-table"> |
332 <tr> |
368 <tr> |
333 <th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th> |
369 <th><label for="WPLANG"><?php _e( 'Default Language' ); ?></label></th> |
334 <td> |
370 <td> |
335 <?php |
371 <?php |
336 $lang = get_site_option( 'WPLANG' ); |
372 $lang = get_site_option( 'WPLANG' ); |
337 if ( ! in_array( $lang, $languages ) ) { |
373 if ( ! in_array( $lang, $languages ) ) { |
338 $lang = ''; |
374 $lang = ''; |
339 } |
375 } |
340 |
376 |
341 wp_dropdown_languages( array( |
377 wp_dropdown_languages( |
342 'name' => 'WPLANG', |
378 array( |
343 'id' => 'WPLANG', |
379 'name' => 'WPLANG', |
344 'selected' => $lang, |
380 'id' => 'WPLANG', |
345 'languages' => $languages, |
381 'selected' => $lang, |
346 'translations' => $translations, |
382 'languages' => $languages, |
347 'show_available_translations' => wp_can_install_language_pack(), |
383 'translations' => $translations, |
348 ) ); |
384 'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(), |
|
385 ) |
|
386 ); |
349 ?> |
387 ?> |
350 </td> |
388 </td> |
351 </tr> |
389 </tr> |
352 </table> |
390 </table> |
353 <?php |
391 <?php |
354 } |
392 } |
355 ?> |
393 ?> |
356 |
394 |
357 <h3><?php _e( 'Menu Settings' ); ?></h3> |
395 <h2><?php _e( 'Menu Settings' ); ?></h2> |
358 <table id="menu" class="form-table"> |
396 <table id="menu" class="form-table"> |
359 <tr> |
397 <tr> |
360 <th scope="row"><?php _e( 'Enable administration menus' ); ?></th> |
398 <th scope="row"><?php _e( 'Enable administration menus' ); ?></th> |
361 <td> |
399 <td> |
362 <?php |
400 <?php |
363 $menu_perms = get_site_option( 'menu_items' ); |
401 $menu_perms = get_site_option( 'menu_items' ); |
364 /** |
402 /** |
365 * Filter available network-wide administration menu options. |
403 * Filters available network-wide administration menu options. |
366 * |
404 * |
367 * Options returned to this filter are output as individual checkboxes that, when selected, |
405 * Options returned to this filter are output as individual checkboxes that, when selected, |
368 * enable site administrator access to the specified administration menu in certain contexts. |
406 * enable site administrator access to the specified administration menu in certain contexts. |
369 * |
407 * |
370 * Adding options for specific menus here hinges on the appropriate checks and capabilities |
408 * Adding options for specific menus here hinges on the appropriate checks and capabilities |
371 * being in place in the site dashboard on the other side. For instance, when the single |
409 * being in place in the site dashboard on the other side. For instance, when the single |
372 * default option, 'plugins' is enabled, site administrators are granted access to the Plugins |
410 * default option, 'plugins' is enabled, site administrators are granted access to the Plugins |
373 * screen in their individual sites' dashboards. |
411 * screen in their individual sites' dashboards. |
374 * |
412 * |
375 * @since MU |
413 * @since MU (3.0.0) |
376 * |
414 * |
377 * @param array $admin_menus The menu items available. |
415 * @param array $admin_menus The menu items available. |
378 */ |
416 */ |
379 $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) ); |
417 $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) ); |
380 $fieldset_end = ''; |
418 $fieldset_end = ''; |