array( 'arguments' => array('form' => NULL), ), // Theme for a generic object 'object' => array( 'arguments' => array('element' => array()), ), ); } /** * Implement hook_menu(). */ function embed_menu() { // Menu items that are basically just menu blocks. $items['admin/settings/embed'] = array( 'title' => 'Embed', 'description' => 'Configure various aspects of the embed module.', 'page callback' => 'system_admin_menu_block_page', 'access arguments' => array('administer embed'), ); // Menu items that are basically just menu blocks. $items['admin/settings/embed/handlers'] = array( 'title' => 'Handlers', 'description' => 'Configure embedding handlers.', 'page callback' => 'system_admin_menu_block_page', 'access arguments' => array('administer embed'), ); // Get the available embedding themes from a fresh query $themes = embed_get_info('', EMBED_RESET_CACHE); if ($themes) { // Re-order themes by type, not by theme $themes = embed_remap_info($themes); // Build a menu path for mime types with a custom handler foreach ($themes as $type => $info) { // Need to make sure that menu path is ok $type_url = str_replace('+', '_', $type); // Add menu items to the array $items['admin/settings/embed/handlers/' . $type_url] = array( 'title' => $type, 'page callback' => 'drupal_get_form', 'page arguments' => array('embed_admin_settings', $type), 'access arguments' => array('administer embed'), ); } } // Return the menu items return $items; }