alpc
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Can I add a section of the Customizer dynamically?@bcworkz
Thank you for your thoughtful answers.
I’ll read the core source and do my best.Forum: Developing with WordPress
In reply to: Can I add a section of the Customizer dynamically?I meant the former.
It was the standard implemented Menu section that does something similar to this, but it’s still hard to find in thecustomize-nav-menus.jsimplementation, and I’d appreciate any hints you can give me.
I don’t see any additional sections being added incustomize-nav-menus.js, but there seems to be a special property calledMenusinwp.customizelikeapi.Menus.NewMenuSection.
Is it possible to mimic this?
I’m hoping to get some sort of solution.
I’m sorry, but I would appreciate your help.- This reply was modified 5 years, 10 months ago by alpc.
Forum: Developing with WordPress
In reply to: Can I add a section of the Customizer dynamically?@bcworkz
Thank you for your answer.
Dynamic means, for example, that the new section will appear in the Customizer when you click on the “Add Section” button.
I tried outputting “panel.sections()” in the console log and it seems that I can add the section, but it doesn’t appear in the customizer.Thank you for telling me about the menu implementation.
I read the core source for the part that generates the menu, but I couldn’t get to the part that I’m getting from ajax.I looked at the links you gave me as much as I could, but the only way to get to the custom controls was to read the source, and I was too inexperienced to understand the core source.