You are here

function file_styles_styles_default_containers in Styles 7.2

Implementation of Styles module hook_styles_default_containers().

File

contrib/file_styles/includes/styles/file_styles.styles.inc, line 11
styles/contrib/file_styles/includes/styles/file_styles.styles.inc Implementations of various Styles hooks.

Code

function file_styles_styles_default_containers() {
  $containers = array();
  foreach (array(
    'image',
    'audio',
    'video',
    'default',
  ) as $type) {
    $containers[$type] = array(
      'label' => t(ucfirst($type)),
      'class' => 'FileStyles',
    );
  }
  $containers['image']['preview'] = 'file_styles_image_preview';
  return array(
    'file' => array(
      'admin' => array(
        'path' => 'admin/config/media/file-styles',
      ),
      'filter callback' => 'file_styles_styles_filter',
      'help' => t('Each of the following containers defines a set of styles that will be applied when a file is of the specified type. For instance, if a file field allows images and videos, a specific style might be defined for \'Thumbnail\', that will display a cropped image when a JPEG is given, or a thumbnail linking to a shadowboxed video when an MPEG is stored.'),
      'containers' => $containers,
    ),
  );
}