You are here

function ais_file_default_displays in Adaptive Image Styles (ais) 7

Implements hook_file_default_displays().

Provides default display configurations for media types.

See also

file_entity_schema()

File

./ais.module, line 193
Adaptive Image Styles Module

Code

function ais_file_default_displays() {
  $default_displays = array();
  $default_image_styles = array(
    'media_adaptive' => 'adaptive',
  );
  foreach ($default_image_styles as $view_mode => $image_style) {
    $display_name = 'image__' . $view_mode . '__file_image';
    $default_displays[$display_name] = (object) array(
      'api_version' => 1,
      'name' => $display_name,
      'status' => 1,
      'weight' => 5,
      'settings' => array(
        'image_style' => $image_style,
      ),
    );
  }
  return $default_displays;
}