| @@ -197,8 +197,11 @@ | ||
| 197 | 197 | if ( ! function_exists( 'get_editable_roles' ) ) { |
| 198 | 198 | require_once ABSPATH . '/wp-admin/includes/user.php'; |
| 199 | 199 | } |
| 200 | 200 | $this->user_roles = array_keys( get_editable_roles() ); |
| 201 | + if ( is_multisite() ) { | |
| 202 | + $this->user_roles[] = 'super_admin'; | |
| 203 | + } | |
| 201 | 204 | // Define some other defaults. |
| 202 | 205 | $this->custom_graphic_type = $default_values['custom_graphic_type']; |
| 203 | 206 | $this->custom_graphic_url = $default_values['custom_graphic_url']; |
| 204 | 207 | $this->custom_graphic_link = $default_values['custom_graphic_link']; |
| @@ -220,9 +223,11 @@ | ||
| 220 | 223 | * |
| 221 | 224 | * @return void |
| 222 | 225 | */ |
| 223 | 226 | protected function after_load(): void { |
| 224 | - $this->user_roles = array_values( $this->user_roles ); | |
| 227 | + $this->user_roles = array_values( $this->user_roles ); | |
| 228 | + $this->force_auth_roles = array_values( array_intersect( $this->force_auth_roles, $this->user_roles ) ); | |
| 229 | + $this->force_auth = array() !== $this->force_auth_roles; | |
| 225 | 230 | } |
| 226 | 231 | |
| 227 | 232 | /** |
| 228 | 233 | * Check if a plugin is in conflict with the current instance. |