You are here

function ds_styles in Display Suite 6

Same name and namespace in other branches
  1. 6.3 includes/ds.display.inc \ds_styles()
  2. 6.2 includes/ds.display.inc \ds_styles()

Return styles.

3 calls to ds_styles()
ds_display_overview_form in includes/ds.display.inc
Menu callback; presents a listing of fields display settings for an object type.
ds_fields_display_form in includes/ds.display.inc
Add fields to display overview form.
ds_field_default_form_properties in includes/ds.display.inc
Function to load default form properties for a field in a context
1 string reference to 'ds_styles'
ds_styles_form in includes/ds.display.inc
Menu callback, show styles form.

File

includes/ds.display.inc, line 643
Display overview form.

Code

function ds_styles($variable = '') {
  static $run = FALSE;
  static $styles = array();
  if (!$run) {

    // Field styles.
    $field_styles = _ds_style_parse_variable('ds_styles');
    $styles['fields'] = $field_styles;

    // Region styles.
    $region_styles = _ds_style_parse_variable('ds_styles_regions');
    $styles['regions'] = $region_styles;
    $run = TRUE;
  }
  return empty($variable) ? $styles : (isset($styles[$variable]) ? $styles[$variable] : array());
}