function advanced_forum_style_info in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 includes/style.inc \advanced_forum_style_info()
Get the info for a style, using an additive notation to include all items from the parent lineage.
1 call to advanced_forum_style_info()
- advanced_forum_forum_load in includes/
core-overrides.inc - Returns a tree of all forums for a given taxonomy term ID.
File
- includes/
style.inc, line 207 - Functions relating to the style system, not including core hooks and preprocess / theme functions.
Code
function advanced_forum_style_info($style = NULL) {
static $info = array();
if (empty($style)) {
// If no style is passed in, assume the current style is wanted.
$style = advanced_forum_get_current_style();
}
if (!array_key_exists($style, $info)) {
$info[$style] = array();
$lineage = advanced_forum_style_lineage();
foreach ($lineage as $key => $dir) {
// Using the + operator is additive but will not overwrite.
// $lineage comes out as the actual style with each
// successive style after it, so simply adding the arrays
// together means that all info will be combined and keys
// in the parent info will be defaults passed down to children
// only if they do not override them.
$info[$style] += advanced_forum_get_style($key);
}
}
return $info[$style];
}