Opened 9 years ago
Closed 9 years ago
#20877 closed defect (bug) (fixed)
Customizer should return to front-end, when launched from front-end
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.4 | Priority: | low |
Severity: | normal | Version: | 3.4 |
Component: | Customize | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
When launching the Customizer (Live Preview) from the front-end using the admin bar (toolbar), upon hitting the Close button, you'd expect it to return you where you were, but instead it takes you to themes.php in the admin panel. Jane agreed it would be better to return to front-end, but was also concerned it was too late to make such a change.
Attachments (4)
Change History (14)
#4
@
9 years ago
Attached patch opens the preview on the current front-end page you are on, and then returns you to that front-end page when you are done. Needs to be tested on mapped/unmapped, SSL/non-SSL, etc.. If the domain is invalid (say, ?url=http://wordpress.org) you end up with a white screen.
#7
@
9 years ago
20877.4.diff adds some same-origin checking via wp_validate_redirect(). This ensures that the $return value is also clean (at least to the domain), which 20877.3.diff does not handle.
I'll slate this for 3.4 for investigation. Not concerned about it, but it could be easy.
The customizer should probably listen to wp_http_referer(), which means we could potentially use ?_wp_http_referer here.