You are here

function popup_ui_popup_attributes_alter in Popup 6.x

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

Code

function popup_ui_popup_attributes_alter(&$attributes) {
  if ($attributes['format']) {
    module_load_include('inc', 'popup_ui', 'includes/popup_ui.admin');
    $formats = _popup_ui_formatter_settings();
    if (is_array($formats[$attributes['format']])) {
      $format_attributes = array_filter($formats[$attributes['format']]);
    }
    if ($format_attributes) {
      $attributes = array_merge($format_attributes, array_filter($attributes));
    }
    unset($attributes['format']);
  }
}