The public theme contract is the stable integration boundary between Hotel Booking and a theme. It exposes normalized context envelopes, public CSS roots, feature capability booleans, component catalogs, design tokens, language navigation and documented hooks. A renderer receives canonical primitive data as read-only input and returns presentation markup; it cannot replace the canonical data or make a business decision.
Integration rules
- Check the contract version and keep the same major; a theme contract may not claim a newer version than the active plugin contract.
- Register complete declarations atomically at the documented lifecycle action. Invalid metadata or a throwing renderer is rejected without replacing the last valid declaration.
- Use
hotel_booking_theme_contract_version()and the documented registration functions rather than instantiating plugin classes. - Escape output, preserve status and validation fields, and keep canonical URLs and machine values untouched.
- Treat Pro as optional. Public capability
falsemeans no optional wrapper, heading, hook pair or asset should be emitted.
When an optional renderer or field is unavailable, return an empty string (or omit the field) rather than inventing fallback business data in the theme.
The contract is presentation-only for themes. Availability, pricing, tax, payment, booking, policy, review, license and persistence decisions remain in Hotel Booking Core or Pro. For template-specific changes, use the template override contract.