Black Friday
Skip to documentation content

Developer Reference

Read public feature and language capabilities

Themes need safe presentation capabilities, not access to Pro's license or internal feature registry. Core exposes feature helpers separately from the small language-navigation facade.

Themes need safe presentation capabilities, not access to Pro’s license or internal feature registry. Core exposes feature helpers separately from the small language-navigation facade.

Feature helpers

kimorapro_hb_has_feature($feature) returns a boolean; kimorapro_hb_features() returns the current presentation snapshot; kimorapro_hb_feature_catalog() describes stable public names/surfaces. Unknown or unavailable capabilities fail closed.

function example_optional_policy_section(string $html): string
{
    if ($html === '' || !function_exists('kimorapro_hb_has_feature')
        || !kimorapro_hb_has_feature('room_policies')) {
        return '';
    }
    return '<section class="example-policies">' . wp_kses_post($html) . '</section>';
}

The supplied content must come from its authorized owner. A true capability alone is not content or permission to query a private service. Before kimorapro_hb_theme_features_ready, optional capabilities can remain false while add-ons synchronize; early false is not a license diagnosis.

Language navigation

Use kimorapro_hb()->languages() and its public interface, not kimorapro_hb()->features(). Methods are current, available, url, state, provider and snapshot. Render links only from ready/switchable normalized items and escape labels/URLs.

Core owns provider selection, validation and sensitive-route suppression; the theme owns location, appearance and accessible markup. Locked or single-language output should not be repaired by vendor globals, a guessed Home URL or forwarding token-bearing query fields.

Version and regression boundaries

Feature, navigation and global Theme Contract probes are separate. Depend on the supported major and review newer majors explicitly. Do not inspect an edition enum, license expiry, raw key or Pro class to infer presentation availability.

Test absent Core, Free-only optional false, empty content, provider errors, locked routes and a supported entitled configuration independently. Source/native examples are not a real WPML session or licensed Pro browser test.

See the navigation consumer example and public theme contract.

Was this article helpful?

Your feedback helps us improve the documentation.