theme_get_function
- 5
theme_get_function($function)
Determine if a theme function exists, and if so return which one was found.
Parameters
$function
The name of the theme function to test.
Return value
The name of the theme function that should be used, or FALSE if no function exists.
Code
5/includes/theme.inc, line 182
<?php
function theme_get_function($function) {
global $theme, $theme_engine;
if (!isset($theme)) {
init_theme();
}
if (($theme != '') && function_exists($theme .'_'. $function)) {
return $theme .'_'. $function;
}
elseif (($theme != '') && isset($theme_engine) && function_exists($theme_engine .'_'. $function)) {
return $theme_engine .'_'. $function;
}
elseif (function_exists('theme_'. $function)){
return 'theme_'. $function;
}
return FALSE;
}
?>