front ​
File: src/Helpers/front.php
Frontend-oriented helpers for resolving host URLs and SVG symbol identifiers used by the Modularous UI.
Functions ​
getHost ​
getHost(): stringReturns the current application host URL (scheme://host) without a trailing slash. Used by permalink and permalinkPrefix input extensions to build full preview URLs.
getModularousDefaultUrls ​
getModularousDefaultUrls(): arrayReturns an array of default URLs that the Modularous frontend injects into its global configuration:
[
'admin' => adminUrlPrefix(),
'system' => systemUrlPrefix(),
// additional entries from modularous config
]modularous_svg_symbol_exists ​
modularous_svg_symbol_exists(string $symbol): boolChecks whether an SVG symbol with the given identifier exists in the compiled Modularous sprite sheet. Returns true if the symbol is found.
get_modularous_logo_symbol ​
get_modularous_logo_symbol(string|array $candidates): stringAccepts a single symbol name or an ordered list of candidates and returns the first one that exists in the SVG sprite. Falls back to 'main-logo' if no candidate is found. Used for locale-specific logo variants (e.g. mini-logo-dark-tr, then mini-logo-dark).
get_modularous_locale_symbol ​
get_modularous_locale_symbol(string $locale): stringReturns the SVG symbol identifier for a given locale flag icon. Falls back to a generic globe symbol if no locale-specific flag is registered.