Inicio - Documentación - POM Theme - 11 Developers - 11.6 Assets - Generated and conditional assets

Generated and conditional assets

POM generates site-specific styles and scripts from Theme Options and builder content. Extensions can also request documented conditional frontend bundles when their output needs a POM interaction.

Chapter contents

  1. Regenerate generated styles and scripts
  2. Use the shared searchable select

Use the regeneration helper only after an intentional settings or maintenance write. For component assets, use the conditional asset helpers instead of rebuilding or enqueueing the complete theme bundle.

Extend the module registry

Register pom_modules_config callbacks before the theme first reads the module registry. The registry is memoized only for the current request and retains the filtered, normalized, translated, and sorted result used by the builder and frontend asset helpers.

If an integration intentionally adds or removes a pom_modules_config callback after the first registry read, call Pom_Assets_Modules_Runtime::reset_modules_config_cache() before reading the registry again. The reset affects only the current request; it does not clear persistent data or enqueue assets by itself.