[wp-trac] [WordPress Trac] #47954: Create a sanity check for siteurl and home changes

WordPress Trac noreply at wordpress.org
Thu Sep 5 14:09:46 UTC 2019

#47954: Create a sanity check for siteurl and home changes
 Reporter:  Otto42          |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  ui, administration

Comment (by Clorith):

 Had a quick look, and the concept isn't bad.

 I would prefer if it used core constants for the expiry-time, instead of
 plain numbers, it makes it easier to discern what the time actually is,
 and would probably also do well with a filter to modify the expiry time.
 The default time of 30 minutes sounds reasonable though.

 Using `30 * MINUTE_IN_SECONDS` would make this default much clearer.

 I noticed the restore feature is hooked to `registered_taxonomy`, this
 needs a much earlier hook, a quick test with `init` shows that even that
 is too late. WordPress does an automatic redirect to the URL configured,
 and that redirect is a 301, which means browsers will cache the redirect,
 making it near impossible for the average user to utilize the restore URL.


 For the part that's not done yet, which I personally think is the more
 important aspect of this, the loopback to check if a new URL will still
 work before the user is locked out, this should be one function for all of
 core (I've made mention of this elsewhere as well today), and I would
 prefer to see a proper implementation of such a function for use here

Ticket URL: <https://core.trac.wordpress.org/ticket/47954#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list