function views_isotope_example_uninstall in Views Isotope (Deprecated) 7.2
Implements hook_uninstall().
Delete sample data.
File
- views_isotope_example/
views_isotope_example.install, line 116 - Create sample data to be used in isotope example.
Code
function views_isotope_example_uninstall() {
// Delete the example nodes.
$query = new EntityFieldQuery();
$query
->entityCondition('entity_type', 'node')
->propertyCondition('type', 'views_isotope_example');
$result = $query
->execute();
if (!empty($result['node'])) {
foreach ($result['node'] as $node) {
node_delete($node->nid);
}
}
// Delete the example fields.
$fields = array(
'views_isotope_example_color',
'views_isotope_example_shape',
'views_isotope_example_size',
);
foreach ($fields as $field_name) {
field_delete_field($field_name);
}
}