function oembed_menu_alter in oEmbed 7
Same name and namespace in other branches
- 7.0 oembed.module \oembed_menu_alter()
Implements hook_menu_alter().
Instead of rewriting ctools export UI's hook_menu implementations, alter the callback items to have a common menu item.
File
- ./
oembed.module, line 126 - Core functionality for oEmbed
Code
function oembed_menu_alter(&$items) {
// Create a new menu item where all oembed export UIs will be local tasks by
// copying the export UI's menu item that will become the default local task.
if (!empty($items['admin/config/media/oembed/provider/default'])) {
$items['admin/config/media/oembed/provider'] += $items['admin/config/media/oembed/provider/default'];
$items['admin/config/media/oembed/provider']['type'] = MENU_LOCAL_TASK;
$items['admin/config/media/oembed/provider/default']['type'] = MENU_DEFAULT_LOCAL_TASK;
}
}