function menu_position_read_rules in Menu Position 7
Same name and namespace in other branches
- 7.2 menu_position.admin.inc \menu_position_read_rules()
Retrieves a menu position rule from the database.
Return value
array An associative array for all rules with keys equal to the rid of each rule.
File
- ./
menu_position.admin.inc, line 588 - Provides infrequently used functions and hooks for menu_position.
Code
function menu_position_read_rules() {
$query = db_query('SELECT * FROM {menu_position_rules} ORDER BY weight, rid');
$rules = array();
foreach ($query as $rule) {
$rule->conditions = unserialize($rule->conditions);
$rules[$rule->rid] = $rule;
}
return $rules;
}