function media_soundcloud_styles_styles in Media: SoundCloud 7
Implements hook_styles_styles().
File
- includes/
media_soundcloud.styles.inc, line 74 - media_soundcloud/includes/media_soundcloud.styles.inc Styles definitions for Media: SoundCloud.
Code
function media_soundcloud_styles_styles() {
$styles = array(
'file' => array(
'containers' => array(
'media_soundcloud' => array(
'styles' => array(
'soundcloud_thumbnail' => array(
'name' => 'soundcloud_thumbnail',
'effects' => array(
array(
'label' => t('Thumbnail'),
'name' => 'thumbnail',
'data' => array(
'thumbnail' => 1,
),
),
array(
'label' => t('Resize'),
'name' => 'resize',
'data' => array(
'width' => 100,
'height' => 75,
),
),
),
),
'soundcloud_preview' => array(
'name' => 'soundcloud_preview',
'effects' => array(
array(
'label' => t('Autoplay'),
'name' => 'autoplay',
'data' => array(
'autoplay' => 1,
),
),
array(
'label' => t('Resize'),
'name' => 'resize',
'data' => array(
'width' => 220,
'height' => 165,
),
),
),
),
'soundcloud_full' => array(
'name' => 'soundcloud_full',
'effects' => array(
array(
'label' => t('Autoplay'),
'name' => 'autoplay',
'data' => array(
'autoplay' => 0,
),
),
array(
'label' => t('Resize'),
'name' => 'resize',
'data' => array(
'width' => '100%',
),
),
),
),
),
),
),
),
);
// Allow any image style to be applied to the thumbnail.
foreach (image_styles() as $style_name => $image_style) {
$styles['file']['containers']['media_soundcloud']['styles']['soundcloud_thumbnail_' . $style_name] = array(
'name' => 'soundcloud_thumbnail_' . $style_name,
'image_style' => $style_name,
'effects' => array(
array(
'label' => t('Thumbnail'),
'name' => 'thumbnail',
'data' => array(
'thumbnail' => 1,
),
),
),
);
}
return $styles;
}