function menu_test_theme_callback in Drupal 7
Theme callback to use when testing the theme callback functionality.
Parameters
$argument: The argument passed in from the URL.
Return value
The name of the custom theme to request for the current page.
1 string reference to 'menu_test_theme_callback'
- menu_test_menu in modules/
simpletest/ tests/ menu_test.module - Implements hook_menu().
File
- modules/
simpletest/ tests/ menu_test.module, line 440 - Dummy module implementing hook menu.
Code
function menu_test_theme_callback($argument) {
// Test using the variable administrative theme.
if ($argument == 'use-admin-theme') {
return variable_get('admin_theme');
}
elseif ($argument == 'use-stark-theme') {
return 'stark';
}
elseif ($argument == 'use-fake-theme') {
return 'fake_theme';
}
// For any other value of the URL argument, do not return anything. This
// allows us to test that returning nothing from a theme callback function
// causes the page to correctly fall back on using the main site theme.
}