You are here

function context_reaction_region::execute in Context 7.3

File

plugins/context_reaction_region.inc, line 37

Class

context_reaction_region

Code

function execute(&$page) {
  global $theme;
  foreach ($this
    ->get_contexts() as $k => $v) {
    if (isset($v->reactions[$this->plugin][$theme])) {
      $regions = $v->reactions[$this->plugin][$theme]['disable'];
      foreach ($regions as $region => $disable) {
        if ($disable && isset($page[$region])) {
          unset($page[$region]);
        }
      }
    }
  }
}