In drupal 7 there has been different ways to change the current active theme on the page:
- You could use the 'theme callback' on the hook_menu() definition of the current page
- You could use hook_custom_theme() which was triggered really early in the bootstrap
The idea is to add a similar kind of mechanism like breadcrumb does, so multiple services can set the current active theme,
if wanted. By default the active theme is determined from the config, but there is also a theme determined by the user setting.
If something like OG comes in , they would just implement the service and override if needed.
(reviews needed, tests to be written or run, documentation to be written, etc.)
User interface changes
(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)
This removes hook_custom_theme() and removes 'theme callback' from hook_menu()
@todo Fill out.
Hook menu allowed items to specify a theme callback which is called to determine the used theme.
$items['system/ajax'] = array( 'title' => 'AHAH callback', 'page callback' => 'ajax_form_callback', 'access callback' => TRUE, 'theme callback' => 'ajax_base_page_theme', 'type' => MENU_CALLBACK, 'file path' => 'core/includes', 'file' => 'form.inc', );
This has to happen somehow early in the request (before the actual _controller is called. It could be a method defined on the route or simply something manually called in your controller, though this feels wrong.
PASSED: [[SimpleTest]]: [MySQL] 59,798 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] 59,884 pass(es), 14 fail(s), and 156 exception(s). View
PASSED: [[SimpleTest]]: [MySQL] 59,374 pass(es). View