1 menu_test.module menu_test_theme_page_callback($inherited = FALSE)

Page callback to use when testing the theme callback functionality.

Parameters

$inherited: An optional boolean to set to TRUE when the requested page is intended to inherit the theme of its parent.

Return value

A string describing the requested custom theme and actual theme being used: for the current page request.

File

core/modules/simpletest/tests/menu_test.module, line 439
Dummy module implementing hook menu.

Code

function menu_test_theme_page_callback($inherited = FALSE) {
  global $theme_key;
  // Initialize the theme system so that $theme_key will be populated.
  backdrop_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;
}