hs_taxonomy_views.install in Hierarchical Select 6.3
Install file for the Hierarchical Select Taxonomy Views module.
File
modules/hs_taxonomy_views.installView source
<?php
/**
* @file
* Install file for the Hierarchical Select Taxonomy Views module.
*/
/**
* Implementation of hook_uninstall().
*/
function hs_taxonomy_views_uninstall() {
$views = views_get_all_views();
foreach ($views as $view) {
foreach (array_keys($view->display) as $display_name) {
if (count($view->display[$display_name]->display_options['filters'])) {
foreach (array_keys($view->display[$display_name]->display_options['filters']) as $filter_id) {
$filter = $view->display[$display_name]->display_options['filters'][$filter_id];
if ($filter['type'] == 'hierarchical_select' && $filter['table'] == 'term_node' && $filter['field'] == 'tid') {
$view->display[$display_name]->display_options['filters'][$filter_id]['type'] = 'select';
$view
->save();
}
}
}
}
}
drupal_set_message(t("Reset the Selection Type from 'Hierarchical Select' to\n 'Dropdown' everywhere where it was used."), 'warning');
}
Functions
Name | Description |
---|---|
hs_taxonomy_views_uninstall | Implementation of hook_uninstall(). |