You are here

function styleguide_palette in Style Guide 7

Returns the sanitized swatches for a given theme.

Parameters

string $theme: The machine name of the theme.

Return value

array An array of swatches, with all values sanitized.

2 calls to styleguide_palette()
styleguide_palette_page in styleguide_palette/styleguide_palette.admin.inc
Page callback: Displays color swatches.
styleguide_palette_styleguide in styleguide_palette/styleguide_palette.module
Implements hook_styleguide().
6 string references to 'styleguide_palette'
StyleguidePaletteTest::testSwatchTheming in styleguide_palette/styleguide_palette.test
Tests theme functions.
StyleguidePaletteTestBase::setUp in styleguide_palette/styleguide_palette.test
Sets up a Drupal site for running functional and integration tests.
styleguide_palette_form in styleguide_palette/styleguide_palette.admin.inc
Form constructor for the style guide swatch form.
styleguide_palette_menu in styleguide_palette/styleguide_palette.module
Implements hook_menu().
styleguide_palette_styleguide in styleguide_palette/styleguide_palette.module
Implements hook_styleguide().

... See full list

File

styleguide_palette/styleguide_palette.module, line 78
Stores and displays color palettes and swatches.

Code

function styleguide_palette($theme) {
  $swatches = array();
  $results = styleguide_palette_swatch_load_multiple($theme);
  foreach ($results as $swatch) {
    $swatches[] = array_map('check_plain', (array) $swatch);
  }
  return $swatches;
}