SteveDickinson
Customize API

Customize API

The customize API is the mechanism whereby Theme developers can provide site Administrators with the ability to easily customize their site, for example by providing facilities to change background images, logos, text fonts etc. The Customize API is fully object based, and centres around four object classes:

  • Panels – Most outwardly UI container. A panel basically contains a set of sections (As a principle Themes should not create panels or modify existing panels. (Plugin developers may have a need to extend or modify existing Panels)
  • Section – A UI Container for UI Controls
  • Control – UI Control. Generally any HTML UI control can be accommodated. In addition there are some WordPress customize controls already available for importing images, media files, etc, and for cropping images.
  • Setting – Each control must be associated with a setting object. The Setting object is in effect the data object for the UI Class. It is serialized to the database and can be accessed by the various template files using the get_theme_mod(‘settings-id’) function.