WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #39752, comment 11


Ignore:
Timestamp:
03/10/2017 09:29:09 PM (4 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39752, comment 11

    initial v1  
    1 Something else to consider with the link back to the customizer is to not only include the `changeset_uuid` query param but also the rest of the customizer state UI as it was when the link to edit a post was clicked. In other words, the current `url` being previewed and whichever panel/section/control is expanded via the appropriate `autofocus` param(s). Additionally, while not yet supported by core, the `scroll` position and `device` being previewed could also be captured: the [https://github.com/xwp/wp-customizer-browser-history Customizer Browser History] feature plugin is able to restore these. Also, the [https://github.com/xwp/wp-customize-snapshots Customize Snapshots] plugin just [https://github.com/xwp/wp-customize-snapshots/pull/129/files added support] for capturing the state query params at the time of saving a changeset, [https://github.com/xwp/wp-customize-snapshots/issues/107 allowing these to be restored] when the changeset is picked up again for editing. This is the same scenario that this ticket is addressing. See [https://github.com/xwp/wp-customize-snapshots/blob/43bee5bd5d6d5494288352d076c11d12a96aa9c3/js/customize-snapshots.js#L101-L128 the code] for obtaining the state query vars.
     1Something else to consider with the link back to the customizer is to not only include the `changeset_uuid` query param but also the rest of the customizer state UI as it was when the link to edit a post was clicked. In other words, the current `url` being previewed and whichever panel/section/control is expanded via the appropriate `autofocus` param(s). Additionally, while not yet supported by core, the `scroll` position and `device` being previewed could also be captured: the [https://github.com/xwp/wp-customizer-browser-history Customizer Browser History] feature plugin (see #28536) is able to restore these. Also, the [https://github.com/xwp/wp-customize-snapshots Customize Snapshots] plugin just [https://github.com/xwp/wp-customize-snapshots/pull/129/files added support] for capturing the state query params at the time of saving a changeset, [https://github.com/xwp/wp-customize-snapshots/issues/107 allowing these to be restored] when the changeset is picked up again for editing. This is the same scenario that this ticket is addressing. See [https://github.com/xwp/wp-customize-snapshots/blob/43bee5bd5d6d5494288352d076c11d12a96aa9c3/js/customize-snapshots.js#L101-L128 the code] for obtaining the state query vars.