summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-admin/options.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/wp-admin/options.php')
-rw-r--r--src/wp-admin/options.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
index 8348b24c8e..23d0f3971b 100644
--- a/src/wp-admin/options.php
+++ b/src/wp-admin/options.php
@@ -404,21 +404,32 @@ foreach ( (array) $options as $option ) :
continue;
}
+ if ( 'home' === $option->option_name && defined( 'WP_HOME' ) ) {
+ $disabled = true;
+ }
+
+ if ( 'siteurl' === $option->option_name && defined( 'WP_SITEURL' ) ) {
+ $disabled = true;
+ }
+
if ( is_serialized( $option->option_value ) ) {
if ( is_serialized_string( $option->option_value ) ) {
// This is a serialized string, so we should display it.
$value = maybe_unserialize( $option->option_value );
$options_to_update[] = $option->option_name;
- $class = 'all-options';
} else {
$value = 'SERIALIZED DATA';
$disabled = true;
- $class = 'all-options disabled';
}
} else {
$value = $option->option_value;
$options_to_update[] = $option->option_name;
- $class = 'all-options';
+ }
+
+ $class = 'all-options';
+
+ if ( $disabled ) {
+ $class .= ' disabled';
}
$name = esc_attr( $option->option_name );