You are here

function panelizer_has_no_choice_callback in Panelizer 7

Same name and namespace in other branches
  1. 6 panelizer.module \panelizer_has_no_choice_callback()
  2. 7.3 panelizer.module \panelizer_has_no_choice_callback()
  3. 7.2 panelizer.module \panelizer_has_no_choice_callback()

Menu callback to determine if a type has a choice of defaults.

We use this to make sure the right tabs appear.

1 string reference to 'panelizer_has_no_choice_callback'
panelizer_menu in ./panelizer.module
Implements hook_menu().

File

./panelizer.module, line 259
panelize.module

Code

function panelizer_has_no_choice_callback($type, $key) {
  if (!user_access('administer panelizer')) {
    return FALSE;
  }

  // If this type has defaults and is not allowed a choice, return true.
  $settings = variable_get('panelizer_defaults_' . $type . '_' . $key, array());
  return !empty($settings['status']) && !empty($settings['default']) && empty($settings['choice']);
}