Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39652 closed feature request (invalid)

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

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

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 8 years ago.
nead image created by Michal Marciniak

Download all attachments as: .zip

Change History (2)

#1 @celloexpressions
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

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
8 years ago

nead image created by Michal Marciniak

Note: See TracTickets for help on using tickets.