function _ad_ui_install_taxonomy in Advertisement 7.3
Install taxonomy data.
1 call to _ad_ui_install_taxonomy()
- drush_ad_ui_install in modules/
ad_ui/ ad_ui.drush.inc - Callback to install example ads and terms.
File
- modules/
ad_ui/ ad_ui.drush.inc, line 38
Code
function _ad_ui_install_taxonomy() {
$vocabularies = array(
'advertisement_size' => array(
'terms' => array(
array(
'name' => 'Leaderboard',
'field_ad_size' => '728x90',
),
array(
'name' => 'Rectangle',
'field_ad_size' => '160x120',
),
array(
'name' => 'Skyscraper',
'field_ad_size' => '160x600',
),
),
),
);
foreach ($vocabularies as $machine_name => $definition) {
if (!empty($definition['terms'])) {
$vocabulary = taxonomy_vocabulary_machine_name_load($machine_name);
_ad_ui_install_taxonomy_terms($vocabulary, $definition['terms']);
}
}
}