Changes between Initial Version and Version 1 of Ticket #10970, comment 37
- Timestamp:
- 08/10/2017 01:06:35 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10970, comment 37
initial v1 1 1 Re-uploading a patch I'd written for #41595. As a workaround, while TPTB discuss a "proper" longer-term solution, this simply checks for a define('WP_DISABLE_URLCHANGES') and, if so defined, hides those fields. Suitable for use in wp-config.php, probably would work in a site-specific plugin too (haven't tested that yet). 2 3 I suspect my use case isn't uncommon -- we host a few hundred separate WP installs (long story), and they're all managed centrally by a single IT team. There's no way for our users to change their own URLs and have it work; they don't have access to DNS, for instance. Every so often, one of our content creators sees this box and gets ideas, and then we have to rush about to clean up their broken production site (it's always production). My patch simply hides those fields from the user, in a fairly clean way. 4 5 A friend on Twitter asked why I went with a define instead of a filter -- I simply chose that because the two settings I'm hiding also can be disabled with their own defines (the ever-popular WP_HOME and WP_SITEURL defines). Seemed more internally consistent to implement it this way.