function _commerce_kickstart_taxonomy_menu in Commerce Kickstart 7.2
BatchAPI callback.
See also
commerce_kickstart_import_content()
1 string reference to '_commerce_kickstart_taxonomy_menu'
- commerce_kickstart_import_content in ./
commerce_kickstart.install - Task callback: return a batch API array with the products to be imported.
File
- ./
commerce_kickstart.install_callbacks.inc, line 179 - Contains Batch API callbacks used during installation.
Code
function _commerce_kickstart_taxonomy_menu($operation, &$context) {
$context['message'] = t('@operation', array(
'@operation' => $operation,
));
// Set up taxonomy main menu.
$vocabulary_machine_name = variable_get('commerce_kickstart_demo_store', FALSE) ? 'collection' : 'product_category';
if ($collection = taxonomy_vocabulary_machine_name_load($vocabulary_machine_name)) {
$variable_name = _taxonomy_menu_build_variable('vocab_menu', $collection->vid);
variable_set($variable_name, 'main-menu');
$variable_name = _taxonomy_menu_build_variable('vocab_parent', $collection->vid);
variable_set($variable_name, '0');
$variable_name = _taxonomy_menu_build_variable('path', $collection->vid);
variable_set($variable_name, 'commerce_kickstart_taxonomy_term_path');
$variable_name = _taxonomy_menu_build_variable('rebuild', $collection->vid);
variable_set($variable_name, 1);
$variable_name = _taxonomy_menu_build_variable('sync', $collection->vid);
variable_set($variable_name, 1);
}
}