Commit 43c86c4e authored by Dries's avatar Dries

- Patch #778880 by Steven Merrill: add static caching to color.module.

parent 8cb52e47
......@@ -115,10 +115,17 @@ function _color_page_alter(&$vars) {
* Retrieve the color.module info for a particular theme.
*/
function color_get_info($theme) {
static $theme_info = array();
if (isset($theme_info[$theme])) {
return $theme_info[$theme];
}
$path = drupal_get_path('theme', $theme);
$file = DRUPAL_ROOT . '/' . $path . '/color/color.inc';
if ($path && file_exists($file)) {
include $file;
$theme_info[$theme] = $info;
return $info;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment