| Versionen | |
|---|---|
| drupal6 – drupal7 | menu_link_delete($mlid, $path = NULL) |
Delete one or several menu links.
$mlid A valid menu link mlid or NULL. If NULL, $path is used.
$path The path to the menu items to be deleted. $mlid must be NULL.
includes/
<?php
function menu_link_delete($mlid, $path = NULL) {
if (isset($mlid)) {
_menu_delete_item(db_fetch_array(db_query("SELECT * FROM {menu_links} WHERE mlid = %d", $mlid)));
}
else {
$result = db_query("SELECT * FROM {menu_links} WHERE link_path = '%s'", $path);
while ($link = db_fetch_array($result)) {
_menu_delete_item($link);
}
}
}
?>
Kommentare
Kommentar hinzufügen