function popup_ui_popup_attributes_alter in Popup 8
Same name and namespace in other branches
- 7 modules/popup_ui/popup_ui.module \popup_ui_popup_attributes_alter()
- 7.x modules/popup_ui/popup_ui.module \popup_ui_popup_attributes_alter()
- 6.x modules/popup_ui/popup_ui.module \popup_ui_popup_attributes_alter()
Implementation of hook_popup_attributes_alter Hooked to add format attributes
File
- modules/popup_ui/ popup_ui.module, line 123 
Code
function popup_ui_popup_attributes_alter(&$attributes) {
  if (isset($attributes['format'])) {
    module_load_include('inc', 'popup_ui', 'includes/popup_ui.admin');
    $format_attributes = FALSE;
    $formats = _popup_ui_formatter_settings();
    if (isset($formats[$attributes['format']]) && is_array($formats[$attributes['format']])) {
      // Attributes must always override format settings
      $attributes = array_merge($formats[$attributes['format']], $attributes);
    }
    unset($attributes['format']);
  }
}