You are here

function menu_position_add_menu_link in Menu Position 6

Same name and namespace in other branches
  1. 7.2 menu_position.admin.inc \menu_position_add_menu_link()
  2. 7 menu_position.admin.inc \menu_position_add_menu_link()

Adds a menu position rule.

Parameters

$rid: ID of the rule needing a menu link.

$plid: The mlid of the parent menu link specified in the rule.

$admin_title: The administrative title of the rule.

Return value

The mlid of the rule's new menu link.

3 calls to menu_position_add_menu_link()
menu_position_add_rule in ./menu_position.admin.inc
Adds a menu position rule.
menu_position_enable_helper in ./menu_position.admin.inc
Fix rules after module has been re-enabled.
menu_position_rules_form_submit in ./menu_position.admin.inc
Handles form submission for menu_position_rules_form().

File

./menu_position.admin.inc, line 509
Provides infrequently used functions and hooks for menu_position.

Code

function menu_position_add_menu_link($rid, $plid, $admin_title) {

  // Add a menu link to handle matching pages. Passing NULL as the mlid will
  // cause menu_link_save() to add a new menu link.
  return menu_position_edit_menu_link($rid, NULL, $plid, $admin_title);
}