You are here

function spaces_dashboard_preprocess_context_block_editable_region in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 spaces_dashboard/spaces_dashboard.module \spaces_dashboard_preprocess_context_block_editable_region()
  2. 7 spaces_dashboard/spaces_dashboard.module \spaces_dashboard_preprocess_context_block_editable_region()

Preprocessor for theme('context_block_editable_region'). Only allow regions that have been set to editable to be changed.

File

spaces_dashboard/spaces_dashboard.module, line 267

Code

function spaces_dashboard_preprocess_context_block_editable_region(&$vars) {
  if (module_exists('context_layouts') && context_isset('context', 'spaces_dashboard')) {
    $layout = context_layouts_get_active_layout(FALSE);
    $regions = variable_get('spaces_dashboard_regions', array());
    if (!empty($regions[$layout])) {
      $vars['editable'] = !empty($regions[$layout][$vars['region']]);
    }
  }
}