Modules
There are two module systems.
Theme modules:
- Folder: wp-content/themes/balinot/modules/
- Boot: functions.php loads every PHP file in that folder.
- These are always part of the theme runtime.
Important theme modules:
- 00-acf-compat.php: ACF safety layer and plugin-availability guards.
- 00-enqueue.php: frontend assets and page contexts.
- 04-balinot-setup.php: bridge that boots the setup layer.
- 05-admin-bar.php: admin bar behavior on frontend.
- 06-performance.php: runtime cleanup and performance rules.
- 07-branding.php: frontend branding variables.
- 08-maintenance.php: maintenance and construction mode.
- 10-menu.php: menu registration and menu CSS auto-loading.
- 20-forms.php: Contact Form 7 integration and inbox storage.
- 21-faqs.php: FAQ custom post type and location mapping.
- 22-reviews.php: review custom post type and location mapping.
- 23-popups.php: popup runtime behavior.
- 30-utils.php: shared helpers.
Setup modules:
- Manifest: wp-content/themes/balinot/setup/includes/theme-options.php
- Boot: wp-content/themes/balinot/setup/balinot-setup.php
- Each setup module is enabled or disabled through the manifest and settings.
Current setup modules include:
- acf-setup
- icons-setup
- media-setup
- gsap-setup
- swiper-setup
- fancybox-setup
- email-setup
- liquid-glass-wrapper
- woocommerce-setup
How to add a new theme module:
- Create a new PHP file in modules/ with the right numeric prefix.
- Keep it self-contained.
- Use guards like function_exists() when exposing helpers.
- If it needs docs in the Balinot panel, also add a reference in the setup docs system.
How to add a new setup module:
- Create setup/modules/my-module/module.php.
- Add the module to balinot_theme_get_module_manifest() in setup/includes/theme-options.php.
- Set source to setup and bootstrap to the module file.
- Choose the page group with page => design, functionalities, email, woocommerce, or system.
- If you want it visible in the admin module UI, also place it in the correct grouping inside setup/admin/admin-page.php.
Important note:
- The manifest controls loading.
- The admin screen grouping controls where the module appears in the Balinot UI.
- Those are related but not the same thing.
- 00-acf-compat.php is special because it is loaded before the rest of the modules to keep ACF-safe boot behavior.
Good maintenance rule:
- If the module changes runtime behavior on every request, it usually belongs in modules/.
- If the module is optional tooling, admin-only integration, or a feature pack controlled by the Balinot panel, it usually belongs in setup/modules/.
Last updated on