1 system.api.php hook_system_theme_info()

Return additional themes provided by modules.

Only use this hook for testing purposes. Use a hidden MY_MODULE_test.module to implement this hook. Testing themes should be hidden, too.

This hook is invoked from _system_rebuild_theme_data() and allows modules to register additional themes outside of the regular 'themes' directories of a Backdrop installation.

Return value

An associative array. Each key is the system name of a theme and each value: is the corresponding path to the theme's .info file.

Related topics

File

core/modules/system/system.api.php, line 1627
Hooks provided by Backdrop core and the System module.

Code

function hook_system_theme_info() {
  $themes['my_module_test_theme'] = backdrop_get_path('module', 'my_module') . '/my_module_test_theme/my_module_test_theme.info';
  return $themes;
}