You are here

function popup_ui_popup_attributes_alter in Popup 7

Same name and namespace in other branches
  1. 8 modules/popup_ui/popup_ui.module \popup_ui_popup_attributes_alter()
  2. 7.x modules/popup_ui/popup_ui.module \popup_ui_popup_attributes_alter()
  3. 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']);
  }
}