Make WordPress Core

Opened 3 weeks ago

Closed 45 hours ago

Last modified 22 hours ago

#63341 closed defect (bug) (fixed)

siteurl and home fields not disabled in wp-admin/options.php when defined in wp-config.php

Reported by: dilipbheda's profile dilipbheda Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: has-patch has-screenshots
Focuses: administration Cc:

Description

When visiting the wp-admin/options.php page, the siteurl and home fields remain editable, even if the WP_SITEURL and WP_HOME constants are defined in wp-config.php.

Expected Behavior:
These fields should be disabled (read-only) just like they are on the General Settings page (wp-admin/options-general.php) when the constants are defined.

References:

Change History (8)

This ticket was mentioned in PR #8732 on WordPress/wordpress-develop by @dilipbheda.


3 weeks ago
#1

This ticket was mentioned in PR #8733 on WordPress/wordpress-develop by @Presskopp.


3 weeks ago
#2

If a setting is defined in wp-config.php, disable the respective field.

Trac ticket: 63341

#3 @Presskopp
3 weeks ago

Good point! Patch made.

@dilipbheda commented on PR #8732:


3 weeks ago
#4

I'm closing this PR as another contributor has submitted a new one with more optimized code.

New PR https://github.com/WordPress/wordpress-develop/pull/8733

#5 @SergeyBiryukov
45 hours ago

  • Milestone changed from Awaiting Review to 6.9

#6 @SergeyBiryukov
45 hours ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 60237:

Options, Meta APIs: Disable siteurl and home fields on All Settings screen when defined as constants.

This aims to bring consistency with the General Settings screen, where these fields are disabled (read-only) if the WP_SITEURL and WP_HOME constants are defined in wp-config.php.

Follow-up to [208], [5093], [5394].

Props dilipbheda, Presskopp, SergeyBiryukov.
Fixes #63341.

#7 @SergeyBiryukov
45 hours ago

In 60238:

Coding Standards: Move $class variable in wp-admin/options.php closer to where it's used.

Follow-up to [60237].

See #63341.

@SergeyBiryukov commented on PR #8733:


22 hours ago
#8

Thanks for the PR! Merged in r60237.

Note: See TracTickets for help on using tickets.