Skip to content

Hide styles controls which are not relevant to current preview #32

@westonruter

Description

@westonruter

There may be styles which are only visible on certain templates. It would be misleading to present controls for styles for which there is no corresponding element in the preview. For Widget Customizer, it turned out to be pretty easy to dynamically hide customizer sections (and controls) based on whether or not a sidebar was rendered in the current preview, and then upon each page load within the preview iframe, to update which sections should be displayed.

For how this was implemented in Widget Customizer, see xwp/wp-widget-customizer#2

Relates to #21
Relates to xwp/wp-widget-customizer#5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions