function ad_ui_add_page in Advertisement 7.2
Menu callback: display a list of ad types that the user can create.
1 string reference to 'ad_ui_add_page'
- ad_ui_menu in ./
ad_ui.module - Implements hook_menu().
File
- includes/
ad_ui.inc, line 6
Code
function ad_ui_add_page() {
$item = menu_get_item();
$content = system_admin_menu_block($item);
// Bypass the admin/ad/add listing if only one ad type is available.
if (count($content) == 1) {
$item = array_shift($content);
drupal_goto($item['href']);
}
return theme('ad_add_list', array(
'content' => $content,
));
}