Skip to content

Commit 0c1583f

Browse files
authored
Update options.php
If a setting is defined in wp-config.php, disable the respective field.
1 parent 2e4be8b commit 0c1583f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/wp-admin/options.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,11 @@
416416
$class = 'all-options disabled';
417417
}
418418
} else {
419+
if ( in_array( $option->option_name, [ 'siteurl', 'home' ], true ) && defined( 'WP_' . strtoupper( $option->option_name ) ) ) {
420+
// If a setting is defined in wp-config.php, disable the respective field.
421+
$disabled = true;
422+
}
423+
419424
$value = $option->option_value;
420425
$options_to_update[] = $option->option_name;
421426
$class = 'all-options';

0 commit comments

Comments
 (0)