Change default Scald legend or caption output I am sure the setting must be somewhere, but I only want to have the title as a default caption, the author field is irrelevant and the people updating content have to delete it each time.



Update:

I have found that going to Administration > Structure > Scald > Image (/admin/structure/scald/image/player/full/image_figure) I am able to alter the caption for that player, but not for the default player.

I have also found a hook in scald.api.php hook_scald_player(), but this is used like an info hook and using hook_scald_player_alter() does not alter the value:

function mymodule_scald_player_alter(&amp;$players) { // tried referencing
  $players['default']['settings']['caption'] = '[atom:title]';
  return $players; // tried returning
}
It seems that you can alter the settings of players as much as you like, but it won't change the caption text because the pattern is hardcoded in the function theme_sdl_editor_legend() of the Scald module.

So we need to overwrite the output by something of our choice.

The previously mentioned theme function can be overwritten in your themes functions.php. Probably you use a Drupal Core or contributed theme as administrative theme, those template.php files you should not change. Thus the preferred method is below (a custom module).

Below you find a simple example of how to get rid of the "by" part in a custom module.
Effectively we just completely overwrite the output of theme_sdl_editor_legend() using an implementation of the hook_scald_dnd_library_item_alter() hook. You can change $item['meta']['legend'] to any string you like using data from $atom.

/**
 * Alter a scald library item.
 *
 * Implements hook_scald_dnd_library_item_alter()
 *
 * @param $atom
 *   The atom object.
 * @param $item
 *   The scald library item.
 */
function MODULE_scald_dnd_library_item_alter($atom, &amp;$item) {
  $item['meta']['legend'] = "
   &lt;div class='meta'&gt;
    &lt;!--copyright={$atom-&gt;sid}--&gt;{$atom-&gt;rendered-&gt;title}&lt;!--END copyright={$atom-&gt;sid}--&gt;
  &lt;/div&gt;
 ";
}