You are here

function _popup_theme_array in Popup 7

Same name and namespace in other branches
  1. 8 includes/popup.theme.inc \_popup_theme_array()
  2. 7.x includes/popup.theme.inc \_popup_theme_array()
  3. 6.x includes/popup.util.inc \_popup_theme_array()

generate a theme array for a specific style

1 call to _popup_theme_array()
popup_theme in ./popup.module
Implementation of hook_theme

File

includes/popup.theme.inc, line 12

Code

function _popup_theme_array($style = FALSE, $path = FALSE) {
  $suffix = $style ? '-' . $style : '';
  $theme = array(
    'popup-element' . $suffix => array(
      'arguments' => array(
        'title' => '',
        'body' => '',
        'css_id' => '',
        'class' => '',
        'style' => '',
      ),
      'template' => 'popup-element',
      'preprocess functions' => array(
        'popup_preprocess_popup_element',
      ),
    ),
    'popup-element-body' . $suffix => array(
      'arguments' => array(
        'body' => '',
        'class' => '',
        'close' => '',
      ),
      'template' => 'popup-element-body',
    ),
    'popup-element-title' . $suffix => array(
      'arguments' => array(
        'title' => '',
        'class' => '',
        'href' => '',
      ),
      'template' => 'popup-element-title',
    ),
  );
  if ($path) {
    foreach ($theme as &$element) {
      $element['path'] = $path;
    }
  }
  return $theme;
}