theme_color_scheme_form

Говорят, каждое переведенное предложение документации продлевает жизнь разработчика на 17 минут. Скорее всего это выдумки, но мы бы были все-равно рады твоей помощи с переводами!

modules/color/color.module, строка 207

Версии
5 – 6
theme_color_scheme_form($form)

Темизирует форму выбора расцветки темы оформления.

Связанные темы

Код

<?php
function theme_color_scheme_form($form) {
  // Include stylesheet
  $theme = $form['theme']['#value'];
  $info = $form['info']['#value'];
  $path = drupal_get_path('theme', $theme) .'/';
  drupal_add_css($path . $info['preview_css']);
  $output = '';
  // Wrapper
  $output .= '<div class="color-form clear-block">';

  // Color schemes
  $output .= drupal_render($form['scheme']);

  // Palette
  $output .= '<div id="palette" class="clear-block">';
  foreach (element_children($form['palette']) as $name) {
    $output .= drupal_render($form['palette'][$name]);
  }
  $output .= '</div>';

  // Preview
  $output .= drupal_render($form);
  $output .= '<h2>'. t('Preview') .'</h2>';
  $output .= '<div id="preview"><div id="text"><h2>Lorem ipsum dolor</h2><p>Sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud <a href="#">exercitation ullamco</a> laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div><div id="img" style="background-image: url('. base_path() . $path . $info['preview_image'] .')"></div></div>';

  // Close wrapper
  $output .= '</div>';

  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему