Black Friday
Skip to documentation content

Developer Reference

Consume the public Theme Contract

The public Theme Contract connects Core/Pro-owned behavior to theme presentation. Current Core reports version 1.12.0 through kimorapro_hb_theme_contract_version(); themes should use exported functions and documented hooks rather than internal dispatcher classes.

The public Theme Contract connects Core/Pro-owned behavior to theme presentation. Current Core reports version 1.12.0 through kimorapro_hb_theme_contract_version(); themes should use exported functions and documented hooks rather than internal dispatcher classes.

Read the prepared surface

Surface contexts carry contract_version, surface, canonical data and presentation extensions. The owner validates access and computes domain data before rendering. Theme actions receive context/version; surface filters add normalized extensions without replacing canonical data.

Use kimorapro_hb_rooms_url(), kimorapro_hb_search_url() and managed Page helpers for navigation. Use prepared room/availability/price and HTML slots rather than repository queries or slug inference. The language facade is kimorapro_hb()->languages(); feature helpers are separate functions.

Keep Core and Pro optionality intact

Read public capability booleans and require actual supplied content before rendering an optional section. No wrapper, heading or optional asset should appear solely because a Pro class exists. Early lifecycle calls can safely report unavailable capabilities until add-ons synchronize.

Core continues to own availability, quote synchronization, booking validation/persistence and ledger facts. Pro owns its gated policy, account, online payment and source implementations. The theme must not initialize/reconcile payment on a read-only account GET or turn a displayed estimate into a financial outcome.

Versioned presentation slots

Book Now, confirmation and authorized customer detail have separate presentation/template contracts. Preserve the prepared HTML and supported markers/metadata. Confirmation can have a minimal payment-return surface; do not fabricate a Retry action when the owner supplies none.

Room title/media may use current public presentation while financial/policy snapshots remain historical. Missing ledger amounts are unknown, not zero. A theme should preserve those meanings when styling receipts.

Probe the supported major, escape theme-owned text and retain native form/security hooks. Unsupported overrides fall through to a safe parent/plugin candidate. See template override contract and component/token APIs.

Was this article helpful?

Your feedback helps us improve the documentation.