Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 130709

Load only certain Customizer settings, controls only if editing a page

$
0
0

Replies: 0

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…


Viewing all articles
Browse latest Browse all 130709

Trending Articles