#31782 closed defect (bug) (wontfix)
Customizer: Use proper preview URL for Live Preview links
Reported by: | mattwiebe | Owned by: | ocean90 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Customize | Keywords: | needs-patch |
Focuses: | javascript | Cc: |
Description
You're doing more work then is needed, since the theme object already has the theme.actions.customize
URL built in. Also, it breaks on WordPress.com since our themes are in subdirectories. Using theme.actions.customize
is how wp-admin/themes.php
does it.
Attachments (1)
Change History (11)
#4
@
10 years ago
- Keywords commit added
- Owner changed from westonruter to ocean90
- Status changed from assigned to reviewing
#6
@
10 years ago
- Keywords needs-patch added; has-patch commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Sorry, totally missed this.
This was done so that we can preserve url
and return
URL parameters, to make the experience smoother (I changed it from using theme.actions.customize
for that reason). The page you're previewing shouldn't be changed when you switch themes, which currently works if you don't navigate further in the preview and will be improved westonruter's ticket that adds history and url updating for that.
I'd suggest correcting the bug with assuming that the theme id can be used as the query arg by using either an additional available field or adding a field to wp_prepare_themes_for_js()
. Unfortunately the way it currently works, we need to build the URL in PHP with the adding/removing query args, which shouldn't happen in prepare_themes_for_js.
Good re-use of the data we're already passing to the template.