Problem/Motivation
Rabbit Hole provides 4 variables for each entity bundle:
- 'rh_{entity_type}_override_{bundle}'
- 'rh_{entity_type}_action_{bundle}'
- 'rh_{entity_type}_redirect_{bundle}'
- 'rh_{entity_type}_redirect_response_{bundle}'
So, once the bundle is removed, all these variables should be deleted and we already have a function responsible for clean-up:
function rabbit_hole_delete_variables($entity_type, $bundle) {
variable_del('rh_' . $entity_type . '_action_' . $bundle);
variable_del('rh_' . $entity_type . '_redirect_' . $bundle);
variable_del('rh_' . $entity_type . '_redirect_response_' . $bundle);
}
Just need to add one more variable: 'rh_{entity_type}_override_{bundle}'
Comments
Comment #3
matroskeenI decided to add one more helper function
rabbit_hole_get_variables()that will return a list of available variables.Also, added 'rh_{entity_type}_override_{bundle}' variable to the list.