Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#39652 closed feature request (invalid)

enable Customize Manager Theme-Preview to switch to the dedicated page of a control

Reported by: nimo24 Owned by:
Priority: normal Milestone:
Component: Customize Version: 4.7.1
Severity: normal Keywords:
Cc: Focuses:

Description

According to https://developer.wordpress.org/themes/customize-api/tools-for-improved-user-experience/ we can "Hide core sections/controls when they aren't used on the current page.".

However, actually the opposite is not possible: To show the dedicated page for sections/controls which are dedicated to that page and not to the actually shown page.

For example, at the beginning "page1" is shown, when clicking the "panel/section/control" which are dedicated to "page2", the theme customizer should switch to "page2" (unload "page1" and instead load "page2" within the iframe) to enable live preview for that page, because the user selects a "panel/section/control" which is dedicated to "page2".

Attachments (1)

RELACJELIVE (1280x497).jpg (285.4 KB ) - added by michal88sla 10 years ago.
nead image created by Michal Marciniak

Download all attachments as: .zip

Change History (2)

#1 @celloexpressions
10 years ago

  • Milestone Awaiting Review
  • Resolutioninvalid
  • Status newclosed

This is currently possible via the JS API, and should probably remain in JS rather than PHP since it can happen much more directly that way. There are a couple of core examples for this, such as the "original" link in menu item controls and the front page and posts page controls.

I've added a new section with an example of this to the documentation on the JS API: https://developer.wordpress.org/themes/customize-api/the-customizer-javascript-api/#preview-js-and-controls-js. In your particular case, you'll want to bind a callback to the section's expanded state and change the preview URL when it turns true.

@michal88sla
10 years ago

nead image created by Michal Marciniak

Note: See TracTickets for help on using tickets.