Customizer JavaScript APIs: Panel, Section, and Control
read more

Customizer JavaScript APIs: Panel, Section, and Control

Today, we will resume our discussion on the JavaScript API in the WordPress Customizer. In the last tutorial, we prepared and loaded two JavaScript files, customizer-control.js and customizer-preview.js, that will allow us to interact with the JavaScript API from the Customizer back-end and the front-end or the Previewer interface. So be sure to follow the last tutorial before proceeding further.

In this tutorial, we will be focusing on the interface composing the Customizer back-end, Panels, Settings, and Controls. Again, if these three things are something new to you, I highly recommend that you follow our previous complete series: A Guide to the WordPress Theme Customizer.

Basic Interaction With the Customizer JavaScript API

Aside from the PHP API, with which I’m sure some of you are familiar, Panels, Sections, and Controls are also accessible through the JavaScript API. Likewise, we can then modify them. Here are some examples.