function menu_position_get_plugins in Menu Position 6
Same name and namespace in other branches
- 7.2 menu_position.module \menu_position_get_plugins()
- 7 menu_position.module \menu_position_get_plugins()
Retrieves a list of information about every rule plugin.
2 calls to menu_position_get_plugins()
- menu_position_get_condition_callback in ./
menu_position.module - Loads the include file containing a condition's callback function definition.
- menu_position_rule_form in ./
menu_position.admin.inc - Returns form to add or edit a menu position rule.
File
- ./
menu_position.module, line 291 - Provides menu links for dynamic positioning of nodes based on configurable rules.
Code
function menu_position_get_plugins() {
static $plugins = array();
if (empty($plugins)) {
foreach (module_implements('menu_position_rule_plugins') as $module) {
$function = $module . '_menu_position_rule_plugins';
if (function_exists($function)) {
// Register each module's plugin while setting baseline defaults.
foreach ($function() as $name => $plugin) {
$plugins[$name] = $plugin + array(
'module' => $module,
'file' => '',
'form_callback' => $module . '_menu_position_rule_' . $name . '_form',
'condition_callback' => $module . '_menu_position_condition_' . $name,
);
}
}
}
}
return $plugins;
}