You are here

function juicebox_preprocess_juicebox_debug_markup in Juicebox HTML5 Responsive Image Galleries 7.2

Proprocess logic for the juicebox_debug_markup theme function.

Parameters

array $variables: An associative array containing variables used to render this HTML.

File

themes/juicebox.theme.inc, line 66
Theme related functions for processing output related to Juicebox galleries.

Code

function juicebox_preprocess_juicebox_debug_markup(&$variables) {

  // Calculate the XML link that will be displayed. For this display no query
  // strings should be shown and the link should be absolute.
  $xml_url = url($variables['xml']['path'], array(
    'absolute' => TRUE,
  ));
  $variables['xml_link'] = l($xml_url, $variables['xml']['path'], array(
    'absolute' => TRUE,
  ));

  // Get image count.
  $variables['image_count'] = count($variables['gallery_images']);

  // Get the gallery option list in a displayable format.
  $variables['option_list'] = array();
  foreach ($variables['gallery_options'] as $option_key => $option_value) {
    $variables['option_list'][] = $option_key . '=' . $option_value;
  }

  // Get the library info in a displayable format.
  $library = juicebox_library_detect(FALSE, TRUE);
  $variables['lib_status'] = t('Locally Installed');
  if (empty($library['installed'])) {
    $variables['lib_status'] = t('Not Locally Installed');
  }
  if (!empty($library['version'])) {
    $variables['lib_status'] = $variables['lib_status'] . ', ' . $library['version'];
  }
}