menu_test_theme_page_callback($inherited = FALSE)Page callback to use when testing the theme callback functionality.
$inherited An optional boolean to set to TRUE when the requested page is intended to inherit the theme of its parent.
A string describing the requested custom theme and actual theme being used for the current page request.
modules/simpletest/tests/menu_test.module, line 198
<?php
function menu_test_theme_page_callback($inherited = FALSE) {
global $theme_key;
// Initialize the theme system so that $theme_key will be populated.
drupal_theme_initialize();
// Now check both the requested custom theme and the actual theme being used.
$custom_theme = menu_get_custom_theme();
$requested_theme = empty($custom_theme) ? 'NONE' : $custom_theme;
$output = "Custom theme: $requested_theme. Actual theme: $theme_key.";
if ($inherited) {
$output .= ' Theme callback inheritance is being tested.';
}
return $output;
}
?>