You are here

function hook_scald_transcoders in Scald: Media Management made easy 7

Define information about atom transcoders provided by a module.

Return value

array An $transcoders array of atom transcoders. This array is keyed by the machine-readable transcoder name. Each transcoder is defined as an associative array containing the following item:

  • "title": the human-readable name of the transcoder.
  • "description": the longer description of the transcoder.
  • "formats": array of supported formats for each atom type.

Currently unused.

2 functions implement hook_scald_transcoders()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

scald_image_scald_transcoders in modules/providers/scald_image/scald_image.module
Implements hook_scald_transcoders().
scald_scald_transcoders in ./scald.module
Implements hook_scald_transcoders().

File

./scald.api.php, line 147
Hooks related to Scald atoms and providers.

Code

function hook_scald_transcoders() {
  $transcoders = array();
  foreach (image_styles() as $name => $style) {
    $label = isset($style['label']) ? $style['label'] : $style['name'];
    $transcoders['style-' . $name] = array(
      'title' => t('@style (Image style)', array(
        '@style' => $label,
      )),
      'description' => t('Use the Image style @style to prepare the image', array(
        '@style' => $label,
      )),
      'formats' => array(
        'image' => 'passthrough',
      ),
    );
  }
  return $transcoders;
}