Sync browser URL in Customizer with current preview URL and focused panels, sections, and controls.
ChangeLog
0.5.2
- Prevent autofocus params for themes panel and its sections from being included during theme switch. See #22.
- Only remove parent construct autofocus params if child is defined statically; ensures that lazy-loaded children can be autofocused.
- Remove code now irrelevant as of WordPress 4.7.
- Bump minimum WordPress requirement to 4.7.
- Bump tested to 4.9.
0.5.1
Fix reference to package.json
which is not included in build.
0.5.0
Persist scroll position and previewed URL between frontend and customizer preview. See #20.
0.4.7
Prevent dropping non-home initial url
param when loading customizer. See #19.
0.4.6
Fix compatibility with WordPress 4.6. See #17.
0.4.5
Ensure changeset_uuid
param is added to customize.php
URL if state is dirty OR the changeset post exists. PR #16.
0.4.4
Only include one autofocus
param. If autofocus[control]
is present, skip including autofocus[section]
(since implied). Likewise, if autofocus[section]
is present, also exclude its containing autofocus[panel]
since it is also implied. By only including one autofocus
param the URL bar is less cluttered, but also an issue is fixed where focus may not reliably be added due to apparent inconsistencies in which construct is autofocused first (the control should really be the last to get focus).
0.4.3
Send scroll message to previewer to fix 4.7 scroll position.
0.4.2
Misc cleanup and improve integration with WP 4.7.
0.4.1
Fixed issue whereby an expanded widget control could persist its autofocus
param when another section is expanded.
0.4.0
- Added persistence of
scroll
position when navigating back/forward in the preview and when reloading the customizer.
- Renamed the
customize_previewed_device
query param to just device
.
- Improved the building of the URL query params to omit any params that are the same as the defaults, so
device=desktop
and scroll=0
should not be shown, nor should a url
that points to the home URL.
- Fixed dropping of value-less query params, e.g.
customize.php?debug
0.3.0
- Add back/forward browser history for navigation in the Customizer preview. See #2, PR #8.
- Eliminate initial insertion of
url
and customize_previewed_device
params when same as default.
0.2.0
Persist the device being previewed (desktop, tablet, mobile) in the URL via a new customize_previewed_device
query param. See #3.
0.1.1
Remove autofocus[control]
when there is not a section expanded, such as when a widget is expanded when the sidebar section is collapsed.
0.1.0
Initial release.