You are here

function _panopoly_magic_add_path_to_ajax in Panopoly Magic 7

Content panes should not use default system/ajax. Use our own for now.

1 call to _panopoly_magic_add_path_to_ajax()
panopoly_magic_form_alter in ./panopoly_magic.module
Implements hook_form_alter()

File

./panopoly_magic.module, line 623

Code

function _panopoly_magic_add_path_to_ajax($element) {
  if (!empty($element['#ajax']) && !isset($element['#ajax']['path'])) {
    $element['#ajax']['path'] = 'system/panopoly-magic';
  }
  foreach (element_children($element) as $key) {
    _panopoly_magic_add_path_to_ajax($element[$key]);
  }
}