You are here

function ctools_stylizer_get_settings_name in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 includes/stylizer.inc \ctools_stylizer_get_settings_name()

Get a safe name for the settings.

This uses an md5 of the palette if the name is temporary so that multiple temporary styles on the same page can coexist safely.

1 call to ctools_stylizer_get_settings_name()
ctools_stylizer_get_css_class in includes/stylizer.inc
Get the class to use for a stylizer plugin.

File

includes/stylizer.inc, line 196
Create customized CSS and images from palettes created by user input.

Code

function ctools_stylizer_get_settings_name($settings) {
  if ($settings['name'] != '_temporary') {
    return $settings['name'];
  }
  return $settings['name'] . '-' . md5(serialize($settings['palette']));
}