function ad_menu_add_global_settings in Advertisement 7
Same name and namespace in other branches
- 6.3 ad.module \ad_menu_add_global_settings()
- 6 ad.module \ad_menu_add_global_settings()
- 6.2 ad.module \ad_menu_add_global_settings()
Load settings for all ad modules. Those modules, who don't have their settings form, will get a standard one.
File
- ./
ad.module, line 1356
Code
function ad_menu_add_global_settings(&$menu_items) {
$adtypes = ad_get_types();
foreach ($adtypes as $type => $name) {
// Ad type global settings.
$settings = 'ad_' . $type . '_global_settings';
$file = 'ad_image.module';
if (!function_exists($settings)) {
$settings = 'ad_no_global_settings';
$file = 'ad.admin.inc';
}
$menu_items['admin/content/ad/configure/' . $type] = array(
'title' => $name,
'page callback' => 'drupal_get_form',
'page arguments' => array(
$settings,
),
'access arguments' => array(
'administer advertisements',
),
'type' => MENU_LOCAL_TASK,
'weight' => 2,
'file' => 'ad.admin.inc',
);
}
}