[wp-trac] [WordPress Trac] #32637: Customizer should default to returning to the front page, not the themes page
WordPress Trac
noreply at wordpress.org
Tue Jun 16 06:56:55 UTC 2015
#32637: Customizer should default to returning to the front page, not the themes
page
-------------------------------------------------+-------------------------
Reporter: celloexpressions | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Customize | Release
Severity: normal | Version: 4.0
Keywords: needs-patch good-first-bug 2nd- | Resolution:
opinion | Focuses: ui
-------------------------------------------------+-------------------------
Changes (by McGuive7):
* keywords: needs-patch good-first-bug => needs-patch good-first-bug 2nd-
opinion
Comment:
I don't know enough about the ongoing customizer conversation to agree or
disagree with this one, however it does seem like there's the opportunity
to do one more check in case both `return` and `url` parameters are
absent. We could check to see if `$_SERVER['HTTP_REFERER']` exists, and if
so check to see if it contains the admin url with something like this:
{{{
if ( isset( $_SERVER['HTTP_REFERER'] ) && false !== strpos(
$_SERVER['HTTP_REFERER'], admin_url() ) ) {
$return = admin_url();
} else {
$return = home_url( '/' );
}
}}}
Happy to turn this into a patch if others think it makes sense - I'm
curious to know if this seems like a warranted check for the sake of
thoroughness.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32637#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list