Function __global->save_add_menu_item_from_post

Definitions

sources/menus2.php

  • Add a menu item from details in POST.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$menu_id ID_TEXT No No required parameter N/A N/A The name of the menu the item is on
$id integer No No required parameter N/A N/A The ID of the menu item (i.e. what it is referenced as in POST)
&$ids array Yes No required parameter N/A N/A The map of IDs on the menu (ID=>parent)
$parent ?integer No No required parameter N/A N/A The ID of the parent branch (null: no parent)
&$old_menu_bits array Yes No required parameter N/A N/A The map of menu id=>string content language string IDs employed by items before the edit
&$order integer Yes No required parameter N/A N/A The order this branch has in the editor (and due to linearly moving through, the number of branches shown assembled ready)

Preview

Code (PHP)

/**
 * Add a menu item from details in POST.
 *
 * @param  ID_TEXT $menu_id The name of the menu the item is on
 * @param  integer $id The ID of the menu item (i.e. what it is referenced as in POST)
 * @param  array $ids The map of IDs on the menu (ID=>parent)
 * @param  ?integer $parent The ID of the parent branch (null: no parent)
 * @param  array $old_menu_bits The map of menu id=>string content language string IDs employed by items before the edit
 * @param  integer $order The order this branch has in the editor (and due to linearly moving through, the number of branches shown assembled ready)
 */

function save_add_menu_item_from_post(string $menu_id, int $id, array &$ids, ?int $parent, array &$old_menu_bits, int &$order)