Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#31782 closed defect (bug) (wontfix)

Customizer: Use proper preview URL for Live Preview links

Reported by: mattwiebe Owned by: ocean90
Priority: normal Milestone:
Component: Customize Version: 4.2
Severity: normal Keywords: needs-patch
Cc: Focuses: javascript

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)

31782.diff (661 bytes ) - added by mattwiebe 11 years ago.

Download all attachments as: .zip

Change History (11)

@mattwiebe
11 years ago

#1 @mattwiebe
11 years ago

  • Keywords has-patch added

#2 @westonruter
11 years ago

  • Milestone Awaiting Review4.2

#3 @DrewAPicture
11 years ago

  • Owner set to westonruter
  • Status newassigned

#4 @westonruter
11 years ago

  • Keywords commit added
  • Owner changed from westonruter to ocean90
  • Status assignedreviewing

Good re-use of the data we're already passing to the template.

#5 @ocean90
11 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 31911:

Customizer: Use proper preview URL for Live Preview links.

props mattwiebe.
fixes #31782.

#6 @celloexpressions
11 years ago

  • Keywords needs-patch added; has-patch commit removed
  • Resolution fixed
  • Status closedreopened

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.

This ticket was mentioned in Slack in #core-customize by ocean90. View the logs.


11 years ago

#8 @ocean90
11 years ago

In 31933:

Customizer: Revert [31911]. We want to preserve url and return URL parameters to make the experience smoother.

see #31782.

#9 @ocean90
11 years ago

  • Milestone 4.2
  • Resolutionwontfix
  • Status reopenedclosed

#10 @westonruter
11 years ago

I think we can still preserve the URL and return parameters. We just have to amend them to the URL we get from data.theme.actions.customize.

Related: #31896

Note: See TracTickets for help on using tickets.