You are here

function breakpoints_themes_disabled in Breakpoints 7

Implements hook_themes_disabled(); Remove breakpoints from all disabled themes.

File

./breakpoints.module, line 123
Breakpoints @todo: provide button to reload breakpoints from theme

Code

function breakpoints_themes_disabled($theme_list) {
  $themes = list_themes();
  foreach ($theme_list as $theme_key) {
    $breakpoints = breakpoints_breakpoint_load_all_theme($theme_key);
    foreach ($breakpoints as $breakpoint) {
      breakpoints_breakpoint_delete($breakpoint, $theme_key);
    }
    breakpoints_breakpoint_group_delete_by_name($theme_key);
  }
  variable_set('menu_rebuild_needed', TRUE);
}