• Resolved superskill

    (@superskill)


    I am not talking about the active_callback option.

    Let’s say I want to customize a page in the Customizer, I only want to have options displayed for that page. No “Site Identity, Menus, Widgets” sections displayed.

    At this point the Customizer loads all the theme options/mods as you can see here:
    https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-customize-manager.php#L3506

    If I have a lot of options, the Customizer loads really hard, that’s why I would like to only load what I need for a certain page.

    I could try and remove all the options that I don’t need, for certain pages, with the
    remove_*() methods, but I don’t think that’s really future proof and it might break some plugins.

    If only I had some filters for the settings, controls, panels, sections proprieties…

  • The topic ‘Load only certain Customizer settings, controls only if editing a page’ is closed to new replies.