1 color.theme.inc theme_color_preview($variables)

Returns HTML for a theme's color preview.

Parameters

$variables: An associative array containing settings for the preview.

Related topics

File

core/modules/color/color.theme.inc, line 15
Theme functions for the Color module.

Code

function theme_color_preview($variables) {

  $preview_link = l(t('Open preview in a new window'), $variables['preview_url'], array(
    'attributes' => array(
      'target' => '_blank'
    )
  ));

  $output = '<div class="color-preview">';
  $output .= $preview_link;
  $output .= '<object id="preview" data="' . $variables['preview_url'] . '"></iframe>';
  $output .= '</div>';

  return $output;
}