[wp-trac] [WordPress Trac] #27666: Set/Get the current URL in the Theme Customizer
WordPress Trac
noreply at wordpress.org
Sat Jun 14 06:22:30 UTC 2014
#27666: Set/Get the current URL in the Theme Customizer
-----------------------------+-----------------------------------------
Reporter: TJNowell | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Appearance | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript, administration
-----------------------------+-----------------------------------------
Changes (by westonruter):
* component: Administration => Appearance
Old description:
> When opening the theme customiser, the URL GET parameter sets the page
> shown in the preview pane, however a user can navigate away by clicking
> links in the preview pane.
>
> This is fine for global background colours, but becomes a problem if you
> try to do anything contextual with the customiser controls.
>
> It would be useful to also set this URL. For example, if I have a control
> that configures the layout of the category archive, it would make sense
> to provide a means to navigate to a category archive automatically.
>
> I would suggest this be done using `PostMessage`, and be implemented in
> the preview, so that calls like this:
>
> api.instance('my_control').previewer.refresh();
>
> could be used like this:
>
> api.instance('my_theme_options[footer_image]').previewer.getURL();
New description:
When opening the theme customiser, the `url` query parameter sets the page
shown in the preview pane, however a user can navigate away by clicking
links in the preview pane.
This is fine for global background colours, but becomes a problem if you
try to do anything contextual with the customiser controls.
It would be useful to also set this URL. For example, if I have a control
that configures the layout of the category archive, it would make sense to
provide a means to navigate to a category archive automatically.
I would suggest this be done using `PostMessage`, and be implemented in
the preview, so that calls like this:
api.instance('my_control').previewer.refresh();
could be used like this:
api.instance('my_theme_options[footer_image]').previewer.getURL();
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27666#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list