Say I have a single custom control, but this control has 2 inputs that require saving, e.g.:
- Currency type and value
- Size and unit of measurement
- First and last name
- Text and style
- Image and image size
- Font family & font weight
How would I do it? I see there is a settings option when creating a control, but there is no documentation to suggest how it’s used, and the only example of it being done in the wild is Easy Google Fonts, which has no explanation as to how it’s done, and is difficult to read. Is it possible to nest controls and sections?
So far all the tutorials and documentation I’ve found talk about a control with a single html input, none mention controls that have multiple inputs/settings, despite it being suggested by the API
This plugin demonstrates how to do it. Of note, the steps involved are:
$this->settings
Here’s the code: