#35617 closed enhancement (fixed)
Export more Customizer app settings in preview
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Customize | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
As more logic is added to the Customizer preview (e.g. selective refresh and inline controls), more of the Customizer's app settings need to be available.
- Preview nonce.
- Other nonces added via
customize_refresh_nonces
. - Current theme (stylesheet and whether active).
- The previewed URL.
Some of these are currently being exported to JS with each refresh via the WP_Customize_Nav_Menus::export_preview_data()
, and should be moved to the core app settings exported to wp.customize.settings
.
Additionally, the nonce settings should be refreshed whenever a nonce-refresh
happens in the pane.
Attachments (3)
Change History (7)
Note: See
TracTickets for help on using
tickets.
In 35617.0.diff:
nonce-refresh
.customize_refresh_nonces
with the exported data.This patch builds upon the patch in #35616.
Note that with the nonces exported here, nav menus in the Customizer will be able to remove its separate exporting of the data.