function page_theme_get_rule_roles in Page Theme 7.2
2 calls to page_theme_get_rule_roles()
- page_theme_admin_edit in ./
page_theme.admin.inc - Menu callback; edits a rule.
- page_theme_admin_overview in ./
page_theme.admin.inc - Menu callback; lists all defined rules.
File
- ./
page_theme.module, line 195 - Allows to use different themes than the site default on specific pages.
Code
function page_theme_get_rule_roles($rule) {
static $roles = array();
if (!$roles) {
$roles = user_roles();
}
$rule_roles = db_query('SELECT rid FROM {page_theme_role} WHERE ptid = :ptid', array(
'ptid' => $rule->ptid,
))
->fetchAllKeyed(0, 0);
return array_intersect_key($roles, $rule_roles);
}