run:R W Run
245 By
2026-03-11 16:18:51
R W Run
1 KB
2026-03-11 16:18:51
R W Run
255 By
2026-03-11 16:18:51
R W Run
249 By
2026-03-11 16:18:51
R W Run
908 By
2026-03-11 16:18:51
R W Run
251 By
2026-03-11 16:18:51
R W Run
2.84 KB
2026-03-11 16:18:51
R W Run
4.69 KB
2026-03-11 16:18:51
R W Run
266 By
2026-03-11 16:18:51
R W Run
377 By
2026-03-11 16:18:51
R W Run
249 By
2026-03-11 16:18:51
R W Run
249 By
2026-03-11 16:18:51
R W Run
254 By
2026-03-11 16:18:51
R W Run
21.51 KB
2026-03-11 16:18:51
R W Run
247 By
2026-03-11 16:18:51
R W Run
7.59 KB
2026-03-11 16:18:51
R W Run
9.38 KB
2026-03-11 16:18:51
R W Run
5.47 KB
2026-03-11 16:18:51
R W Run
6.71 KB
2026-03-11 16:18:51
R W Run
11.53 KB
2026-03-11 16:18:51
R W Run
14.2 KB
2026-03-11 16:18:51
R W Run
264 By
2026-03-11 16:18:51
R W Run
374 By
2026-03-11 16:18:51
R W Run
15.61 KB
2026-03-11 16:18:51
R W Run
253 By
2026-03-11 16:18:51
R W Run
450 By
2026-03-11 16:18:51
R W Run
4.83 KB
2026-03-11 16:18:51
R W Run
253 By
2026-03-11 16:18:51
R W Run
5.11 KB
2026-03-11 16:18:51
R W Run
9.27 KB
2026-03-11 16:18:51
R W Run
error_log
📄site-settings.php
1<?php
2/**
3 * Edit Site Settings Administration Screen
4 *
5 * @package WordPress
6 * @subpackage Multisite
7 * @since 3.1.0
8 */
9
10/** Load WordPress Administration Bootstrap */
11require_once __DIR__ . '/admin.php';
12
13if ( ! current_user_can( 'manage_sites' ) ) {
14 wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
15}
16
17get_current_screen()->add_help_tab( get_site_screen_help_tab_args() );
18get_current_screen()->set_help_sidebar( get_site_screen_help_sidebar_content() );
19
20$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
21
22if ( ! $id ) {
23 wp_die( __( 'Invalid site ID.' ) );
24}
25
26$details = get_site( $id );
27if ( ! $details ) {
28 wp_die( __( 'The requested site does not exist.' ) );
29}
30
31if ( ! can_edit_network( $details->site_id ) ) {
32 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
33}
34
35$is_main_site = is_main_site( $id );
36
37if ( isset( $_REQUEST['action'] ) && 'update-site' === $_REQUEST['action'] && is_array( $_POST['option'] ) ) {
38 check_admin_referer( 'edit-site' );
39
40 switch_to_blog( $id );
41
42 $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form.
43 foreach ( (array) $_POST['option'] as $key => $val ) {
44 $key = wp_unslash( $key );
45 $val = wp_unslash( $val );
46 if ( 0 === $key || is_array( $val ) || in_array( $key, $skip_options, true ) ) {
47 continue; // Avoids "0 is a protected WP option and may not be modified" error when editing blog options.
48 }
49 update_option( $key, $val );
50 }
51
52 /**
53 * Fires after the site options are updated.
54 *
55 * @since 3.0.0
56 * @since 4.4.0 Added `$id` parameter.
57 *
58 * @param int $id The ID of the site being updated.
59 */
60 do_action( 'wpmu_update_blog_options', $id );
61
62 restore_current_blog();
63 wp_redirect(
64 add_query_arg(
65 array(
66 'update' => 'updated',
67 'id' => $id,
68 ),
69 'site-settings.php'
70 )
71 );
72 exit;
73}
74
75if ( isset( $_GET['update'] ) ) {
76 $messages = array();
77 if ( 'updated' === $_GET['update'] ) {
78 $messages[] = __( 'Site options updated.' );
79 }
80}
81
82// Used in the HTML title tag.
83/* translators: %s: Site title. */
84$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
85
86$parent_file = 'sites.php';
87$submenu_file = 'sites.php';
88
89require_once ABSPATH . 'wp-admin/admin-header.php';
90
91?>
92
93<div class="wrap">
94<h1 id="edit-site"><?php echo $title; ?></h1>
95<p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
96
97<?php
98
99network_edit_site_nav(
100 array(
101 'blog_id' => $id,
102 'selected' => 'site-settings',
103 )
104);
105
106if ( ! empty( $messages ) ) {
107 $notice_args = array(
108 'type' => 'success',
109 'dismissible' => true,
110 'id' => 'message',
111 );
112
113 foreach ( $messages as $msg ) {
114 wp_admin_notice( $msg, $notice_args );
115 }
116}
117?>
118<form method="post" action="site-settings.php?action=update-site">
119 <?php wp_nonce_field( 'edit-site' ); ?>
120 <input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
121 <table class="form-table" role="presentation">
122 <?php
123 $blog_prefix = $wpdb->get_blog_prefix( $id );
124 $options = $wpdb->get_results(
125 $wpdb->prepare(
126 'SELECT * FROM %i
127 WHERE option_name NOT LIKE %s
128 AND option_name NOT LIKE %s',
129 "{$blog_prefix}options",
130 $wpdb->esc_like( '_' ) . '%',
131 '%' . $wpdb->esc_like( 'user_roles' )
132 )
133 );
134
135 foreach ( $options as $option ) {
136 if ( 'default_role' === $option->option_name ) {
137 $editblog_default_role = $option->option_value;
138 }
139
140 $disabled = false;
141 $class = 'all-options';
142
143 if ( is_serialized( $option->option_value ) ) {
144 if ( is_serialized_string( $option->option_value ) ) {
145 $option->option_value = esc_html( maybe_unserialize( $option->option_value ) );
146 } else {
147 $option->option_value = 'SERIALIZED DATA';
148 $disabled = true;
149 $class = 'all-options disabled';
150 }
151 }
152
153 if ( str_contains( $option->option_value, "\n" ) ) {
154 ?>
155 <tr class="form-field">
156 <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>" class="code"><?php echo esc_html( $option->option_name ); ?></label></th>
157 <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ); ?>]" id="<?php echo esc_attr( $option->option_name ); ?>"<?php disabled( $disabled ); ?>><?php echo esc_textarea( $option->option_value ); ?></textarea></td>
158 </tr>
159 <?php
160 } else {
161 ?>
162 <tr class="form-field">
163 <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>" class="code"><?php echo esc_html( $option->option_name ); ?></label></th>
164 <?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ), true ) ) { ?>
165 <td><code><?php echo esc_html( $option->option_value ); ?></code></td>
166 <?php } else { ?>
167 <td><input class="<?php echo $class; ?>" name="option[<?php echo esc_attr( $option->option_name ); ?>]" type="text" id="<?php echo esc_attr( $option->option_name ); ?>" value="<?php echo esc_attr( $option->option_value ); ?>" size="40" <?php disabled( $disabled ); ?> /></td>
168 <?php } ?>
169 </tr>
170 <?php
171 }
172 } // End foreach.
173
174 /**
175 * Fires at the end of the Edit Site form, before the submit button.
176 *
177 * @since 3.0.0
178 *
179 * @param int $id Site ID.
180 */
181 do_action( 'wpmueditblogaction', $id );
182 ?>
183 </table>
184 <?php submit_button(); ?>
185</form>
186
187</div>
188<?php
189require_once ABSPATH . 'wp-admin/admin-footer.php';
190