function menu_link_maintain


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 menu_link_maintain($module, $op, $link_path, $link_title)
cle7 menu_link_maintain($module, $op, $link_path, $link_title)
elmsmedia7 menu_link_maintain($module, $op, $link_path, $link_title)
icor7 menu_link_maintain($module, $op, $link_path, $link_title)
meedjum_blog7 menu_link_maintain($module, $op, $link_path, $link_title)
mooc7 menu_link_maintain($module, $op, $link_path, $link_title)

Inserts, updates, or deletes an uncustomized menu link related to a module.


$module: The name of the module.

$op: Operation to perform: insert, update or delete.

$link_path: The path this link points to.

$link_title: Title of the link to insert or new title to update the link to. Unused for delete.

Return value

The insert op returns the mlid of the new item. Others op return NULL.

Related topics

1 call to menu_link_maintain()
aggregator_save_category in modules/aggregator/aggregator.module
Adds/edits/deletes aggregator categories.


includes/, line 3395
API for the Drupal menu system.


function menu_link_maintain($module, $op, $link_path, $link_title) {
  switch ($op) {
    case 'insert':
      $menu_link = array(
        'link_title' => $link_title,
        'link_path' => $link_path,
        'module' => $module,
      return menu_link_save($menu_link);
    case 'update':
      $result = db_query("SELECT * FROM {menu_links} WHERE link_path = :link_path AND module = :module AND customized = 0", array(':link_path' => $link_path, ':module' => $module))->fetchAll(PDO::FETCH_ASSOC);
      foreach ($result as $link) {
        $link['link_title'] = $link_title;
        $link['options'] = unserialize($link['options']);
    case 'delete':
      menu_link_delete(NULL, $link_path);