function _menu_link_weight_insert_item in Menu Link Weight 7
Same name and namespace in other branches
- 8.2 menu_link_weight.reorder.inc \_menu_link_weight_insert_item()
- 8 menu_link_weight.reorder.inc \_menu_link_weight_insert_item()
Helper function for _menu_link_weight_reorder_options().
Adds a value, weight to the reordered options array and increments weight by one.
Parameters
array $reordered_options: Reordered options array.
string $index: Either "current_link" or the menu link ID.
string $value: The title of the link in the old options array.
int $weight: The weight of the link within the parent menu.
1 call to _menu_link_weight_insert_item()
- _menu_link_weight_reorder_options in ./
menu_link_weight.reorder.inc - Allow other modules to reorder the tree.
File
- ./
menu_link_weight.reorder.inc, line 72 - Functionality related to reordering of options by other modules.
Code
function _menu_link_weight_insert_item(array &$reordered_options, $index, $value, &$weight) {
$reordered_options[$index] = $value;
$reordered_options[$index]['weight'] = $weight;
$weight++;
}