theme
Definition
theme()
includes/theme.inc, line 160
Description
Generate the themed representation of a Drupal object.
All requests for themed functions must go through this function. It examines the request and routes it to the appropriate theme function. If the current theme does not implement the requested function, then the current theme engine is checked. If neither the engine nor theme implement the requested function, then the base theme function is called.
For example, to retrieve the HTML that is output by theme_page($output), a module should call theme('page', $output).
Parameters
$function The name of the theme function to call.
... Additional arguments to pass along to the theme function.
Return value
An HTML string that generates the themed output.
Code
<?php
function theme() {
$args = func_get_args();
$function = array_shift($args);
if ($func = theme_get_function($function)) {
return call_user_func_array($func, $args);
}
}
?> 