You are here

function oembed_menu_alter in oEmbed 7.0

Same name and namespace in other branches
  1. 7 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 125

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.
  $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;
}